Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   VB Script to generate all possible combinations of words for a given set of letters (http://www.go4expert.com/forums/vb-script-generate-combinations-words-t8661/)

gopal_787 5Feb2008 16:03

VB Script to generate all possible combinations of words for a given set of letters
 
Hi All,

I am new to the world of VB scripting. I am trying to get some help writing a VB script that generates all possible combinations of words from the letters provided.

for ex: Input -> {a,b,c}
expected outpur - > abc
acb
bac
bca
cab
cba

Any help would be great

Cheers
Gopal

oogabooga 5Feb2008 22:16

Re: VB Script to generate all possible combinations of words for a given set of letters
 
You are looking for a permutation algorithm.

gopal_787 6Feb2008 16:43

Re: VB Script to generate all possible combinations of words for a given set of letters
 
Thanks a lot for that.. The first link that comes up gives a good explanation of it.. served the purpose.. Thanks :)


All times are GMT +5.5. The time now is 12:48.