• Foundation
  • About 13 min
  • 5 practice questions

Reversing the line and reversing inside items

Follow machines that reverse the whole line, or the letters in each word, or the digits in each number, and use the repeating pattern to jump to a distant step.

If something looks wrong, please tell us.

Some machines do not sort at all. In each step they reverse something: the order of the items, or the letters inside each word, or the digits inside each number. These machines are easy to follow, and they repeat after a few steps. If you see the repeat, you can answer 'what is Step VI?' without writing six lines.

Two kinds of reversal

  • Reversing the line: the last item becomes the first, the second last becomes the second, and so on. The items themselves stay the same.
  • Reversing inside items: each word is written backwards, or each number has its digits written backwards. The order of the items stays the same.

Doing the same reversal twice brings you back to where you started. That is why reversal machines repeat.

A machine that alternates

Rule A: on odd steps (I, III, V ...) the order of the whole line is reversed; on even steps (II, IV, VI ...) the letters or digits inside each item are reversed.

Worked examples

Example 1. Input: red sky blue. Step I reverses the line: blue sky red. Step II reverses inside each word: eulb yks der. Step III reverses the line: der yks eulb. Step IV reverses inside each word: red sky blue. Step IV is the same as the input.

Example 2. Input: 24 17 95 36. Step I: 36 95 17 24. Step II: 63 59 71 42. Step III: 42 71 59 63. Step IV: 24 17 95 36, the input again. The machine repeats every 4 steps, so Step V equals Step I and Step VI equals Step II.

Example 3. Using Example 2, what is Step VI? Divide 6 by 4: the remainder is 2, so Step VI is the same as Step II: 63 59 71 42.

Example 4 (a single reversal). Rule B: in each step, the order of the whole line is reversed. Input: 8 3 6 1. Step I: 1 6 3 8. Step II: 8 3 6 1, the input again. This machine repeats every 2 steps, so every odd step gives 1 6 3 8, and every even step gives 8 3 6 1. Step V is therefore 1 6 3 8.

Example 5 (words that read the same both ways). Input: mom dad pop. Reversing inside each word changes nothing, because each word reads the same backwards. Reversing the line gives pop dad mom. So under Rule A, Step I is pop dad mom, Step II is also pop dad mom, Step III is mom dad pop, and Step IV is mom dad pop again. Always check each word before you assume it changes.

Exam setters avoid numbers that end in zero in this kind of machine, because reversing the digits of 40 would give 04, which is not a normal number. If you meet a number such as 305, reverse its three digits to get 503; the middle digit stays in the middle.

Find how many steps the pattern takes to repeat, divide the step number by that period, and use the remainder.

— Rule to remember

Key takeaways

  • Reversing twice returns the original.
  • Rule A repeats every 4 steps; Rule B repeats every 2 steps.
  • If the remainder is 0, the step equals the last step of the cycle (Step IV in Rule A).
  • Keep reversals of the line and reversals inside items separate.

Check your understanding

  1. 1. Rule A (odd steps reverse the line, even steps reverse inside each word). Input: red sky blue. What is Step II?

    1. eulb yks der
    2. blue sky red
    3. der yks eulb
    4. red sky blue
    Show answer

    Answer: A. Step I gives blue sky red. Reversing inside each word gives eulb yks der.

  2. 2. Using the same rule and input, what is Step III?

    1. blue sky red
    2. eulb yks der
    3. der yks eulb
    4. red sky blue
    Show answer

    Answer: C. Reversing the line of Step II (eulb yks der) gives der yks eulb.

  3. 3. Rule A applied to the input 24 17 95 36. What is Step VI?

    1. 42 71 59 63
    2. 63 59 71 42
    3. 36 95 17 24
    4. 24 17 95 36
    Show answer

    Answer: B. Rule A repeats every 4 steps, so Step VI equals Step II, which is 63 59 71 42.

  4. 4. After how many steps does Rule A first return the line to its input?

    1. 2
    2. 3
    3. 6
    4. 4
    Show answer

    Answer: D. Two reversals of the line and two reversals inside items are needed, which is 4 steps.

  5. 5. Rule B (the line is reversed in every step). Input: 8 3 6 1. What is Step V?

    1. 1 6 3 8
    2. 8 3 6 1
    3. 3 8 1 6
    4. 6 1 8 3
    Show answer

    Answer: A. Odd steps give the reversed line, so Step V is 1 6 3 8.

Sign in to keep track of the lessons you finish.

Next lesson → Answering questions from a step

Privacy · Terms · Refunds · Delivery