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: 71 20 78 wheat 73 bean corn rice
Step I: bean 71 20 wheat 73 corn rice 78
Step II: bean corn 71 20 wheat rice 73 78
Step III: bean corn rice 20 wheat 71 73 78
Step IV: bean corn rice wheat 20 71 73 78
Step IV is the last step of this input.
Input: 55 39 80 pine 42 elm oak 75 ash fir
Following the same rule, which of the following will be Step III for this input?
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → ash elm fir 39 pine 42 oak 55 75 80
Compare each step of the illustration with the one before it. In each step, the word that comes first in dictionary order among the words left moves to the next place from the left end, and the largest of the numbers left moves to the next place from the right end; the others keep their order.
Step I: ‘bean’ (first in dictionary order) moves to the first place from the left, and 78 (the largest number left) moves to the first place from the right
Step II: ‘corn’ (first in dictionary order) moves to the second place from the left, and 73 (the largest number left) moves to the second place from the right
Step III: ‘rice’ (first in dictionary order) moves to the third place from the left, and 71 (the largest number left) moves to the third place from the right
Step IV: ‘wheat’ (first in dictionary order) moves to the fourth place from the left, and 20 (the largest number left) moves to the fourth place from the right
After Step IV the words stand in dictionary order on the left and the numbers from the smallest to the largest on the right, so the arrangement is complete.
Apply the same rule to the input 55 39 80 pine 42 elm oak 75 ash fir.
Step I: ‘ash’ (first in dictionary order) moves to the first place from the left, and 80 (the largest number left) moves to the first place from the right, giving ash 55 39 pine 42 elm oak 75 fir 80
Step II: ‘elm’ (first in dictionary order) moves to the second place from the left, and 75 (the largest number left) moves to the second place from the right, giving ash elm 55 39 pine 42 oak fir 75 80
Step III: ‘fir’ (first in dictionary order) moves to the third place from the left, and 55 (the largest number left) moves to the third place from the right, giving ash elm fir 39 pine 42 oak 55 75 80
So Step III is ash elm fir 39 pine 42 oak 55 75 80.
Why the other options are incorrect
Option (1) ash elm 55 39 pine 42 oak fir 75 80 — Incorrect. This is Step II; in Step III ‘fir’ and 55 must also be moved.
Option (3) ash elm fir oak 39 pine 42 55 75 80 — Incorrect. This is Step IV, where ‘oak’ and 42 have also been moved.
Option (4) ash elm fir 39 pine 42 55 oak 75 80 — Incorrect. Here 55 is put in front of ‘oak’; the others keep their order, so ‘oak’ stays before 55.