|
-
Oct 15th, 2002, 09:24 AM
#1
Thread Starter
Fanatic Member
Permutations
What, do you guys think, is the best way to arrange 7 aribtrary letters in all of thier combinations and enter them into an array or compare them to an array.
i want to loop through each of these combinations, and then compare it to an array of 4000 elements to see if there are any matches
P.S. there are 8031810176 combinations
-
Oct 15th, 2002, 09:27 AM
#2
Member
Thats gonna take a long time to loop through!!
-
Oct 15th, 2002, 09:29 AM
#3
Thread Starter
Fanatic Member
well I was wondering if there was a faster way to do it than just looping through all of the possible combinations
-
Oct 15th, 2002, 09:38 AM
#4
Member
You could do it a bit like the mastermind game, if it finds that a particular letter never occurs in a position then skip that part of the loop.
eg
(4000 matches)
DJEMLSJ
HSYEKDM
etc....
(7 aribtrary letters)
AKTNDO
(loop starts with A in position 1)
A******
if A does not occur in position 1 for any of the 4000 matches then skip looping though the combinations with A in position 1.
Hope that makes sense - it just an idea, ive probably miss-understood!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|