permutations
Posted: Thu Mar 15, 2007 1:11 pm
i'm at an absolute lost at how the best way to do this would be.
I'm looking for a way to give all possible combinations of word any length, given an initial set of characters
so say i was using abc i want
a
b
c
ab
ac
bc
abc
....
the order does not matter (abc == bac) because they will all be permutated.
i was thinking of passing the original set through the permatations, and getting the first originalLength - 1 returns and running the permutations on those, and keep going, but i'm not sure if that would work and/or be the most effecient.
if anyone has seen something like this, or heard of it, please let me know.
Thanks
I'm looking for a way to give all possible combinations of word any length, given an initial set of characters
so say i was using abc i want
a
b
c
ab
ac
bc
abc
....
the order does not matter (abc == bac) because they will all be permutated.
i was thinking of passing the original set through the permatations, and getting the first originalLength - 1 returns and running the permutations on those, and keep going, but i'm not sure if that would work and/or be the most effecient.
if anyone has seen something like this, or heard of it, please let me know.
Thanks