Generalized balanced ternary

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.{{cite journal |last1=Gibson |first1=Laurie |last2=Lucas |first2=Dean |title=Spatial Data Processing Using Generalized Balanced Ternary |journal=Proceedings of the IEEE Computer Society Conference on Pattern Recognition and Image Processing |date=1982 |pages=566–571}} It has since been used for various applications, including geospatial{{cite journal |last1=Sahr |first1=Kevin |title=Hexagonal Discrete Global Grid Systems for Geospatial Computing|journal=Archives of Photogrammetry, Cartography and Remote Sensing |date=2011-01-01 |volume=22 |page=363 |bibcode=2011ArFKT..22..363S |url=http://webpages.sou.edu/~sahrk/sqspc/pubs/sahrMMT11us.pdf}} and high-performance scientific{{cite journal |last1=de Kinder |first1=R. E. Jr. |last2=Barnes |first2=J. R. |title=The Generalized Balanced Ternary (GBT) Applied to High-Performance Computational Algorithms |journal=APS Meeting Abstracts |date=August 1997|bibcode=1997APS..CPC..C409D }} computing.

General form

Like standard positional numeral systems, generalized balanced ternary represents a point p as powers of a base B multiplied by digits d_i.

p = d_0 + B d_1 + B^2 d_2 + \ldots

Generalized balanced ternary uses a transformation matrix as its base B. Digits are vectors chosen from a finite subset \{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 is a 1\times 1 matrix, and the digits D_i are length-1 vectors, so they appear here without the extra brackets.

\begin{align}B &= 3 \\ D_0 &= 0 \\ D_1 &= 1 \\ D_2 &= -1\end{align}

= Addition table =

This is the same addition table as standard balanced ternary, but with D_2 replacing T. To make the table easier to read, the numeral i is written instead of D_i.

:

class="wikitable" style="width: 8em; text-align: center;"

|+ Addition

align="right"

! + !! 0 !! 1 !! 2

0

| 0 || 1 || 2

1

| 1 || 12 || 0

2

| 2 || 0 || 21

Two dimensions

File:Visualization of three-digit 2D generalized balanced ternary numbers.png

In two dimensions, there are seven digits. The digits D_1, \ldots, D_6 are six points arranged in a regular hexagon centered at D_0 = 0.{{cite journal |last1=van Roessel |first1=Jan W. |title=Conversion of Cartesian coordinates from and to Generalized Balanced Ternary addresses |journal=Photogrammetric Engineering and Remote Sensing |date=1988 |volume=54 |pages=1565–1570 |url=https://www.asprs.org/wp-content/uploads/pers/1988journal/nov/1988_nov_1565-1570.pdf}}

\begin{align}

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{align}

= Addition table =

As in the one-dimensional addition table, the numeral i is written instead of D_i (despite e.g. D_2 having no particular relationship to the number 2).

:

class="wikitable" style="width: 8em; text-align: center;"

|+ Addition

align="right"

! + !! 0 !! 1 !! 2 !! 3 !! 4 !! 5 !! 6

0

| 0 || 1 || 2 || 3 || 4 || 5 || 6

1

| 1 || 12 || 3 || 34 || 5 || 16 || 0

2

| 2 || 3 || 24 || 25 || 6 || 0 || 61

3

| 3 || 34 || 25 || 36 || 0 || 1 || 2

4

| 4 || 5 || 6 || 0 || 41 || 52 || 43

5

| 5 || 16 || 0 || 1 || 52 || 53 || 4

6

| 6 || 0 || 61 || 2 || 43 || 4 || 65

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.

See also

References

{{reflist}}