Identifying the Step Number at Which a Given Arrangement Is Achieved
Reasoning › Input-Output · Topic 17.4
To identify the step number at which a given arrangement is achieved, count how many items are already in their final fixed positions at one end of the line. For a rule that fixes one item per step, an arrangement with k items fixed in order, and the rest in their original relative order, is Step k. Check that the unplaced items still keep their input order.
7 min read · Reasoning · Input-Output
Quick Answer
To identify the step number at which a given arrangement is achieved, count how many items are already in their final fixed positions at one end of the line. For a rule that fixes one item per step, an arrangement with k items fixed in order, and the rest in their original relative order, is Step k. Check that the unplaced items still keep their input order.
At a Glance
- Key idea Step k fixes k items in order at one end
- Count Length of the fixed block gives the step
- Validity test Unplaced items must keep input order
- Last step n – 1 at most, earlier if the tail is sorted
- Not a step The input line itself
- Unreachable line Fails the fixed block or the order test
Where Does It Fit?
This topic is the question side of Number-Based Input-Output Rearrangement (Ascending/Descending Order), Word-Based Input-Output Rearrangement (Alphabetical Order) and Mixed Word-Number Input-Output Problems. The rule-reading skill carries on to Input-Output Based on Shifting Position of Elements Using a Defined Rule, where items shift by position, and to Identifying the Underlying Rule of an Input-Output Machine from a Given Example.
How Do You Find the Step of a Given Arrangement?
In short: measure the fixed block at the end where the rule builds, then confirm that the remaining items are still in their original relative order.
- Find the rule and the end it builds from.
- Sort the items as the rule would, so that you know the final fixed order.
- Count the fixed block in the given arrangement: how many items at that end match the sorted order?
- Check the rest of the line against the input order.
- The step number is the length of the block if both tests pass.
| Arrangement | Rule: largest to the left | Fixed block | Step |
|---|---|---|---|
| 93 14 57 48 92 28 | Input 14 57 48 92 93 28 | 93 | I |
| 93 92 14 57 48 28 | Same input | 93 92 | II |
| 93 92 57 14 48 28 | Same input | 93 92 57 | III |
| 93 57 92 14 48 28 | Same input | 93 then 57: wrong, 92 should be second | Not a step |
The sorted fixed order for this rule is 93, 92, 57, 48, 28, 14. This is also the final arrangement, and the block must match its beginning exactly.
How Do You Handle Special Cases?
In short: repeated lines, an early finish and unreachable lines are the three special cases.
- Repeated line: when the chosen item is already in its place, the next step looks the same. The question usually asks for the first step at which the line appears.
- Early finish: if the tail is already in order, the sorted line appears before step n – 1, and later steps repeat it.
- Unreachable line: if the block does not match the sorted order or the unplaced items are reordered, the line is not a step of this machine.
- Mixed lines: in a mixed machine, count the number block and the word block together, each growing from its own end, as in Mixed Word-Number Input-Output Problems.
Quick checks
- Step number = items fixed so far.
- Total steps needed = n – 1 at most.
- The second last step has n – 2 items fixed.
How Do You Answer How Many Steps Are Needed?
In short: find the first step at which the final sorted line appears, which is n minus the length of the already-sorted tail, minus 1 at most.
For the input 14 57 48 92 93 28 with the rule “largest to the left”, the final line is 93 92 57 48 28 14. It appears at Step V. For the input 45 12 78 23 56 34 with the rule “largest to the right”, the final line 12 23 34 45 56 78 appears at Step III, because after three steps the remaining numbers 12, 23, 34 are already in order.
Solved Examples
Example 1
Question: Input: 14 57 48 92 93 28. Rule: in each step the largest number not yet placed moves to the next free place from the left. At which step is the line 93 92 57 14 48 28 obtained?
- The sorted order is 93, 92, 57, 48, 28, 14.
- The given line begins 93 92 57, which matches the first three sorted numbers.
- The rest, 14 48 28, appears in the same relative order as in the input (14, 48, 28).
Answer: Step III.
Example 2
Question: Input: 14 57 48 92 93 28, same rule. How many steps are needed to reach the final line?
- The final line is 93 92 57 48 28 14.
- Step IV is 93 92 57 48 14 28, and Step V is 93 92 57 48 28 14.
Answer: 5 steps are needed.
Example 3
Question: Input: pen cup rose bell fan mat. Rule: in each step the alphabetically first word not yet placed moves to the next free place from the left. At which step is bell cup fan pen rose mat obtained?
- The sorted order is bell, cup, fan, mat, pen, rose.
- The line begins bell cup fan, which are the first three sorted words.
- The rest, pen rose mat, keeps its input order (pen, rose, mat).
Answer: Step III.
Example 4
Question: Input: pen rose 18 orange 78 80. Odd steps move the largest number to the next free place from the left; even steps move the alphabetically first word to the next free place from the right. At which step is 80 78 pen rose 18 orange obtained?
- The number block 80 78 has two numbers, placed in Steps I and III.
- The word block orange has one word, placed in Step II.
- Steps I, II and III have been done, and the middle pen rose 18 keeps its input order.
Answer: Step III.
Example 5
Question: Input: 14 57 48 92 93 28, same rule as the first example. Is 93 57 92 14 48 28 a step of this machine?
- After the first item 93, the second fixed item must be 92.
- Here the second item is 57, so the block does not match the sorted order.
Answer: No, it is not a step of this machine.
Shortcuts and Tricks
- Write the sorted order first, then compare it with the given line from the building end.
- Count only the continuous matching block, not scattered matches.
- Check that the rest of the line keeps the input order.
- For how many steps, look at the final line and find its earliest appearance.
- Reject lines that reorder the unplaced items.
Common Mistakes
- Counting matching items from the wrong end.
- Counting scattered matches as a block.
- Forgetting the order test on the unplaced items.
- Including the input as a step.
- Giving the last repeated step instead of the first appearance.
Practice Questions
- Input: 26 71 43 58. Rule: largest number to the next free place from the left each step. At which step is 71 58 43 26 obtained?
- Input: 63 28 91 45. Rule: smallest number to the next free place from the left each step. At which step is 28 45 63 91 obtained?
- Input: hen ant owl cat. Rule: alphabetically first word to the next free place from the left each step. At which step is ant cat hen owl obtained?
- Input: 36 71 25 58 90. Rule: largest number to the next free place from the left each step. At which step is 90 71 36 25 58 obtained?
- With the same input and rule as the previous question, at which step is 90 71 58 36 25 obtained?
Answers: 1) Step III; 2) Step II; 3) Step II; 4) Step II; 5) Step III.
Why Is This Topic Important?
- Exam frequency A step-number question appears in almost every input-output set.
- Speed The block-count test finds the step without writing earlier steps.
- Accuracy The order test catches impossible lines.
- Link The same machine ideas are used in Input-Output Based on Shifting Position of Elements Using a Defined Rule.
What Comes Next?
The next topic is Input-Output Based on Shifting Position of Elements Using a Defined Rule. It covers rules that shift elements by position instead of sorting them.
Key Terms and Formulas
- Fixed block Items already placed at the building end
- Valid step A line the machine can produce
- Sorted order The final order the rule builds
- First appearance The earliest step with that line
- Unplaced items Items not yet fixed
- Building end The end from which the block grows
Related Topics
- Mixed Word-Number Input-Output Problems
- Input-Output Based on Shifting Position of Elements Using a Defined Rule
- Number-Based Input-Output Rearrangement (Ascending/Descending Order)
- Word-Based Input-Output Rearrangement (Alphabetical Order)
Exam Corner
Points to Remember
- Step number = length of the fixed block.
- Unplaced items keep their input order.
- Compare from the building end.
- The input is not a step.
- Give the first appearance of a repeated line.
Do Not Confuse With
- Block vs scattered matches Only a continuous block from the end counts.
- Step number vs position They coincide only for the placed block.
- Valid vs sorted A valid step need not be fully sorted.
- First appearance vs last repeat The question asks for the first.
Memory Hook
Count the sorted block from the building end, check the rest, and that is the step.
GS Relevance
Frequently Asked Questions
How do you find the step at which an arrangement appears in input-output?
Sort the items as the rule would and count how many of them already stand in a continuous block at the building end of the given line. That count is the step number, provided the remaining items still appear in their original input order. If either test fails, the line is not a step.
How many steps are needed in an input-output question?
Find the first step at which the final sorted line appears. For a rule that fixes one item per step, this is at most one fewer than the number of items, and it can be earlier when the tail of the input is already in order, because the later steps then leave the line unchanged.
How do you check that an arrangement is a valid step?
Check two things: the fixed block at the building end must match the sorted order exactly, and the rest of the line must keep the same relative order as in the input. A line that fails either test cannot be produced by the machine and is not a step.
What if two steps look identical?
When the chosen item is already in its place, the next step leaves the line unchanged. A question about the step at which the line is obtained normally means its first appearance, so give the earliest step and not the later repeat.
Is the input line counted as Step I?
No. The input is the starting line, and Step I is the line produced after the first application of the rule. When a question asks which step gives a line, the input is never counted, so a line with one fixed item is Step I.
PYQ Practice — Statement Analysis
1 The length of the fixed block at the building end gives the step number.
One item is fixed per step.
2 A line that reorders the unplaced items can be a step.
Unplaced items keep their input order.
3 When two steps give the same line, the answer is the later one.
The first appearance is asked.
4 The input line is counted as Step I.
Step I is the first result.
Related Topics
Browse the full Reasoning index