Physics Wallah
banner

Railway Exams Reasoning Machine Input Output

Machine Input problems require identifying a hidden logic to arrange numbers, words, or both through a series of steps. This topic is crucial for competitive exams like SSC Steno, Banking, and UP-SI. Common patterns involve arranging elements in ascending/descending order, alphabetical order, mixed arrangements, and number transformations. The goal is to decode the rules governing each step to solve new inputs.
authorImageNeha Tanna30 Jun, 2026
Railway Exams Reasoning Machine Input Output

Machine Input is a fundamental topic in competitive exams where an initial "input" of numbers, words, or a combination is processed sequentially according to a hidden rule. 

The primary objective is to decipher this underlying logic and apply it to new scenarios to predict subsequent steps or the final arrangement. This section focuses on developing the analytical skills required to identify these patterns effectively. Machine Input can be considered an advanced version of Coding-Decoding (Memory Tip: Remember 'Machine Input' involves 'decoding' rules across 'steps').

Types of Machine Input Questions

Machine Input questions commonly involve:

  • Numbers: Arranging numbers based on value (ascending, descending).

  • Words: Arranging words based on alphabetical order.

  • Mixed: Arranging a combination of numbers and words.

  • Transformation: Applying mathematical operations or digit manipulations to numbers.

Understanding Machine Input Logic: Examples

Understanding Machine Input Logic requires identifying how words, numbers, or mixed elements change from one step to another. The arrangement may follow alphabetical order, ascending or descending values, positional shifts, or number transformations. Check the examples below to understand how these patterns are applied and decoded. 

Number Arrangement (Ascending Order)

Logic: Numbers are arranged one by one in ascending order from the left end. If a number is already in its correct sorted position, it is considered "auto-filled."

Demonstration:

Input: 25, 20, 10, 40, 15

  • Step 1: Smallest number, 10, moves to the first position.
    10, 25, 20, 40, 15

  • Step 2: Next smallest number, 15, moves to the second position.
    10, 15, 25, 20, 40

  • Step 3: Next smallest number, 20, moves to the third position. 25 and 40 are now correctly placed relative to each other and are auto-filled.
    10, 15, 20, 25, 40
    Conclusion: Step 3 is the Last Step.

Practice Question based on Logic 1:

Input: 25, 13, 22, 12, 29, 17

Applying the ascending arrangement logic:

  • Step 1: 12, 25, 13, 22, 29, 17 (12 arranged)

  • Step 2: 12, 13, 25, 22, 29, 17 (13 arranged)

  • Step 3: 12, 13, 17, 25, 22, 29 (17 arranged)

  • Step 4: 12, 13, 17, 22, 25, 29 (22 arranged, 25 & 29 auto-filled)
    Answers:

  1. Four steps are required.

  2. In Step 2 (12, 13, 25, 22, 29, 17), the third number from the left is 25.

Number Arrangement (Ascending Order - Multiple Questions)

Demonstration:

Input: 40, 30, 10, 60, 20, 80, 75

  • Step 1: 10, 40, 30, 60, 20, 80, 75

  • Step 2: 10, 20, 40, 30, 60, 80, 75

  • Step 3: 10, 20, 30, 40, 60, 80, 75

  • Step 4: 10, 20, 30, 40, 60, 75, 80 (60, 75, 80 auto-filled after 40 is placed)
    Conclusion: Step 4 is the Last Step.

Practice Question based on Logic:

Input: 50, 40, 20, 70, 30, 90, 60

Applying the ascending arrangement logic:

  • Step 1: 20, 50, 40, 70, 30, 90, 60

  • Step 2: 20, 30, 50, 40, 70, 90, 60

  • Step 3: 20, 30, 40, 50, 70, 90, 60

  • Step 4: 20, 30, 40, 50, 60, 70, 90 (50 auto-filled, 60, 70, 90 then fall into place)
    Answers:

  1. Four steps are required.

  2. In Step 4 (20, 30, 40, 50, 60, 70, 90), the fifth number from the right end is 40.

  3. In Step 3 (20, 30, 40, 50, 70, 90, 60), the fourth number from the left end is 50.

Number Arrangement (Descending Order)

Logic: Numbers are arranged one by one in descending order from the left end.

Demonstration:

Input: 33, 15, 20, 17, 37, 42, 39, 59

  • Step 1: Largest number, 59, moves to the first position.
    59, 33, 15, 20, 17, 37, 42, 39

  • Step 2: Next largest, 42, moves to second.
    59, 42, 33, 15, 20, 17, 37, 39

  • Step 3: Next largest, 39, moves to third.
    59, 42, 39, 33, 15, 20, 17, 37

  • Step 4: Next largest, 37, moves to fourth.
    59, 42, 39, 37, 33, 15, 20, 17

  • Step 5: Next largest, 33, is auto-filled.
    59, 42, 39, 37, 33, 20, 17, 15 (Order of 20, 17, 15 is from speaker's arrangement)

  • Step 6: Next largest, 20, is moved. 17 and 15 are auto-filled.
    59, 42, 39, 37, 33, 20, 17, 15
    Conclusion: Step 6 is the Last Step.

Practice Question based on Logic:

Input: 17, 42, 39, 52, 13, 57, 15, 19

Applying the descending arrangement logic:

  • Step 1: 57, 17, 42, 39, 52, 13, 15, 19

  • Step 2: 57, 52, 17, 42, 39, 13, 15, 19

  • Step 3: 57, 52, 42, 17, 39, 13, 15, 19

  • Step 4: 57, 52, 42, 39, 17, 13, 15, 19

  • Step 5: 57, 52, 42, 39, 19, 17, 13, 15

  • Step 6: 57, 52, 42, 39, 19, 17, 15, 13
    Answers:

  1. Six steps are required.

  2. In Step 3 (57, 52, 42, 17, 39, 13, 15, 19), the third number from the right end is 13.

  3. In Step 4 (57, 52, 42, 39, 17, 13, 15, 19), the fifth number from the left end is 17.

Word Arrangement (Alphabetical Order)

Logic: Words are arranged one by one in alphabetical order from the left end.

Demonstration:

Input: Class, And, Clean, Are, Liked, Boy

  • Step 1: And, Class, Clean, Are, Liked, Boy

  • Step 2: And, Are, Class, Clean, Liked, Boy

  • Step 3: And, Are, Boy, Class, Clean, Liked (Boy is arranged, Class, Clean, Liked are auto-filled).
    Conclusion: Step 3 is the Last Step.

Practice Question based on Logic:

Input: Boy, Can, Merge, Topics, In, Mid, Term

Applying the alphabetical arrangement logic:

  • Step 1: Boy, Can, In, Merge, Topics, Mid, Term (Boy and Can are in place, In is moved)

  • Step 2: Boy, Can, In, Mid, Merge, Topics, Term (Mid is moved)

  • Step 3: Boy, Can, In, Mid, Merge, Term, Topics (Merge is in place, Term is moved, Topics auto-filled)
    Answers:

  1. Three steps are required.

  2. In Step 2 (Boy, Can, In, Mid, Merge, Topics, Term), the second word from the left is Can.

  3. In Step 3 (Boy, Can, In, Mid, Merge, Term, Topics), the third word from the right is Mid.

Mixed Arrangement (Number Left-Ascending, Word Right-Alphabetical)

Logic: The smallest number is moved to the leftmost position, and the alphabetically smallest word is moved to the rightmost position. This dual arrangement occurs simultaneously in each step.

Practice Question based on Logic:

Input: Tell, 12, Baby, Not, 13, Enjoy

Alphabetical Words: Baby, Enjoy, Not, Tell

Ascending Numbers: 12, 13

  • Step 1: Smallest number 12 to L1, Smallest word Baby to R1.
    12, Tell, Not, 13, Enjoy, Baby

  • Step 2: Next smallest number 13 to L2, Next smallest word Enjoy to R2.
    12, 13, Tell, Not, Enjoy, Baby

  • Step 3: Next smallest word Not to R3 (from remaining Tell, Not).
    12, 13, Tell, Not, Enjoy, Baby (This state shows Tell before Not, indicating Not needs to be moved to its right position.)

  • Step 4: Next smallest word Tell to R4.
    Final arranged state: 12, 13, Not, Tell, Enjoy, Baby (Numbers 12, 13 are left-ascending. Words Baby, Enjoy, Not, Tell are right-alphabetical from right end.)
    Answer: Four steps are required.

Number & Word Arrangement (Another Mixed Type)

Logic:

  • Words: Arranged in alphabetical order from the left end.

  • Numbers: Arranged in ascending order, placed one by one from the right end.

Demonstration:

Input: Pen, 10, 15, Cut, Boy, 18, 19, Dance

  • Step 1: Smallest word Boy to L1, Smallest number 10 to R1.
    Boy, Pen, 15, Cut, 18, 19, Dance, 10

  • Step 2: Next smallest word Cut to L2, Next smallest number 15 to R2.
    Boy, Cut, Pen, 18, 19, Dance, 15, 10

  • Step 3: Next smallest word Dance to L3, Next smallest number 18 to R3.
    Boy, Cut, Dance, Pen, 19, 18, 15, 10

  • Step 4: Next smallest word Pen is auto-filled, Next smallest number 19 is auto-filled.
    Boy, Cut, Dance, Pen, 19, 18, 15, 10
    Conclusion: Step 4 is the Last Step.

Practice Question based on Logic:

Input: Out, 27, 29, Given, Play, 15, Over, 20

  • Words: Given, Out, Over, Play (alphabetical order)

  • Numbers: 15, 20, 27, 29 (ascending order)
    Applying the logic:

  • Step 1: Given, Out, 27, 29, Play, Over, 20, 15

  • Step 2: Given, Out, 27, 29, Play, Over, 20, 15 (Note: Out is placed, and 20 after 15 at the right end)

  • Step 3: Given, Out, Over, 29, Play, 27, 20, 15

  • Step 4: Given, Out, Over, Play, 29, 27, 20, 15
    Answer: Four steps are required.

Number Transformation (Multiple Operations)

Logic: Each step performs a distinct mathematical operation on the digits of the numbers from the original input.

Demonstration:

Input: 21, 24, 36, 48, 51

  • Step 1 (Digital Sum): Sum of digits of each number.
    Output: 3, 6, 9, 12, 6

  • Step 2 (Absolute Difference of Digits): Absolute difference between digits of each number.
    Output: 1, 2, 3, 4, 4

  • Step 3 (Product of Digits): Product of digits of each number.
    Output: 2, 8, 18, 32, 5

  • Step 4 (Sum of Squares of Digits): Sum of the squares of digits of each number.
    Output: 5, 20, 45, 80, 26

Practice Question based on Logic:

Input: 91, 82, 73, 64, 53

  • Step 1 (Digital Sum): 10, 10, 10, 10, 8

  • Step 2 (Absolute Difference of Digits): 8, 6, 4, 2, 2

  • Step 3 (Product of Digits): 9, 16, 21, 24, 15

  • Step 4 (Sum of Squares of Digits): 82, 68, 58, 52, 34

Word Arrangement (Specific Pattern)

Demonstration:

Input: Gun, Man, Out, Play, Over, Bat

  • Step 1: Smallest word Bat moves to the rightmost. Largest word Out moves to the leftmost.
    Out, Gun, Man, Play, Over, Bat

  • Step 2: Next largest word Over moves to second leftmost.
    Out, Over, Gun, Man, Play, Bat

  • Step 3: Next largest word Play moves to third leftmost.
    Out, Over, Play, Gun, Man, Bat

  • Step 4: Next largest word Man moves to fourth leftmost. Gun is auto-filled.
    Out, Over, Play, Man, Gun, Bat
    Conclusion: Step 4 is the Last Step.

Practice Question based on Logic:

Input: Tell, Your, Boy, Not, To, Active

Alphabetical Words: Active, Boy, Not, Tell, To, Your

Applying the logic (Largest word left, Smallest word right, then remaining largest left, etc.):

  • Step 1: Your, Tell, Boy, Not, To, Active (Your to L1, Active to R1)

  • Step 2: Your, To, Tell, Not, Boy, Active (To to L2, Boy to R2)

  • Step 3: Your, To, Tell, Not, Boy, Active (Tell to L3, Not to R3).
    Answer: Three steps are required.

Alphabetical Arrangement (Decreasing Order)

Rule: Arrange words in decreasing alphabetical order.

Input Example: Your, Tell, Boy, Not, To, Active

  • Step 1: Your, Tell, Boy, Not, To, Active (Word Your is placed first as it's alphabetically largest)

  • Step 2: Your, To, Tell, Boy, Not, Active (Word To is placed next in decreasing order)

  • Step 3: Your, To, Tell, Not, Boy, Active (Word Tell is placed. Remaining Not, Boy, Active are in correct decreasing order and are auto-filled if they align, or Not is placed and Boy, Active are auto-filled.)
    Total Steps Required: Three steps were required.

Number Arrangement: Largest-Left, Smallest-Right (Steno Exam Type)

Input: 31, 45, 18, 61, 27, 53

Arrangement Rules:

  1. Step 1: Put the largest number to the extreme left.

  • Largest: 61

  • Result: 61, 31, 45, 18, 27, 53

  1. Step 2: Put the smallest number to the extreme right.

  • Smallest (from original): 18

  • Result: 61, 31, 45, 27, 53, 18

  1. Step 3: The second largest number should be in the second left most position.

  • Second largest (from original): 53

  • Result: 61, 53, 31, 45, 27, 18

Key Point: Pay close attention to the exact position specified (e.g., "second left most" vs. "second right most").

Number Arrangement: Incremental Smallest & "Auto-Fill"

Input Example (Pattern Identification): 15, 12, 22, 20, 42

  • Step 1: Smallest number (12) is placed first.

  • Result: 12, 15, 22, 20, 42

  • Step 2: Next smallest number (15) is already in place ("auto-filled").

New Input for Question: 35, 36, 39, 37, 38, 40

Question: Which number will be Third from the Left End in Step Two?

Solution:

  1. Step 1: Smallest number (35) moves to the first position.

  • Arrangement: 35, 36, 39, 37, 38, 40

  1. Step 2: The next smallest number (36) is already in the second position and thus "auto-filled".

  • Arrangement: 35, 36, 39, 37, 38, 40
    The number Third from the Left End in Step Two is 39.

Number Arrangement: Alternating Smallest and Largest

Logic: Numbers are arranged by alternately picking the smallest and largest available numbers.

Pattern Identification:

  • First Element: Smallest

  • Second Element: Largest

  • Third Element: Second Smallest

  • Fourth Element: Second Largest

  • Fifth Element: Third Smallest

  • Sixth Element: Third Largest
    тАжand so on.

New Input for Question: 50, 40, 20, 70, 30, 90, 60

Step-by-Step Arrangement:

  1. Step 1: Smallest (20)
    20, 50, 40, 70, 30, 90, 60

  2. Step 2: Largest (90)
    20, 90, 50, 40, 70, 30, 60

  3. Step 3: Second Smallest (30)
    20, 90, 30, 50, 40, 70, 60

  4. Step 4: Second Largest (70)
    20, 90, 30, 70, 50, 40, 60

  5. Step 5: Third Smallest (40)
    20, 90, 30, 70, 40, 50, 60

  6. Step 6: Third Largest (60)
    20, 90, 30, 70, 40, 60, 50 (50 is auto-filled)

Total Steps Required: Six steps.

Questions based on the arrangement:

  • Question 1: "Fifth from Right in Step Five."

  • Step 5: 20, 90, 30, 70, 40, 50, 60

  • Answer: 30

  • Question 2: "Fourth from Left in Step Six."

  • Step 6: 20, 90, 30, 70, 40, 60, 50

  • Answer: 70

 

FAQs

What is Machine Input in competitive exams?

Machine Input is a reasoning topic where a given sequence (input) of numbers, words, or both is processed through multiple steps according to a specific hidden logic. Candidates must identify this logic to solve related questions.

How can I identify the logic in Machine Input problems?

Carefully observe the changes between the input and each subsequent step. Look for patterns in arrangement (ascending/descending, alphabetical), element movement (left/right ends, specific positions), or transformations (mathematical operations on digits).

What does "auto-filled" mean in Machine Input problems?

An element is "auto-filled" when it naturally falls into its correct sorted position during a step, without requiring an explicit move or operation on that specific element in that particular step.
Join 15 Million students on the app today!
Point IconLive & recorded classes available at ease
Point IconDashboard for progress tracking
Point IconMillions of practice questions at your fingertips
Download ButtonDownload Button
Banner Image
Banner Image
Free Learning Resources
Know about Physics Wallah
Physics Wallah is an Indian edtech platform that provides accessible & comprehensive learning experiences to students from Class 6th to postgraduate level. We also provide extensive NCERT solutions, sample paper, NEET, JEE Mains, BITSAT previous year papers & more such resources to students. Physics Wallah also caters to over 3.5 million registered students and over 78 lakh+ Youtube subscribers with 4.8 rating on its app.
We Stand Out because
We provide students with intensive courses with IndiaтАЩs qualified & experienced faculties & mentors. PW strives to make the learning experience comprehensive and accessible for students of all sections of society. We believe in empowering every single student who couldn't dream of a good career in engineering and medical field earlier.
Our Key Focus Areas
Physics Wallah's main focus is to make the learning experience as economical as possible for all students. With our affordable courses like Lakshya, Udaan and Arjuna and many others, we have been able to provide a platform for lakhs of aspirants. From providing Chemistry, Maths, Physics formula to giving e-books of eminent authors like RD Sharma, RS Aggarwal and Lakhmir Singh, PW focuses on every single student's need for preparation.
What Makes Us Different
Physics Wallah strives to develop a comprehensive pedagogical structure for students, where they get a state-of-the-art learning experience with study material and resources. Apart from catering students preparing for JEE Mains and NEET, PW also provides study material for each state board like Uttar Pradesh, Bihar, and others

Copyright ┬й 2026 Physicswallah Limited All rights reserved.