Scrambled Codes

Oh no! The Evil Gollarks are attacking.
You need to send a secret
message to warn your agent without
making everybody else panic!

CODES Home Page

One simple way of coding a message is to mix up the letters in a secret way that only your agent knows. (Your agent is the person you send the message to.)

Suppose we want to say THE ALIENS ARE ATTACKING.

The easiest way to scramble this message is to split it into pairs of letters:
TH EA LI EN SA RE AT TA CK IN GF
Note: As the last G was on its own we added a random letter so it could be in a pair.

Now we just swap each pair of letters round!
HT AE IL NE AS ER TA AT KC NI FG

And just to finish it off, we can move the spaces around:

HTA EILN EASER TAA TKCN IFG

Already we've made a nice code, but now we'll make it even better.

The Scramble Grid

This time we'll code a longer message: THE ALIENS ARE ATTACKING TOMORROW NIGHT AT NINE O CLOCK.

You write your message out in a grid.

Your grid can be any size, as long as your agent knows how big it is. Here we've used a grid that has six columns and eight rows.

You start by filling letters in along the top row, then the next row and so on.

You'll see we've added some random letters (UMR) at the end to complete the bottom row.

Now you look down the first column and write out the letters in order.

T E A I O I T O

Next you write out the letters going down the second column, then the third column and so on!

Your scrambled message would look like this:

TEAIOITO HNTNRGEC ESTGRHNK AAATOTOU LRCOWACM IEKMNTLR

Finally, to hide how many columns were in your grid, you can move the spaces!

TEA IOIT OH NTN RGECE STG R HNKAAA TOTO ULRCO WA C MIEKM NTLR

You can DOWNLOAD and PRINT scramble code grids with complete instructions here.
To DECODE a message like this, your agent uses a blank grid the same size as the one you used. The agent writes the coded message in, but he fills the letters in going down the columns. When he has filled the first column, he continues filling the letters in the second column and so on. When he's finished, the message can be read off along the rows!

If your agent doesn't have a grid, he can still decode your message, so long as he knows your grid had EIGHT rows.

  • The agent writes down the first letter T
  • The agent then counts along eight, and writes down the next letter H
  • The agent counts along eight more and writes down E.
  • When the agent reaches the end of the coded message, he will have written down THEALI.
  • The agent then goes back to the front and writes the second letter E... then counts along eight letters and so on!

CODES Home Page

Teacher Resources

The Murderous Maths Home Page