complex-base system

{{short description|Positional numeral system}}

{{Numeral systems}}

In arithmetic, a complex-base system is a positional numeral system whose radix is an imaginary (proposed by Donald Knuth in 1955{{cite journal |last=Knuth |first=D.E. |title=An Imaginary Number System |journal=Communications of the ACM |year=1960 |volume=3 |issue=4 |pages=245–247 |doi=10.1145/367177.367233|s2cid=16513137 |doi-access=free }}{{cite book |last=Knuth |first=Donald |authorlink=Donald Knuth |title=The art of computer programming |publisher=Addison-Wesley |location=Boston |year=1998 |volume=2 |edition=3rd |pages=205 |isbn=0-201-89684-2 |chapter=Positional Number Systems |oclc=48246681}}) or complex number (proposed by S. Khmelnik in 1964{{cite journal |last=Khmelnik |first=S.I. |title=Specialized digital computer for operations with complex numbers

|journal=Questions of Radio Electronics (In Russian)|volume=XII |issue=2 |year=1964}} and Walter F. Penney in 1965W. Penney, A "binary" system for complex numbers, JACM 12 (1965) 247-248.{{cite journal |last=Jamil |first=T. |year=2002 |title=The complex binary number system |journal=IEEE Potentials |volume=20 |pages=39–41 |doi=10.1109/45.983342 |issue=5}}{{cite arXiv |last=Duda |first=Jarek |date=2008-02-24 |title=Complex base numeral systems |eprint=0712.1309 |class=math.DS }}).

In general

Let D be an integral domain \subset \C, and |\cdot| the (Archimedean) absolute value on it.

A number X\in D in a positional number system is represented as an expansion

: X = \pm \sum_{\nu}^{ } x_\nu \rho^\nu,

where

:

class="table left"
\rho \in Dis the radix (or base) with |\rho| > 1,
\nu \in \Zis the exponent (position or place),
x_\nuare digits from the finite set of digits Z \subset D, usually with |x_\nu| < |\rho|.

The cardinality R:=|Z| is called the level of decomposition.

A positional number system or coding system is a pair

: \left\langle \rho, Z \right\rangle

with radix \rho and set of digits Z, and we write the standard set of digits with R digits as

: Z_R := \{0, 1, 2,\dotsc, {R-1}\}.

Desirable are coding systems with the features:

  • Every number in D, e. g. the integers \Z, the Gaussian integers \Z[\mathrm i] or the integers \Z[\tfrac{-1+\mathrm i\sqrt7}2], is uniquely representable as a finite code, possibly with a sign ±.
  • Every number in the field of fractions K:=\operatorname{Quot}(D), which possibly is completed for the metric given by |\cdot| yielding K:=\R or K:=\C, is representable as an infinite series X which converges under |\cdot| for \nu \to -\infty, and the measure of the set of numbers with more than one representation is 0. The latter requires that the set Z be minimal, i.e. R=|\rho| for real numbers and R=|\rho|^2 for complex numbers.

In the real numbers

In this notation our standard decimal coding scheme is denoted by

:\left\langle 10, Z_{10} \right\rangle,

the standard binary system is

:\left\langle 2, Z_2 \right\rangle,

the negabinary system is

:\left\langle -2, Z_2 \right\rangle,

and the balanced ternary system is

:\left\langle 3, \{-1,0,1\} \right\rangle.

All these coding systems have the mentioned features for \Z and \R, and the last two do not require a sign.

In the complex numbers

Well-known positional number systems for the complex numbers include the following (\mathrm i being the imaginary unit):

  • \left\langle\sqrt{R},Z_R\right\rangle, e.g. \left\langle\pm \mathrm i \sqrt{2},Z_2\right\rangle and

:\left\langle\pm 2\mathrm i,Z_4\right\rangle, the quater-imaginary base, proposed by Donald Knuth in 1955.

  • \left\langle\sqrt{2}e^{\pm \tfrac{\pi}2 \mathrm i}=\pm \mathrm i\sqrt{2},Z_2\right\rangle and

:\left\langle\sqrt{2}e^{\pm \tfrac{3 \pi}4 \mathrm i}=-1\pm\mathrm i,Z_2\right\rangle (see also the section Base −1 ± i below).

  • \left\langle\sqrt{R}e^{\mathrm i\varphi},Z_R\right\rangle, where \varphi=\pm \arccos{(-\beta/(2\sqrt{R}))}, \beta<\min(R, 2\sqrt{R}) and \beta_{ }^{ } is a positive integer that can take multiple values at a given R.{{cite journal |last=Khmelnik |first=S.I. |title=Positional coding of complex numbers

|journal=Questions of Radio Electronics (In Russian)|volume=XII |issue=9 |year=1966}} For \beta=1 and R=2 this is the system

:\left\langle\tfrac{-1+\mathrm i\sqrt7}2,Z_2\right\rangle.

  • \left\langle 2e^{\tfrac{\pi}3 \mathrm i},A_4:=\left\{0,1,e^{\tfrac{2 \pi}3 \mathrm i},e^{-\tfrac{2 \pi}3 \mathrm i}\right\}\right\rangle.{{cite book |last=Khmelnik |first=S.I. |title=Coding of Complex Numbers and Vectors (in Russian)|publisher=Mathematics in Computer |location=Israel |isbn=978-0-557-74692-7 | year=2004 |url=http://mic34.com/Magazine/94846.pdf}}
  • \left\langle-R,A_R^2\right\rangle, where the set A_R^2 consists of complex numbers r_\nu=\alpha_\nu^1+\alpha_\nu^2\mathrm i, and numbers \alpha_\nu^{ } \in Z_R, e.g.

:\left\langle -2, \{0,1,\mathrm i,1+\mathrm i\}\right\rangle.

  • \left\langle\rho=\rho_2,Z_2\right\rangle, where \rho_2=\begin{cases}

(-2)^{\tfrac{\nu}2} & \text{if } \nu \text{ even,}\\

(-2)^{\tfrac{\nu-1}2}\mathrm i & \text{if } \nu \text{ odd.}

\end{cases} {{cite book |last=Khmelnik |first=S.I. |title=Method and system for processing complex numbers |url=http://worldwide.espacenet.com/publicationDetails/biblio?DB=EPODOC&adjacent=true&locale=en_EP&FT=D&date=20030814&CC=US&NR=2003154226A1&KC=A1 |publisher=Patent USA, US2003154226 (A1) |year=2001 }}

Binary systems

Binary coding systems of complex numbers, i.e. systems with the digits Z_2=\{0,1\}, are of practical interest.

Listed below are some coding systems \langle \rho, Z_2 \rangle (all are special cases of the systems above) and resp. codes for the (decimal) numbers {{math|−1, 2, −2, i}}.

The standard binary (which requires a sign, first line) and the "negabinary" systems (second line) are also listed for comparison. They do not have a genuine expansion for {{math|i}}.

class="wikitable" style="text-align: right;"

|+ Some bases and some representations[http://www.math.uwaterloo.ca/~wgilbert/Research/ArithCxBases.pdf William J. Gilbert, "Arithmetic in Complex Bases" Mathematics Magazine Vol. 57, No. 2, March 1984]

style="text-align: right;" | Radix

! style="text-align: left;" | –1 ←

! style="text-align: left;" | 2 ←

! style="text-align: left;" | –2 ←

! style="text-align: left;" |{{math|i}} ←

! style="text-align: center;" colspan="2" | Twins and triplets

2–110–10{{math|i}}style="border-right: white" | 1 ←0.1 = 1.0
–21111010{{math|i}}{{sfrac|1|3}} ←0.01 = 1.10
\mathrm i\sqrt{2}1011010010010.101010100...infinite non-repeating sequence\frac{1}{3}+\frac{1}{3}\mathrm i \sqrt{2}0.0011 = 11.1100
\frac{-1 + \mathrm{i}\sqrt{7}}{2}111101011011.110001100...\frac{3+\mathrm i\sqrt{7}}{4}1.011 = 11.101 = 11100.110
\rho_2 1011010010010{{sfrac|1|3}} + {{sfrac|1|3}}{{math|i}} ←0.0011 = 11.1100
–1+{{math|i}}1110111001110011{{sfrac|1|5}} + {{sfrac|3|5}}{{math|i}} ←0.010 = 11.001 = 1110.100
2{{math|i}}103210210.2{{sfrac|1|5}} + {{sfrac|2|5}}{{math|i}} ←0.0033 = 1.3003 = 10.0330 = 11.3300

As in all positional number systems with an Archimedean absolute value, there are some numbers with multiple representations. Examples of such numbers are shown in the right column of the table. All of them are repeating fractions with the repetend marked by a horizontal line above it.

If the set of digits is minimal, the set of such numbers has a measure of 0. This is the case with all the mentioned coding systems.

The almost binary quater-imaginary system is listed in the bottom line for comparison purposes. There, real and imaginary part interleave each other.

Base {{math|−1 ± i}}

Image:ComplexTwindragon.svg

Of particular interest are the quater-imaginary base (base {{math|2i}}) and the base {{math|−1 ± i}} systems discussed below, both of which can be used to finitely represent the Gaussian integers without sign.

Base {{math|−1 ± i}}, using digits {{math|0}} and {{math|1}}, was proposed by S. Khmelnik in 1964 and Walter F. Penney in 1965.

= Connection to the twindragon =

The rounding region of an integer – i.e., a set S of complex (non-integer) numbers that share the integer part of their representation in this system – has in the complex plane a fractal shape: the twindragon (see figure). This set S is, by definition, all points that can be written as \textstyle \sum_{k\geq 1}x_k (\mathrm i-1)^{-k} with x_k\in Z_2. S can be decomposed into 16 pieces congruent to \tfrac14 S. Notice that if S is rotated counterclockwise by 135°, we obtain two adjacent sets congruent to \tfrac{1}{\sqrt{2}}S, because (\mathrm i-1)S=S\cup(S+1). The rectangle R\subset S in the center intersects the coordinate axes counterclockwise at the following points: \tfrac2{15}\gets 0.\overline{00001100}, \tfrac1{15} \mathrm i\gets 0.\overline{00000011}, and -\tfrac8{15}\gets 0.\overline{11000000}, and -\tfrac4{15} \mathrm i\gets 0.\overline{00110000}. Thus, S contains all complex numbers with absolute value ≤ {{sfrac|1|15}}.Knuth 1998 p.206

As a consequence, there is an injection of the complex rectangle

: [-\tfrac8{15},\tfrac2{15}]\times[-\tfrac4{15},\tfrac1{15}]\mathrm i

into the interval [0,1) of real numbers by mapping

: \textstyle \sum_{k\geq 1}x_k (\mathrm i-1)^{-k} \mapsto \sum_{k\geq 1}x_k b^{-k}

with b > 2.Base b = 2 cannot be taken because both, \textstyle 2^{-1} = 0.1_{\text{bin}} = 0.5_{\text{dec}} and \textstyle \sum_{k\geq 2} 2^{-k} = 0.0\overline{1}_{\text{bin}} = 0.1_{\text{bin}} = 0.5_{\text{dec}}. However, \textstyle (\mathrm i-1)^{-1} = -0.1_{\text{bin}} -0.1_{\text{bin}} \mathrm i = -0.5_{\text{dec}} -0.5_{\text{dec}} \mathrm i   is unequal to   \textstyle \sum_{k\geq 2} (\mathrm i-1)^{-k} = 0.1_{\text{dec}} +0.3_{\text{dec}} \mathrm i .

Furthermore, there are the two mappings

:\begin{array}{lll}

Z_2^\N & \to & S \\

\left(x_k\right)_{k\in\N} & \mapsto & \sum_{k\geq 1}x_k (\mathrm i-1)^{-k}

\end{array}

and

:\begin{array}{lll}

Z_2^\N & \to & [0,1) \\

\left(x_k\right)_{k\in\N} & \mapsto & \sum_{k\geq 1}x_k 2^{-k}

\end{array}

both surjective, which give rise to a surjective (thus space-filling) mapping

:[0,1) \qquad \to \qquad S

which, however, is not continuous and thus not a space-filling curve. But a very close relative, the Davis-Knuth dragon, is continuous and a space-filling curve.

See also

References

{{reflist}}