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: cashew 49 garden 83 shark fort 41 falcon 72 14
Step I: 14 cashew 49 garden 83 fort 41 falcon 72 shark
Step II: 14 41 cashew 49 83 fort falcon 72 garden shark
Step III: 14 41 49 cashew 83 falcon 72 fort garden shark
Step IV: 14 41 49 72 cashew 83 falcon fort garden shark
Step V: 14 41 49 72 83 cashew falcon fort garden shark
Step V is the last step of this input.
Step I of another input is: 35 89 duck 79 51 mirror 36 slate brush velvet
Following the same rule, which of the following will be Step III for that input?
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → 35 36 51 89 duck 79 brush mirror slate velvet
Compare each step of the illustration with the one before it. In each step, the smallest of the numbers left moves to the next place from the left end, and the word that comes last in dictionary order among the words left moves to the next place from the right end; the others keep their order.
Step I: 14 (the smallest number left) moves to the first place from the left, and ‘shark’ (last in dictionary order among the words left) moves to the first place from the right
Step II: 41 (the smallest number left) moves to the second place from the left, and ‘garden’ (last in dictionary order among the words left) moves to the second place from the right
Step III: 49 (the smallest number left) moves to the third place from the left, and ‘fort’ (last in dictionary order among the words left) moves to the third place from the right
Step IV: 72 (the smallest number left) moves to the fourth place from the left, and ‘falcon’ (last in dictionary order among the words left) moves to the fourth place from the right
Step V: 83 (the smallest number left) moves to the fifth place from the left, and ‘cashew’ (last in dictionary order among the words left) moves to the fifth place from the right
After Step V the numbers stand from the smallest to the largest on the left and the words in dictionary order on the right, so the arrangement is complete.
In Step I, 35 at the left end and ‘velvet’ at the right end are already in place. Continue from Step I with the same rule.
Step II: 36 (the smallest number left) moves to the second place from the left, and ‘slate’ (last in dictionary order among the words left) moves to the second place from the right, giving 35 36 89 duck 79 51 mirror brush slate velvet
Step III: 51 (the smallest number left) moves to the third place from the left, and ‘mirror’ (last in dictionary order among the words left) moves to the third place from the right, giving 35 36 51 89 duck 79 brush mirror slate velvet
So Step III is 35 36 51 89 duck 79 brush mirror slate velvet.
Why the other options are incorrect
Option (1) 35 36 51 89 duck 79 mirror brush slate velvet — Incorrect. Only 51 has moved; in the same step ‘mirror’, last in dictionary order among the words left, must go to the third place from the right.
Option (2) 35 36 89 duck 79 51 mirror brush slate velvet — Incorrect. This is Step II; in Step III 51 and ‘mirror’ must also move.
Option (3) 35 36 89 duck 79 51 brush mirror slate velvet — Incorrect. Only ‘mirror’ has moved; in the same step 51, the smallest number left, must go to the third place from the left.