# Input-Output Sequence

Introduction:
What is Input Output

Machine input or Input Output is a question type, where the candidate is given some kind of word and number arrangement. With each subsequent operation, the arrangement of the words and numbers changes. These operations are performed until a final arrangement is reached or is performed in loop. The student is required to identify the hidden pattern in the rearrang0ement and apply it to the questions.
Example:
A word arrangement machine when given an input of words, rearranges them following a particular rule in each step. The following is an illustration of input and steps rearrangement.
Input : Camp Rule Show Mouth Fast
Step I : Show Camp Rule Mouth Fast
Step II : Show Rule Camp Mouth Fast
Step III: Show Rule Mouth Camp Fast
Step IV: Show Rule Mouth Fast Camp
This is the final arrangement and STEP IV is the last step for this input.
What should be the last step of the following input?
INPUT: Coal Steer Brief Nap Blast Cry
Explanation:
The given rearrangement has a pattern that can be followed from the input step to the final step, which is Step IV. Observe carefully. The rearrangement follows the following patterns:
1. The rearrangement is taking place from left to right.
2. The rearrangement is taking place one word at a time.
3. The rearrangement is done on the basis of decreasing alphabetic order.
NOTE:　To understand the pattern, often it is sufficient to look at the input, 1st, 2nd and final steps of the arrangement.
Now if we apply the same pattern rules to the second input given, we can immediately tell what the output (final step after rearrangement) would be:
INPUT:    Coal 　 　 Steer 　     Brief　　 Nap 　    　Blast　      Cry
OUTPUT: Steer　　  Nap 　 　 Cry 　 　 Coal 　 　Brief　　 Blast
TYPES OF QUESTIONS
Based on the logic used behind the rearrangement, we can classify these types of questions as:

A. Rearrangements based on Ordering:

Words are arranged alphabetically (forward or reversed) as per their positions in the dictionary while numbers are arranged in ascending/descending order.
Both words and numbers could be arranged individually or simultaneously in each step. The rearrangement can start from the leftmost side or the rightmost side of the sentence and sometimes even simultaneously from both the ends. The rearrangement could either start with a word or a number. Whatever the finer details may be, in these kinds of rearrangements, one or two words/numbers are shifted at a time, without changing the order of the remaining words/numbers.
Example:
Input :  71          cowboy             dye         zirconium      92       45         66           bandit
Step I : 45              71            cowboy             dye              92       66       bandit      zirconium
Step II : 45           66                   71           cowboy            92      bandit    dye        zirconium
Step III: 45          66                    71               92             bandi t cowboy   dye       zirconium
Here, Step III is the final step and the rearrangement is done simultaneously from both front and back ends. The rearrangements are done this way : the numbers are arranged in ascending order one by one from the left end, with the next biggest number being added to the right of the previous number. The words are arranged in descending order one by one from the right end, with the last word in the dictionary going to the rightmost end, and earlier entries in the dictionary getting added in subsequent steps to the left of that word.
B. Rearrangements based on Interchanging the Positions of Words and Numbers:
Specific positions are selected and the positions of only those words/numbers are exchanged. The positions of all others remain unchanged.
Example:
Input : 102   bobby     indica   49   diamond      22       gas   figure    75      20
Step I :  20    bobby    indica   49    diamond      22       gas   figure   75      102
'bobby' is already arranged, so we will move on to the next element.
Step II : 20   bobby       22      49      diamond   indica   gas  figure   75      102
Step III: 20  bobby       22  diamond    49          indica  gas  figure    75        102
Step IV : 20  bobby       22  diamond    49          figure  gas  indica   75        102
Step V : 20   bobby       22   diamond    49          figure   75   indica  gas      102
Step VI : 20 bobby       22   diamond    49           figure   75     gas   indica  102
Step VII : 20 bobby      22   diamond   49          figure     75    gas   102       indica
Step VII is the final step of the input. The underlined words are used to indicate the words that will be interchanged in the each subsequent step.
C. Rearrangements based on Mathematical operations:
Some mathematical operation (like squaring the number, adding the digits within the number, some common number added/subtracted/multiplied/divided to each number etc.) is applied on the numbers in each step.
Example:
Input : 17 25 92 88 19 52
Step I : 10 25 92 88 19 50
Step II : 10 20 92 88 10 50
Step III: 10 20 90 80 10 50
Step III is the final step. Clearly in this example, the unit’s digits of the left most and right most number are simultaneously being subtracted from the numbers themselves. This is followed by the number to the right of the left most one, and to the left of the right most one.
1. If there are ‘n’ words/digits in the input then at most ‘n-1’ steps are required to rearrange it completely.
2. Number of words/digits arranged until the present step is greater than or equal to the present step number.
3. If input is not given we cannot determine the previous step from given step number or we cannot determine input from given step number.

Posted Date : 04-02-2021

గమనిక : ప్రతిభ.ఈనాడు.నెట్‌లో కనిపించే వ్యాపార ప్రకటనలు వివిధ దేశాల్లోని వ్యాపారులు, సంస్థల నుంచి వస్తాయి. మరి కొన్ని ప్రకటనలు పాఠకుల అభిరుచి మేరకు కృత్రిమ మేధస్సు సాంకేతికత సాయంతో ప్రదర్శితమవుతుంటాయి. ఆ ప్రకటనల్లోని ఉత్పత్తులను లేదా సేవలను పాఠకులు స్వయంగా విచారించుకొని, జాగ్రత్తగా పరిశీలించి కొనుక్కోవాలి లేదా వినియోగించుకోవాలి. వాటి నాణ్యత లేదా లోపాలతో ఈనాడు యాజమాన్యానికి ఎలాంటి సంబంధం లేదు. ఈ విషయంలో ఉత్తర ప్రత్యుత్తరాలకు, ఈ-మెయిల్స్ కి, ఇంకా ఇతర రూపాల్లో సమాచార మార్పిడికి తావు లేదు. ఫిర్యాదులు స్వీకరించడం కుదరదు. పాఠకులు గమనించి, సహకరించాలని మనవి.