Calculating the number of permutations that also contain a specific subset

557 Views Asked by At

If I have a set of {1,2,3,4,5,6} and I need to calculate the number of permutations where I take 3 numbers then I know that the formula for the total number of permutations is:

$\frac{n!}{(n-r)!} = \frac{6!}{(6-3)!} = 120 $

How can I calculate the number of permutations that contain 1 and 2?

Eg. {1,2,3}, {1,3,2}, {2,1,4} etc.

1

There are 1 best solutions below

0
On BEST ANSWER

You calculate the number $S$ of different sets, including your subset. So to make set of size 3, if we already know 2 elements, we need to choose 1 from the last 4 elements: $$ S = {6-2 \choose 3-2}={4\choose 1}=4 $$

Then for each of those sets you calculate all the permutations of its elements, it's $3!$

So the number of permutations of size $r=3$ from set of size $n=6$ which contatin given $k=2$ elements is: $$ N={n-k\choose r-k}r!=\frac{(n-k)!\ r!}{(n-r)!(r-k!)} $$