-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Blogs
Posts posted by Vincany
-
-
If there is a word , then will swapping 2 adjacent letters at the beginning of string will give me a new word (not necessarily a meaningful word) and then swapping the next 2 letters will give me a new word. After switching the last 2 letters , we go back to the beginning of the word and continue.
example: If the word is ABCCD , it becomes BACCD , then BCACD , BCCAD, BCCDA, then CBCDA and so on ..Ignoring the swapping of the same two letters (like BCCDA) , will this algorithm give me all the words of all permutations ? I Tried for few number of letters and it works , but I want to know how to prove for any no. of letters. I have no idea how to prove it , it seems to work . By the way ,it is not a puzzle .
shuffling algorithm for letters in a word
in Homework Help
Posted
Yes , I see that some of the permutations do not show up. Thanks!