Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Golden ratio base
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Positional numeral system}} {{no footnotes|date=August 2018}} {{numeral systems}} '''Golden ratio base''' is a [[Non-integer representation|non-integer positional numeral system]] that uses the [[golden ratio]] (the irrational number <math display=inline>\frac{1+\sqrt{5}}{2}</math> β 1.61803399 symbolized by the [[Greek alphabet|Greek letter]] [[phi|Ο]]) as its [[radix|base]]. It is sometimes referred to as '''base-Ο''', '''golden mean base''', '''phi-base''', or, colloquially, '''phinary'''. Any [[non-negative]] [[real number]] can be represented as a base-Ο numeral using only the digits 0 and 1, and avoiding the digit sequence "11" β this is called a ''standard form''. A base-Ο numeral that includes the digit sequence "11" can always be rewritten in standard form, using the algebraic properties of the base Ο β most notably that Ο<sup>{{math|''n''}}</sup> + Ο<sup>{{math|''n''β1}}</sup> = Ο<sup>{{math|''n''+1}}</sup>. For instance, 11<sub>Ο</sub> = 100<sub>Ο</sub>. Despite using an [[irrational number]] base, when using standard form, all non-negative [[integer]]s have a unique representation as a terminating (finite) base-Ο expansion. The set of numbers which possess a finite base-Ο representation is the [[ring (algebra)|ring]] [[quadratic integer|'''Z'''[<math display=inline>\frac{1+\sqrt{5}}{2}</math>]]]; it plays the same role in this numeral systems as [[dyadic rational]]s play in [[binary number]]s, providing a possibility to [[multiplication|multiply]]. Other numbers have standard representations in base-Ο, with [[rational number]]s having recurring representations. These representations are unique, except that numbers with a terminating expansion also have a non-terminating expansion. For example, 1 = 0.1010101β¦ in base-Ο just as [[0.999...|1 = 0.99999β¦]] in [[decimal]]. ==Examples== {| class="wikitable" |- ! Decimal ! Powers of Ο ! Base Ο |- | 1 | Ο<sup>0</sup> | align=right | {{mono|1 }} |- | 2 | Ο<sup>1</sup> + Ο<sup>β2</sup> | align=right | {{mono|10.01 }} |- | 3 | Ο<sup>2</sup> + Ο<sup>β2</sup> | align=right | {{mono|100.01 }} |- | 4 | Ο<sup>2</sup> + Ο<sup>0</sup> + Ο<sup>β2</sup> | align=right | {{mono|101.01 }} |- | 5 | Ο<sup>3</sup> + Ο<sup>β1</sup> + Ο<sup>β4</sup> | align=right | {{mono|1000.1001}} |- | 6 | Ο<sup>3</sup> + Ο<sup>1</sup> + Ο<sup>β4</sup> | align=right | {{mono|1010.0001}} |- | 7 | Ο<sup>4</sup> + Ο<sup>β4</sup> | align=right | {{mono|10000.0001}} |- | 8 | Ο<sup>4</sup> + Ο<sup>0</sup> + Ο<sup>β4</sup> | align=right | {{mono|10001.0001}} |- | 9 | Ο<sup>4</sup> + Ο<sup>1</sup> + Ο<sup>β2</sup> + Ο<sup>β4</sup> | align=right | {{mono|10010.0101}} |- | 10 | Ο<sup>4</sup> + Ο<sup>2</sup> + Ο<sup>β2</sup> + Ο<sup>β4</sup> | align=right | {{mono|10100.0101}} |} ==Writing golden ratio base numbers in standard form== In the following example of conversion from non-standard to standard form, the notation <u>1</u> is used to represent the [[signed-digit representation|signed digit]] β1. 211.0<u>1</u><sub>Ο</sub> is not a standard base-Ο numeral, since it contains a "11" and additionally a "2" and a "<u>1</u>" = β1, which are not "0" or "1". To put a numeral in standard form, we may use the following substitutions: <math>0\underline{1}0_\phi=\underline{1}01_\phi</math>, <math>1\underline{1}0_\phi=001_\phi</math>, <math>200_\phi=1001_\phi</math>, <math>011_\phi=100_\phi</math>. The substitutions may be applied in any order we like, as the result will be the same. Below, the substitutions applied to the number on the previous line are on the right, the resulting number on the left. <math> \begin{align} 211.0\underline{1}0_\phi = 211&.\underline{1}01_\phi &0\underline{1}0\rightarrow\underline{1}01 \\ = 210&.011_\phi &1\underline{1}0\rightarrow001 \\ = 1011&.011_\phi &200\rightarrow1001 \\ = 1100&.100_\phi &011\rightarrow100 \\ = 10000&.1_\phi &011\rightarrow100\\ \end{align} </math> Any [[positive number]] with a non-standard terminating base-Ο representation can be [[unique (mathematics)|unique]]ly standardized in this manner. If we get to a point where all digits are "0" or "1", except for the first digit being [[negative number|negative]], then the number is negative. (The exception to this is when the first digit is negative one and the next two digits are one, like <u>1</u>111.001=1.001.) This can be converted to the negative of a base-Ο representation by [[negation|negating]] every digit, standardizing the result, and then marking it as negative. For example, use a [[minus sign]], or some other significance to denote negative numbers. ==Representing integers as golden ratio base numbers== We can either consider our integer to be the (only) digit of a nonstandard base-Ο numeral, and standardize it, or do the following: 1 Γ 1 = 1, Ο Γ Ο = 1 + Ο and {{sfrac|1|Ο}} = β1 + Ο. Therefore, we can compute : (''a'' + ''b''Ο) + (''c'' + ''d''Ο) = ((''a'' + ''c'') + (''b'' + ''d'')Ο), : (''a'' + ''b''Ο) β (''c'' + ''d''Ο) = ((''a'' β ''c'') + (''b'' β ''d'')Ο) and : (''a'' + ''b''Ο) Γ (''c'' + ''d''Ο) = ((''ac'' + ''bd'') + (''ad'' + ''bc'' + ''bd'')Ο). So, using integer values only, we can add, subtract and multiply numbers of the form (''a'' + ''b''Ο), and even represent positive and negative integer [[Exponentiation|powers]] of Ο. (''a'' + ''b''Ο) > (''c'' + ''d''Ο) if and only if 2(''a'' β ''c'') β (''d'' β ''b'') > (''d'' β ''b'') Γ {{sqrt|5}}. If one side is negative, the other positive, the comparison is trivial. Otherwise, square both sides, to get an integer comparison, reversing the comparison direction if both sides were negative. On [[square (algebra)|squaring]] both sides, the <math display=inline>\sqrt{5}</math> is replaced with the integer 5. So, using integer values only, we can also compare numbers of the form (''a'' + ''b''Ο). # To convert an integer ''x'' to a base-Ο number, note that ''x'' = (''x'' + 0Ο). # Subtract the highest power of Ο, which is still smaller than the number we have, to get our new number, and record a "1" in the appropriate place in the resulting base-Ο number. # Unless our number is 0, go to step 2. # Finished. The above procedure will never result in the sequence "11", since 11<sub>Ο</sub> = 100<sub>Ο</sub>, so getting a "11" would mean we missed a "1" prior to the sequence "11". Start, e.g., with integer = 5, with the result so far being ...00000.00000...<sub>Ο</sub> Highest power of Ο β€ 5 is Ο<sup>3</sup> = 1 + 2Ο β 4.236067977 Subtracting this from 5, we have 5 β (1 + 2Ο) = 4 β 2Ο β 0.763932023..., the result so far being 1000.00000...<sub>Ο</sub> Highest power of Ο β€ 4 β 2Ο β 0.763932023... is Ο<sup>β1</sup> = β1 + 1Ο β 0.618033989... Subtracting this from 4 β 2Ο β 0.763932023..., we have 4 β 2Ο β (β1 + 1Ο) = 5 β 3Ο β 0.145898034..., the result so far being 1000.10000...<sub>Ο</sub> Highest power of Ο β€ 5 β 3Ο β 0.145898034... is Ο<sup>β4</sup> = 5 β 3Ο β 0.145898034... Subtracting this from 5 β 3Ο β 0.145898034..., we have 5 β 3Ο β (5 β 3Ο) = 0 + 0Ο = 0, with the final result being '''1000.1001'''<sub>Ο</sub>. ===Non-uniqueness=== Just as with any base-n system, numbers with a terminating representation have an alternative recurring representation. In base-10, this relies on the observation that [[0.999...|0.999...=1]]. In base-Ο, the numeral 0.1010101... can be seen to be equal to 1 in several ways: *Conversion to nonstandard form: 1 = 0.11<sub>Ο</sub> = 0.1011<sub>Ο</sub> = 0.101011<sub>Ο</sub> = ... = 0.10101010...<sub>Ο</sub> *[[Geometric series]]: 1.0101010...<sub>Ο</sub> is equal to :<math>\sum_{k=0}^\infty \varphi^{-2k}=\frac{1}{1-\varphi^{-2}} = \varphi</math> *Difference between "shifts": Ο<sup>2</sup> ''x'' β ''x'' = 10.101010...<sub>Ο</sub> β 0.101010...<sub>Ο</sub> = 10<sub>Ο</sub> = Ο so that ''x'' = {{sfrac|Ο|Ο<sup>2</sup> β 1}} = 1 This non-uniqueness is a feature of the numeration system, since both 1.0000 and 0.101010... are in standard form. In general, the final 1 of any number in base-Ο can be replaced with a recurring 01 without changing the value of that number. ==Representing rational numbers as golden ratio base numbers== Every non-negative rational number can be represented as a recurring base-Ο expansion, as can any non-negative element of the [[field (mathematics)|field]] '''Q'''[{{sqrt|5}}] = '''Q''' + {{sqrt|5}}'''Q''', the field generated by the [[rational number]]s and [[square root of 5|<math display=inline>\sqrt{5}</math>]]. Conversely any recurring (or terminating) base-Ο expansion is a non-negative element of '''Q'''[{{sqrt|5}}]. For recurring decimals, the recurring part has been overlined: *{{sfrac|1|2}} = 0.<span style="text-decoration:overline;>010</span><sub>Ο</sub> *{{sfrac|1|3}} = 0.<span style="text-decoration:overline;>00101000</span><sub>Ο</sub> *{{sfrac|1|4}} = 0.<span style="text-decoration:overline;>001000</span><sub>Ο</sub> *{{sfrac|1|5}} = 0.<span style="text-decoration:overline;>001001010100100100</span><sub>Ο</sub> *{{sfrac|1|10}} = 0.<span style="text-decoration:overline;>000010000100010100001010001010101000100101000001001000100000</span><sub>Ο</sub> The justification that a rational gives a recurring expansion is analogous to the equivalent proof for a base-''n'' numeration system (''n'' = 2,3,4,...). Essentially in base-Ο [[long division]] there are only a finite number of possible remainders, and so once there must be a recurring pattern. For example, with {{sfrac|1|2}} = {{sfrac|1|10.01<sub>Ο</sub>}} = {{sfrac|100<sub>Ο</sub>|1001<sub>Ο</sub>}} long division looks like this (note that base-Ο subtraction may be hard to follow at first): <pre> .0 1 0 0 1 ________________________ 1 0 0 1 ) 1 0 0.0 0 0 0 0 0 0 0 1 0 0 1 trade: 10000 = 1100 = 1011 ------- so 10000 β 1001 = 1011 β 1001 = 10 1 0 0 0 0 1 0 0 1 ------- etc. </pre> The converse is also true, in that a number with a recurring base-Ο; representation is an element of the field '''Q'''[{{sqrt|5}}]. This follows from the observation that a recurring representation with period k involves a [[geometric series]] with ratio Ο<sup>βk</sup>, which will sum to an element of '''Q'''[{{sqrt|5}}]. ==Representing irrational numbers of note as golden ratio base numbers== The base-Ο representations of some interesting numbers: <!-- unlike the previous rational numbers where spaces actually indicate something meaningful, the spaces I stuck in these irrational numbers every 4 bits are meaningless. Feel free to remove/add spaces if it helps. --> * [[Pi|{{pi}}]] β 100.0100 1010 1001 0001 0101 0100 0001 0100 ...<sub>Ο</sub> {{OEIS|A102243}} * {{mvar|[[e (mathematical constant)|e]]}} β 100.0000 1000 0100 1000 0000 0100 ...<sub>Ο</sub> {{OEIS|A105165}} * [[Square root of 2|<math display=inline>\sqrt{2}</math>]] β 1.0100 0001 0100 1010 0100 0000 0101 0000 0000 0101 ...<sub>Ο</sub> * <math display=inline>\sqrt{5}</math> = 10.1<sub>Ο</sub> ==Addition, subtraction, and multiplication== It is possible to adapt all the standard algorithms of base-10 arithmetic to base-Ο arithmetic. There are two approaches to this: ===Calculate, then convert to standard form=== For [[addition]] of two base-Ο numbers, add each pair of digits, without carry, and then convert the numeral to standard form. For [[subtraction]], subtract each pair of digits without borrow (borrow is a negative amount of carry), and then convert the numeral to standard form. For [[multiplication]], multiply in the typical base-10 manner, without carry, then convert the numeral to standard form. For example, *2 + 3 = 10.01 + 100.01 = 110.02 = 110.1001 = 1000.1001 *2 Γ 3 = 10.01 Γ 100.01 = 1000.1 + 1.0001 = 1001.1001 = 1010.0001 *7 β 2 = 10000.0001 β 10.01 = 100<u>1</u>0.0<u>1</u>01 = 11<u>1</u>0.0<u>1</u>01 = 1001.0<u>1</u>01 = 1000.1001 ===Avoid digits other than 0 and 1=== A more "native" approach is to avoid having to add digits 1+1 or to subtract 0 β 1. This is done by reorganising the operands into nonstandard form so that these combinations do not occur. For example, * 2 + 3 = 10.01 + 100.01 = 10.01 + 100.0011 = 110.0111 = 1000.1001 * 7 β 2 = 10000.0001 β 10.01 = 1100.0001 β 10.01 = 1011.0001 β 10.01 = 1010.1101 β 10.01 = 1000.1001 The subtraction seen here uses a modified form of the standard "trading" algorithm for subtraction. ==Division== No non-integer [[rational number]] can be represented as a [[finite set|finite]] base-Ο number. In other words, all finitely representable base-Ο numbers are either integers or (more likely) an irrational in a [[quadratic field]] '''Q'''[{{sqrt|5}}]. Due to long division having only a finite number of possible remainders, a division of two integers (or other numbers with finite base-Ο representation) will have a recurring expansion, as demonstrated above. ==Relationship with Fibonacci coding== {{main|Fibonacci coding}} [[Fibonacci coding]] is a closely related numeration system used for integers. In this system, only digits 0 and 1 are used and the place values of the digits are the [[Fibonacci number]]s. As with base-Ο, the digit sequence "11" is avoided by rearranging to a standard form, using the Fibonacci [[recurrence relation]] ''F''<sub>''k''+1</sub> = ''F''<sub>''k''</sub> + ''F''<sub>''k''β1</sub>. For example, :30 = 1Γ21 + 0Γ13 + 1Γ8 + 0Γ5 + 0Γ3 + 0Γ2 + 1Γ1 + 0Γ1 = 10100010<sub>fib</sub>. ==Practical usage== It is possible to mix base-Ο arithmetic with [[Generalizations of Fibonacci numbers|Fibonacci integer sequences]]. The sum of numbers in a General Fibonacci integer sequence that correspond with the nonzero digits in the base-Ο number, is the multiplication of the base-Ο number and the element at the zero-position in the sequence. For example: *product 10 (10100.0101 base-Ο) and 25 (zero position) = 5 + 10 + 65 + 170 = 250 *:base-Ο: 1 0 1 0 0. 0 1 0 1 *:partial sequence: ... '''5''' 5 '''10''' 15 ''25'' 40 '''65''' 105 '''170''' 275 445 720 1165 ... *product 10 (10100.0101 base-Ο) and 65 (zero position) = 10 + 25 + 170 + 445 = 650 *:base-Ο: 1 0 1 0 0. 0 1 0 1 *:partial sequence: ... 5 5 '''10''' 15 '''25''' 40 ''65'' 105 '''170''' 275 '''445''' 720 1165 ... ==See also== * [[Beta encoder]] β Originally used golden ratio base * [[Ostrowski numeration]] ==References== * {{cite journal|doi=10.2307/3029218|last=Bergman|first=George|title=A Number System with an Irrational Base|journal=Mathematics Magazine|volume=31|issue=2|pages=98β110|year=1957|jstor=3029218}} * {{cite journal |first1=L. C. |last1=Eggan |first2=C. L. |last2=vanden Eynden |jstor=2314786 |journal=Amer. Math. Monthly |year=1966 |number=73 |pages=576β582 |title=Decimal expansions to nonintegral bases |volume=73 |doi=10.2307/2314786 }} *{{cite journal|last=Plojhar|first=Jozef|title=The Good natured Rabbit breeder|journal=Manifold|volume=11|year=1971|pages=26β30}} <!-- ''To do: is there any official name for normalizing?'' ... not that I know of, but "standard form" is not too bad, so I have incorporated this --> ==External links== * [http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/phigits.html Using Powers of Phi to represent Integers (Base Phi)] {{Metallic ratios}} [[Category:Non-standard positional numeral systems]] [[Category:Golden ratio]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite journal
(
edit
)
Template:Main
(
edit
)
Template:Math
(
edit
)
Template:Metallic ratios
(
edit
)
Template:Mono
(
edit
)
Template:Mvar
(
edit
)
Template:No footnotes
(
edit
)
Template:Numeral systems
(
edit
)
Template:OEIS
(
edit
)
Template:Pi
(
edit
)
Template:Sfrac
(
edit
)
Template:Short description
(
edit
)
Template:Sidebar with collapsible groups
(
edit
)
Template:Sqrt
(
edit
)