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 57 85 18 75 38 15
Step I: 15 57 85 18 75 38 23
Step II: 15 18 85 57 75 38 23
Step III: 15 18 23 57 75 38 85
Step IV: 15 18 23 38 75 57 85
Step V: 15 18 23 38 57 75 85
Step V is the last step of this input.
Step II of another input is: 13 26 74 58 91 33 47
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) → 13 26 33 47 91 74 58
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; no other number moves.
Step I: 15 is the smallest of the numbers left; it changes places with 23, the number in the first place from the left
Step II: 18 is the smallest of the numbers left; it changes places with 57, the number in the second place from the left
Step III: 23 is the smallest of the numbers left; it changes places with 85, the number in the third place from the left
Step IV: 38 is the smallest of the numbers left; it changes places with 57, the number in the fourth place from the left
Step V: 57 is the smallest of the numbers left; it changes places with 75, the number in the fifth place from the left
After Step V the numbers stand from the smallest to the largest, so the arrangement is complete.
In Step II the first two elements, 13 26, are already in place. Continue from Step II with the same rule.
Step III: 33 is the smallest of the numbers left; it changes places with 74, the number in the third place from the left, giving 13 26 33 58 91 74 47
Step IV: 47 is the smallest of the numbers left; it changes places with 58, the number in the fourth place from the left, giving 13 26 33 47 91 74 58
So Step IV is 13 26 33 47 91 74 58.
Why the other options are incorrect
Option (1) 13 26 33 58 91 74 47 — Incorrect. This is Step III; in Step IV 47 must also be placed.
Option (2) 13 26 33 47 58 74 91 — Incorrect. This is Step V, the last step, where 58 has also been placed.
Option (3) 13 26 33 47 74 58 91 — Incorrect. Here each number is put in place and the others are pushed along; the machine interchanges two numbers, so the others do not move.