07-08-2010 05:47 AM - edited 07-08-2010 05:52 AM
I'm trying to build a VI that lets me use the letters A B C D E F and arrange them in all permutations (so 720 different orders - 6!)
i've tried doing it with simple N-loop structures, but i'm a bit rusty.
the output would ideally be a 2D word matrix of
ABCDEF
ABCDFE
etc......
help!!
Solved! Go to Solution.
07-08-2010 07:07 AM
oh, i'm on LV v8.2
07-08-2010 07:14 AM
07-08-2010 07:17 AM
i believe that one only gives you the number of permutations, what I'm after is the permutations in total as a list.
07-08-2010 07:19 AM - edited 07-08-2010 07:19 AM
Hi John,
if you can wait some hours, then i upload an example later (i don't have it with me now).
Mike
07-08-2010 07:19 AM
oh, hang on, i'll give it a go, need to turn on the pc with LV on it to check
07-08-2010 07:20 AM
@Mike, i'll give it a go myself, but i would really apreciate an example, i'll upload anything i get if i make progress.
Chears for you help!
07-08-2010 07:30 AM
@Mike - yeah ran it on my other computer, it just does the 'how many permutations are there' calculation
thats not what i'm after, i'm after each of the permutations themselves.
so lets say we have A B C D E and F
so it could start:-
ABCDEF
ABCDFE
ABCEDF
ABCEFD
....
and so on, its a simple enough sequence its just laborious to type out 720 lines of it manually,
and i'f i move onto 7,8 or 9 letters gets longer and longer.
07-08-2010 07:35 AM
Hi John,
i understand what you need, but i didn't open the example from the link. Sorry for that. I'll upload an example later.
Mike
07-08-2010 07:41 AM
no worries mike, its esentially a sequence its done neatly, you can say the first coloumn- the far left one
A repeats 24 times, then B 24 times, C- 24 etc......
The next column over then repeats the remaining letters every 6
B: 6, C: 6 etc......
and so on.