Two Enumerations of the Rationals
Two Enumerations of the Rationals
Here are two methods for enumerating the rational numbers. The Calkin–Wilf method starts with corresponding to the binary number 1. If the binary number corresponds to the fraction , then the binary number corresponding to is 0 appended to , and the one corresponding to is 1 appended to . According to this scheme, the Calkin–Wilf enumeration begins with , where semicolons separate the rows of an array.
1
1
x
a
b
a
a+b
x
a+b
b
x
;,;,,,;,,,,,,,;⋯
1
1
1
2
2
1
1
3
3
2
2
3
3
1
1
4
4
3
3
5
5
2
2
5
5
3
3
4
4
1
The Stern–Brocat method is more complicated, but it winds up reversing the Calkin–Wilf binary number except for the leading 1. The corresponding enumeration then reads .
;,;,,,;,,,,,,,;⋯
1
1
1
2
2
1
1
3
2
3
3
2
3
1
1
4
2
5
3
5
3
4
4
3
5
3
5
2
4
1
Since either of the above arrays can be put into one-to-one correspondence with the set of natural numbers (positive integers) , the rationals must also comprise a set of cardinality .
ℵ
0