Input-Output Machines Questions with Answers

83 practice questions on Input-Output Machines (Puzzles & Brain Teasers) with answers and step-by-step solutions. Try 10 samples below, then practise all 83 free in the AptiNest app.

Sample questions

Question 1Easy

A machine rearranges numbers step by step. Step I: the machine adds 6 to every number. Step II: the machine arranges all the numbers in descending order.
Input: 56 60 79 16 30
What is the difference between the numbers in the 1st and 5th places in step I?

  1. 24
  2. 27
  3. 26
  4. 86

Answer: C. 26

Explanation

Step I gives 62 66 85 22 36; the difference of the 1st and 5th places is 26.

Step-by-step solution

  1. Apply each step to 56 60 79 16 30.
  2. Step I: 62 66 85 22 36
  3. Read the required places in step I.

Why the other options are wrong

  • A. Wrong: this comes from reading the wrong place or an earlier step.
  • B. Wrong: this comes from reading the wrong place or an earlier step.
  • D. Wrong: this comes from reading the wrong place or an earlier step.

Question 2Easy

A machine rearranges a set of numbers step by step. Step I: the machine adds 7 to the numbers in the 1st, 3rd and 5th places. Step II: the machine reverses the order of all the numbers.
Input: 80 38 73 66 88
What is the output of step II?

  1. 95 66 80 38 87
  2. 79 57 64 29 71
  3. 88 58 73 30 80
  4. 66 73 38 80 88

Answer: A. 95 66 80 38 87

Explanation

The rules are: step I adds 7 to the numbers in the 1st, 3rd and 5th places; step II reverses the order of all the numbers. Applying them to 80 38 73 66 88 gives 95 66 80 38 87 at step II.

Step-by-step solution

  1. Step I adds 7 to the numbers in the 1st, 3rd and 5th places: 87 38 80 66 95
  2. Step II reverses the order of all the numbers: 95 66 80 38 87

Why the other options are wrong

  • B. Gets step I wrong (not adding 7 to places 1, 3 and 5), so the reversed numbers do not match.
  • C. Reverses correctly but subtracts 8 from the 2nd and 4th numbers, a step not in the rules.
  • D. Reverses only the first four numbers and leaves 88 in place.

Question 3Easy

A machine rearranges a set of numbers step by step. Step I: the machine interchanges the 1st and 2nd numbers, and also the 3rd and 4th numbers. Step II: the machine subtracts 2 from every number. Step III: the machine adds 5 to the numbers in the 1st, 3rd and 5th places.
Input: 22 61 26 35 32
What is the output of step III?

  1. 25 59 29 33 35
  2. 64 20 38 24 35
  3. 61 17 35 21 32
  4. 22 56 26 30 32

Answer: B. 64 20 38 24 35

Explanation

The rules are: step I interchanges the 1st and 2nd numbers, and also the 3rd and 4th numbers; step II subtracts 2 from every number; step III adds 5 to the numbers in the 1st, 3rd and 5th places. Applying them to 22 61 26 35 32 gives 64 20 38 24 35 at step III.

Step-by-step solution

  1. Step I interchanges the 1st and 2nd numbers, and also the 3rd and 4th numbers: 61 22 35 26 32
  2. Step II subtracts 2 from every number: 59 20 33 24 30
  3. Step III adds 5 to the numbers in the 1st, 3rd and 5th places: 64 20 38 24 35

Why the other options are wrong

  • A. Does not follow from step II: 25 and 29 are 20 and 24 plus 5, placed in the wrong slots.
  • C. Subtracts 5 from the 2nd and 4th numbers, but step II subtracts 2 from every number.
  • D. Subtracts 5 from the 2nd and 4th input numbers, skipping the pair swaps and later steps.

Question 4Easy

A machine rearranges a set of numbers step by step. Step I: the machine subtracts 4 from the numbers in the 2nd and 4th places. Step II: the machine adds 6 to the numbers in the 1st, 3rd and 5th places.
Input: 81 61 54 30 13
What is the output of step II?

  1. 87 57 60 26 19
  2. 80 54 53 23 12
  3. 57 54 26 13 81
  4. 81 57 54 26 13

Answer: A. 87 57 60 26 19

Explanation

The rules are: step I subtracts 4 from the numbers in the 2nd and 4th places; step II adds 6 to the numbers in the 1st, 3rd and 5th places. Applying them to 81 61 54 30 13 gives 87 57 60 26 19 at step II.

Step-by-step solution

  1. Step I subtracts 4 from the numbers in the 2nd and 4th places: 81 57 54 26 13
  2. Step II adds 6 to the numbers in the 1st, 3rd and 5th places: 87 57 60 26 19

Why the other options are wrong

  • B. Uses -7 on the 2nd and 4th numbers and -1 on the rest, which matches neither rule.
  • C. Moves 81 to the end, a rotation the rules never do; step II only adds 6 to 1st, 3rd, 5th.
  • D. Stops after step I, so the +6 to the 1st, 3rd and 5th numbers is missing.

Question 5Medium

A machine rearranges numbers step by step. Step I: the machine adds 7 to the numbers in the 1st, 3rd and 5th places. Step II: the machine moves the first number to the extreme right end. Step III: the machine subtracts 4 from every number.
Input: 27 24 82 55 14
Which number stands in the 2nd place in step II?

  1. 91
  2. 21
  3. 87
  4. 89

Answer: D. 89

Explanation

Step II gives 24 89 55 21 34; the number in the 2nd place is 89.

Step-by-step solution

  1. Apply each step to 27 24 82 55 14.
  2. Step I: 34 24 89 55 21
  3. Step II: 24 89 55 21 34
  4. Read the required places in step II.

Why the other options are wrong

  • A. Wrong: this comes from reading the wrong place or an earlier step.
  • B. Wrong: this comes from reading the wrong place or an earlier step.
  • C. Wrong: this comes from reading the wrong place or an earlier step.

Question 6Medium

A machine rearranges numbers step by step. Step I: the machine adds 6 to the numbers in the 1st, 3rd and 5th places. Step II: the machine subtracts 4 from the numbers in the 2nd and 4th places. Step III: the machine moves the smallest number to the extreme right.
Input: 50 68 86 40 65
What is the sum of the numbers in the 2nd and 4th places in step I?

  1. 118
  2. 98
  3. 106
  4. 108

Answer: D. 108

Explanation

Step I gives 56 68 92 40 71; the sum of the 2nd and 4th places is 108.

Step-by-step solution

  1. Apply each step to 50 68 86 40 65.
  2. Step I: 56 68 92 40 71
  3. Read the required places in step I.

Why the other options are wrong

  • A. Wrong: this comes from reading the wrong place or an earlier step.
  • B. Wrong: this comes from reading the wrong place or an earlier step.
  • C. Wrong: this comes from reading the wrong place or an earlier step.

Question 7Medium

A machine rearranges a set of numbers using the same fixed rule at each step. When the input is given, it produces:
Input: 46 14 52 82 66
Step I: 52 14 58 82 72
Step II: 14 52 58 82 72
Following the same rules, what is the output of step II for the input below?
Input: 34 87 66 61 41

  1. 47 87 72 61 40
  2. 43 87 75 61 50
  3. 40 87 72 61 47
  4. 31 78 63 52 38

Answer: C. 40 87 72 61 47

Explanation

The rules are: step I adds 6 to the numbers in the 1st, 3rd and 5th places; step II moves the smallest number to the extreme left. Applying them to 34 87 66 61 41 gives 40 87 72 61 47 at step II.

Step-by-step solution

  1. Compare each step of the example with the one before it to find the rule.
  2. Rule I: adds 6 to the numbers in the 1st, 3rd and 5th places
  3. Rule II: moves the smallest number to the extreme left
  4. Applying to the new input gives 40 87 72 61 47 at step II.

Why the other options are wrong

  • A. Swaps 40 and 47 at the ends, but the smallest number should stay at the left.
  • B. Adds 9 instead of 6 to the 1st, 3rd and 5th numbers.
  • D. Gives 31 and 38 for 34 and 41, which is not adding 6 to either.

Question 8Medium

A machine rearranges a line of words step by step. Step I: the machine moves the last word to the extreme left end. Step II: the machine arranges the words from the longest to the shortest. Step III: the machine arranges the words in alphabetical order.
Input: mystery cloud pillow sun drum
What is the output of step III?

  1. sun mystery pillow cloud drum
  2. mystery pillow cloud drum sun
  3. sun drum cloud pillow mystery
  4. cloud drum mystery pillow sun

Answer: D. cloud drum mystery pillow sun

Explanation

The rules are: step I moves the last word to the extreme left end; step II arranges the words from the longest to the shortest; step III arranges the words in alphabetical order. Applying them to mystery cloud pillow sun drum gives cloud drum mystery pillow sun at step III.

Step-by-step solution

  1. Step I moves the last word to the extreme left end: drum mystery cloud pillow sun
  2. Step II arranges the words from the longest to the shortest: mystery pillow cloud drum sun
  3. Step III arranges the words in alphabetical order: cloud drum mystery pillow sun

Why the other options are wrong

  • A. Starts with 'sun', which is last alphabetically, not first.
  • B. Stops after step II and skips the alphabetical sort.
  • C. Is not in alphabetical order; only 'sun' first and 'mystery' last are placed as in the reverse order.

Question 9Hard

A machine rearranges a line of words using the same fixed rule at each step. When the input is given, it produces:
Input: train candle map lamp cabinet
Step I: map lamp train candle cabinet
Step II: train map lamp candle cabinet
Step III: map lamp candle cabinet train
Following the same rules, what is the output of step II for the input below?
Input: candle green pumpkin drum bus

  1. pumpkin green drum candle bus
  2. pumpkin bus drum green candle
  3. drum green candle pumpkin bus
  4. green drum candle bus pumpkin

Answer: A. pumpkin green drum candle bus

Explanation

The rules are: step I arranges the words from the shortest to the longest; step II arranges the words in reverse alphabetical order; step III moves the first word to the extreme right end. Applying them to candle green pumpkin drum bus gives pumpkin green drum candle bus at step II.

Step-by-step solution

  1. Compare each step of the example with the one before it to find the rule.
  2. Rule I: arranges the words from the shortest to the longest
  3. Rule II: arranges the words in reverse alphabetical order
  4. Rule III: moves the first word to the extreme right end
  5. Applying to the new input gives pumpkin green drum candle bus at step II.

Why the other options are wrong

  • B. Puts 'bus' second, breaking the reverse alphabetical order of green, drum and candle.
  • C. Moves 'bus' to the extreme right end instead of applying the reverse alphabetical sort.
  • D. Puts 'green' first and leaves 'pumpkin' at the end, so the reverse alphabetical sort is not applied.

Tip: Compare each step with the one before to find the rule (length sort, alphabetical reverse, move first or last word), then apply the rules in order.

Question 10Hard

A machine works on this line of numbers: 87 81 51 74 91
In step k the machine finds the largest number among all places except the last k-1 and interchanges it with the number in the k-th place from the right end.
After how many steps will the numbers first appear in ascending order?

  1. 5
  2. 6
  3. 4
  4. 3

Answer: C. 4

Explanation

Carrying out the steps gives 87 81 51 74 91; 74 81 51 87 91; 74 51 81 87 91 .... The line first becomes ascending at step 4.

Step-by-step solution

  1. Step 1: 87 81 51 74 91
  2. Step 2: 74 81 51 87 91
  3. Step 3: 74 51 81 87 91
  4. Step 4: 51 74 81 87 91

Why the other options are wrong

  • A. Wrong: after step 5 the line is not the first time: it is already ascending after step 4.
  • B. Wrong: after step 6 the line is not the first time: it is already ascending after step 4.
  • D. Wrong: after step 3 the line is still not sorted.

Tip: Follow each step literally: find the largest number in the allowed places, swap it into the marked place, and write every step until the order is ascending.

Practise all 83 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all Puzzles & Brain Teasers topics · All topics