Input-Output (Machine)
Input-output (machine input) questions show a line of numbers or words and the steps a machine makes, one change per step, until the line is in its final order. Find the rule from the given steps, then build the step that is asked.
What should you know about Input-Output (Machine)?
- Common rule: in each step the largest (or smallest) remaining number moves to the left end, after the ones already placed; the rest keep their order.
- Word rule: the word that comes first in the dictionary moves to the front in each step.
- The last step is the one after which the line no longer changes. If an element is already in place, no step is spent on it.
What are the shortcuts for Input-Output (Machine) questions?
- Step k = the k largest numbers in order at the front + the rest in their original order. You can write any step directly.
- To count steps, check whether the last few elements are already in place at the start; those steps are skipped.
- Write each step under the previous one so the moving element is easy to see.
How do you solve Input-Output (Machine) questions? Worked examples
Example 1
Input: 34 72 19 85 46. In each step the largest remaining number moves to the left, after those already moved. Which step is the last?
Solution
- Step I: 85 34 72 19 46; Step II: 85 72 34 19 46
- Step III: 85 72 46 34 19, which is fully in order, so Step III is last.
Answer: Step 3 (Step III)
Example 2
Input: sun bat cow ant dog. In each step the word that comes first in the dictionary moves to the front, after those already moved. What is Step II?
Solution
- Step I: ant sun bat cow dog
- Step II: ant bat sun cow dog
Answer: ant bat sun cow dog
What mistakes should you avoid in Input-Output (Machine)?
- Reordering the unmoved elements: only the moving element changes place; the rest keep their earlier order.
- Counting a step for an element that is already in its place.
Input-Output (Machine) question book: practice each sub-topic
- Number machines
- Word machines
- Counting the steps
Question book · 3 chapters
Input-Output (Machine)
A machine rearranges a line of numbers step by step. In each step it moves the largest of the remaining numbers to the left, just after the items it has already arranged. Input: 36 50 69 87 66 43 Step I: 87 36 50 69 66 43 In Step III, which item is 3rd from the right?
Solution
- Step I: 87 36 50 69 66 43
- Step II: 87 69 36 50 66 43
- Step III: 87 69 66 36 50 43
- Step IV: 87 69 66 50 36 43
- Step V: 87 69 66 50 43 36
A machine rearranges a line of words step by step. In each step it moves the word that comes first in dictionary order among the rest to the left, just after the items it has already arranged. Input: uncle ocean plant kite grass nurse Step I: grass uncle ocean plant kite nurse What is Step III?
Solution
- Step I: grass uncle ocean plant kite nurse
- Step II: grass kite uncle ocean plant nurse
- Step III: grass kite nurse uncle ocean plant
- Step IV: grass kite nurse ocean uncle plant
- Step V: grass kite nurse ocean plant uncle
A machine rearranges a line of words step by step. In each step it moves the word that comes first in dictionary order among the rest to the left, just after the items it has already arranged. Input: uncle house train light cloud flame Step I: cloud uncle house train light flame In which step is this arrangement obtained? cloud flame house light train uncle
Solution
- Step I: cloud uncle house train light flame
- Step II: cloud flame uncle house train light
- Step III: cloud flame house uncle train light
- Step IV: cloud flame house light uncle train
- Step V: cloud flame house light train uncle
Open the book to turn the pages: every question with its answer and full solution.
Ready? Take a mock: fresh questions every time, each with a step-by-step solution.