2
$\begingroup$

How can I perform operations so as to get this value? Number should not have leading zeros.

$\endgroup$
  • $\begingroup$ HINT: Do casework whether the first digit is even or odd. $\endgroup$ – K. Jiang Apr 1 '16 at 16:25
5
$\begingroup$

Case 1: First digit is odd

  1. How many choices do we have for this first digit?

There are $5$ ways of choosing a digit for this place from $1,3,5,7,9$

  1. Now in how many ways can we build the rest of the number?

For the remaining 19 digits, we need to choose 9 positions to be odd and the rest to be even.

Number of ways to choose 9 positions out of 19 is $\binom{19}{9}$. By choosing where we want to place the odd numbers we have also fixed the positions where the even numbers should be places since there are only 10 positions remaining and we want exactly 10 even digits.

Now that we know whether a given position is even or odd, each of the $19$ positions have $5$ choices to choose from. Thus there are $5^{19}$ ways to build the number once we have fixed the positions for the odd digits.

Multiplying everything together, we get $5\binom{19}{9}5^{19} = \binom{19}{9}5^{20}$ for this case.

Case 2: First digit is even

We can do the same for the case when the first digit is even taking care of the fact that this digit cannot be $0$. Thus everything remains the same as in Case 1 except for the fact that we now have $4$ ways to choose the first digit instead of $5$.

Following the steps correctly should give you $4\binom{19}{9}5^{19}$ ways.

Final Answer

Combining our answers in both the cases we get

$$9\times\binom{19}{9}\times 5^{19} = 15857734680175781250$$

$\endgroup$
0
$\begingroup$

A way without casework

Allowing leading $0's$, there will be $\binom{20}{10}\times 5^{20}\;$ ways

Now $\dfrac1{10}$ of cases will start with leading $0's$; subtracting these,

ans = $0.9\times\binom{20}{10}\times 5^{20}\;$ ways

$\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.