Golden ratio base is a
non-integer positional numeral system that uses the
golden ratio
In mathematics, two quantities are in the golden ratio if their ratio is the same as the ratio of their summation, sum to the larger of the two quantities. Expressed algebraically, for quantities and with , is in a golden ratio to if
\fr ...
(the irrational number
≈ 1.61803399 symbolized by the
Greek letter
The Greek alphabet has been used to write the Greek language since the late 9th or early 8th century BC. It was derived from the earlier Phoenician alphabet, and is the earliest known alphabetic script to systematically write vowels as wel ...
φ) as its
base. It is sometimes referred to as base-φ, golden mean base, phi-base, or, colloquially, phinary. Any
non-negative
In mathematics, the sign of a real number is its property of being either positive, negative, or 0. Depending on local conventions, zero may be considered as having its own unique sign, having no sign, or having both positive and negative sign. ...
real number
In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
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 φ
+ φ
= φ
. For instance, 11
φ = 100
φ.
Despite using an
irrational number
In mathematics, the irrational numbers are all the real numbers that are not rational numbers. That is, irrational numbers cannot be expressed as the ratio of two integers. When the ratio of lengths of two line segments is an irrational number, ...
base, when using standard form, all non-negative
integer
An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
s have a unique representation as a terminating (finite) base-φ expansion. The set of numbers which possess a finite base-φ representation is the
ring Z \frac">math display=inline>\frac it plays the same role in this numeral systems as
dyadic rationals play in
binary number
A binary number is a number expressed in the Radix, base-2 numeral system or binary numeral system, a method for representing numbers that uses only two symbols for the natural numbers: typically "0" (zero) and "1" (one). A ''binary number'' may ...
s, providing a possibility to
multiply.
Other numbers have standard representations in base-φ, with
rational number
In mathematics, a rational number is a number that can be expressed as the quotient or fraction of two integers, a numerator and a non-zero denominator . For example, is a rational number, as is every integer (for example,
The set of all ...
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
1 = 0.99999… in
decimal
The decimal numeral system (also called the base-ten positional numeral system and denary or decanary) is the standard system for denoting integer and non-integer numbers. It is the extension to non-integer numbers (''decimal fractions'') of th ...
.
Examples
Writing golden ratio base numbers in standard form
In the following example of conversion from non-standard to standard form, the notation
1 is used to represent the
signed digit −1.
211.0
1φ is not a standard base-φ numeral, since it contains a "11" and additionally a "2" and a "
1" = −1, which are not "0" or "1".
To put a numeral in standard form, we may use the following substitutions:
,
,
,
. 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.
Any
positive number
In mathematics, the sign of a real number is its property of being either positive, negative, or 0. Depending on local conventions, zero may be considered as having its own unique sign, having no sign, or having both positive and negative sign. ...
with a non-standard terminating base-φ representation can be
uniquely standardized in this manner. If we get to a point where all digits are "0" or "1", except for the first digit being
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
1111.001=1.001.) This can be converted to the negative of a base-φ representation by
negating every digit, standardizing the result, and then marking it as negative. For example, use a
minus sign
The plus sign () and the minus sign () are mathematical symbols used to denote positive and negative functions, respectively. In addition, the symbol represents the operation of addition, which results in a sum, while the symbol represent ...
, 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 = −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
powers of φ.
(''a'' + ''b''φ) > (''c'' + ''d''φ) if and only if 2(''a'' − ''c'') − (''d'' − ''b'') > (''d'' − ''b'') × . 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
squaring both sides, the
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
φ = 100
φ, 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...
φ
Highest power of φ ≤ 5 is φ
3 = 1 + 2φ ≈ 4.236067977
Subtracting this from 5, we have 5 − (1 + 2φ) = 4 − 2φ ≈ 0.763932023..., the result so far being 1000.00000...
φ
Highest power of φ ≤ 4 − 2φ ≈ 0.763932023... is φ
−1 = −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...
φ
Highest power of φ ≤ 5 − 3φ ≈ 0.145898034... is φ
−4 = 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
φ.
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... = 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
φ = 0.1011
φ = 0.101011
φ = ... = 0.10101010...
φ
*
Geometric series
In mathematics, a geometric series is a series (mathematics), series summing the terms of an infinite geometric sequence, in which the ratio of consecutive terms is constant. For example, 1/2 + 1/4 + 1/8 + 1/16 + ⋯, the series \tfrac12 + \tfrac1 ...
: 1.0101010...
φ is equal to
:
*Difference between "shifts": φ
2 ''x'' − ''x'' = 10.101010...
φ − 0.101010...
φ = 10
φ = φ so that ''x'' = = 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 Q[] = Q + Q, the field generated by the
rational number
In mathematics, a rational number is a number that can be expressed as the quotient or fraction of two integers, a numerator and a non-zero denominator . For example, is a rational number, as is every integer (for example,
The set of all ...
s and
. Conversely any recurring (or terminating) base-φ expansion is a non-negative element of Q[]. For recurring decimals, the recurring part has been overlined:
* = 0.
00101000φ
* = 0.
001001010100100100φ
* = 0.
long division there are only a finite number of possible remainders, and so once there must be a recurring pattern. For example, with = = long division looks like this (note that base-φ subtraction may be hard to follow at first):
.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.
The converse is also true, in that a number with a recurring base-φ; representation is an element of the field Q[]. This follows from the observation that a recurring representation with period k involves a geometric series with ratio φ−k, which will sum to an element of Q[].
Representing irrational numbers of note as golden ratio base numbers
The base-φ representations of some interesting numbers:
* ≈ 100.0100 1010 1001 0001 0101 0100 0001 0100 ...φ
* ≈ 100.0000 1000 0100 1000 0000 0100 ...φ
* ≈ 1.0100 0001 0100 1010 0100 0000 0101 0000 0000 0101 ...φ
* = 10.1φ
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
Addition (usually signified by the Plus and minus signs#Plus sign, plus symbol, +) is one of the four basic Operation (mathematics), operations of arithmetic, the other three being subtraction, multiplication, and Division (mathematics), divis ...
of two base-φ numbers, add each pair of digits, without carry, and then convert the numeral to standard form. For subtraction
Subtraction (which is signified by the minus sign, –) is one of the four Arithmetic#Arithmetic operations, arithmetic operations along with addition, multiplication and Division (mathematics), division. Subtraction is an operation that repre ...
, subtract each pair of digits without borrow (borrow is a negative amount of carry), and then convert the numeral to standard form. For multiplication
Multiplication is one of the four elementary mathematical operations of arithmetic, with the other ones being addition, subtraction, and division (mathematics), division. The result of a multiplication operation is called a ''Product (mathem ...
, 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 = 10010.0101 = 1110.0101 = 1001.0101 = 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
In mathematics, a rational number is a number that can be expressed as the quotient or fraction of two integers, a numerator and a non-zero denominator . For example, is a rational number, as is every integer (for example,
The set of all ...
can be represented as a finite base-φ number. In other words, all finitely representable base-φ numbers are either integers or (more likely) an irrational in a quadratic field
In algebraic number theory, a quadratic field is an algebraic number field of Degree of a field extension, degree two over \mathbf, the rational numbers.
Every such quadratic field is some \mathbf(\sqrt) where d is a (uniquely defined) square-free ...
Q[]. 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
Fibonacci coding
In mathematics and computing, Fibonacci coding is a universal code which encodes positive integers into binary code words. It is one example of representations of integers based on Fibonacci numbers. Each code word ends with "11" and contains n ...
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
In mathematics, the Fibonacci sequence is a Integer sequence, sequence in which each element is the sum of the two elements that precede it. Numbers that are part of the Fibonacci sequence are known as Fibonacci numbers, commonly denoted . Many w ...
s. As with base-φ, the digit sequence "11" is avoided by rearranging to a standard form, using the Fibonacci recurrence relation
In mathematics, a recurrence relation is an equation according to which the nth term of a sequence of numbers is equal to some combination of the previous terms. Often, only k previous terms of the sequence appear in the equation, for a parameter ...
''F''''k''+1 = ''F''''k'' + ''F''''k''−1. For example,
:30 = 1×21 + 0×13 + 1×8 + 0×5 + 0×3 + 0×2 + 1×1 + 0×1 = 10100010fib.
Practical usage
It is possible to mix base-φ arithmetic with 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
*
*
*
External links
Using Powers of Phi to represent Integers (Base Phi)
{{Metallic ratios
Non-standard positional numeral systems
Golden ratio