When a line of words and numbers is fed into a machine, the machine rearranges it step by step following a particular rule. An illustration of an input and its rearrangement is given below.
Input: tree 45 ant 18 milk 62 bowl 33
Step I: ant tree 45 18 milk 62 bowl 33
Step II: ant 18 tree 45 milk 62 bowl 33
Step III: ant 18 bowl tree 45 milk 62 33
Step IV: ant 18 bowl 33 tree 45 milk 62
Step V: ant 18 bowl 33 milk tree 45 62
Step VI: ant 18 bowl 33 milk 45 tree 62
Step VI is the last step of this input.
Input: 52 rain cup 17 fish 84 door 26
Following the same rule, which of the following will be Step IV for this input?
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → cup 17 door 26 52 rain fish 84
Compare each step of the illustration with the one before it. Words and numbers are placed by turns from the left end: in Steps I, III, V, ... the word that comes first in dictionary order among the words left, and in Steps II, IV, VI, ... the smallest of the numbers left, moves to the next place; the others keep their order.
Step I: ‘ant’ comes first in dictionary order, so it moves to the first place from the left
Step II: 18 is the smallest of the numbers left, so it moves to the second place from the left
Step III: ‘bowl’ comes first in dictionary order, so it moves to the third place from the left
Step IV: 33 is the smallest of the numbers left, so it moves to the fourth place from the left
Step V: ‘milk’ comes first in dictionary order, so it moves to the fifth place from the left
Step VI: 45 is the smallest of the numbers left, so it moves to the sixth place from the left
After Step VI words and numbers come by turns, the words in dictionary order and the numbers from the smallest to the largest, so the arrangement is complete.
Apply the same rule to the input 52 rain cup 17 fish 84 door 26.
Step I: ‘cup’ comes first in dictionary order, so it moves to the first place from the left, giving cup 52 rain 17 fish 84 door 26
Step II: 17 is the smallest of the numbers left, so it moves to the second place from the left, giving cup 17 52 rain fish 84 door 26
Step III: ‘door’ comes first in dictionary order, so it moves to the third place from the left, giving cup 17 door 52 rain fish 84 26
Step IV: 26 is the smallest of the numbers left, so it moves to the fourth place from the left, giving cup 17 door 26 52 rain fish 84
So Step IV is cup 17 door 26 52 rain fish 84.
Why the other options are incorrect
Option (1) cup 17 door 52 rain fish 84 26 — Incorrect. This is Step III; in Step IV the number 26 must also be placed.
Option (2) cup 17 door 26 fish 52 rain 84 — Incorrect. This is Step V, where ‘fish’ has also been placed.
Option (4) cup 17 door 84 52 rain fish 26 — Incorrect. Here 84, the largest number, is placed; the machine takes the smallest number left, 26.