A number arrangement machine, when given an input line of numbers, rearranges them step by step following a particular rule. An illustration of an input and its rearrangement is given below.
Input: 97 64 84 37 94 52 12 34
Step I: 12 64 84 37 94 52 34 97
Step II: 12 34 64 84 37 52 94 97
Step III: 12 34 37 64 52 84 94 97
Step IV: 12 34 37 52 64 84 94 97
Step IV is the last step of this input.
Input: 80 90 54 18 16 56 38 27
Following the same rule, which number will be fourth from the left in Step II for this input?
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → 56
Compare each step of the illustration with the one before it. In each step, the smallest of the numbers not yet arranged moves to the next place from the left end and the largest of them moves to the next place from the right end, both in the same step; the other numbers keep their order.
Step I: 12 (the smallest number left) moves to the first place from the left, and 97 (the largest number left) moves to the first place from the right
Step II: 34 (the smallest number left) moves to the second place from the left, and 94 (the largest number left) moves to the second place from the right
Step III: 37 (the smallest number left) moves to the third place from the left, and 84 (the largest number left) moves to the third place from the right
Step IV: 52 (the smallest number left) moves to the fourth place from the left, and 64 (the largest number left) moves to the fourth place from the right
After Step IV every one of the numbers is in its final place, so the arrangement is complete.
Apply the same rule to the input 80 90 54 18 16 56 38 27.
Step I: 16 (the smallest number left) moves to the first place from the left, and 90 (the largest number left) moves to the first place from the right, giving 16 80 54 18 56 38 27 90
Step II: 18 (the smallest number left) moves to the second place from the left, and 80 (the largest number left) moves to the second place from the right, giving 16 18 54 56 38 27 80 90
In Step II, 16 18 54 56 38 27 80 90, the fourth from the left is 56.
Why the other options are incorrect
Option (1) 18 — Incorrect. In Step II, 18 is second from the left (seventh from the right).
Option (2) 38 — Incorrect. In Step II, 38 is fifth from the left (fourth from the right).
Option (4) 54 — Incorrect. In Step II, 54 is third from the left (sixth from the right).