0
$\begingroup$

My solution is the following:

Choose $k$ elements from the set $N - 1$ (the set $N$, without $1$), then do the same for the element $2$ and at the last step subtract the elements which don't contain $1$ and $2$ because I count them $2$ times. So the solution is: $$ 2C(n-1,k) - C(n-2,k)$$

Am I right?

$\endgroup$
3
$\begingroup$

Yeah this is alright. Also we know there $\binom{n}{k}$ ways to select $k$ integers from $N$ without any restrictions, and $\binom{n-2}{k-2}$ ways to select $k$ integers from $N$ so that both $1$ and $2$ are selected. SO the required number of ways is also same as: $$\binom{n}{k}-\binom{n-2}{k-2}$$

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.