Thursday, July 11, 2019

[upaswssq] Big book of binary numbers

Create a book which lists the binary integers in order, with their conversions to decimal.  This should be easy, though there's considerable room for sophistication, e.g., page headers denoting a common prefix that is then removed from all entries on that page for conciseness.

How many entries can be put into a reasonably sized book?  Maybe "reasonable size" is only one page.  Here are some attempts at one-pagers (front and back).  We used lowercase letter o and lowercase letter L as zero and one to make them different heights so easier to distinguish, and commas to separate groups of digits.  We formatted as paragraphs rather than columns in order to fit more.

A high quality entropy source most people have access to is a coin to flip, a d2 (though coins might be getting rarer in a cashless society, but you could still flip a credit card).  (Here is how to sample unbiased bits from a biased coin.)  Randomizers that choose among more than 2 items are specialized and harder to come by, e.g. dice, deck of cards, app, and may arouse suspicion (though so will this book).  Having a source of randomness is strategically valuable against an adversary who might be trying to predict your actions.  In cryptography, random values get used in initialization vectors, nonces, and salts.

Having a table of binary conversions allows using a d2 to sample from any discrete uniform distribution, and approximately sample from most discrete distributions.  Use rejection sampling.

It will be slow.  Demonstrate shuffling a deck of cards using hundreds of coin flips, choosing a random card 52 times, removing each chosen card and adding it to the shuffled pile (Fischer-Yates shuffle).

We could also get d2 random bits out of a cryptographic hash function, though if you have a hash function calculator, you probably also have a tool, namely a computer, to sample among more than 2.

Previously, log tables as another example of useful text that can be made arbitrarily long.

No comments :