Input-Output Questions with Solutions
Input-output questions show a machine that rearranges a line of words, numbers or both, step by step, according to a fixed rule. You are given the input and several steps of the arrangement, then asked about the output for a new input, such as what step 4 looks like or how many steps it takes to finish. The first job is to discover the rule. Compare the input with step 1, then step 1 with step 2, and notice which element moves each time and where it goes. Common rules include arranging words in alphabetical order, arranging numbers in increasing or decreasing order, and alternately placing words and numbers at the left and right ends. Once the rule is clear, apply it carefully to the new input, writing each step out. Many machines finish in fewer steps than you might expect, because some elements are already in the right place. Practise the input-output questions below. Each solution explains the rule and shows every step.