Latest Update: UPSC CSE 2025 Notification Out!
Reasoning Notes

Input-Output Reasoning Notes for Competitive Exams

Komal Gupta

UPSC Exam Expert & Content Editor

Updated 17 Oct 2026

PDF Notes: Input-Output Reasoning Notes for Competitive Exams

Premium PDF · one-time payment of ₹5 · instant access

Input-Output, also called Machine Input, is a reasoning topic in which a "machine" takes a line of words and numbers (the input) and rearranges or transforms it step by step according to a hidden rule. You must discover the rule from a solved example and apply it to a new input. This topic is a regular feature of bank PO and clerk mains, RBI Assistant, LIC AAO and other banking and insurance exams, usually as a set of 5 questions. It is not directly asked in UPSC CSAT, but the skill it builds, finding a pattern in a sequence of changes, is useful for series and coding questions in CSAT as well. Input-output looks long and intimidating at first, but once you identify the logic, the questions become mechanical.

Quick Facts at a Glance

  • Structure: One input line, followed by Step I, Step II and so on, until the final arrangement.
  • Common patterns: Shifting (left or right), swapping, sorting (ascending or descending), alphabetical arrangement and mathematical operations.
  • First task: Compare the input with the last step to understand the final order.
  • Second task: Compare Step I with the input to understand how one element moves.
  • Question types: Find a particular step, find the position of an element in a step, count the steps needed, or find the element between two others.

1. Main Types of Input-Output

Type 1: Shifting Pattern

In each step, one or two elements move to the left or right end, and the rest shift by one place. The remaining elements keep their relative order.

Example of logic: In each step, the smallest number moves to the left end, and the largest number moves to the right end.

Type 2: Swapping (Interchange) Pattern

Elements exchange positions with each other, such as the first and last, or the second and second-last, in each step. The number of steps is usually half the number of elements.

Type 3: Sorting Pattern

Words are arranged in alphabetical order or by number of letters, and numbers in ascending or descending order. Elements may be placed one at a time from one end.

Type 4: Mathematical Operations

Numbers change in each step by an operation such as adding the digits, squaring, multiplying by a fixed number, or subtracting the next number. Words may change by replacing letters with their alphabetical neighbours.

Type 5: Mixed Word and Number Arrangement

Words and numbers are arranged alternately. For example, words may be arranged in alphabetical order from the left, while numbers are arranged in descending order between them.

2. The Step-by-Step Method

  1. Look at the final step first. Is it sorted? Are words and numbers grouped or alternating? This tells you the goal.
  2. Compare input with Step I. Find which element(s) moved and where. Check whether the rest kept their order.
  3. Confirm with Step II. The same rule should apply. If it does not, re-check your understanding.
  4. Write the rule in one line on your rough sheet, for example: "Each step: next smallest number to left end; next word in reverse alphabetical order to right end."
  5. Apply the rule to the new input and write every step on a new line, at least until the step asked in the question.

3. Solved Example (Shifting Pattern)

Input: 45 bank 18 tree 72 apple 33 moon

Rule: In each step, the next word in alphabetical order is placed from the left end, and the next largest number is placed from the right end (so numbers build up in ascending order from the right). All other elements keep their relative order.

Step Arrangement What moved
Input 45 bank 18 tree 72 apple 33 moon —
Step I apple 45 bank 18 tree 33 moon 72 "apple" to left end; 72 to right end
Step II apple bank 18 tree 33 moon 45 72 "bank" next to apple; 45 just left of 72
Step III apple bank moon 18 tree 33 45 72 "moon" placed third; 33 placed before 45
Step IV apple bank moon tree 18 33 45 72 "tree" placed fourth; 18 placed before 33

The arrangement is complete in 4 steps: words in alphabetical order on the left and numbers in ascending order on the right. Sample questions: In Step II, which element is third from the right? Answer: moon. Which step reads "apple bank moon 18 tree 33 45 72"? Answer: Step III.

Notice how the elements that were not moved in a step, such as 18 and tree in Step I, kept their original order. This "relative order is preserved" property is what lets you write each step quickly without re-reading the input.

4. Solved Example (Mathematical Pattern)

Input: 24 36 15 48

Step I: 6 9 6 12 (sum of digits of each number)

Step II: 36 81 36 144 (square of each number)

Step III: 9 9 9 9 (sum of digits again)

Once you spot the operation for each step, you can apply it to any new input. For a new input 52 17 63 29, Step I = 7 8 9 11, Step II = 49 64 81 121, and Step III = 13 10 9 4.

5. Tricks to Count Steps Quickly

  • In simple shifting where one element is placed per step from one end, the maximum number of steps = number of elements − 1 (the last element falls into place automatically).
  • If two elements are placed per step (one from each end), the steps needed are about half the number of elements.
  • If some elements are already in their final position in the input, they may reduce the number of steps. Check this before counting.
  • For "which step will be the last step?" questions, run the rule until the arrangement stops changing.

6. Common Question Formats

Question type What to do
Which step will be "..."? Compare the given line with your steps
What is the position of X in Step IV? Count from the correct end; note left or right
How many steps are needed to complete the arrangement? Run the rule until no change
Which element is third to the right of Y in the last step? Use the final step and count carefully
What is the sum of numbers at the two ends in Step III? Write Step III and add

Common Mistakes to Avoid

  1. Assuming the rule from Step I alone, without confirming it in Step II.
  2. Changing the order of unmoved elements; most patterns keep them in the same relative order.
  3. Counting positions from the wrong end.
  4. Forgetting that some elements may already be in place, reducing the total steps.
  5. Not writing steps fully; skipping lines often causes errors.

Preparation Strategy

  • Practise one input-output set daily for two weeks, covering shifting, swapping, sorting and mathematical types.
  • For each set, write the rule in one sentence before solving.
  • Time yourself: aim to solve a 5-question set in 6 to 7 minutes.
  • Collect unusual patterns from mains papers in a notebook and revise them.
  • In the exam, if the pattern is not clear in 90 seconds, move on and return later.

Input-output rewards careful observation. Spend the first minute understanding the rule, and the rest of the set will take only a few minutes.

Solved Example (Swapping Pattern)

Input: 81 sky 27 rain 64 cloud 9 wind

Rule: In Step I, the first and last elements swap. In Step II, the second and second-last swap. This continues inward until all pairs have been swapped.

  • Step I: wind sky 27 rain 64 cloud 9 81
  • Step II: wind 9 27 rain 64 cloud sky 81
  • Step III: wind 9 cloud rain 64 27 sky 81
  • Step IV: wind 9 cloud 64 rain 27 sky 81

With 8 elements, there are 4 pairs, so the arrangement finishes in 4 steps. The final line is simply the input in reverse order. Recognising this saves time: if a question asks for the last step of a full swapping pattern, just reverse the input.

Practice Questions

  1. Using the shifting rule from Example 3, how many steps are needed for the input "29 pen 56 ink 11 book 40 desk"? Answer: 4 steps (book, desk, ink, pen from the left; 56, 40, 29, 11 from the right). Final: book desk ink pen 11 29 40 56.
  2. Using the mathematical rule from Example 4, what is Step II for the input 13 22 31? Answer: Step I = 4 4 4, Step II = 16 16 16.
  3. Using the swapping rule, what is the last step for "A B C D E F"? Answer: F E D C B A, reached in 3 steps.

Practise each pattern type separately before attempting mixed mains-level sets, where two rules may operate together.

Frequently Asked Questions

What is input-output in reasoning?

It is a question type where a machine rearranges or changes an input line step by step using a hidden rule that you must identify and apply.

Is input-output asked in bank exams?

Yes. It is common in bank PO and clerk mains, RBI Assistant and insurance exams, usually as a set of five questions.

Is input-output asked in UPSC CSAT?

No, not directly, but the pattern-finding skill helps in series and coding questions.

How do I find the rule in an input-output question?

Compare the input with Step I, then confirm the change with Step II, and check the final step to understand the goal.

What are the common patterns in machine input?

Shifting, swapping, sorting, alphabetical arrangement and mathematical operations on numbers.

How many steps are usually needed?

It depends on the rule and the number of elements. In one-element-per-step shifting, it is at most one less than the number of elements.

Do unmoved elements change their order?

In most patterns, unmoved elements keep their relative order. Always check with the example.

What should I do if I cannot find the pattern?

Skip the set after about 90 seconds, solve other questions and return to it later.

Can some elements already be in place?

Yes. If an element is already in its final position, it may reduce the number of steps needed.

What is a mathematical input-output?

A type where numbers change in each step through operations such as adding digits, squaring or multiplying.

How much time should a set take?

A well-practised student can solve a five-question set in about six to seven minutes.

Why should I write every step?

Writing every step prevents skipping errors and makes it easy to answer position-based questions.

About the Author

Komal Gupta

UPSC Exam Expert & Content Editor

Komal is a senior UPSC exam strategist with 8+ years of experience helping aspirants crack CSE, CDS and NDA exams. She writes in-depth notification breakdowns, exam pattern guides and preparation strategies.