S4Success4Sure
Reasoning · Topic guide

Input-Output Machine Questions: Finding the Rule Fast

Input-output (machine input) questions show a line of words and numbers and the steps a 'machine' uses to rearrange it. IBPS PO, SBI PO and RBI Grade B mains papers use them most, though they sometimes appear in prelims as a five-question set. You must decode the rule from the sample steps and apply it to a new input. The rules repeat across papers: dictionary order, ascending or descending numbers, alternating ends, or arithmetic changes to numbers.

Last updated 26 November 2026 · By the Success4Sure editorial team · Free

Arrangement machines

Each step places one or two elements in their final position, for example the word that comes first in the dictionary moves to the left end and the smallest number goes next to it. Elements not yet arranged keep their relative order. Compare input and step I to see which elements moved and where.

Shifting machines

Some machines do not sort but rotate: each step shifts the whole line by a fixed number of places, or swaps two halves. Check whether every element changed position by the same amount.

Calculation machines

Numbers may change at each step (add 3, multiply digits, take a square root) and words may gain or lose letters. The arrangement may stay fixed. Test the change on the first two numbers before assuming a rule.

Last step and number of steps

The machine stops when the line is fully arranged. If the last few elements happen to be in order already, fewer steps are needed than elements. Questions like 'How many steps are needed?' test this.

Shortcuts and tricks

  • Look at the final step first if it is given; it shows the complete target order and the rule becomes obvious.
  • Track only the elements that moved between two steps; the rest are just shifted.
  • In alternating machines, odd-numbered steps often move words and even-numbered steps move numbers — confirm with step II.
  • When an input is partially sorted, check after each step whether the line already matches the target.
  • Write steps one under another and align columns; questions like '3rd from the right in step II' become lookups.

Worked examples

Example 1

Input: fish 52 rope 17 cart 88 lamp 35. Step I: cart 17 fish 52 rope 88 lamp 35. Step II: cart 17 fish 35 52 rope 88 lamp. Step III: cart 17 fish 35 lamp 52 rope 88. What is the rule?

Solution

In each step the word that comes next in dictionary order moves to the left side, followed by the next smallest number, after the already-arranged pairs. The other elements keep their order. Step III is the last step because the line is fully arranged: cart, fish, lamp, rope with 17, 35, 52, 88 between them.

Example 2

Using the same machine, input: tree 64 bowl 29 sand 71 kite 13 drum 45. Write the steps.

Solution

Words in dictionary order: bowl, drum, kite, sand, tree. Numbers ascending: 13, 29, 45, 64, 71. Step I: bowl 13 tree 64 29 sand 71 kite drum 45. Step II: bowl 13 drum 29 tree 64 sand 71 kite 45. Step III: bowl 13 drum 29 kite 45 tree 64 sand 71. Step IV: bowl 13 drum 29 kite 45 sand 64 tree 71. Four steps.

Example 3

A calculation machine adds 3 to every number in each step. If the input has 12, 25 and 40, what are they in step II?

Solution

Each step adds 3, so after two steps every number grows by 6: 18, 31 and 46.

Practice questions

Question 1

Using the dictionary-and-ascending machine, how many steps are needed for the input tree 64 bowl 29 sand 71 kite 13 drum 45?

  1. Four
  2. Five
  3. Three
  4. Six
Show answer & explanation

Answer: A. Four

The steps are bowl 13…, then drum 29…, then kite 45…, and finally sand 64 tree 71. The line is fully arranged at step IV, so four steps are needed.

Question 2

For the input tree 64 bowl 29 sand 71 kite 13 drum 45, Step II is: bowl 13 drum 29 tree 64 sand 71 kite 45. Which element is 6th from the left in Step II?

  1. tree
  2. 64
  3. sand
  4. 29
Show answer & explanation

Answer: B. 64

Counting in Step II: bowl, 13, drum, 29, tree and then 64. The sixth element from the left is 64.

Question 3

In Step III: bowl 13 drum 29 kite 45 tree 64 sand 71, which element is 3rd from the right?

  1. sand
  2. 71
  3. 64
  4. tree
Show answer & explanation

Answer: C. 64

Reading Step III from the right gives 71, then sand, then 64. So the third element from the right is the number 64.

Question 4

For the input fish 52 rope 17 cart 88 lamp 35, which is the last step of the machine?

  1. Step I
  2. Step II
  3. Step IV
  4. Step III
Show answer & explanation

Answer: D. Step III

After Step III the line reads cart 17 fish 35 lamp 52 rope 88. All words and numbers are in final order, so Step III is the last step.

Question 5

A machine adds 3 to every number in each step. A number reads 31 in Step II. What was it in the input?

  1. 25
  2. 28
  3. 22
  4. 34
Show answer & explanation

Answer: A. 25

Two steps add 3 each, a total of 6. Subtracting 6 from 31 gives the original input value of 25.

FAQs

Should I write every step in the exam?

Write the steps only as far as the questions need. If a question asks about Step III, writing Steps I to III is safer than jumping ahead. For the 'how many steps' question you may need the full sequence, but by then most steps are already written.

What if the rule seems different between steps?

Check whether the machine alternates: it may arrange words in odd steps and numbers in even steps, or move one element to the left end and one to the right. Compare three consecutive lines rather than two. If two rules fit, test both on the given final step.

Practise for these exams

More Reasoning topics