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: 23 98 44 17 39 33
Step I: 17 98 44 23 39 33
Step II: 17 23 44 98 39 33
Step III: 17 23 33 98 39 44
Step IV: 17 23 33 39 98 44
Step V: 17 23 33 39 44 98
Step V is the last step of this input.
Input: 28 34 99 88 27 63
Following the same rule, which of the following will be Step III for this input?
Answer & explanation
Correct answer: option 1
The correct answer is Option (1) → 27 28 34 88 99 63
Compare each step of the illustration with the one before it. In each step, the smallest of the numbers not yet arranged changes places with the number standing in the next place from the left end; the other numbers stay where they are.
Step I: 17 is the smallest of the numbers left, so it changes places with 23, which stands in the first place from the left
Step II: 23 is the smallest of the numbers left, so it changes places with 98, which stands in the second place from the left
Step III: 33 is the smallest of the numbers left, so it changes places with 44, which stands in the third place from the left
Step IV: 39 is the smallest of the numbers left, so it changes places with 98, which stands in the fourth place from the left
Step V: 44 is the smallest of the numbers left, so it changes places with 98, which stands in the fifth place from the left
After Step V every one of the numbers is in its final place, so the arrangement is complete.
Apply the same rule to the input 28 34 99 88 27 63.
Step I: 27 is the smallest of the numbers left, so it changes places with 28, which stands in the first place from the left, giving 27 34 99 88 28 63
Step II: 28 is the smallest of the numbers left, so it changes places with 34, which stands in the second place from the left, giving 27 28 99 88 34 63
Step III: 34 is the smallest of the numbers left, so it changes places with 99, which stands in the third place from the left, giving 27 28 34 88 99 63
So Step III is 27 28 34 88 99 63.
Why the other options are incorrect
Option (2) 27 28 34 63 99 88 — Incorrect. This is Step IV, where 63 has also been moved.
Option (3) 27 28 99 88 34 63 — Incorrect. This is Step II; in Step III 34 must also move.
Option (4) 27 28 63 88 34 99 — Incorrect. Here 63 has been brought into the third place, but the number to move is 34, the smallest of the numbers left.