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. It has since been used for various applications, including geospatial and high-performance scientific computing.

General form

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

p=d0+Bd1+B2d2+…

Generalized balanced ternary uses a transformation matrix as its base B. Digits are vectors chosen from a finite subset {D0=0,D1,…,Dn} 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×1 matrix, and the digits Di are length-1 vectors, so they appear here without the extra brackets.

B=3D0=0D1=1D2=−1

Addition table

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

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 D1,…,D6 are six points arranged in a regular hexagon centered at D0=0.

B=12[53−35]D0=0D1=(0,3)D2=(32,−32)D3=(32,32)D4=(−32,−32)D5=(−32,32)D6=(0,−3)

Addition table

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

Addition
+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.

See also