Input-Output Based on Shifting Position of Elements Using a Defined Rule
Reasoning › Input-Output · Topic 17.5
Input-output based on shifting the position of elements uses a rule that moves items by place, not by size or alphabet, for example every element shifts one place to the right and the last comes to the front, or neighbouring pairs swap. Apply the rule exactly to positions, and use the repeat cycle: a shift of one place on n items returns the input after n steps.
7 min read · Reasoning · Input-Output
Quick Answer
Input-output based on shifting the position of elements uses a rule that moves items by place, not by size or alphabet, for example every element shifts one place to the right and the last comes to the front, or neighbouring pairs swap. Apply the rule exactly to positions, and use the repeat cycle: a shift of one place on n items returns the input after n steps.
At a Glance
- Rule type Acts on positions, not on size or letters
- Rotation Everything shifts; the end item wraps around
- Pair swap Positions 1-2, 3-4 and so on exchange
- Reversal The first k items reverse
- Cycle Rotation repeats after n steps; pair swap after 2
- Long steps Reduce the step number by the cycle length
Where Does It Fit?
Earlier topics, Number-Based Input-Output Rearrangement (Ascending/Descending Order) to Identifying the Step Number at Which a Given Arrangement Is Achieved, sorted items by size or alphabet. This topic only moves items by place. The step-reading skill leads to Input-Output Problems Involving Both Numbers and Words Shuffled Together in Steps and Identifying the Underlying Rule of an Input-Output Machine from a Given Example.
What Position-Shifting Rules Appear?
In short: the usual rules are rotation, pair swap and growing reversal, and each can be applied by position alone.
| Rule | Each step | Example input 24 61 37 85 19 |
|---|---|---|
| Right rotation | Every item moves one place to the right; the last item comes to the front | Step I: 19 24 61 37 85 |
| Left rotation | Every item moves one place to the left; the first item goes to the end | Step I: 61 37 85 19 24 |
| Pair swap | Items in places 1-2, 3-4, 5-6 swap | Step I: 61 24 85 37 19 |
| Reverse first k | At Step k, the first k + 1 items are reversed | Step I: 61 24 37 85 19 |
Positions never depend on the values. Two inputs of the same length produce the same pattern of movement, which is why one worked example is enough to find the rule.
- Odd length: when you swap pairs, the last item has no partner and stays.
- Wrap-around: in rotation, the item leaving one end enters at the other end.
- Check: compare each step with the previous line, place by place.
How Do Repeat Cycles Shorten Long Steps?
In short: rotation repeats after n steps on n items and pair swap repeats after 2 steps, so you divide the step number by the cycle and work with the remainder.
Cycle lengths
- Rotation by one place on n items: cycle = n steps.
- Pair swap: cycle = 2 steps.
- Step s equals step (s mod cycle); a remainder of 0 means the input itself.
For right rotation on 5 items, Step 5 returns the input 24 61 37 85 19, so Step 12 equals Step 2, which is 85 19 24 61 37. For pair swap on 6 items, every even step returns the input and every odd step gives the swapped line.
This is different from the sorting machines of Number-Based Input-Output Rearrangement (Ascending/Descending Order), which stop changing after at most n – 1 steps.
How Do You Identify the Rule From an Example?
In short: trace where one item went, check whether the movement is the same for all items, and test the guess on Step II.
- Track one item, such as the first, through Step I.
- Compare all items: if all moved one place and one wrapped, it is a rotation.
- Look for exchanges: if neighbouring pairs swapped, it is a pair swap.
- Test on Step II before applying to the question.
- Find the cycle for large step numbers.
Solved Examples
Example 1
Question: Input: 24 61 37 85 19. Rule: every item moves one place to the right, and the last item comes to the front. Show the steps until the input returns.
- Step I: 19 24 61 37 85.
- Step II: 85 19 24 61 37.
- Step III: 37 85 19 24 61.
- Step IV: 61 37 85 19 24.
- Step V: 24 61 37 85 19, which is the input.
Answer: The input returns at Step V, so the cycle is 5 steps.
Example 2
Question: Input: 14 29 36 47 52 63. Rule: items in places 1-2, 3-4 and 5-6 swap in every step. What are Steps I, II and III?
- Step I: 29 14 47 36 63 52.
- Step II: swapping again returns 14 29 36 47 52 63.
- Step III is the same as Step I.
Answer: Steps I and III are 29 14 47 36 63 52, and Step II is 14 29 36 47 52 63.
Example 3
Question: Input: 3 9 14 20 27. Rule: at Step I the first two items reverse, at Step II the first three reverse, and so on. Show the steps.
- Step I: reverse the first two: 9 3 14 20 27.
- Step II: reverse the first three: 14 3 9 20 27.
- Step III: reverse the first four: 20 9 3 14 27.
- Step IV: reverse all five: 27 14 3 9 20.
Answer: Step IV is 27 14 3 9 20.
Example 4
Question: Input: 24 61 37 85 19 with the right rotation rule. What is Step 12?
- The cycle is 5 steps.
- 12 divided by 5 leaves a remainder of 2.
- Step 12 equals Step II, which is 85 19 24 61 37.
Answer: Step 12 is 85 19 24 61 37.
Example 5
Question: Input: 46 18 73 29 55. Rule: the first item goes to the end in each step. What is Step II?
- Step I: 18 73 29 55 46.
- Step II: 73 29 55 46 18.
Answer: Step II is 73 29 55 46 18.
Shortcuts and Tricks
- Track the first item through Step I to identify the rule.
- Use the cycle length and the remainder for large step numbers.
- For pair swap, only odd or even matters.
- For rotation by one place, copy the previous line and move one item.
- Test the rule on Step II before using it.
Common Mistakes
- Sorting items instead of shifting them.
- Forgetting the wrap-around item.
- Not reducing a large step number by the cycle.
- Swapping the wrong pairs for an odd number of items.
- Reading Step I from the wrong line.
Practice Questions
- Input: 31 52 17 44 26. Rule: every item moves one place to the right and the last comes to the front. What is Step II?
- Input: 11 22 33 44 55 66. Rule: places 1-2, 3-4 and 5-6 swap each step. What is Step I?
- With the same input and rule, what is Step IV?
- Input: 46 18 73 29 55. Rule: the first item goes to the end each step. What is Step VII?
- Input: 5 8 12 16 21. Rule: at Step I the first two items reverse, at Step II the first three, and so on. What is Step II?
Answers: 1) 44 26 31 52 17; 2) 22 11 44 33 66 55; 3) 11 22 33 44 55 66; 4) 73 29 55 46 18; 5) 12 5 8 16 21.
Why Is This Topic Important?
- Variety It breaks the habit of assuming every machine sorts.
- Exam frequency Position rules appear in some bank prelims as one of the five questions.
- Skill Cycle thinking is the same as in remainders and calendars.
- Link Calendar cycles are used in Calendar Problems – Finding the Day of the Week for a Given Date.
What Comes Next?
The next topic is Input-Output Problems Involving Both Numbers and Words Shuffled Together in Steps. It covers lines in which numbers and words are shuffled together in steps.
Key Terms and Formulas
- Rotation Shifting all items with wrap-around
- Pair swap Exchanging neighbouring pairs
- Cycle Number of steps after which the line repeats
- Remainder Used to reduce a large step number
- Wrap-around The end item entering at the other end
- Position rule A rule that ignores the values
Related Topics
- Identifying the Step Number at Which a Given Arrangement Is Achieved
- Input-Output Problems Involving Both Numbers and Words Shuffled Together in Steps
- Number-Based Input-Output Rearrangement (Ascending/Descending Order)
- Word-Based Input-Output Rearrangement (Alphabetical Order)
Exam Corner
Points to Remember
- Position rules ignore values.
- Rotation on n items repeats after n steps.
- Pair swap repeats after 2 steps.
- Reduce the step number by the cycle.
- Test the rule on Step II.
Do Not Confuse With
- Rotation vs pair swap Rotation moves all items; pair swap exchanges neighbours.
- Shifting vs sorting Shifting ignores size and letters.
- Cycle vs steps needed A cycle repeats; sorting finishes.
- Right vs left rotation They differ in which end wraps.
Memory Hook
Shift by place, find the cycle, use the remainder.
GS Relevance
Frequently Asked Questions
How do you solve input-output questions based on shifting positions?
Find the rule by tracking one item and seeing whether all items moved the same way, such as a rotation or a pair swap, and test it on Step II. Then apply it by place only, ignoring the values. For large step numbers, divide by the cycle length and use the remainder.
What is the cycle length of a rotation rule?
A rotation by one place on n items repeats after n steps, because each item has then visited every place. For five items the input returns at Step V. Any step number can be reduced by dividing by n and keeping the remainder, with a remainder of zero meaning the input itself.
How does a pair swap rule behave over steps?
A pair swap exchanges the items in places 1-2, 3-4 and so on, and doing it twice returns the input. So odd steps give the swapped line and even steps give the original input. With an odd number of items the last item has no partner and stays in place.
How is a shifting rule different from a sorting rule?
A shifting rule acts on positions and ignores size and letters, while a sorting rule picks items by value. Shifting rules often repeat in a cycle and never finish, while sorting rules end after at most n minus 1 steps once the line is fully sorted.
How do you find a very large step in a cycle problem?
Divide the step number by the cycle length and keep the remainder. The line at the large step equals the line at the step given by the remainder, and a remainder of zero means the input line. For example, Step 12 of a 5-step cycle equals Step II.
PYQ Practice — Statement Analysis
1 A rotation by one place on five items returns the input at Step V.
The cycle length equals the number of items.
2 A pair swap rule gives the input again after two steps.
Swapping the same pairs twice restores the line.
3 Position rules depend on the values of the items.
They act on places only.
4 Step 12 of a 5-step cycle equals Step 5.
12 leaves a remainder of 2, so it equals Step 2.
Related Topics
Browse the full Reasoning index