Help reorder the alphabet 4

Line up the 26 26 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 swap two letters, or cycle three letters. For example, you can cycle the letters a , b , c a,b,c by sending a a to b b , b b to c c and c c to a a . You can swap the two letters a , b a,b by sending a a to b b , and b b to a a .

What is the total maximum number of swaps and 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 -1 .

Note: By "total" we mean the combined number of swaps and three-cycles. For example, if you can re-arrange a certain permutation with 11 11 swaps and 4 4 three-cycles, but you can also re-arrange the same permutation with 6 6 swaps and 7 7 three-cycles, then you need at most 6 + 7 = 13 6+7=13 total swaps and three-cycles for that permutation (since 6 + 7 < 11 + 4 6+7 < 11 + 4 ).


The answer is 13.

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.

0 solutions

No explanations have been posted yet. Check back later!

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...