Syllabus links
Key Stage 2 (age 7 to 11)
Can you crack the secret code?
This experiment gives children an opportunity to discover the relative frequency of letters in English.
The child will learn how to create a frequency table and use it to decode a secret message.
Open your book at a random page. You are going to count the number of each letter. This will help you to crack the code.
For each letter, draw a small line in the box with that letter. When you get to five, draw a line across to form a gate. This will make it easier to count them up in the end.
A substitution code is where you substitute one set of letters for another.
For example:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
O D P I R H Z A V Q G K N U Y E W S J C L M T X F B
To encode a word, find the letter in the first row and write the letter from the second row. For example, SECRET becomes JRPSRC.
To decode a word, do the reverse: find the letters in the second row and write the matching letter from the first row.
You have received the following coded message:
RQI RKIJFAKI WF QWTTIB JR RQI PHRRHN HO RQI CJKTIB.
TH BHR UHHS OHK WR WB RQI TJERWNI PIVJAFI EHA JKI PIWBC OHUUHGIT.
For each letter, write down how many times it appears in the coded message.
Try to fill in the most common letters first. Remember that your list is only a guide and won't match the coded message exactly.
When you work out what a word is, you can fill in those letters in the rest of the phrase.
The letter percentages from the book will depend on the book, but the following are typical values:
A=8.17% B=1.49% C=2.78% D=4.25% E=12.70% F=2.23% G=2.02% H=6.09% I=6.97% J=0.15% K=0.77% L=4.03% M=2.41% N=6.75% O=7.51% P=1.93% Q=0.10% R=5.99% S=6.33% T=9.06% U=2.76% V=0.98% W=2.36% X=0.15% Y=1.97% Z=0.07%
The letter counts for the question are as follows:
A=3 B=5 C=2 D=0 E=2 F=3 G=1 H=11 I=14 J=6 K=5 L=0 M=0
N=2 O=3 P=3 Q=5 R=11 S=1 T=6 U=3 V=1 W=6 X=0 Y=0 Z=0
There are 93 letters in total.
A=3.23% B=5.38% C=2.15% D=0.00% E=2.15% F=3.23% G=1.08% H=11.83% I=15.05% J=6.45% K=5.38% L=0.00% M=0.00% N=2.15% O=3.23% P=3.23% Q=5.38% R=11.83% S=1.08% T=6.45% U=3.23% V=1.08% W=6.45% X=0.00% Y=0.00% Z=0.00%
I=15.05% H=11.83% R=11.83% J=6.45% T=6.45% W=6.45% B=5.38% K=5.38% Q=5.38% A=3.23% F=3.23% O=3.23% P=3.23% U=3.23% C=2.15% E=2.15% N=2.15% G=1.08% S=1.08% V=1.08% D=0.00% L=0.00% M=0.00% X=0.00% Y=0.00% Z=0.00%
The following substitution code was used:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
J P V T I O C Q W D S U N B H X Z K F R A M G Y E L
The decoded message is as follows:
THE TREASURE IS HIDDEN AT THE BOTTOM OF THE GARDEN. DO NOT LOOK FOR IT IN THE DAYTIME BECAUSE YOU ARE BEING FOLLOWED.
Solving this problem is quite challenging, so you might have to help the child (or at least check that they haven't gone wrong).
One way to create a more accurate version of the frequency chart would be to use more words to get the frequencies.
Another approach would be to count the frequencies of pairs of letters instead of single letters. This should make it easier to decode messages.
You can find frequency lists of pairs of letters online.