LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

permutations of a 6! numerically

Solved!
Go to solution

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!!

0 Kudos
Message 1 of 57
(1,961 Views)

oh, i'm on LV v8.2

0 Kudos
Message 2 of 57
(1,932 Views)

Hi John,

maybe this hepls.

http://zone.ni.com/devzone/cda/epd/p/id/362

 

Mike

0 Kudos
Message 3 of 57
(1,923 Views)

i believe that one only gives you the number of permutations, what I'm after is the permutations in total as a list.

0 Kudos
Message 4 of 57
(1,919 Views)

Hi John,

if you can wait some hours, then i upload an example later (i don't have it with me now).

 

Mike

0 Kudos
Message 5 of 57
(1,915 Views)

oh, hang on, i'll give it a go, need to turn on the pc with LV on it to check

 

0 Kudos
Message 6 of 57
(1,913 Views)

@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!

0 Kudos
Message 7 of 57
(1,911 Views)

@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.

0 Kudos
Message 8 of 57
(1,901 Views)

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

0 Kudos
Message 9 of 57
(1,892 Views)

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.

0 Kudos
Message 10 of 57
(1,885 Views)