user1592 wrote:
A certain computer program reorders the letters of any seven-letter sequence, and the position of a letter in the new order depends only on its position in the original order. The first run of the program changes the initial input ABCDEFG to the output DABCGEF. If the input to each subsequent run is the output from the preceding run, after how many runs will the output first equal the initial input ABCDEFG ?
A. 6
B. 7
C. 12
D. 14
E. 24
Why did we group the first 4 digits together and the last 3 together/only rearrange them within their own groups, instead of rearranging all 7? Is there something that indicates this in the question? I'm also confused about how to figure out the different patterns.
The question says that the position of a letter in the new order depends only on its position in the original order. Then we are told that ABCDEFG was reordered to DABCGEF.
Observe that in the first four letters, ABCD, the change was that the first three letters and the fourth letters were switched: ABCD became DABC. In the last three letters, EFG, the first two letters and the third letter were switched: EFG became GEF.
Hence, the first four letters would change the following way:
ABCD - The initial order- DABC
- CDAB
- BCDA
- ABCD - Back to the initial order
The last three letters would change the following way:
EFG - The initial order.- GEF
- FGE
- EFG - Back to the initial order
As we can see, the first four letters cycle back to the initial order after every 4 runs and the last three letters cycle back to the initial order after every 3 runs. Therefore, the entire word will cycle back to the initial order of ABCDEFG in 12 runs:
ABCD - EFG - The initial order- DABC - GEF
- CDAB - FGE
- BCDA - EFG
- ABCD - GEF
- DABC - FGE
- CDAB - EFG
- BCDA - GEF
- ABCD - FGE
- DABC - EFG
- CDAB - GEF
- BCDA - FGE
- ABCD - EFG - Back to the initial order
Answer: C.