How can i find the combination of a word.
for example: abc,acb,bac,bca,cab,cba
i only know this because i analyze it, but how about 7 letter word?or 8 maybe?
Because as the letter increases, the combination increases also exponentially.
is there any technique to do it?
How do i find the combination of a 7 letter word?
Started by mr_skyflakes21, Mar 27 2009 03:00 PM
5 replies to this topic
#1
Posted 27 March 2009 - 03:00 PM
|
|
|
#2
Posted 28 March 2009 - 04:51 AM
Technically, what you are talking about is permutations. Do you want to list them or count them (two completely different issues)?
#3
Posted 28 March 2009 - 05:09 AM
I need to know their arrangement.^_^.
Coz i only know the equation where i can find all the possible permutation without repeating.
The actual arrangement is what i am looking for.
Coz i only know the equation where i can find all the possible permutation without repeating.
The actual arrangement is what i am looking for.
#4
Posted 28 March 2009 - 06:11 AM
First issue: are you dealing with words with repeating letters or not?
Second issue: are you storing the results in a file or something? 7 letters = up to 5040 words. 8 letters = up to 40320 words!
Second issue: are you storing the results in a file or something? 7 letters = up to 5040 words. 8 letters = up to 40320 words!
#5
Posted 28 March 2009 - 11:20 AM
Im just aiming for 7 letter word. 5040 is too big for the memory..hihihi.
No Repitition.
No Repitition.
#6
Posted 28 March 2009 - 11:50 AM
no repetition = 5040 different permutations.
You will probably want to look at doing something like this:
given string "abdslef", start at the right and find the first character pair that is not in reverse order (in this case, "ef") and reverse them, then list the characters after the first reversed character in sorted order. For example:
"abdslef"
"abdslfe"
"absefls" - s moves forward, sort "dlfe"
You will probably want to look at doing something like this:
given string "abdslef", start at the right and find the first character pair that is not in reverse order (in this case, "ef") and reverse them, then list the characters after the first reversed character in sorted order. For example:
"abdslef"
"abdslfe"
"absefls" - s moves forward, sort "dlfe"


Sign In
Create Account


Back to top









