An Initiative by SAARTHI IAS
Maarg Manthan · Topic 17.3

Mixed Word-Number Input-Output Problems

Reasoning › Input-Output · Topic 17.3

Mixed word-number input-output problems have a line containing both words and numbers, and the machine treats them by separate rules in alternate steps. A common rule moves the largest remaining number to the next free place from the left in odd steps, and the alphabetically first remaining word to the next free place from the right in even steps. All other items keep their order.

Share:
Mixed Word-Number Input-Output Problems - Reasoning - MaargX UPSC Maarg Manthan

Quick Answer

Mixed word-number input-output problems have a line containing both words and numbers, and the machine treats them by separate rules in alternate steps. A common rule moves the largest remaining number to the next free place from the left in odd steps, and the alphabetically first remaining word to the next free place from the right in even steps. All other items keep their order.

At a Glance

  • Input Words and numbers together
  • Odd steps A number moves, to the left block
  • Even steps A word moves, to the right block
  • Numbers Chosen by size
  • Words Chosen by alphabetical order
  • Others Keep their relative order

Where Does It Fit?

This topic joins Number-Based Input-Output Rearrangement (Ascending/Descending Order) and Word-Based Input-Output Rearrangement (Alphabetical Order) in one line. The next topic, Identifying the Step Number at Which a Given Arrangement Is Achieved, asks at which step a given line appears, and Input-Output Problems Involving Both Numbers and Words Shuffled Together in Steps covers lines where numbers and words end up shuffled together.

How Does a Mixed Machine Work?

In short: the machine keeps two blocks, a number block growing from the left and a word block growing from the right, and moves one item per step to the correct block.

Step Item moved Chosen by Moved to
I, III, V (odd) A number Largest of the numbers not yet placed Next free place from the left
II, IV, VI (even) A word Alphabetically first of the words not yet placed Next free place from the right

Take the input pen rose 18 orange 78 80. Step I moves 80, the largest number, to the left end. Step II moves orange, the alphabetically first word, to the right end. Step III moves 78 to the second place. Step IV moves pen, the first of the remaining words, to the second place from the right. Step V moves 18 to the third place. At the end the line has numbers in descending order on the left and the words in reverse alphabetical order on the right.

  • Two blocks: the placed numbers and the placed words never move again.
  • Middle items: the unplaced items keep their relative order in the middle.
  • Rule variants: papers swap the roles, for example smallest number to the left or last word to the right.

How Do You Solve Mixed Machine Questions Step by Step?

In short: sort the numbers and words separately, find which item moves in Step I and Step II, then follow the pattern for later steps.

  1. Sort numbers in the required order and sort words alphabetically.
  2. Read Step I to see which type moves first and to which end.
  3. Read Step II to find the second rule.
  4. Apply the pattern to the new input.
  5. Keep the middle in order while the blocks grow.
  6. Check the step number against the pattern of odd and even steps.

Step pattern

  • Odd step k: the ((k + 1)/2)th largest number is placed.
  • Even step k: the (k/2)th word in alphabetical order is placed.
  • Total steps = number of items – 1 at most.

A question on which step gives a certain line is covered in Identifying the Step Number at Which a Given Arrangement Is Achieved.

Where Do Candidates Go Wrong?

In short: the usual errors are placing a word in an odd step, putting an item at the wrong end, and reordering the middle.

  • Wrong type: moving a word when the step is for a number.
  • Wrong end: placing words from the left.
  • Middle disturbed: reordering the unplaced items.

Solved Examples

Example 1

Question: Input: pen rose 18 orange 78 80. In odd steps, the largest number not yet placed moves to the next free place from the left. In even steps, the alphabetically first word not yet placed moves to the next free place from the right. Show every step and say at which step the final line is reached.

  1. Step I: 80 is the largest number, so it goes to the left end: 80 pen rose 18 orange 78.
  2. Step II: orange is the alphabetically first word, so it goes to the right end: 80 pen rose 18 78 orange.
  3. Step III: 78 is the largest remaining number and goes to the second place: 80 78 pen rose 18 orange.
  4. Step IV: pen is the first of the remaining words and goes second from the right: 80 78 rose 18 pen orange.
  5. Step V: 18 goes to the third place: 80 78 18 rose pen orange. The only remaining item, rose, is already in its place.

Answer: The final line is 80 78 18 rose pen orange, reached at Step V.

Example 2

Question: Input: dove 25 jar 61 cat 40. The same rule applies. What is Step III?

  1. Step I: 61 goes to the left end: 61 dove 25 jar cat 40.
  2. Step II: cat is the alphabetically first word and goes to the right end: 61 dove 25 jar 40 cat.
  3. Step III: 40 is the largest remaining number and goes to the second place: 61 40 dove 25 jar cat.

Answer: Step III is 61 40 dove 25 jar cat. Step IV is 61 40 25 jar dove cat.

Example 3

Question: In the second example, which item is third from the left in Step IV?

  1. Step IV is 61 40 25 jar dove cat.
  2. The third item from the left is 25.

Answer: 25.

Example 4

Question: In the first example, which item is fourth from the left in Step III?

  1. Step III is 80 78 pen rose 18 orange.
  2. The fourth item is rose.

Answer: rose.

Example 5

Question: In the first example, in which steps are the words moved?

  1. Words move in the even steps.
  2. Orange is moved in Step II and pen in Step IV.

Answer: Orange in Step II and pen in Step IV.

Shortcuts and Tricks

  • Sort numbers and words separately before any step.
  • Count odd steps for numbers and even steps for words.
  • Words placed from the right end appear in reverse alphabetical order when read left to right.
  • The middle items stay in their old order; copy them across.
  • If a chosen item is already in its place, the line is unchanged.

Common Mistakes

  • Moving a number in an even step.
  • Placing words from the left end.
  • Reordering the middle items.
  • Comparing words by length.
  • Counting the input as Step I.

Practice Questions

  1. Input: dove 25 jar 61 cat 40, with the rule above. What is Step I?
  2. With the same input and rule, what is Step III?
  3. In which step is the second largest number placed?
  4. In which step is the alphabetically first word placed?
  5. In a line of 3 numbers and 3 words, in how many steps are words moved?

Answers: 1) 61 dove 25 jar cat 40; 2) 61 40 dove 25 jar cat; 3) Step III; 4) Step II; 5) 3.

Why Is This Topic Important?

  • Exam frequency Mixed lines are the commonest input-output form in bank exams.
  • Skill They train you to run two rules in parallel.
  • Reuse Each rule is the one met in Number-Based Input-Output Rearrangement (Ascending/Descending Order) and Word-Based Input-Output Rearrangement (Alphabetical Order).
  • Speed Pre-sorting both groups makes every step a copy.

What Comes Next?

The next topic is Identifying the Step Number at Which a Given Arrangement Is Achieved. It asks at which step a given arrangement appears.

Key Terms and Formulas

  • Number block Numbers placed at the left
  • Word block Words placed at the right
  • Odd step Step I, III, V and so on
  • Even step Step II, IV, VI and so on
  • Middle Items not yet placed
  • Pattern The repeating order of rules

Exam Corner

Points to Remember

  • Odd steps move numbers, even steps move words.
  • Numbers fill the left; words fill the right.
  • Middle items keep their order.
  • Sort both groups first.
  • The input is not a step.

Do Not Confuse With

  • Number step vs word step They alternate; do not swap them.
  • Left block vs right block Numbers go left and words go right in this rule.
  • Alphabetical first vs last The rule says which is chosen.
  • Odd step vs odd number Odd refers to the step number.

Memory Hook

Odd step number left, even step word right, middle stays put.

GS Relevance

Mixed lines of words and numbers are standard in IBPS PO and SBI PO prelims and mains, with 5 questions on one input line and its steps.

Frequently Asked Questions

How do you solve mixed word and number input-output questions?

Sort the numbers and words separately, then read Step I and Step II to find which item moves in each and to which end. Apply the pattern to the new input, moving one item per step, keep the unplaced items in their old order in the middle, and check the step number against the odd-even pattern.

Which steps move numbers and which move words?

In a typical machine, odd steps such as I, III and V move numbers, and even steps such as II, IV and VI move words. The pattern may be reversed in some papers, so read Step I and Step II of the given example to see which type moves first.

Where do the moved items go in a mixed machine?

Numbers usually move to the next free place from the left and words to the next free place from the right, so two blocks grow towards each other. The unplaced items stay between them in their original relative order until they are placed.

Why are the words in reverse order at the end?

Words are placed from the right end, starting with the alphabetically first one. So the first word placed ends at the extreme right, and later words sit to its left. Read left to right, the word block therefore appears in reverse alphabetical order.

How can I save time on mixed machine questions?

Sort both groups at the start. Then Step k can be written directly: the left block holds the largest numbers placed so far, the right block holds the alphabetically earliest words placed so far, and the middle holds the remaining items in their original order.

PYQ Practice — Statement Analysis

1 In a mixed machine, odd steps move numbers and even steps move words.
True

This is the usual alternate pattern, read from Step I and Step II.

2 Words placed from the right end appear in alphabetical order when read left to right.
False

They appear in reverse alphabetical order when the first word is placed first.

3 The middle items are reordered in every step.
False

They keep their relative order.

4 In a line of 3 numbers and 3 words, the words are moved in 3 steps.
True

Words move in the even steps II, IV and VI.

Share: