Skew binary number system
The skew binary number system is a non-standard positional numeral system in which the nth digit has a value of and each digit has a value of 0, 1, or 2. Each number can be written uniquely in skew binary canonical form where there is only at most one instance of the digit 2, which must be the first non-zero least significant digit, as shown in following table:
The advantage of skew binary could be made by exploiting the fact that . This means we can simply increment the skew binary number that contains a two by setting it zero and incrementing the next digit from zero to one or one to two.
Skew binary numbers find applications in skew binomial heaps, a variant of binomial heaps that support worst-case O(1) insertion, and in skew binary random access lists, a purely functional data structure. They also find use in bootstrapped skew binomial heaps, which have excellent asymptotic guarantees.
- skew binary numbers
- Okasaki, Chris. Purely Functional Data Structures.
|This number theory-related article is a stub. You can help Wikipedia by expanding it.|