Solve combinatorics tasks The Question


*

*The student forgot the four-digit identification code of his credit card. What is the probability that a student will receive his money by
typing a code at random if he remembers that:

$\quad$ a) all digits of the code are different;
$\quad$ b) the code does not contain the digits $0$ and $1$?
$\quad$ P.S. a and b are two separated cases


*$15$ parcels came to the orphanage. In four of them - winter things, in one - a leather jacket, in the rest - books. Workers open three
parcels randomly. What is the probability that:

$\quad$ a) in two of them - winter clothes and in one - a leather jacket;
$\quad$ b) all three parcels - with books?
$\quad$ P.S. a and b are two separated cases

My Understanding
I tried solving them using formulas and logic
1(a) the total number of possible combinations is $\frac{10!}{ 6!} = 5040$, and the probability $\frac{1}{5040}$?
1(b) there are only $8$ possible digits, repetitions are possible, so the probability is $\frac{1}{4096}$.
2(a)$\frac{2}{455}$
2(b)$\frac{24}{91}$
I've done all calculations using fractions and multiplication because I don't know how to do these using formulas and which
 A: Your answers are correct except for $2$(a). You do not need to apply much of formula anyway. Some of them did not have the working behind the answer so not sure how you arrived at them.
1(a). As you said each of the four digits are different so there are $10$ choices for the first digit, $9$ for the second, $8$ for the third and $7$ for the fourth digit. That is $10 \cdot 9 \cdot 8 \cdot 7 = 5040$ codes in total and hence the probability that they will enter the right code in one attemtp $ = \frac{1}{5040}$.
1(b). There are $8$ choices for each of the four digits and that is $8^4 = 4096$ codes. So probability $ = \frac{1}{4096}$.
2(a). You seem to have made a mistake in this one. We select $3$ random boxes out of $15$. We need to find probability that one of the boxes has leather jacket and other two have winter clothes. As there is just one box with leather jacket, there is just one way to choose the box with leather jacket. But there are $4 \choose 2$ ways to choose two boxes with winter clothes.
So the probability should be $ \displaystyle \frac{4 \choose 2}{15 \choose 3} = \frac{6}{455}$.
2(b) As we need to find probability that all $3$ boxes have books,
The answer should be $ \displaystyle \frac{10 \choose 3}{15 \choose 3} = \frac{24}{91}$.
