Machine Input-Output
Overview
Machine Input-Output is a reasoning topic where you are given an initial arrangement of words and/or numbers, and shown how a hypothetical "machine" rearranges them step-by-step until reaching a final output. Your job is to decode the hidden rule governing each step, then apply it to answer questions about intermediate or final arrangements.
This topic typically carries 5 questions in IBPS PO Prelims, often appearing as a single set. It tests pattern recognition, systematic thinking, and the ability to track multiple elements through sequential changes. Once you crack the rule, all five questions become quick marks—but missing the pattern can cost you the entire set. Mastering this topic is high-reward because the questions are predictable once the logic is understood.
The key challenge is that the rule is never stated explicitly. You must infer it by comparing the input with each subsequent step, observing which element moves and where it lands.
Key Concepts
- **The machine follows a consistent rule at every step.** Whatever operation happens in Step 1 repeats in the same logical manner in Step 2, Step 3, and so on.
- **Elements are typically rearranged, not removed or added.** The same words and numbers from the input appear in the output—only their positions change.
- **Common operations involve sorting:** arranging words alphabetically (A→Z or Z→A) or numbers in ascending/descending order, one element per step.
- **Position matters:** Elements may be picked from the left end, right end, or based on a specific property (smallest number, first word alphabetically).
- **Dual-end movement is common:** One word may move to the left while one number moves to the right in the same step, or vice versa.
- **The final output is the stopping point:** When no further rearrangement is needed (fully sorted), the machine halts.
- **Counting steps from input:** Input is Step 0. The first rearrangement is Step 1. Questions often ask about Step 3 or Step 4, so track carefully.
Formulas / Key Facts
1. **Alphabetical order for words:** Compare first letters; if same, compare second letters (e.g., "bat" comes before "box").
2. **Ascending order:** Smallest to largest (12, 25, 38, 47).
3. **Descending order:** Largest to smallest (47, 38, 25, 12).
4. **Left-end placement:** The selected element moves to position 1 (leftmost).
5. **Right-end placement:** The selected element moves to the last position.
6. **Alternating pattern:** Words may go to one end, numbers to the other—or odd-positioned and even-positioned elements may follow different rules.
7. **Step count:** Total steps = Total elements ÷ Elements moved per step (approximately). For 8 elements moving 2 per step, expect 4 steps.
8. **Reverse alphabetical:** Z→A ordering—"zone" comes before "apple."
Worked Examples
### Example 1: Basic Word-Number Sorting
**Input:** sky 42 pen 18 box 65 arm 31
**Step 1:** arm sky 42 pen 18 box 31 65 **Step 2:** arm box sky 42 pen 18 31 65 **Step 3:** arm box pen sky 42 18 31 65 **Step 4:** arm box pen sky 18 31 42 65
**Decode the rule:**
- Compare Input to Step 1: "arm" (alphabetically first word) moved to left end; "65" (largest number) moved to right end.
- Step 2 confirms: "box" (next alphabetical word) goes left; "42" was already in position, so "31" shifts.
- Pattern: Each step moves the next alphabetically first word to the left end and arranges numbers in ascending order from the right.
**Question:** What is the position of "42" in Step 3? **Answer:** In Step 3, the arrangement is: arm box pen sky 42 18 31 65. Position of "42" = 5th from left.
---
### Example 2: Reverse Pattern
**Input:** 24 march 52 june 11 april 39 may
**Step 1:** 24 march 11 june april 39 may 52 **Step 2:** 24 11 june april 39 may 52 march **Step 3:** 11 june april 39 may 52 march 24 **Step 4:** june april 39 may 52 march 24 11
**Decode the rule:**
- Step 1: "april" moved toward left (but observe position); "52" moved to right.
- Looking closely: smallest number moves right, and words are being arranged in reverse alphabetical order (Z→A) from the right end.
- Alternative reading: Each step picks largest number to the right end and arranges months in reverse calendar order.
**Question:** Which element is 4th from the right in Step 2? **Step 2 arrangement:** 24 11 june april 39 may 52 march **Counting from right:** march(1), 52(2), may(3), 39(4) **Answer:** 39
---
### Example 3: Finding a Specific Step
**Input:** row 17 cat 84 job 53 win 29
You're told the final output is: cat job row win 17 29 53 84
**Question:** How many steps does the machine take?
**Solution:**
- Words are alphabetically arranged (left side): cat, job, row, win
- Numbers are in ascending order (right side): 17, 29, 53, 84
- If one word and one number are placed per step, total steps = 4
Common Mistakes
- **Confusing Input with Step 1:** Students count the input as Step 1. Fix: Input is always Step 0; the first change produces Step 1.
- **Assuming only one type of sorting:** Students think only numbers are sorted or only words. Fix: Check both ends—often words go one way, numbers go the other.
- **Misreading alphabetical order:** Comparing "pen" and "pan"—students pick wrong word. Fix: Compare letter by letter: p-a-n comes before p-e-n.
- **Losing track of positions:** After 3-4 steps, students miscount positions. Fix: Write out each step fully; count from left starting at 1.
- **Not verifying the rule:** Students assume a rule after one step. Fix: Always confirm the pattern holds for at least two consecutive steps before answering.
Quick Reference
- Decode the rule by comparing Input → Step 1 → Step 2.
- Words usually sort alphabetically; numbers sort by value.
- One element (or one pair) typically moves per step.
- Input = Step 0. First rearrangement = Step 1.
- Final output = fully sorted arrangement where no more moves are needed.
- Always verify your decoded rule against multiple steps before answering.