“F12.2: Stein's way, step one: K4's statistics by segment and by width (letter counts per segment, index of coincidence for 1-48 alphabets, repeats at widths 7, 21 and 31), each against 1,000 shuffles, with the number of comparisons stated”
F12.2. Stein began K1-K3 by quantifying impressions: letter counts by carved row (his Figure 3 split the panel at row 14/15) and the index of coincidence against the number of alphabets (his Figures 7, 17, 26). 0056 measured two of K4's patterns. Here a fixed battery, set before the run: (1) whether K4's letters are spread evenly across segments (the carved lines 1-4, 5-35, 36-66, 67-97; halves at 48/49; thirds; the stretch before EAST, between the runs, after CLOCK): chi-square of the segment-by-letter table; (2) the average index of coincidence when K4 is cut into m alphabets, m 1-48; (3) at widths 7, 21 and 31: repeated vertical bigrams (0056's statistic), vertical repeats (same letter directly below), diagonal repeats (one row down, one column right and left), and the largest number of horizontal doublets in one column. Each statistic against 1,000 letter-preserving shuffles: the two-sided rank p. An observation counts as outside the shuffles only if no shuffle is as extreme (p < 0.001, two-sided 0.002), and the number of statistics is stated so the expected number of such accidents is known.
revertedstatus
a new rootparents
4 mintime, all phases
0candidates
0/24known letters
unclocked
1
The experiment method
What the method does with the 24 known letters.
Before attacking a cipher, Stein measured it: how evenly each letter is spread along the text, and how the letters behave when the text is cut into a number of interleaved strands. We measure K4the carved letters The 97 letters cut into the copper at the CIA, shown at the top of every experiment page. the same way, seventy-one measurements in all, and compare each with a thousand random shufflings of K4's own letters. Only a measurement that no shuffling matches is reported as a real feature; with this many measurements, about one in seven of a single such accident would be expected by luck.
Words in the margin are defined on the glossary page.
1.1
The method at work
The carved letters go in at the top; the reading comes out at the bottom.
the idea
Stein began by measuring: letter counts along the text and the index of coincidence at every number of strands. Here the same for K4, seventy-one measurements fixed before the run.
the check
Each measurement against a thousand shufflings of K4's own 97 letters; only a value no shuffling reaches counts as a feature.
the bound
Nothing lies outside every shuffle. The doublets lining up in sevens and the repeats 21 apart are the least ordinary, as before (p 0.002 and 0.004). No new item.
2
Best candidate against the known letters
This experiment produced no candidate: the search ruled everything out before a full text was built. Its product is the bounded negative in section 7.
3
Walkthrough, by hand
Redo the method on a few letters with pencil and paper.
Cut K4 at the ends of its carved lines and count each letter in each piece; compare how uneven the counts are with the same for shuffled K4.
Write K4 in m interleaved strands (every m-th letter) for m = 1 to 48; in each strand count how often two letters drawn at random match; average.
Write K4 in rows of 7, 21 and 31; count letters that repeat directly below, or diagonally below, and the doublets falling in one column.
Shuffle K4's letters 1,000 times and repeat every count; a feature is real only if K4 is more extreme than every shuffle.
the worksheet: the first steps by hand, on squared paper
4
Worked example, generated
The same steps run by the code on the real letters.
K4 in rows of 7 (doublets marked by the column they start in):
O B K R U O X
O G H U L B S
O L I F B B W
F L R V Q Q P
R N G K S S O
T W T Q S J Q
S S E K Z Z W
A T J K L U D
I A W I N F B
N Y P V T T M
Z F P K W G D
K Z X T J C D
I G K U H U A
U E K C A R
doublets by starting column (0-6): {0: 1, 4: 5}
index of coincidence of all 97 letters: 0.0361 (random 26 letters: 0.0385; English: 0.066)
5
Hypothesis, for a cryptanalyst
Family, key space, the constraint under test, and the clues it reads.
Stein 1999 (knowledge/sources/stein-1999-cracking-the-courtyard-crypto.txt): 'I seemed to see different patterns throughout, but I wanted to quantify these impressions'; the row-wise frequency break between rows 14 and 15; the I.C. plots. C28 (the m = 13 peak) is F12.3. 0056: the width-7 doublet column and width-21 vertical repeats against 10,000 shuffles (corrected p 0.005 and 0.010). Shuffles keep K4's letters and permute positions. Statistics: S = 8 segment tables + 48 I.C. values + 3 widths x 5 repeat statistics = 71; at p < 0.002 two-sided about 0.14 false outliers expected. Any statistic outside every shuffle becomes a new item (F12.5 if it is a segment break).
6
Prediction
Written before the run; the result decides it.
The two known fingerprints come out at the edge (the width-7 doublet column near p 0.002-0.005, the width-21 vertical repeats near p 0.01), but with 71 statistics nothing lies outside every shuffle; no segment break; no I.C. peak at any m. Zero candidates.
7
Method
Compute the 71 statistics on K4.
1,000 shuffles of K4's letters (seed 1612): the same statistics.
For each, the two-sided rank p; list those beyond every shuffle; state the multiple-comparison count.
8
Result and bounds
The harness's record: candidates, gates, loss, and the negative result this experiment leaves behind.
0candidates returned
0passed every gate
0/24known letters, best
–lowest loss
nonechampion before
71 statistics x 1000 shuffles: outside every shuffle 0 ([]); smallest p width 7: most doublets in one column 0.002, width 21: repeated vertical bigrams (0056's statistic) 0.004, width 7: vertical repeats 0.008, segments: quarters 0.014
What was searched, as the harness recorded it.
family
observation, not a cipher: K4's statistics against 1,000 shuffles