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: 52 40 31 23 30 44 58
Step I: 23 52 40 31 30 44 58
Step II: 23 30 52 40 31 44 58
Step III: 23 30 31 52 40 44 58
Step IV: 23 30 31 40 52 44 58
Step V: 23 30 31 40 44 52 58
Step V is the last step of this input.
Input: 88 73 27 14 69 79 67 92
Following the same rule, how many steps will be needed to complete the arrangement of this input?
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → Six
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 all the other numbers keep their order.
Step I: 23 is the smallest of the numbers left, so it moves to the first place from the left
Step II: 30 is the smallest of the numbers left, so it moves to the second place from the left
Step III: 31 is the smallest of the numbers left, so it moves to the third place from the left
Step IV: 40 is the smallest of the numbers left, so it moves to the fourth place from the left
Step V: 44 is the smallest of the numbers left, so it moves to the fifth place from the left
After Step V the last two numbers, 52 58, are already in their final places, so the machine stops there.
Apply the same rule to the input 88 73 27 14 69 79 67 92.
Step I: 14 is the smallest of the numbers left, so it moves to the first place from the left, giving 14 88 73 27 69 79 67 92
Step II: 27 is the smallest of the numbers left, so it moves to the second place from the left, giving 14 27 88 73 69 79 67 92
Step III: 67 is the smallest of the numbers left, so it moves to the third place from the left, giving 14 27 67 88 73 69 79 92
Step IV: 69 is the smallest of the numbers left, so it moves to the fourth place from the left, giving 14 27 67 69 88 73 79 92
Step V: 73 is the smallest of the numbers left, so it moves to the fifth place from the left, giving 14 27 67 69 73 88 79 92
Step VI: 79 is the smallest of the numbers left, so it moves to the sixth place from the left, giving 14 27 67 69 73 79 88 92
After Step VI the last two numbers, 88 92, are already in their final places, so Step VI is the last step: six steps are needed.
Why the other options are incorrect
Option (1) Seven — Incorrect. After Step VI the last two numbers, 88 92, are already in their final places, so the machine stops; there is no Step VII.
Option (3) Five — Incorrect. After Step V the line is 14 27 67 69 73 88 79 92; 79 is not yet in its place, so more steps are needed.
Option (4) Eight — Incorrect. After Step VI the last two numbers, 88 92, are already in their final places, so the machine stops; there is no Step VIII.