One-Line Definition
A Machine Input & Output problem presents a sequence of words, numbers, or alphanumeric tokens processed by an automated rearrangement device that executes a deterministic sorting or shifting rule at each step until a final terminating state is reached.
The Automated Conveyor Belt
Picture an industrial conveyor belt. At every tick of the clock (Step), a robotic arm scans all items, selects the specific element satisfying the target criterion (e.g. smallest word or largest number), and places it into an organized slot at the boundary.
The other items maintain their relative order as they shift to make room. You never need to guess: the machine follows an uncompromising mathematical algorithm.
Machine Input & Output is among the highest-return topics in management entrance exams. In exams like MAH MBA CET, CMAT, SNAP, and NMAT, an Input-Output puzzle set usually comes with 4 to 5 sub-questions based on a single common rule.
Cracking the transformation rule unlocks all 5 questions in under 90 seconds using our shorthand numbering method.
Unprepared students write out every word across 6 steps (wasting 4 minutes). Prepared students index items and solve without rewrites.
CAT and XAT test hybrid mathematical pipelines where operations are applied to digits, parity, and positional coordinates.
Understanding this topic builds algorithmic intuition—the same exact state-transition logic used in sorting algorithms, compiler optimization, and production pipeline scheduling.
Different MBA entrance exams test Input & Output with varying flavors and time constraints:
| Target Exam | Typical Weightage | Primary Pattern Tested | Recommended Speed Strategy |
|---|---|---|---|
| MAH MBA CET | 5 Questions (1 Full Set) | Word-Number dual shifting, ascending/descending extremes | Use shorthand indexing; never rewrite words. Solve all 5 in ≤ 2 mins. |
| SNAP & NMAT | 2 – 3 Questions | Next step prediction, total steps count, position queries | Spot auto-shifts immediately to avoid phantom step counting. |
| CAT & XAT | 4 – 5 Questions (DILR Set) | Hybrid arithmetic transformations, cyclic shifts, digit filters | Write mathematical state formulas \(f(x)\) and trace invariance. |
| CMAT & Banking | 5 Questions | Alphabetical + reverse numerical interleaving | Identify Left vs Right target boundary and check for auto-shifts. |
Before attempting Machine Input & Output sets, ensure you are comfortable with these four basic building blocks:
Lexicographical Order
Arranging words alphabetically (\(A \to Z\)) or reverse alphabetically (\(Z \to A\)), checking 2nd and 3rd letters when first letters match.
Numerical Magnitude
Ascending vs descending order, odd vs even parity, prime numbers, and number length (number of digits).
Positional Indexing
Understanding "Left End" (\(L_1, L_2\dots\)), "Right End" (\(R_1, R_2\dots\)), and counting relative positions from either boundary.
Basic Arithmetic
Sum of digits (\(48 \to 4+8=12\)), squaring, doubling, difference between adjacent pairs, and modular cycles.
Anatomy of a Machine Rearrangement Cycle
Every Input & Output problem is governed by three well-defined stages:
An unsorted, initial sequence of elements (words, numbers, or alphanumeric symbols) presented to the machine.
Step 1, Step 2, Step 3... Each step represents exactly one cycle of transformation according to the machine's internal rule.
The terminal step (e.g. "Step 5 is the last step of the above arrangement"). No further changes occur once the elements satisfy the terminal sorting criteria.
Identifying the Transformation Rule (The Ends-First Method)
Never analyze a machine problem step-by-step from Step 1 down to Step 5 first. That is the slowest approach. Always compare the Input with the Final Output first:
The 3 Diagnostic Questions:
- What is the final pattern? Are words arranged alphabetically? Are numbers descending? Are words and numbers alternating?
- Where do elements move? Does the machine place items at the Left End only, at the Right End only, or at Both Ends simultaneously?
- How do placed elements behave? Does the newly placed item stay fixed at the edge while pushing previous items inward (Inward Pushing), or does it get placed next to earlier settled items (Fixed-Slot Stacking)?
| Movement Mode | Visual Mechanism | Characteristic Sign |
|---|---|---|
| Single-End Left | Step 1: [Item 1] ... Step 2: [Item 2] [Item 1] ... |
Item 1 is pushed to position 2 when Item 2 enters position 1. |
| Single-End Right | Step 1: ... [Item 1] Step 2: ... [Item 1] [Item 2] |
New items append to the extreme right edge. |
| Dual-End (Both Ends) | Step 1: [Left 1] ... [Right 1] Step 2: [Left 2] [Left 1] ... [Right 1] [Right 2] |
Two items change positions in a single step (often Word on Left, Number on Right). |
Word Arrangement Mechanics
When words are processed by the machine, sorting can be based on several deterministic criteria:
1. Dictionary Order (\(A \to Z\))
Standard alphabetical sequence. If multiple words share the first letter, ties are resolved by the 2nd and 3rd letters.
2. Reverse Dictionary (\(Z \to A\))
Reverse alphabetical sequence, placing words starting with Z, Y, X first.
3. Word Length (Letter Count)
Words arranged according to the number of letters (ascending: 3-letter < 4-letter < 5-letter).
4. Vowel vs Consonant Clusters
Words starting with vowels (A, E, I, O, U) sorted first, followed by words starting with consonants.
Number Arrangement Mechanics
Number transformations operate through clean numerical hierarchies:
Ascending Order
Smallest number selected first, moving toward highest: \(14, 27, 43, 68, 95\).
Descending Order
Largest number selected first, moving toward lowest: \(95, 68, 43, 27, 14\).
Parity Split
All Even numbers sorted first, followed by Odd numbers (or vice versa).
Word & Number Interleaving & Alternating Patterns
In standard MBA CET and SNAP sets, words and numbers are combined in a single input. There are two primary architectural models for interleaving:
Words on Left ↔ Numbers on Right
At Step 1, the smallest word moves to the extreme left, while the largest number moves to the extreme right. Both ends grow inward until they meet in the middle.
Step 2: [Word 1] [Word 2] ... [Num 2] [Num 1]
Step 3: [Word 1] [Word 2] [Word 3] [Num 3] [Num 2] [Num 1]
Word – Number – Word – Number
Elements are placed at one end (e.g. Left End) in alternating fashion: Step 1 places a Word, Step 2 places a Number, Step 3 places a Word, and so on.
Step 2: [Num 1] [Word 1] ...
Step 3: [Word 2] [Num 1] [Word 1] ...
Step-by-Step Operations & The "Auto-Shift" Phenomenon
Understanding how intermediate steps evolve requires mastering the single most tested trap in Input & Output: Auto-Arrangement (Auto-Shifts).
⚡ What is an Auto-Shift (Freebie)?
When an item that is scheduled to be sorted next is already in its correct target position because preceding items moved around it, the machine does not consume a step to move it! It is declared settled automatically.
Example: If 5 items need sorting, you might assume 5 steps are needed. But if item 3 and item 4 auto-shift, the entire process terminates in only 3 steps!
Golden Exam Rule: Never count steps by simply counting the total number of elements. Always check whether an item lands in position "for free" after preceding extractions.
Position-Based Rearrangement & Cyclic Permutations
Not all machines sort elements by value or alphabet. Some machines perform pure positional permutations: moving whatever element sits at index \(i\) to index \(j\), regardless of what that element is!
Example of a 6-Element Fixed Permutation Rule:
| Original Position | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| New Position in Next Step | 3 | 1 | 5 | 2 | 6 | 4 |
In pure positional machines, the sequence repeats cyclically after a fixed period \(T\). If the cycle period is \(T = 4\), then:
Mathematical Operations in Machine Pipelines
Modern advanced sets (especially in CAT, XAT, and new-pattern MBA CET) alter the numerical values of tokens between steps using mathematical functions:
1. Digit Sum / Digit Product
Each number \(N\) is replaced by the sum or product of its digits:
2. Parity-Dependent Arithmetic
Even numbers and Odd numbers receive different mathematical transformations:
3. Adjacent Pair Operations
Elements at step \(k+1\) are differences or sums of consecutive pairs from step \(k\):
4. Word-Letter Positional Algebra
Words transform into numbers by summing their alphabet ranks:
Reverse Input & Output & The "Cannot Be Determined" (CBD) Rule
A frequent question in MBA CET asks: "If Step 4 of a sequence is given, what was the original Input?" or "What was Step 2?"
When a machine sorts items by moving them to the boundaries, it obliterates their previous relative positions. You know an item arrived at the left end, but there is no trace of where it originally came from (was it in position 3? position 7? position 9?).
Reverse deduction is only possible when the transformation is a pure 1-to-1 position permutation without conditional sorting or data loss (because every index maps to exactly one unique previous index).
Master this 4-phase framework to decode any Input & Output set without drawing full tables:
Inspect Final Step
Look at the last step to identify the target state: Words alphabetical? Numbers descending? Left-to-right alternating?
Compare Step 1 & 2
Check where the first movers go. Did 1 element move or 2? Did they move to the Left End, Right End, or Both Ends?
Check Auto-Shifts
As items are pulled outward, will any intermediate element naturally land in its target slot? Mark it as a free auto-shift.
Shorthand Indexing
Replace words with initials (\(A, B, C\)) and numbers with rank tags (\(N_1, N_2\)). Track target positions without rewriting words.
Machine Example Given in Question:
Rule Derivation:
1. Final Output Inspection: The words in Step 3 are: apple (A), door (D), gate (G), kettle (K), nest (N). This is strictly alphabetical order (\(A \to Z\)) from left to right.
2. Movement Inspection: In Step 1, the alphabetically earliest word (apple) moves to the extreme left. In Step 2, the next earliest (door) moves next to apple. This is a Single-End Left Stacking process.
Question for New Input:
(i) Find Step 2. (Section 10 — Intermediate Step)
(ii) Which step is the final output? (Section 12 — Determining Final Output)
(iii) Which word is 3rd from the left in Step 1? (Section 13 — Position Queries)
Step-by-Step Derivation:
Answer (i): Step 2 is: camel fox zebra monkey tiger.
Answer (ii): Step 4 is the final output (4 total steps).
Answer (iii): In Step 1, the 3rd word from the left is monkey (1: camel, 2: zebra, 3: monkey).
Sample Machine Processing:
Rule Derivation:
Left Boundary: Words are arranged alphabetically (\(A \to Z\)) from right to left as they push inward: book → cup book → desk cup book → pen desk cup book.
Right Boundary: Numbers are arranged descending (\(85, 63, 42, 19\)) as they append to the right end.
Dual Operation: Each step moves 1 Word to the Left End and 1 Number to the Right End simultaneously.
Problem on New Input:
Question: How many total steps are required to achieve the final output, and what is the 4th element from the right in Step 2?
Solution Breakdown:
Total Steps Required: 4 Steps.
4th element from the right in Step 2: Elements from right in Step 2 are: 1st: 54, 2nd: 78, 3rd: rain, 4th: 12.
Fixed Index Mapping Machine:
Analysis of Permutation Cycle:
Every single step shifts items based strictly on index: \((1, 2, 3, 4, 5, 6) \to (3, 1, 5, 2, 6, 4)\).
Notice that at Step 6, the configuration is completely identical to the Input! Therefore, the cycle period is: \(T = 6\).
Reversibility: Because this is a 1-to-1 bijection without data loss, it is 100% reversible! Going backward 1 step is identical to advancing \((6 - 1) = 5\) steps forward.
Questions:
Q1: If Input is [red, blue, green, yellow, orange, purple], what is Step 26?
Q2: If Step 3 is [king, queen, jack, ace, ten, nine], what was the original Input?
Solution Q1 (Modular Cycle):
Step 26 = Step (26 mod 6) = Step 2.
Applying Step 2 mapping \((E, C, F, A, D, B)\):
Answer Q1: [orange, green, purple, red, yellow, blue]
Solution Q2 (Backward Deduction):
From Step 3 to Input is 3 steps backward, which equals 3 steps forward (since \(6 - 3 = 3\)).
Input mapping from Step 3: Position 6 in Step 3 was Pos 1 in Input, Pos 5 was Pos 2, etc.
Answer Q2: [nine, ten, ace, jack, queen, king]
Multi-Stage Number Pipeline:
Apply Machine to New Input:
Question: What is the value of the 3rd number in Step 2, and what is the final output in Step 4?
Step-by-Step Calculation:
\(2+9=11\), \(1+4=5\), \(5+2=7\), \(3+1=4\), \(6+3=9\)
→ Step 1: 11, 5, 7, 4, 9
• 11 (Odd) → \(11 \times 2 + 1 = 23\)
• 5 (Odd) → \(5 \times 2 + 1 = 11\)
• 7 (Odd) → \(7 \times 2 + 1 = 15\)
• 4 (Even) → \(4 \times 2 = 8\)
• 9 (Odd) → \(9 \times 2 + 1 = 19\)
→ Step 2: 23, 11, 15, 8, 19
\(|23-11|=12\), \(|11-15|=4\), \(|15-8|=7\), \(|8-19|=11\)
→ Step 3: 12, 4, 7, 11
\(12 + 4 + 7 + 11 = 34\)
→ Step 4: 34
Answer (i): 3rd number in Step 2 is 15.
Answer (ii): Final output in Step 4 is 34.
Writing words like "elephant", "crocodile", "aeroplane" repeatedly eats up 4 valuable minutes. Always use initial letter shorthand (\(e, c, a\)) or rank indices.
Failing to notice that an element has already landed in its target position creates a non-existent extra step, causing wrong answers for "How many total steps are required?".
Trying to find the Input when Step 3 of a sorting machine is given. Unless the machine is a pure 1-to-1 positional shuffle, the answer is strictly Cannot Be Determined (CBD)!
In Left-End shifting, verify whether Step 2 places the new item to the left of Step 1's item (\(B_2 B_1\)) or to the right (\(B_1 B_2\)). Mixing this up ruins position queries.
The Shorthand Rank Tagging Technique
Assign target rank numbers directly above the original Input:
Input: zebra(W4) 18(N4) apple(W1) 85(N1) cat(W2) 42(N2)
To find Step 1, you instantly pull \(W_1\) and \(N_1\). To find Step 2, pull \(W_2\) and \(N_2\). You can identify the position of any element in any step in 10 seconds without drawing full intermediate rows.
The Free-Ride / Auto-Shift Detection Formula
For single-end left arrangement: An element auto-shifts if all elements scheduled before it have already moved to its left, AND no unsorted element remains between it and the settled boundary.
Modular Arithmetic for Cyclic Permutations
If the machine configuration repeats after \(T\) steps, any distant future step \(K\) is simply:
For example, if \(T = 5\), then Step 103 is identical to Step \(103 \pmod 5 = \text{Step } 3\).
How To Approach Input & Output on Exam Day
Input & Output is a high-speed scoring engine when approached with discipline:
Spend 45–60 seconds confirming the rule from the sample. Spend 15–20 seconds per follow-up question. Total set time: ≤ 2.5 minutes.
Answer "Which step is the final output?" and "What is the position of X in Step 3?" first. Answer reverse-step questions last (often CBD).
Verify whether newly placed words push inward or stack outwards before marking positional answers.
Test your mastery across varying difficulty levels. Try solving each question before toggling the step-by-step solution:
A machine rearranges words alphabetically at the Left End, one word per step, pushing previous words to the right.
If the Input is: mango banana apple orange grape
Which of the following is Step 2?
Step-by-Step Solution:
1. Identify Alphabetical Ranks:
2. Trace Step 1: Earliest word (apple) moves to extreme left:
→ apple mango banana orange grape
3. Trace Step 2: Next earliest word (banana) moves to extreme left, pushing apple inward:
→ banana apple mango orange grape
Correct Answer: (B) banana apple mango orange grape
A word and number machine arranges the smallest word alphabetically at the Left End and the highest number at the Right End in each step.
Input: 35 fan 88 bat 14 sun 62 joy
How many steps are required to reach the final terminating output?
Step-by-Step Derivation:
In Step 3, once joy moves to the left and 35 moves to the right, the remaining items sun and 14 naturally sit in their proper sorted terminal slots. No Step 4 is required!
Correct Answer: 3 Steps (Step 3 is the final output)
Using the same machine rule from Question 2 on the Input:
35 fan 88 bat 14 sun 62 joy
Which element is third to the left of '88' in Step 2?
Trace Step 2 Array:
Step 2: [bat] [fan] [35] [14] [sun] [joy] [88] [62]
1. Locate '88': '88' is at position 7.
2. Count 3 positions to the left: Position \(7 - 3 = 4\).
3. Identify item at position 4: Item at position 4 is 14.
Correct Answer: 14
A machine sorts numbers in ascending order by moving the smallest unsorted number to the extreme left in each step.
If Step 3 of an input is:
12 18 24 79 38 65 52
What was the original Input?
Conceptual Analysis:
In Step 3, the three smallest numbers (12, 18, 24) have been extracted and placed at the front. However, in the original Input, where were they originally located?
- Could 12 have been at the very end? Yes.
- Could 12 have been between 79 and 38? Yes.
- Could 18 have preceded 12? Yes.
Because moving items to the boundary destroys information regarding their original starting positions, there are multiple valid input permutations that could yield this identical Step 3.
Correct Answer: (D) Cannot Be Determined (CBD)
A machine transforms numbers according to the following operations:
If the Input is: 48 37 26 93 18
What is the second number from the left in Step 3?
Step-by-Step Calculation:
• 48 → \(4 \times 8 = 32\)
• 37 → \(3 \times 7 = 21\)
• 26 → \(2 \times 6 = 12\)
• 93 → \(9 \times 3 = 27\)
• 18 → \(1 \times 8 = 8\)
→ Step 1: 32, 21, 12, 27, 8
• 32 (Multiple of 4) → \(32 \div 4 = 8\)
• 21 (Not mult of 4) → \(21 + 5 = 26\)
• 12 (Multiple of 4) → \(12 \div 4 = 3\)
• 27 (Not mult of 4) → \(27 + 5 = 32\)
• 8 (Multiple of 4) → \(8 \div 4 = 2\)
→ Step 2: 8, 26, 3, 32, 2
Sorting {8, 26, 3, 32, 2} descending:
→ Step 3: 32, 26, 8, 3, 2
The 2nd number from the left in Step 3 is 26.
Correct Answer: 26
❓ What is an "Auto-Shift" and why does it trip up students?
An auto-shift happens when an element naturally finds itself in its correct sorted target position because other elements were shifted around it in earlier steps. Since the machine does not need to execute a dedicated step for an element already in position, students who blindly count the number of elements overcount the total steps by 1 or 2 steps.
❓ Can we ever determine the original Input from Step 4 in a sorting machine?
No. In sorting or shifting machines where elements are selectively relocated to the edges, earlier positional history is completely erased. Multiple different starting configurations could result in the exact same Step 4. Therefore, questions asking for a previous step or the original input must be answered as Cannot Be Determined (CBD). The only exception is pure 1-to-1 position permutation cycles.
❓ What is the fastest way to solve a 5-question Input & Output set in MBA CET?
Inspect the final output step to determine the target sorting pattern. Then tag each word with its alphabetical rank (\(W_1, W_2\dots\)) and each number with its magnitude rank (\(N_1, N_2\dots\)) directly on the question paper. Track slot assignments without rewriting full words. This enables you to solve all 5 questions in under 90 seconds with 100% accuracy.
❓ How do I distinguish between "Inward Pushing" and "Fixed-Slot Stacking"?
Look at Step 1 and Step 2. If the item placed in Step 1 remains in position 1 in Step 2 while the new item takes position 2, it is Fixed-Slot Stacking (\(A_1 A_2\dots\)). If the item placed in Step 2 takes position 1 and pushes Step 1's item into position 2, it is Inward Pushing (\(A_2 A_1\dots\)).