Complex-base system

From HandWiki
Short description: Positional numeral system

In arithmetic, a complex-base system is a positional numeral system whose radix is an imaginary (proposed by Donald Knuth in 1955[1][2]) or complex number (proposed by S. Khmelnik in 1964[3] and Walter F. Penney in 1965[4][5][6]).

In general

Let [math]\displaystyle{ D }[/math] be an integral domain [math]\displaystyle{ \subset \C }[/math], and [math]\displaystyle{ |\cdot| }[/math] the (Archimedean) absolute value on it.

A number [math]\displaystyle{ X\in D }[/math] in a positional number system is represented as an expansion

[math]\displaystyle{ X = \pm \sum_{\nu}^{ } x_\nu \rho^\nu, }[/math]

where

[math]\displaystyle{ \rho \in D }[/math] is the radix (or base) with [math]\displaystyle{ |\rho| \gt 1 }[/math],
[math]\displaystyle{ \nu \in \Z }[/math] is the exponent (position or place),
[math]\displaystyle{ x_\nu }[/math] are digits from the finite set of digits [math]\displaystyle{ Z \subset D }[/math], usually with [math]\displaystyle{ |x_\nu| \lt |\rho|. }[/math]

The cardinality [math]\displaystyle{ R:=|Z| }[/math] is called the level of decomposition.

A positional number system or coding system is a pair

[math]\displaystyle{ \left\langle \rho, Z \right\rangle }[/math]

with radix [math]\displaystyle{ \rho }[/math] and set of digits [math]\displaystyle{ Z }[/math], and we write the standard set of digits with [math]\displaystyle{ R }[/math] digits as

[math]\displaystyle{ Z_R := \{0, 1, 2,\dotsc, {R-1}\}. }[/math]

Desirable are coding systems with the features:

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

In the real numbers

In this notation our standard decimal coding scheme is denoted by

[math]\displaystyle{ \left\langle 10, Z_{10} \right\rangle, }[/math]

the standard binary system is

[math]\displaystyle{ \left\langle 2, Z_2 \right\rangle, }[/math]

the negabinary system is

[math]\displaystyle{ \left\langle -2, Z_2 \right\rangle, }[/math]

and the balanced ternary system[2] is

[math]\displaystyle{ \left\langle 3, \{-1,0,1\} \right\rangle. }[/math]

All these coding systems have the mentioned features for [math]\displaystyle{ \Z }[/math] and [math]\displaystyle{ \R }[/math], 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 ([math]\displaystyle{ \mathrm i }[/math] being the imaginary unit):

  • [math]\displaystyle{ \left\langle\sqrt{R},Z_R\right\rangle }[/math], e.g. [math]\displaystyle{ \left\langle\pm \mathrm i \sqrt{2},Z_2\right\rangle }[/math] [1] and
[math]\displaystyle{ \left\langle\pm 2\mathrm i,Z_4\right\rangle }[/math],[2] the quater-imaginary base, proposed by Donald Knuth in 1955.
  • [math]\displaystyle{ \left\langle\sqrt{2}e^{\pm \tfrac{\pi}2 \mathrm i}=\pm \mathrm i\sqrt{2},Z_2\right\rangle }[/math] and
[math]\displaystyle{ \left\langle\sqrt{2}e^{\pm \tfrac{3 \pi}4 \mathrm i}=-1\pm\mathrm i,Z_2\right\rangle }[/math][3][5] (see also the section Base −1 ± i below).
  • [math]\displaystyle{ \left\langle\sqrt{R}e^{\mathrm i\varphi},Z_R\right\rangle }[/math], where [math]\displaystyle{ \varphi=\pm \arccos{(-\beta/(2\sqrt{R}))} }[/math], [math]\displaystyle{ \beta\lt \min(R, 2\sqrt{R}) }[/math] and [math]\displaystyle{ \beta_{ }^{ } }[/math] is a positive integer that can take multiple values at a given [math]\displaystyle{ R }[/math].[7] For [math]\displaystyle{ \beta=1 }[/math] and [math]\displaystyle{ R=2 }[/math] this is the system
[math]\displaystyle{ \left\langle\tfrac{-1+\mathrm i\sqrt7}2,Z_2\right\rangle. }[/math]
  • [math]\displaystyle{ \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 }[/math].[8]
  • [math]\displaystyle{ \left\langle-R,A_R^2\right\rangle }[/math], where the set [math]\displaystyle{ A_R^2 }[/math] consists of complex numbers [math]\displaystyle{ r_\nu=\alpha_\nu^1+\alpha_\nu^2\mathrm i }[/math], and numbers [math]\displaystyle{ \alpha_\nu^{ } \in Z_R }[/math], e.g.
[math]\displaystyle{ \left\langle -2, \{0,1,\mathrm i,1+\mathrm i\}\right\rangle. }[/math][8]
  • [math]\displaystyle{ \left\langle\rho=\rho_2,Z_2\right\rangle }[/math], where [math]\displaystyle{ \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} }[/math] [9]

Binary systems

Binary coding systems of complex numbers, i.e. systems with the digits [math]\displaystyle{ Z_2=\{0,1\} }[/math], are of practical interest.[9] Listed below are some coding systems [math]\displaystyle{ \langle \rho, Z_2 \rangle }[/math] (all are special cases of the systems above) and resp. codes for the (decimal) numbers −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 i.

Some bases and some representations[10]
Radix –1 ← 2 ← –2 ← i Twins and triplets
2 –1 10 –10 i 1 ← 0.1 = 1.0
–2 11 110 10 i 1/3 0.01 = 1.10
[math]\displaystyle{ \mathrm i\sqrt{2} }[/math] 101 10100 100 10.101010100...[11] [math]\displaystyle{ \frac{1}{3}+\frac{1}{3}\mathrm i \sqrt{2} }[/math] 0.0011 = 11.1100
[math]\displaystyle{ \frac{-1 + \mathrm{i}\sqrt{7}}{2} }[/math] 111 1010 110 11.110001100...[11] [math]\displaystyle{ \frac{3+\mathrm i\sqrt{7}}{4} }[/math] 1.011 = 11.101 = 11100.110
[math]\displaystyle{ \rho_2 }[/math] 101 10100 100 10 1/3 + 1/3i 0.0011 = 11.1100
–1+i 11101 1100 11100 11 1/5 + 3/5i 0.010 = 11.001 = 1110.100
2i 103 2 102 10.2 1/5 + 2/5i 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 −1 ± i

The complex numbers with integer part all zeroes in the base i – 1 system

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

Base −1 ± i, using digits 0 and 1, was proposed by S. Khmelnik in 1964[3] and Walter F. Penney in 1965.[4][6]

Connection to the twindragon

The rounding region of an integer – i.e., a set [math]\displaystyle{ S }[/math] 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 [math]\displaystyle{ S }[/math] is, by definition, all points that can be written as [math]\displaystyle{ \textstyle \sum_{k\geq 1}x_k (\mathrm i-1)^{-k} }[/math] with [math]\displaystyle{ x_k\in Z_2 }[/math]. [math]\displaystyle{ S }[/math] can be decomposed into 16 pieces congruent to [math]\displaystyle{ \tfrac14 S }[/math]. Notice that if [math]\displaystyle{ S }[/math] is rotated counterclockwise by 135°, we obtain two adjacent sets congruent to [math]\displaystyle{ \tfrac{1}{\sqrt{2}}S }[/math], because [math]\displaystyle{ (\mathrm i-1)S=S\cup(S+1) }[/math]. The rectangle [math]\displaystyle{ R\subset S }[/math] in the center intersects the coordinate axes counterclockwise at the following points: [math]\displaystyle{ \tfrac2{15}\gets 0.\overline{00001100} }[/math], [math]\displaystyle{ \tfrac1{15} \mathrm i\gets 0.\overline{00000011} }[/math], and [math]\displaystyle{ -\tfrac8{15}\gets 0.\overline{11000000} }[/math], and [math]\displaystyle{ -\tfrac4{15} \mathrm i\gets 0.\overline{00110000} }[/math]. Thus, [math]\displaystyle{ S }[/math] contains all complex numbers with absolute value ≤ 1/15.[12]

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

[math]\displaystyle{ [-\tfrac8{15},\tfrac2{15}]\times[-\tfrac4{15},\tfrac1{15}]\mathrm i }[/math]

into the interval [math]\displaystyle{ [0,1) }[/math] of real numbers by mapping

[math]\displaystyle{ \textstyle \sum_{k\geq 1}x_k (\mathrm i-1)^{-k} \mapsto \sum_{k\geq 1}x_k b^{-k} }[/math]

with [math]\displaystyle{ b \gt 2 }[/math].[13]

Furthermore, there are the two mappings

[math]\displaystyle{ \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} }[/math]

and

[math]\displaystyle{ \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} }[/math]

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

[math]\displaystyle{ [0,1) \qquad \to \qquad S }[/math]

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

  1. 1.0 1.1 Knuth, D.E. (1960). "An Imaginary Number System". Communications of the ACM 3 (4): 245–247. doi:10.1145/367177.367233. 
  2. 2.0 2.1 2.2 Knuth, Donald (1998). "Positional Number Systems". The art of computer programming. 2 (3rd ed.). Boston: Addison-Wesley. pp. 205. ISBN 0-201-89684-2. OCLC 48246681. 
  3. 3.0 3.1 3.2 Khmelnik, S.I. (1964). "Specialized digital computer for operations with complex numbers". Questions of Radio Electronics (In Russian) XII (2). 
  4. 4.0 4.1 W. Penney, A "binary" system for complex numbers, JACM 12 (1965) 247-248.
  5. 5.0 5.1 Jamil, T. (2002). "The complex binary number system". IEEE Potentials 20 (5): 39–41. doi:10.1109/45.983342. 
  6. 6.0 6.1 Duda, Jarek (2008-02-24). "Complex base numeral systems". arXiv:0712.1309 [math.DS].
  7. Khmelnik, S.I. (1966). "Positional coding of complex numbers". Questions of Radio Electronics (In Russian) XII (9). 
  8. 8.0 8.1 Khmelnik, S.I. (2004). Coding of Complex Numbers and Vectors (in Russian). Israel: Mathematics in Computer. ISBN 978-0-557-74692-7. http://mic34.com/Magazine/94846.pdf. 
  9. 9.0 9.1 Khmelnik, S.I. (2001). Method and system for processing complex numbers. Patent USA, US2003154226 (A1). http://worldwide.espacenet.com/publicationDetails/biblio?DB=EPODOC&adjacent=true&locale=en_EP&FT=D&date=20030814&CC=US&NR=2003154226A1&KC=A1. 
  10. William J. Gilbert, "Arithmetic in Complex Bases" Mathematics Magazine Vol. 57, No. 2, March 1984
  11. 11.0 11.1 infinite non-repeating sequence
  12. Knuth 1998 p.206
  13. Base [math]\displaystyle{ b = 2 }[/math] cannot be taken because both, [math]\displaystyle{ \textstyle 2^{-1} = 0.1_{\text{bin}} = 0.5_{\text{dec}} }[/math] and [math]\displaystyle{ \textstyle \sum_{k\geq 2} 2^{-k} = 0.0\overline{1}_{\text{bin}} = 0.1_{\text{bin}} = 0.5_{\text{dec}} }[/math]. However, [math]\displaystyle{ \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 }[/math]   is unequal to   [math]\displaystyle{ \textstyle \sum_{k\geq 2} (\mathrm i-1)^{-k} = 0.1_{\text{dec}} +0.3_{\text{dec}} \mathrm i }[/math].

External links