5.5 Input-Output Machine Rearrangement

Key Takeaways

  • Identify rearrangement mechanisms immediately: Single-shifting (one element moves per step) vs. Double-shifting (two elements move simultaneously from opposite ends).
  • Sorting criteria include alphabetical/length order for words and ascending/descending/digital-sum order for numbers.
  • An element that naturally lands in its designated position due to earlier shifts is auto-shifted and does not consume an extra step.
  • Mains box-matrix input-output applies mathematical operations (digit products, cross-inversion, digital roots) across stage boxes.
  • Shorthand position tracking allows solving specific step questions without writing out full step lines manually.
Last updated: July 2026

Input-Output Machine Rearrangement

Machine Input-Output questions present an initial sequence of words and numbers (the Input) alongside a step-by-step rearrangement process driven by a fixed logical rule. Candidates must deduce the underlying sorting algorithm and apply it to a new input sequence. In Prelims, questions feature Single-Shifting or Double-Shifting word-number lines. In Mains, questions feature Box-Matrix Input-Output or Arithmetic Transformations.


Machine Shifting Mechanisms

Understanding how elements shift position is the first critical step in cracking machine input logic.

FeatureSingle-ShiftingDouble-Shifting
Elements Moved per StepExactly 1 element per stepExactly 2 elements per step (simultaneously)
Shift DirectionUsually Left-End OR Right-EndLeft-End AND Right-End simultaneously
Pushed ElementsExisting elements shift right to accommodateLeft elements shift right, Right elements shift left
Average Total Steps5 to 7 steps3 to 5 steps

Sorting Logic Catalog

Machines apply specific sorting criteria to words and numbers:

Word Sorting Criteria

  1. Alphabetical Order: Ascending ($A \to Z$) or Descending ($Z \to A$).
  2. Word Length: Shortest word to longest word (or vice versa).
  3. Vowel Count: Words sorted by number of vowels contained.
  4. Consonant-Vowel Alternation: Alternate arrangement of consonant-starting and vowel-starting words.

Number Sorting Criteria

  1. Numerical Value: Ascending order ($12, 25, 41 \dots$) or Descending order ($89, 72, 63 \dots$).
  2. Sum of Digits: Numbers sorted by digit sum (e.g., $84 \implies 8+4=12$; $59 \implies 5+9=14$).
  3. Even/Odd Classification: Even numbers grouped on one end, Odd numbers on the other.
  4. Prime/Composite Sorting: Prime numbers sorted first, followed by composite numbers.

The Auto-Shifting Phenomenon

One of the most frequent traps in Machine Input is failing to account for Auto-Shifting.

[!IMPORTANT] Definition: Auto-shifting occurs when an element that is scheduled to be moved in a later step automatically lands in its target position as a byproduct of previous shifts. An auto-shifted element does NOT require an additional step.

  • Example: Suppose Step 2 yields apple 12 cat dog 89 56. If the machine rule requires 'dog' to be at position 4 from left, and 'dog' is ALREADY at position 4 after Step 2, 'dog' is auto-shifted. Step 3 immediately processes the NEXT required element.

Mains Box-Matrix Input-Output Patterns

In SBI PO Mains, the input consists of numbered boxes containing 2-digit numbers arranged in rows or columns.

  INPUT:    [ 42 ] [ 18 ]    [ 35 ] [ 24 ]    [ 61 ] [ 53 ]
               Box 1            Box 2            Box 3
                 |
  STEP 1:     [ 12 , 10 ]      [ 15 , 20 ]      [ 18 , 05 ]

Common Matrix Transformation Operations

  1. Cross-Multiply First/Second Digits: First digit of Box 1 multiplied by first digit of Box 4 ($4 \times 3 = 12$).
  2. Digit Difference: Second digit of Box 1 minus second digit of Box 4 ($8 - 3 = 5$).
  3. Digital Root Addition: Summing digits within boxes across steps ($1+2+1+0 = 4$).
  4. Average of Stage 2 Outputs: Combining Stage 2 numbers to yield a final single-box output in Step 3.

Complete Step-by-Step Worked Example

Given Input: gear 42 19 winter 85 apple 63 mobile

Rule Deduction

  • Words: Sorted alphabetically at Left End (apple, gear, mobile, winter).
  • Numbers: Sorted in descending order at Right End (85, 63, 42, 19).
  • Mechanism: Double-shifting (Word shifted to Left End, Number shifted to Right End simultaneously).

Step-by-Step Trace

  • Input: gear 42 19 winter 85 apple 63 mobile
  • Step 1: Shift 'apple' (smallest word) to Left, Shift '85' (highest number) to Right. apple gear 42 19 winter 63 mobile 85
  • Step 2: Shift 'gear' (next word) to Left, Shift '63' (next number) to Right. apple gear 42 19 winter mobile 63 85
  • Step 3: Shift 'mobile' (next word) to Left, Shift '42' (next number) to Right. apple gear mobile 19 winter 42 63 85
  • Step 4: Shift 'winter' (last word) to Left, Shift '19' (last number) to Right. apple gear mobile winter 19 42 63 85

Step 4 is the final step.

Question Set Evaluation

  1. How many steps are required to complete the rearrangement? Exactly 4 steps.
  2. In Step 3, what is the position of 'winter' from the left end? Position 5 (apple[1], gear[2], mobile[3], 19[4], winter[5]).
  3. Which element is 3rd to the right of 'gear' in Step 2? Step 2 sequence: apple[1], gear[2], 42[3], 19[4], winter[5]. The element 3rd to the right of 'gear' (pos 2) is pos 5: winter.
Test Your Knowledge

Given Input: 'cat 45 ant 12 bat 89'. The machine arranges words alphabetically at the Left End and numbers in ascending order at the Right End simultaneously (Double-shift). What is Step 1?

A
B
C
D
Test Your Knowledge

What is the key characteristic of an 'auto-shifted' element in machine input rearrangement?

A
B
C
D
Test Your Knowledge

Given Input: 'zebra 15 monkey 42 apple 89'. If words are sorted in reverse alphabetical order at Left End and numbers in descending order at Right End (Double-shift), how many total steps are required?

A
B
C
D
Test Your Knowledge

In a Mains box-type machine, Box A contains digits (6, 3) and Box B contains digits (2, 4). If Step 1 multiplies the first digit of Box A by the second digit of Box B, and the second digit of Box A by the first digit of Box B, what are the two resulting values?

A
B
C
D