# Permutations

1. ## Permutations

I have been searching this forum for hours looking for the answer to my question so I would not have to bother any of you kind folks, but to no avail, so if I offend anyone in any way with my stupidity, I will apologize in advance. I am using a Mac and my excel came with the hardware, so I am unsure of the Version, but the Mac is a 2011 machine if that helps.
I am trying to find out how to create all permutation of 4 numbers, but using the numbers 0-9 as the input numbers. In other words, I want to generate all 4 number combinations of the numbers 0-1-2-3-4-5-6-7-8-9.

kajabi

2. ## Re: Permutations

You might go to wikipedia or similar and look up the algorithm for generating permutations in lexicographic order, as this seems the most applicable algorithm. Basic idea is to start with the first iteration 0000 and change one digit at a time. so
0000
0001
0002
0003
0004
and so on

Basically, you should get all of the integers from 0 to 9999, shouldn't you?

3. ## Re: Permutations

EDIT : Ack, nix that, I completly misunderstood the request here.

There are currently 1 users browsing this thread. (0 members and 1 guests)