MathDB
2017 T5: A Computer Science Problem?

Source:

January 29, 2017
2017team

Problem Statement

We have four registers, R1,R2,R3,R4R_1,R_2,R_3,R_4, such that RiR_i initially contains the number ii for 1i41\le i\le4. We are allowed two operations:
[*] Simultaneously swap the contents of R1R_1 and R3R_3 as well as R2R_2 and R4R_4.
[*] Simultaneously transfer the contents of R2R_2 to R3R_3, the contents of R3R_3 to R4R_4, and the contents of R4R_4 to R2R_2. (For example if we do this once then (R1,R2,R3,R4)=(1,4,2,3)(R_1,R_2,R_3,R_4)=(1,4,2,3).)
Using these two operations as many times as desired and in whatever order, what is the total number of possible outcomes?