I have a sequence of n numbers in a computer game, I want to move m solders randomly based on this sequence. for example 

n={1,2,3}

and m=3

we get the following solution:

s1={1}, s2: {2,3}, s3={} or 

s1={1,2,3}, s2: {},s3={}, or 

s1={3,2,1}, s2: {},s3={}, or

s1={3,2}, s2: {}, s3={1}, or

s1={1}, s2: {2}, s3={3}, or

s1={3}, s2: {2}, s3={1}, or

s1={}, s2: {23}, s3={1}, or ...

for n=3 and m=3 I counted 60 different ways if I was not wrong, what is the formula to find the number of all possible solutions?

More Ahmad Hassanat's questions See All
Similar questions and discussions