# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Re: permutations of a 6! numerically

Hi John,

look for the "Application Control" functions palette. "Open VI Reference" and "Call by Reference" might be interesting...

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 31 of 57
(1,182 Views)

## Re: permutations of a 6! numerically

Can recursion be used for this challenge wiht LV 8.2?

Somewhere in there we picked-up the option to share clones but without that option, it may blow-up in LV 8.2 due to a lack of memory.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 32 of 57
(1,160 Views)

## Re: permutations of a 6! numerically

What would be wrong with just using a while loop that counts to 1000000. Convert each iteration to a string, filter out any number with [0,7-9], then do a simple search and replace (1=A, 2=B, etc).

Of course, it gives you repeat letters and lengths shorter than 6, but those should be easily filtered as well.

Not elegant or super fast (takes a few seconds to build it to an array, didn't try writing directly to a file), but certainly easy.

Message 33 of 57
(1,142 Views)

## Re: permutations of a 6! numerically

Its simple, and the filtering would be straight forward,

its not elegant but that would work.

hmm, nice idea. And it would be easy to see if it worked, run a line count compare to n! for that number and check for repeats and remove.

That might just do it.

I'll give it a go! 😄

Message 34 of 57
(1,130 Views)

## Re: permutations of a 6! numerically

Here's a quick modification (LabVIEW 8.0), adapted from this much more complex problem. 😉

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 35 of 57
(1,124 Views)

## Re: permutations of a 6! numerically

... and here is the same using plain strings:

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 36 of 57
(1,108 Views)

## Re: permutations of a 6! numerically

sweet, here's hoping it'll run on LV v8.2 😄

Message 37 of 57
(1,103 Views)

## Re: permutations of a 6! numerically

Sorry, down-conversion to 8.0 will get rid of the in-place structure, so the attached 8.0 VI is a bit ugly. To simplify, you can remove the inner while loop without breaking anything.

Here's the string version as a 2009 VI for those who upgraded.

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 38 of 57
(1,097 Views)
Solution
Accepted by topic author John Pierson

## Re: permutations of a 6! numerically

Here is a cleaned up 8.0 version:

of course you need to be careful. Don't use very long strings or it will break because of datatype limitations. 😉

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 39 of 57
(1,090 Views)

## Re: permutations of a 6! numerically

yup, that does the job perfectly, can even be expanded for 7, 8 etc... itterations.

does waht i needed and more 😄

now to write to a notpad file 😄

Message 40 of 57
(1,085 Views)