A 'Binary' System for Complex Numbers (1965) [pdf]
nsa.gov
nsa.gov
> Penney's game, named after its inventor Walter Penney, is a binary (head/tail) sequence generating game between two players. At the start of the game, the two players agree on the length of the sequences to be generated.
> This length is usually taken to be three, but can be any larger number.
> Player A then selects a sequence of heads and tails of the required length, and shows this sequence to player B. Player B then selects another sequence of heads and tails of the same length. Subsequently, a fair coin is tossed until either player A's or player B's sequence appears as a consecutive subsequence of the coin toss outcomes. The player whose sequence appears first wins.
> Provided sequences of at least length three are used, the second player (B) has an edge over the starting player (A). This is because the game is nontransitive such that for any given sequence of length three or longer one can find another sequence that has higher probability of occurring first.
One can use this to show that pairs of integers have the same cardinality as natural numbers.
Further, since one can sum the binary representations of two numbers and get the representation of the result, this is homomorphic under addition. I have never before seen a pairing function with that property (not that I have seen many).
[1] https://en.wikipedia.org/wiki/Pairing_function#Cantor_pairin...
in any case this is really clever. the norm-squared of 1+i in the Gaussian integers is (1+i)(1-i) = 1 + 1 = 2. the norm is sqrt(2).
another way to think of this is we can color a checkerboard like this:
xoxoxoxo
oxoxoxox
xoxoxoxo
oxoxoxox
The o's are "even" in this binary system and the x's are "odd"So in a sense this is the "square-root" of the binary numbers in the complex intgers Z[i]
I wonder then how "carries" work in this binary system?
It wasn't, it isn't clear to me what it even has to do with NSA. It was published in Journal of the ACM, Volume 12, 1965: http://dl.acm.org/citation.cfm?doid=321264.321274.
Actually the -1+i base was proposed by S. Khmelnik a year earlier (at least according to Wikipedia, I can't read Russian...)
IFF I'm understanding the above correctly, I have a question: does encoding scheme described in this system let you add/subtract vectors using the fast integer hardware in CPUs?
And ime the speed up from using integers is minor and often not the cost from conversion (to e.g 28.4 fixed or similar), since you often need floats in the end.
My suspicion is that this kind of thing wouldn’t have enough savings to be worthwhile except for very specialized problems, but it’s hard to guess without seeing someone try. It would be a fun thing to play with for a high school student with a bit of free time.
If this had been classified then declassified it would have the original marker (but crossed out), and the text at the bottom would be "Declassified and Approved for Release", rather than just "Approved for Release". For an example of this, see https://www.nsa.gov/public_info/_files/cryptologs/cryptolog_...