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: 85 sheep cabin 57 crab 58 wire 80
Step I: cabin 85 sheep 57 crab 58 wire 80
Step II: cabin 57 85 sheep crab 58 wire 80
Step III: cabin 57 crab 85 sheep 58 wire 80
Step IV: cabin 57 crab 58 85 sheep wire 80
Step V: cabin 57 crab 58 sheep 85 wire 80
Step VI: cabin 57 crab 58 sheep 80 85 wire
Step VII: cabin 57 crab 58 sheep 80 wire 85
Step VII is the last step of this input.
Input: 74 64 canvas watch piano 27 island 72
Following the same rule, which of the following will be Step IV for this input?
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → canvas 27 island 64 74 watch piano 72
Compare each step of the illustration with the one before it. The machine places a word and a number by turns from the left end. In Steps I, III, V, ... the word that comes first in dictionary order among the words left moves to the next place from the left; in Steps II, IV, VI, ... the smallest of the numbers left moves to the next place from the left. The others keep their order.
Step I: ‘cabin’ comes first in dictionary order among the words left, so it moves to the first place from the left
Step II: 57 is the smallest of the numbers left, so it moves to the second place from the left
Step III: ‘crab’ comes first in dictionary order among the words left, so it moves to the third place from the left
Step IV: 58 is the smallest of the numbers left, so it moves to the fourth place from the left
Step V: ‘sheep’ comes first in dictionary order among the words left, so it moves to the fifth place from the left
Step VI: 80 is the smallest of the numbers left, so it moves to the sixth place from the left
Step VII: ‘wire’ comes first in dictionary order among the words left, so it moves to the seventh place from the left
After Step VII the words (in dictionary order) and the numbers (from the smallest to the largest) stand by turns, so the arrangement is complete.
Apply the same rule to the input 74 64 canvas watch piano 27 island 72.
Step I: ‘canvas’ comes first in dictionary order among the words left, so it moves to the first place from the left, giving canvas 74 64 watch piano 27 island 72
Step II: 27 is the smallest of the numbers left, so it moves to the second place from the left, giving canvas 27 74 64 watch piano island 72
Step III: ‘island’ comes first in dictionary order among the words left, so it moves to the third place from the left, giving canvas 27 island 74 64 watch piano 72
Step IV: 64 is the smallest of the numbers left, so it moves to the fourth place from the left, giving canvas 27 island 64 74 watch piano 72
So Step IV is canvas 27 island 64 74 watch piano 72.
Why the other options are incorrect
Option (1) canvas 27 island 64 piano 74 watch 72 — Incorrect. This is Step V, where ‘piano’ has also been moved.
Option (2) canvas 27 island 74 64 watch piano 72 — Incorrect. This is Step III; in Step IV 64 must also move.
Option (3) canvas 27 island piano 74 64 watch 72 — Incorrect. In Step IV it is the turn of a number, so 64 must move, not ‘piano’.