Input–Output (Machine) — IBPS PO Reasoning
Input–output is a Mains staple — one set of ~5 questions — and it intimidates only because the "machine" language hides a simple truth: a fixed rearrangement rule is applied once per step, and each step's output is the next step's input. Nobody asks you to invent the rule from nothing; you deduce it by comparing the given Input to Step 1, confirm it on Step 1 → Step 2, and then you own the machine. The last decade shifted from word/number shifting machines to arithmetic and box machines, so this chapter covers all the live types.
1. What IBPS actually asks
A machine takes an input line of words/numbers and produces a new arrangement each step until no more rearrangement is possible. You're shown the Input and a few steps, then asked things like:
- "What is Step 3?" / "Which element is 3rd from the left in Step 2?"
- "In which step does the arrangement become …?"
- "How many steps to complete the arrangement?"
The type determines the method:
- Shifting machines — one or two elements move to the ends each step (by size, alphabetical order, etc.).
- Arithmetic machines — numbers are operated on (×, +, digit-sum, etc.) — the newer, more common type.
- Box/coding machines — words and numbers are paired and coded.
2. Find the rule from Input → Step 1 (the whole skill)
- Line up Input above Step 1, position by position, and ask what changed.
- Identify the "picked" element(s) — usually the largest/smallest number or the word first/last alphabetically — and where it went (extreme left? right?).
- Confirm on Step 1 → Step 2. The same rule must reproduce Step 2 from Step 1. If it doesn't, your rule is wrong — revise it before proceeding.
- One rule, applied repeatedly. Every step is the same operation on the previous step's output. There is never a new rule mid-machine.
The machine is deterministic. Your only job is to reverse-engineer one rule from two given steps; after that, generating any step is mechanical.
3. Shifting machines — the classic pattern
Common rules (deduce which applies):
- One element per step, alternating ends: largest number to the left in step 1, smallest to the right in step 2, next-largest left in step 3…
- Alphabetical + numerical interleave: words arranged A→Z from one end, numbers ascending/descending from the other.
- Word length or vowel/consonant based ordering.
The number of steps usually equals the number of elements (minus one), because each step places one element into its final position. That gives a fast sanity check.
4. Arithmetic machines — the modern default
Here numbers are transformed, not just moved. Typical operations, applied per step:
- Step-wise arithmetic: "each number is multiplied by the step number", or "add the step number", or "×2 in step 1, +3 in step 2…".
- Digit operations: replace a number by its digit sum, product of digits, reverse, or difference of digits.
- Position-linked: the operation depends on the number's position (odd positions +1, even ×2).
Method is identical: compare Input to Step 1 element-by-element, hypothesise the operation, and verify on the next step (the operation often changes with the step number, which is the whole trick).
5. Read only the step you need
The biggest time-waster is generating every step when the question only needs one. Once you have the rule:
- For "Step 3, 2nd from left", generate up to Step 3 only.
- For "how many steps to finish", use the "one element placed per step" logic for shifting machines, or run it out for arithmetic machines.
- For "which step gives arrangement X", generate forward and stop when you match.
Don't fully solve the machine unless a question forces it.
6. Solved example (shifting)
Input: bat 24 cage 11 door 37 ant 8
Step 1: 8 bat 24 cage 11 door 37 ant
Step 2: 8 37 bat 24 cage 11 door ant
Deduce: Step 1 moved the smallest number (8) to the extreme left. Step 2 moved the largest number (37) to the position just after 8 (i.e., second from left). So the rule alternates: smallest to the front, then largest next, then 2nd-smallest, then 2nd-largest…
Step 3 would bring 11 (next smallest) to the third position: 8 37 11 bat 24 cage door ant. Any "Step 3" question now answers itself.
7. The protocol
- Classify the machine: shifting, arithmetic, or box/coding.
- Compare Input → Step 1 element by element; hypothesise the rule (which element picked, where it went, or what operation).
- Verify on Step 1 → Step 2 — reject the rule if it fails; note if the operation depends on the step number.
- Generate only up to the step the question asks about.
- Sanity-check step count (shifting: ≈ number of elements − 1).
