Generalized balanced ternary

☆ Save On Wikipedia ↗

Generalized balanced ternary is a generalization of the balanced ternary numeral system to represent points in a higher-dimensional space. It was first described in 1982 by Laurie Gibson and Dean Lucas.[1] It has since been used for various applications, including geospatial[2] and high-performance scientific[3] computing.

General form

Like standard positional numeral systems, generalized balanced ternary represents a point p {\displaystyle p} {\displaystyle p} as powers of a base B {\displaystyle B} {\displaystyle B} multiplied by digits d i {\displaystyle d_{i}} {\displaystyle d_{i}}.

p = d 0 + B d 1 + B 2 d 2 + … {\displaystyle p=d_{0}+Bd_{1}+B^{2}d_{2}+\ldots } {\displaystyle p=d_{0}+Bd_{1}+B^{2}d_{2}+\ldots }

Generalized balanced ternary uses a transformation matrix as its base B {\displaystyle B} {\displaystyle B}. Digits are vectors chosen from a finite subset { D 0 = 0 , D 1 , … , D n } {\displaystyle \{D_{0}=0,D_{1},\ldots ,D_{n}\}} {\displaystyle \{D_{0}=0,D_{1},\ldots ,D_{n}\}} of the underlying space.

One dimension

In one dimension, generalized balanced ternary is equivalent to standard balanced ternary, with three digits (0, 1, and −1). B {\displaystyle B} {\displaystyle B} is a 1 × 1 {\displaystyle 1\times 1} {\displaystyle 1\times 1} matrix, and the digits D i {\displaystyle D_{i}} {\displaystyle D_{i}} are length-1 vectors, so they appear here without the extra brackets.

B = 3 D 0 = 0 D 1 = 1 D 2 = − 1 {\displaystyle {\begin{aligned}B&=3\\D_{0}&=0\\D_{1}&=1\\D_{2}&=-1\end{aligned}}} {\displaystyle {\begin{aligned}B&=3\\D_{0}&=0\\D_{1}&=1\\D_{2}&=-1\end{aligned}}}

Addition table

This is the same addition table as standard balanced ternary, but with D 2 {\displaystyle D_{2}} {\displaystyle D_{2}} replacing T. To make the table easier to read, the numeral i {\displaystyle i} {\displaystyle i} is written instead of D i {\displaystyle D_{i}} {\displaystyle D_{i}}.

Addition
+012
0 012
1 1120
2 2021

Two dimensions

The 2D points addressable by three generalized balanced ternary digits. Each point is addressed by its path from the origin; the six colors correspond to the six non-zero digits.

In two dimensions, there are seven digits. The digits D 1 , … , D 6 {\displaystyle D_{1},\ldots ,D_{6}} {\displaystyle D_{1},\ldots ,D_{6}} are six points arranged in a regular hexagon centered at D 0 = 0 {\displaystyle D_{0}=0} {\displaystyle D_{0}=0}.[4]

B = 1 2 [ 5 3 − 3 5 ] D 0 = 0 D 1 = ( 0 , 3 ) D 2 = ( 3 2 , − 3 2 ) D 3 = ( 3 2 , 3 2 ) D 4 = ( − 3 2 , − 3 2 ) D 5 = ( − 3 2 , 3 2 ) D 6 = ( 0 , − 3 ) {\displaystyle {\begin{aligned}B&={\frac {1}{2}}{\begin{bmatrix}5&{\sqrt {3}}\\-{\sqrt {3}}&5\end{bmatrix}}\\D_{0}&=0\\D_{1}&=\left(0,{\sqrt {3}}\right)\\D_{2}&=\left({\frac {3}{2}},-{\frac {\sqrt {3}}{2}}\right)\\D_{3}&=\left({\frac {3}{2}},{\frac {\sqrt {3}}{2}}\right)\\D_{4}&=\left(-{\frac {3}{2}},-{\frac {\sqrt {3}}{2}}\right)\\D_{5}&=\left(-{\frac {3}{2}},{\frac {\sqrt {3}}{2}}\right)\\D_{6}&=\left(0,-{\sqrt {3}}\right)\\\end{aligned}}} {\displaystyle {\begin{aligned}B&={\frac {1}{2}}{\begin{bmatrix}5&{\sqrt {3}}\\-{\sqrt {3}}&5\end{bmatrix}}\\D_{0}&=0\\D_{1}&=\left(0,{\sqrt {3}}\right)\\D_{2}&=\left({\frac {3}{2}},-{\frac {\sqrt {3}}{2}}\right)\\D_{3}&=\left({\frac {3}{2}},{\frac {\sqrt {3}}{2}}\right)\\D_{4}&=\left(-{\frac {3}{2}},-{\frac {\sqrt {3}}{2}}\right)\\D_{5}&=\left(-{\frac {3}{2}},{\frac {\sqrt {3}}{2}}\right)\\D_{6}&=\left(0,-{\sqrt {3}}\right)\\\end{aligned}}}

Addition table

As in the one-dimensional addition table, the numeral i {\displaystyle i} {\displaystyle i} is written instead of D i {\displaystyle D_{i}} {\displaystyle D_{i}} (despite e.g. D 2 {\displaystyle D_{2}} {\displaystyle D_{2}} having no particular relationship to the number 2).

Addition[4]
+0123456
0 0123456
1 1123345160
2 2324256061
3 3342536012
4 4560415243
5 5160152534
6 6061243465

If there are two numerals in a cell, the left one is carried over to the next digit. Unlike standard addition, addition of two-dimensional generalized balanced ternary numbers may require multiple carries to be performed while computing a single digit.[4]

See also

References

  1. Gibson, Laurie; Lucas, Dean (1982). "Spatial Data Processing Using Generalized Balanced Ternary". Proceedings of the IEEE Computer Society Conference on Pattern Recognition and Image Processing: 566–571.
  2. Sahr, Kevin (2011-01-01). "Hexagonal Discrete Global Grid Systems for Geospatial Computing" (PDF). Archives of Photogrammetry, Cartography and Remote Sensing. 22: 363. Bibcode:2011ArFKT..22..363S.
  3. de Kinder, R. E. Jr.; Barnes, J. R. (August 1997). "The Generalized Balanced Ternary (GBT) Applied to High-Performance Computational Algorithms". APS Meeting Abstracts. Bibcode:1997APS..CPC..C409D.
  4. van Roessel, Jan W. (1988). "Conversion of Cartesian coordinates from and to Generalized Balanced Ternary addresses" (PDF). Photogrammetric Engineering and Remote Sensing. 54: 1565–1570.