[Math] In how many ways can N balls be distributed in M slots

combinatorics

If I have M slots, and N balls, and M > N, in how many ways can balls be distributed in slots? Each slot can have at most 1 ball.

UPDATE:

Ok, so the original form of the task was like this: There are 2 processes (think computer processes), each performing 4 operations. Both run simultanousely. Let's say there is process with operations 1-2-3-4, and another one with a-b-c-d. Because processes run simultanousely, operations can be performed in different order. It can be 1-2-3-4-a-b-c-d, or 1-a-2-b-3-c-4-d or 1-2-3-a-b-4-c-d etc. The question is how many such combinations do we have. It is important that in the process, operations must keep order. I.e. we can't have e.g. 2-1 or d-b anywhere.

I figured out there are always 8 operations (not a huge discovery here 😉 ). Let's say this are slots. Now I have to place 4 operations in 8 slots – another 4 will just fill remaining ones. Then I figured out I don't need to label the 4 operations, because their order will be always the same. So the whole task boils down to putting 4 balls in 8 slots.

Best Answer

You are just selecting N slots out of M.....

Related Question