HOME

TheInfoList



OR:

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 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 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 B. 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). B is a 1\times 1 matrix, and the digits D_i are length-1 vectors, so they appear here without the extra brackets. \beginB &= 3 \\ D_0 &= 0 \\ D_1 &= 1 \\ D_2 &= -1\end


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. :


Two dimensions

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. \begin B &= \frac\begin 5 & \sqrt \\ -\sqrt & 5 \end \\ D_0 &= 0 \\ D_1 &= \left( 0, \sqrt \right) \\ D_2 &= \left( \frac, -\frac \right) \\ D_3 &= \left( \frac, \frac \right) \\ D_4 &= \left( -\frac, -\frac \right) \\ D_5 &= \left( -\frac, \frac \right) \\ D_6 &= \left( 0, -\sqrt \right) \\ \end


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). : 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