# All Bicycle Cards

Well, the last puzzle I made was solved in about an hour, during which time I was busily creating more hints.

So this time I'm going to be less forthcoming with the giveaways and see what you cryptography nerds can come up with all on your own.

Here ya go:

• Here's a list of missing cards if it helps anyone: $$\begin{array}{|c|c|c|c|c|} 2 & H & D & C & S \\ 3 & & D & C & \\ 4 & & D & C & S \\ 5 & H & D & C & \\ 6 & H & D & C & \\ 7 & & D & C & S \\ 8 & & D & C & \\ 9 & H & & & \\ T & & D & & S \\ J & & D & C & \\ Q & & D & C & \\ K & H & D & & \\ A & & D & & \end{array}$$ Also interesting, there's only one diamond, a 9. Might have missed something here, they all start running together after a while... – Guest Feb 6 '18 at 21:59
• Looks like you made it an hour this time. – internet_user Feb 6 '18 at 22:25

The decoded message ...

... can be found at the bottom of this post. :)

First, let's transcribe the card layout, so that we can tackle it more easily:

        9S QH JH JS JH 9C AH JS JH 9C
TC TC TC 9C 9S 3S 5S JH KS 9C
8S KH 9C 5S JH 8S 5S 3H JH 9C
7H AS 9C 9S QH JH 9C 6S 8S JS
3H 4H 9D 9C 9S QH 8S KS JH 9C
6S QH 8S 9C QS AS 4H JH JS KS
9S AH AS 4H 9C 8H 7H AS AH JS
3S KC 9C 9S QH 8S KS JH 9C 6S
QH 8S 9C 4H 8S AS AC 9S 9C QS
AS 4H JH JS KS 9S AH AS 4H 9C
8H 7H AS AH JS 3S KC 9C AH AS
4H 9C 9S QH 8S KS JH 9C 6S QH
8S 9C 4H 8S AS AC 9S 9C TH AS
8S 6S 9C 6S QH AH 9S 9C 8H 7H
AS AH JS 3S 9C 7H KS QC


Frequency analysis tells us ...

... that there are only 24 different cards, distributed like this:

      25 × 9C              8 × AH 4H           3 × TC 8H 5S
12 × JH AS 8S        6 × KS 6S           2 × QS KC 3H
11 × 9S              5 × 7H              1 × TH QC KH 9D
9 × QH JS           4 × 3S

The most frequent card by far is the Nine of Clubs.

Let's make some assumptions:

The cards represent a cipher. The reading direction is the usual western one: left to right, top to bottom. The cipher is a monoalphabetic substitution cipher, because the 26 letters can easily be represented with 24 cards.

The most frequent symbol in English texts without punctuation or spaces is usually E. It is space if spaces are also encoded. Here, 9C is never followed by another 9C, and its occurrence spreads out evenly. So let's assume that 9C is a space, which gives this pretty believable layout of words:

xxxxx xxx xxx xxxxx xx xxxxxx xx xxx xxxxxx xxxxx xxx xxxxxxxxxx xxxxxxx xxxxx xxx xxxxx xxxxxxxxxx xxxxxxx xxx xxxxx xxx xxxxx xxxx xxxx xxxxxx xxx

Let's rearrange the input according to these assumptions:

9S QH JH JS JH    AH JS JH    TC TC TC
9S 3S 5S JH KS    8S KH    5S JH 8S 5S 3H JH
7H AS    9S QH JH    6S 8S JS 3H 4H 9D
9S QH 8S KS JH    6S QH 8S
QS AS 4H JH JS KS 9S AH AS 4H
8H 7H AS AH JS 3S KC
9S QH 8S KS JH    6S QH 8S    4H 8S AS AC 9S
QS AS 4H JH JS KS 9S AH AS 4H
8H 7H AS AH JS 3S KC    AH AS 4H
9S QH 8S KS JH    6S QH 8S
4H 8S AS AC 9S    TH AS 8S 6S
6S QH AH 9S    8H 7H AS AH JS 3S    7H KS QC

There are several repeated words, for example 9S QH 8S KS JH, 6S QH 8S, QS AS 4H JH JS KS 9S AH AS 4H and 8H 7H AS AH JS 3S (KC). The additional (KC) could be an s, because it is a plural or a present-tense verb in third person singular, or it could be punctuation. TC TC TC stands out as a word with three identical letters. Aaa!

The previous frequency analysis doesn't make any letter stand out as a prime candidate for E. We could try several smaller words, for example the frequent the and and. Let's focus on QS AS 4H JH JS KS 9S AH AS 4H, which has AS and AHrepeated. This pattern can be found in many words, the most frequent being understand, particular, conversion, despatches, congestion, intolerant and convulsion. Then the list trickles out into the likes of Hanoverian, Manchurian and Talmudical.

The first one, understand, is already a hit and we get:

There are  • • •  types of people in the world: those who understand binary, those who don't understand binary, and those who don't know what binary is.

That's a variation of a popular joke. The punctuation was placed using common rules. But what should the three TCs represent? They must all be the same character, and the joke suggests digits. Maybe 111, because someone who uses unary numbers doesn't know what binary is?

Let's try to find some structure.

The alphabet used for decoding can be arranged according to the suit and rank of each card:

           A 2 3 4 5 6 7 8 9 T J Q K

C    '               _ 1   . ,
D                    :
H    A   L D     I B   K E H F
S    N   Y   P W   O T   R U S


Here, the _ marks the space character; blank entries aren't used in the encoded message. Unfortunately, that doesn't look very regular.

But ...

... if we arrange the ranks of cards in alphabetical order (Ace, Eight, Five, Four, Jack, King, Nine, Queen, Seven, Six, Ten, Three, Two, the table looks like this:

           A 8 5 4 J K 9 Q 7 6 T 3 2

C    '         , _ .     1
D                :
H    A B   D E F   H I   K L
S    N O P   R S T U   W   Y


And that does look familiar: It's the ASCII table, starting from the apostrophe and with the hyphen used as space:
           A 8 5 4 J K 9 Q 7 6 T 3 2

C    ' ( ) * + , - . / 0 1 2 3
D    4 5 6 7 8 9 : ; < = > ? @
H    A B C D E F G H I J K L M
S    N O P Q R S T U V W X Y Z

And indeed, the missing digits are 111.

So, here goes:

There are 111 types of people in the world: those who understand binary, those who don't understand binary, and those who don't know what binary is.

• I considered replying that this is not the correct answer, but decided that that would have been cruel. Very well done! Did you notice my (one and only) hint, the title? All Bicycle Cards, for alphabetizing the suits/values. – Chowzen Feb 7 '18 at 14:46
• Can someone tell me why it is 111 and not 11 (which is 3 in binary)? – Albino Feb 7 '18 at 14:48
• No, I didn't see the hint. I found out about the alhpabetical ordering after seeing that all the Hearts were letters from A to M and all the Spades were letters from N to Z and that the pairs EF and RS were in corresponding columns. – M Oehm Feb 7 '18 at 15:00
• @Albino This is from the answer: "Maybe 111, because someone who uses unary numbers doesn't know what binary is?" – Chowzen Feb 7 '18 at 15:02