A machine arranges words and numbers so that the final line has words in dictionary order and numbers in increasing order, alternately (word, number, word, number …). In each step it moves one element to its final position, starting from the left.Illustration — Input: pin 31 cap 17 dot 25Step I: cap pin 31 17 dot 25Step II: cap 17 pin 31 dot 25Step III: cap 17 dot pin 31 25Step IV: cap 17 dot 25 pin 31For the input 'rat 64 bus 28 fan 53 egg 19', which is the last step?
Answer (Detailed Solution Below)View answer ▾Hide ▴
Answer: Option C — Step VI
Detailed Solution
Final line: bus 19 egg 28 fan 53 rat 64.
I: bus rat 64 28 fan 53 egg 19; II: bus 19 rat 64 28 fan 53 egg; III: bus 19 egg rat 64 28 fan 53.
IV: bus 19 egg 28 rat 64 fan 53; V: bus 19 egg 28 fan rat 64 53; VI: bus 19 egg 28 fan 53 rat 64.
✓ Check
After Step VI the last two elements, rat and 64, are already in place, so no Step VII is needed.⚠ Common trap
(D) Step VII — counts one step per element (8) minus one, without seeing that the last two settle themselves.Quick tip
Last step = number of elements that actually had to move
💬 Discussions on this question
Ask a doubt ›Still stuck on this question? Ask our faculty and fellow students — answers appear here.
Ask a doubtMore Input-Output Questions
View all ›- Q1.A hand-held gaming device takes and as two input values. These values get updated as and at each iteration, and the game stops when is greater than or equal to . For , and , what would be the final value of when the game stops?
- Q2.For the input 'toy pen axe kite map', which step will read 'axe kite map toy pen'?
- Q3.A number machine applies the same rule in every step: each even number is halved and each odd number is increased by 1. Input: 12 35 7 48 21 What is the sum of the numbers in Step III?
- Q4.For the input 'harbour on stone tide market sky', which word is third from the right in Step III?
More Logical Reasoning Questions
- Q1.Six persons A, B, C, D, E, and F are sitting in a row facing north. B sits third to the left of F. A sits to the immediate right of B. D sits second to the right of F. E sits to the immediate right of A. Who sits at the extreme right end?Linear Arrangement
- Q2.Five friends P, Q, R, S, and T are standing in a row. P is to the left of Q but to the right of T. R is to the right of Q. S is between Q and R. Who is standing in the middle?Linear Arrangement
- Q3.Eight people 1 through 8 sit in a row. 3 sits exactly midway between 1 and 5. 5 sits to the immediate left of 7. 2 sits third to the right of 8. 6 sits to the immediate right of 2. 4 sits between 6 and 7. Who sits second from the left?Linear Arrangement
- Q4.A, B, C, D, and E are five houses in a row from left to right. C is to the right of B and to the left of E. A is to the left of B. D is to the right of E. Which house is in the middle?Linear Arrangement
- Q5.Seven students sit in a row. Priya is second from the right. Raj is third to the left of Priya. Meena is immediately to the right of Raj. Sam is between Meena and Priya. Two students sit to the left of Raj. Who sits at the extreme left?Linear Arrangement
Input-Output — Preparation
This question tests your understanding of Input-Output, a key topic in the Logical Reasoning section. The detailed solution above uses a step-by-step approach to show the reasoning, and where available, a shortcut that helps you solve similar questions in under 90 seconds during the actual exam.
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.