Hi there!
A Derangement is a completely disorded permutation:
{2 3 4 1}, {4 3 1 2} , etc see
http://theory.cs.uvic.ca/inf/perm/Derangements.html
My question is: What is minimun number of swaps to change a derangement
to be sorted? My guess about an algorithm is just sort in sequencial
order:
4 3 1 2 - sort 1
1 3 4 2 - sort 2
1 2 4 3 - sort 3
1 2 3 4 = 3 swaps
but I can prove it, someone have ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---