AdvancedLogical Reasoning · Lesson 14 of 17 · Updated ·
Input–Output (Machine Input) — Find the Rule from the Steps
An input–output question (also called machine input) shows a line of words and numbers, and then the same line after Step I, Step II, Step III… A "machine" changes the line a little in every step. You must find the rule and then use it on a new input.
These questions look long, but each one hides a simple rule. Once you have the rule, most questions take less than a minute.
1. The three common rule types
| Type | What the machine does | How to spot it |
|---|---|---|
| Arrangement (sorting) | Picks one word and/or one number each step and moves it to an end, in a fixed order (A to Z, smallest to largest) | The last step is fully sorted; one or two items move per step |
| Shifting | Moves a fixed group of positions each step (for example, the last two items come to the front) | The same pattern of positions moves every time |
| Calculation | Changes every number with a formula (add, halve, square, digit sum) | Numbers change value; nothing moves |
Always check the last step first. If the last step is in alphabetical or numerical order, it is an arrangement machine.
2. An arrangement machine, step by step
Input: tower 47 bus 82 apple 19 kite 63
The machine gives:
Finding the rule. Compare the input with Step I:
- apple is the first word in alphabetical order. It moved to the left end.
- 19 is the smallest number. It moved to just after apple.
- Every other item kept its old order: tower 47 bus 82 kite 63.
Check the guess with Step II: bus is the next word (A to Z) and 47 the next smallest number. They go just after the part already arranged (apple 19). The rule holds.
Rule: in each step, the next word in alphabetical order and the next smallest number move to the left, word first, right after the items arranged earlier. The rest keep their order.
Why only 3 steps for 4 pairs? After Step III, three pairs are in place, and the last pair (tower 82) is already where it should be. The machine stops when the line is fully arranged.
Using the rule on a new input
Input: mango 34 desk 71 zebra 12 cart 58 ink 90
| Step | Line |
|---|---|
| Input | mango 34 desk 71 zebra 12 cart 58 ink 90 |
| I | cart 12 mango 34 desk 71 zebra 58 ink 90 |
| II | cart 12 desk 34 mango 71 zebra 58 ink 90 |
| III | cart 12 desk 34 ink 58 mango 71 zebra 90 |
Step III is fully arranged, so 3 steps are needed even though there are 5 words.
How we got Step I: the first word alphabetically is cart and the smallest number is 12. Remove both from their places and put them at the front. The others (mango 34 desk 71 zebra 58 ink 90) stay in their old order.
3. Answering the usual questions
Placement tests ask 3–5 questions on one input. The common ones:
- "Which step is this line?" Count how many pairs are already arranged at the left.
- "How many steps are needed?" Run the steps until the line is sorted. Watch for pairs that fall into place on their own.
- "What is the third element from the right in Step II?" Write only Step II, then count. In the table above, Step II ends with zebra 58 ink 90, so the third from the right is 58.
- "Which element is exactly between X and Y in Step III?" Write Step III and look.
Speed trick: in an arrangement machine, Step k always starts with the first k words (A to Z) and the k smallest numbers. You can write Step III directly without writing Steps I and II. Only the unarranged tail needs care: it keeps the order it had in the input.
4. A calculation machine
Input: 48 27 36 15
| Step | Line |
|---|---|
| Input | 48 27 36 15 |
| I | 24 26 18 14 |
| II | 12 13 9 7 |
| III | 6 12 8 6 |
Finding the rule. 48 → 24 and 36 → 18 are halved. 27 → 26 and 15 → 14 lose 1. So:
- even number → divide by 2
- odd number → subtract 1
Check Step II: 24 → 12 (even, halved), 26 → 13 (even, halved), 18 → 9, 14 → 7 ✓. Step III: 12 → 6, 13 → 12 (odd, minus 1), 9 → 8, 7 → 6 ✓.
In calculation machines the position never changes. Track one number down the steps, and test the same idea on a second number before you trust it.
5. A shifting machine
Input: P Q R S T U Step I: T U P Q R S Step II: R S T U P Q
The last two items come to the front each step. Step III would be P Q R S T U again — back to the input after 3 steps, because 6 items ÷ 2 per step = 3.
Common mistakes
- Guessing the rule from one step. Always confirm it on the next step.
- Changing the order of the unarranged items. In most arrangement machines they keep their input order.
- Forgetting that the last pair often falls into place by itself, so the number of steps is less than the number of pairs.
- Treating numbers as text: 9 is smaller than 12, even though "9" comes after "1" as a character.
Quick recap
- Look at the last step first: sorted → arrangement; values changed → calculation; blocks moved → shifting.
- Find the rule from Input → Step I, and confirm it on Step II.
- Arrangement: Step k starts with the first k words and numbers in order; the rest keep their input order.
- Count steps until the line is fully arranged — not just the number of pairs.