Generalized balanced ternary is a generalization of the
balanced ternary
Balanced ternary is a ternary numeral system (i.e. base 3 with three Numerical digit, digits) that uses a balanced signed-digit representation of the integers in which the digits have the values −1, 0, and 1. This stands in contrast to the stand ...
numeral system
A numeral system is a writing system for expressing numbers; that is, a mathematical notation for representing numbers of a given set, using digits or other symbols in a consistent manner.
The same sequence of symbols may represent differe ...
to represent points in a higher-dimensional
space
Space is a three-dimensional continuum containing positions and directions. In classical physics, physical space is often conceived in three linear dimensions. Modern physicists usually consider it, with time, to be part of a boundless ...
. 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 system
Positional notation, also known as place-value notation, positional numeral system, or simply place value, usually denotes the extension to any base of the Hindu–Arabic numeral system (or decimal system). More generally, a positional system ...
s, generalized balanced ternary represents a point
as powers of a base
multiplied by digits
.
Generalized balanced ternary uses a
transformation matrix
In linear algebra, linear transformations can be represented by matrices. If T is a linear transformation mapping \mathbb^n to \mathbb^m and \mathbf x is a column vector with n entries, then there exists an m \times n matrix A, called the transfo ...
as its base
. Digits are
vectors chosen from a finite subset
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).
is a
matrix, and the digits
are length-1 vectors, so they appear here without the extra brackets.
Addition table
This is the same addition table as standard balanced ternary, but with
replacing T. To make the table easier to read, the numeral
is written instead of
.
:
Two dimensions

In two dimensions, there are seven digits. The digits
are six points arranged in a regular hexagon centered at
.
Addition table
As in the one-dimensional addition table, the numeral
is written instead of
(despite e.g.
having no particular relationship to the number 2).
:
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
*
Gosper curve
The Gosper curve, named after Bill Gosper, also known as the Peano-Gosper Curve and the flowsnake (a spoonerism of Koch snowflake, snowflake), is a space-filling curve whose limit set is rep-tile, rep-7. It is a fractal curve similar in its cons ...
References
{{reflist
External links
Spiral Honeycomb Mosaic another name for the two-dimensional form of this numbering system
"Clever Hex Grid Method"discussion on rec.games.roguelike.development
Non-standard positional numeral systems