
Algorithm for deriving permutations
Posted:
Oct 18, 2007 11:05 AM


If you have, say, 4 boxes to put the following 6 types of things in:
Apples Oranges Pears Bananas Gooseberry Lemon
Such that you could:
a) only put one piece of each of the things in one box; and
b) you could put the same thing in all the boxes, i.e you could put, say, an apple each in each of the boxes. In the mathematical jargon, if repetition was allowed
Then, I know that we could have 6*6*6*6, i.e 1296 permutations.
However, I want to know the algorithm to decide what those combinations are. Help appreciated.

