# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## permutations of a 6! numerically

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

Message 1 of 57
(2,111 Views)

## Re: permutations of a 6! numerically

oh, i'm on LV v8.2

Message 2 of 57
(2,082 Views)

## Re: permutations of a 6! numerically

Hi John,

maybe this hepls.

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

Mike

Message 3 of 57
(2,073 Views)

## Re: permutations of a 6! numerically

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

Message 4 of 57
(2,069 Views)

## Re: permutations of a 6! numerically

Hi John,

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

Mike

Message 5 of 57
(2,065 Views)

## Re: permutations of a 6! numerically

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

Message 6 of 57
(2,063 Views)

## Re: permutations of a 6! numerically

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

Message 7 of 57
(2,061 Views)

## Re: permutations of a 6! numerically

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

Message 8 of 57
(2,051 Views)

## Re: permutations of a 6! numerically

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

Message 9 of 57
(2,042 Views)

## Re: permutations of a 6! numerically

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.

Message 10 of 57
(2,035 Views)