Anyway, this doesn't offer a whole lot of storage:
$ python -c 'print(sum(__import__("math").log2(x) for x in range(1, 53)) // 8)'
28.045 characters according to the blog post and this demo
For movie-plot '52 pick-up' that's not so bad, especially if used to encode something like a key for the "Solitaire" cryptosystem, mentioned nearby, wherein the same deck can in turn be reconfigured and manipulated to generate an arbitrary-length keystream for application to a longer message transmitted under separate cover.
awww, youuuuu!! hugz!
"The Seven of Diamonds meaning in a Tarot reading can show that you will be surrounded by love."
(i was looking it up to find what the different cards looked like and found that)
and yes "you and I might squeeze a bit" later
This is a common mistake made by people who haven't fully internalized the distinction between numbers (which have no intrinsic representation) and _numerals_ which are the encodings of numbers.
When you are converting a permutation to its index, you are not converting to _decimal_, you are converting it to an integer. That integer has no intrinsic base. In Python (and the linked C++ code) that integer will be internally represented in binary (or a base that is a higher power of 2) and the corresponding decimal representation is generated only when printing.
So functions like decimalToFactoradic() should really be named integerToFactoradic(), etc.
Counterpoint: it doesn’t matter.
Always Adore: Amazing Alliteration.
Or people whose first intuition is that the space measured by 52! permutations, which are painfully obviously based on taking the suit and rank of each card which makes it unique, can be covered with even remote adequacy by considering only the card color, which only narrows down the card to one of two sets of 26.
You can also use other decks, e.g. with tarot cards you will have 78 cards rather than only 52 cards, and can make a longer message.
Other comments on here had mention doing other things such as face-up vs face-down cards.
Impractical, but possible.
Thanks.
My best attempt so far is assigning about ~20 tokens to most popular words (the, and, you...), another ~30 to popular trigrams (ing, ion, tio...), another ~30 to digrams (th, er, on...) and the rest to single letters. The number of unique tokens to be adjusted to the occurrence frequency of corresponding words/trigrams/digrams in natural language.
If the encoder runs out of a token, she just skips it (assuming the decoder will calculate this token is already used and guessing to add it) up until the point where the words become unrecognisable by the decoder. Encoder is also free to use synonyms to avoid running of tokens fast.
Not quite strict system, but my rough assessment gives it 80-100 letters per deck. Should be enough to plan a jailbreak :)
ashfn•6mo ago
pmarreck•6mo ago
(I just prefer poker to solitaire...)
Someone else mentioned that the orientation of the cards (up or down) and possibly even the front-back facingness of the card (facing up, facing down) would add another 2 possible bits to the available encoding space. (Of course, at that point you'd have to also encode which side of the whole deck is the "top"...)
My own thought was to add par2 to make it robust against small errors... at the cost of some transmission space!
hungmung•6mo ago
An asymmetrical joker could indicate which short edge is "right way up", while also indicating which card is the first or last of the deck.
ashfn•6mo ago
russellbeattie•6mo ago
A dark line drawn across the top of the deck would be enough. Though it would ruin the stealth factor of the cards.
Also, the pattern on the back of some playing decks isn't symmetrical, so that could be used as well.
istjohn•6mo ago
OkayPhysicist•6mo ago