Line up the 2 6 letters in the alphabet randomly in a line. The alphabet letters are not necessarily in sorted order. To bring the letters back into sorted order, you are only allowed to cycle three letters. For example, you can cycle the letters a , b , c by sending a to b , b to c and c to a .
What is the maximum number of three-cycles you need to bring the letters back to sorted order. If you may never be able to bring the letters back into sorted order, submit − 1 .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Why 3-cycle ( 1 , 2 , 3 ) can be generate as ( 2 , 3 ) ∘ (1,2))? Meaning of ( 2 , 3 ) ∘ ( 1 , 2 ) isn't is ( 1 , 2 , 3 ) − > ( 2 , 1 , 3 ) − > ( 2 , 3 , 1 ) , but not ( 3 , 1 , 2 ) ?
Log in to reply
( 1 2 ) means here: exchange the first and second element; not exchange the values "1" and "2". It is easier to see if we let the permutation group act on a list of letters:
( 1 2 ) { a , b , c } = { b , a , c } . ( 2 3 ) { b , a , c } = { b , c , a } .
Which has the same effect as ( 1 2 3 ) { a , b , c } = { b , c , a } .
Log in to reply
I know, I just use 1 , 2 , 3 as element instead of { a , b , c } . Let ( 1 , 2 , 3 ) as permutation and { a , b , c } as element. Isn't permutation ( 1 , 2 , 3 ) means move first element to second position, move second element to third position, move third element to first position? If I am true, then ( 1 , 2 , 3 ) { a , b , c } = { c , a , b } instead of { b , c , a } .
Anyway, thanks for your help!
Log in to reply
@Chan Tin Ping – You are correct. I will change my solution accordingly.
Log in to reply
@Arjen Vreugdenhil – Great! Thanks for your help.
Problem Loading...
Note Loading...
Set Loading...
This problem can be solved using some basic facts about permutation groups .
The activity of rearranging letters of the alphabet is a permutation . The set of all permutations of 26 letters forms the permutation group \mathcal S {26}_. Two permutations σ 1 and σ 2 can be combined as σ 2 ∘ σ 1 ( σ 2 after σ 1 ).
A cycle , written ( a 1 a 2 … a i ) is a permutation in which the element in position a 1 is moved to position a 2 , the element in position a 2 to position a 3 , and so on, and finally the element in position a i to position a 1 . Thus the cycle described in the problem is a 3-cycle.
A simple swapping of element is a 2-cycle. All permutations in S 2 6 (or any full permutation group) may be generated by combining 2-cycles. For instance, the 3-cycle ( 1 2 3 ) may be generated as ( 1 2 ) ∘ ( 2 3 ) .
A permutation is called even if it can be generated by combining an even number of 2-cycles. They form a subgroup of S 2 6 , called the alternating group ( A 2 6 ). From the previous paragraph it is clear that a 3-cycle is an even permutation.
Any permutation that is not even is odd ; it can be generated by combining any arbitrary 2-cycle with some element of the alternating group.
For this problem, note that the permutation needed to sort the alphabet may be odd. But since a 3-cycle is an even permutation, any combination of 3-cycles is even. Therefore, it may not be possible to sort the alphabet using 3-cycles.