# distinctly numbered counting problem

How many ways are there to put a total of m tennis balls, each distinctly numbered, into n distinctly marked baskets with at most one ball in each basket?

New contributor
Afra Binth Osman is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Could you edit into your question what you have tried so far? – Henry May 4 at 9:38

From the problem statement, it's clear that $$n \geq m.$$
Step 1: Choose $$m$$ baskets from $$n$$ of them. The number of such choices is $$\binom n m.$$
Step 2: Then you have $$m$$ balls and $$m$$ baskets. Place exactly one ball into a basket. There're $$m!$$ such ways.
Step 3: Find the total number of permutations: It's $$\binom n mm!$$ This number is denoted by $$P(n, m).$$
Add $$n-m$$ numbered tennis balls into the mix, and distribute all the balls across the $$n$$ baskets ($$n!$$ ways), and then remove the dummy balls ($$(n-m)!$$ ways), to give $$\frac{n!}{(n-m)!}$$ ways in all.