Skip over navigation
Cambridge University Faculty of Mathematics NRich logo
menu search
  • Teachers expand_more
    • Early years
    • Primary
    • Secondary
    • Post-16
    • Events
    • Professional development
  • Students expand_more
    • Primary
    • Secondary
    • Post-16
  • Parents expand_more
    • Early Years
    • Primary
    • Secondary
    • Post-16
  • Problem-Solving Schools
  • About NRICH expand_more
    • About us
    • Impact stories
    • Support us
    • Our funders
    • Contact us
  • search

Or search by topic

Number and algebra

  • The Number System and Place Value
  • Calculations and Numerical Methods
  • Fractions, Decimals, Percentages, Ratio and Proportion
  • Properties of Numbers
  • Patterns, Sequences and Structure
  • Algebraic expressions, equations and formulae
  • Coordinates, Functions and Graphs

Geometry and measure

  • Angles, Polygons, and Geometrical Proof
  • 3D Geometry, Shape and Space
  • Measuring and calculating with units
  • Transformations and constructions
  • Pythagoras and Trigonometry
  • Vectors and Matrices

Probability and statistics

  • Handling, Processing and Representing Data
  • Probability

Working mathematically

  • Thinking mathematically
  • Developing positive attitudes
  • Cross-curricular contexts

Advanced mathematics

  • Decision Mathematics and Combinatorics
  • Advanced Probability and Statistics
  • Mechanics
  • Calculus

For younger learners

  • Early Years Foundation Stage

Substitution Transposed

Age 11 to 16
Challenge Level Yellow starYellow starYellow star
  • Problem
  • Getting Started
  • Student Solutions
  • Teachers' Resources

Well done to Holly from Hymers School who cracked this problem. She described her method as follows:

The way I solved this problem was looking at the frequency graph on the Cipher Toolkit. I realised that it would line up with the normal English letter frequency if every letter was moved three to the right (e.g. h-e, d-a), so I moved them all three to the right and came up with a code, which I then transposed. I discovered the factors of 456 are 1, 2, 3, 4, 6, 8, 12, 19, 24, 38, 57, 76, 114, 152, 228 and 456. The first and last two wouldn't be likely, so I kept trying the different factors until I came up with 19 being the correct number of columns.

Writing the message in a 24 by 19 grid and decoding the Caesar shift of +3 gives:

t e e r g k g t r w i t s s a e d a i
h n t a e s a h b i n e i a t r o i e
e t h i t t r e a t a d n g h e w n n
y o e l t h d y n h n v t e r l s t c
w b y w i e e w c t o i h t o e a a e
e e h a n p n e h h r l e h o c n n a
r g a y g a s r i e d l f a m t d d s
e i d s t n a e l i i a r t w r a e t
n n e e o t n j d r n w o w i i g v h
o w v x m o d u r f a i n a t c o e e
t i e c a m m s e a r t t s h b o r h
r t r e s i a t n t y h d c h e d y o
a h t p k m d o a h r c o a o l d m u
i i h t e e a r n e e o o l t l e o s
l d o a l z m d d r d l r l a s a d e
w o u s y o e i t a b o a e n f l e a
a n g a n o t n h n r u t d d r o r g
y t h m e l u a e d i r i a c e f n e
c s t e a o s r y m c e l h o n w c n
h u a a n g s y l o k d e a l c h o t
i p b n d i a s i t f g d l d h i n s
l p o s c c u u v h r l p l w w t v s
d o u o o a d b e e o a a a a i e e a
r s t f o l s u d r n s s b t n p n y

Reading down the columns gives the plaintext:
 

theywerenotrailwaychildrentobeginwithidontsupposetheyhadeverthoughta
boutrailwaysexceptasameansofgettingtomaskelyneandcooksthepantomimezo
ologicalgardensandmadametussaudstheywerejustordinarysuburbanchildren
andtheylivedwiththeirfatherandmotherinanordinaryredbrickfrontedvilla
withcolouredglassinthefrontdooratiledpassagethatwascalledahallabathr
oomwithhotandcoldwaterelectricbellsfrenchwindowsandagooddealofwhitep
aintandeverymodernconvenienceasthehouseagentssay


Here is the text that Holly managed to decipher:

They were not railway children to begin with. I don't suppose they had ever thought about railways except as a means of getting to Maskelyne and Cook's, the Pantomime, Zoological Gardens, and Madame Tussaud's. They were just ordinary suburban children, and they lived with their Father and Mother in an ordinary red-brick-fronted villa, with coloured glass in the front door, a tiled passage that was called a hall, a bath-room with hot and cold water, electric bells, French windows, and a good deal of white paint, and 'every modern convenience', as the house-agents say.

It's the first paragraph from "The Railway Children" by E. Nesbit

You may also like

The Best Card Trick?

Time for a little mathemagic! Choose any five cards from a pack and show four of them to your partner. How can they work out the fifth?

Substitution Cipher

Find the frequency distribution for ordinary English, and use it to help you crack the code.

Secret Transmissions

How can Agent X transmit data on a faulty line and be sure that her message will get through?

  • Tech help
  • Accessibility Statement
  • Sign up to our newsletter
  • Twitter X logo

The NRICH Project aims to enrich the mathematical experiences of all learners. To support this aim, members of the NRICH team work in a wide range of capacities, including providing professional development for teachers wishing to embed rich mathematical tasks into everyday classroom practice.

NRICH is part of the family of activities in the Millennium Mathematics Project.

University of Cambridge logo NRICH logo