Line up the 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 by sending to , to and to . You can swap the two letters by sending to , and to .
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 .
Note: By "total" we mean the combined number of swaps and three-cycles. For example, if you can re-arrange a certain permutation with swaps and three-cycles, but you can also re-arrange the same permutation with swaps and three-cycles, then you need at most total swaps and three-cycles for that permutation (since ).
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.
No explanations have been posted yet. Check back later!