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: 63 32 29 66 37 24 76
Step I: 63 32 29 66 37 76 24
Step II: 63 32 66 37 76 29 24
Step III: 63 66 37 76 32 29 24
Step IV: 63 66 76 37 32 29 24
Step V: 66 76 63 37 32 29 24
Step VI: 76 66 63 37 32 29 24
Step VI is the last step of this input.
Step II of another input is: 68 41 38 43 92 15 13
Following the same rule, which of the following will be Step IV for that input?
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → 68 43 92 41 38 15 13
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 right end, and all the other numbers keep their order.
Step I: 24 is the smallest of the numbers left, so it moves to the first place from the right
Step II: 29 is the smallest of the numbers left, so it moves to the second place from the right
Step III: 32 is the smallest of the numbers left, so it moves to the third place from the right
Step IV: 37 is the smallest of the numbers left, so it moves to the fourth place from the right
Step V: 63 is the smallest of the numbers left, so it moves to the fifth place from the right
Step VI: 66 is the smallest of the numbers left, so it moves to the sixth place from the right
After Step VI every one of the numbers is in its final place, so the arrangement is complete.
In Step II, the last two numbers, 15 13, are already in place. Continue from Step II with the same rule.
Step III: 38 is the smallest of the numbers left, so it moves to the third place from the right, giving 68 41 43 92 38 15 13
Step IV: 41 is the smallest of the numbers left, so it moves to the fourth place from the right, giving 68 43 92 41 38 15 13
So Step IV is 68 43 92 41 38 15 13.
Why the other options are incorrect
Option (1) 68 92 43 41 38 15 13 — Incorrect. This is Step V, where 43 has also been moved.
Option (2) 68 41 43 92 38 15 13 — Incorrect. This is Step III; in Step IV 41 must also move.
Option (3) 68 41 92 43 38 15 13 — Incorrect. Here 43 has been moved in Step IV, but the number to move is 41, the smallest of the numbers left.