Can you recover the Key & Hat?

The third step is to recover the mixed alphabet, then the Key and the Hat. Your computer can do this if you give it a suitable program. Can you do this? If not then read on.

Finding the key.

In the previous section we recovered this enciphering matrix:

abcdefghijklmnopqrstuvwxyz line 0
JNGQSTVKPZROWECXADUIHBYLFM      1
MSBJHPNDLWQGFUVOZAKXRETCIY      2
EIYBXDFCASGMHPWJNVLQOTKZRU      3
QVORNYCUTAHXZBLIDKEFSGMPWJ      4
WUNZKXEQOYAVTHBCMJRLDSIGPF      5

The next task is to find the original mixed alphabet from the matrix. Looking at the first two rows we can say:

The distance from A to J in the mixed alphabet is the same as the distance from B to N, or C to G... because of symmetry.

Whether this distance is 1 place, 2 places...25 places we don’t yet know, and that’s what we have to find.

As a first step we ‘chain’ two of the rows, say the top two:

0,1   AJZMWYFTIPXLOCGVBNESUHKRDQ

In this alphabet A to J = J to Z = Z to M and so on.

Now we come to the second step. If this is the original mixed alphabet then there will be ‘hits’ where a pair of letters in successive alphabetical order will be followed by other letters also in successive alphabetical order. (See Appendix for more detail) We find just one hit:

E is followed by S
F                T

And such a low frequency is not encouraging. So we try a decimation of this alphabet. The 3rd decimation is

AMFPOVEHDJWTXCBSKQZYILGNUR

Where MF = FP = PO ...

Again there is only one hit: N is followed by U and O by V. Not encouraging. So we keep trying decimations and checking the number of hits until we get to the 19th decimation:

ASOYDNXMKVIJUCFQELWRBPZHGT

where we find four hits:

1st letter:  JKLNOP
Followed by: UVWXYZ

This is the best to be found and thus is likely to be the original mixed alphabet. So we try to fit the mixed alphabet into a key block. We make a start with these two rows, adding the letters that precede the first row:

IMEDSB
JKLNOP
UVWXYZ

Then the remaining letters are added, by trial and error, to recover the original block:

ARCHIMED
SBFGJKLN
OPQTUVWX
YZ

Trying every decimation and seeking the one with the most hits is a tedious task. Luckily it can be done in a flash by the computer. Put the chain into ‘Finding the mixed alphabet’ program and run it. All the decimations will be made, scored and displayed and you can select the best. So if you put in the chain  AJZMWYFTIPXLOCGVBNESUHKRDQ  you will get the output:


                                  Letter Following        Score
Dec    Decimated Chain        ABCDEFGHIJKLMNOPQRSTUVWXYZ
1  JZMWYFTIPXLOCGVBNESUHKRDQA JNGQSTVKPZROWECXADUIHBYLFM    1
3  MFPOVEHDJWTXCBSKQZYILGNURA MSBJHPNDLWQGFUVOZAKXRETCIY    1
5  YXVUQWPGSDMICERZTONKJFLBHA YHEMRLSACFJBIKNGWZDOQUPVXT    0
7  TGHZPBRWLEQFCUJIVKMXNDYOSA TRUYQCHZVIMEXDSBFWAGJKLNOP    4
9  PEJXSZLUMOHWCKYGRFVDTBQINA PQKTJVRWNXYUOAHEIFZBMDCSGL    2
11 LKTEMGQXHFNZCDPUYBJORISWVA LJDPMNQFSOTKGZRUXIWEYAVHBC    2
13 CACACACACACACACACACACACACA CAAAAAAAAAAAAAAAAAAAAAAAAA    0
15 VWSIROJBYUPDCZNFHXQGMETKLA VYZCTHMXRBLAEFJDGOIKPWSQUN    2
17 NIQBTDVFRGYKCWHOMULZSXJEPA NTWVPRYOQECZUIMABGXDLFHJKS    2
19 SOYDNXMKVIJUCFQELWRBPZHGTA SPFNLQTGJUVWKXYZEBOACIRMDH    4
21 HBLFJKNOTZRECIMDSGPWQUVXYA HLISCJPBMKNFDOTWUEGZVXQYAR    0
23 RUNGLIYZQKSBCXTWJDHEVOPFMA RCXHVMLEYDSIAGPFKUBWNOJTZQ    2
25 QDRKHUSENBVGCOLXPITFYWMZJA QVORNYCUTAHXZBLIDKEFSGMPWJ    1

Two decimated chains have the highest score of 4, one being the reverse of the other:

TGHZPBRWLEQFCUJIVKMXNDYOSA
SOYDNXMKVIJUCFQELWRBPZHGTA

The second has the nice sequences UVW XYZ in the ‘Letter following’ column and, as shown above, makes a block with the key ARCHIMEDES.

The first makes the same block but inverted:

YZ
OPQTUVWX
SBFGJKLN
ARCHIMED


Finding the Hat.

The order of stripping the block gives a clue to the Hat.

64251837
ARCHIMED
SBFGJKLN
OPQTUVWX
YZ

A computer search of the dictionary gives only SOCRATES with that pattern. If there were several such pattern words, one would select the one most closely linked in meaning to the setting and the Key.

NEXT