I want to check if the solution of this problem, which was extracted from Donald Knuth Book volume 2, is correct.

Lets put only one's. We have one million positions where to put 100000 '1's digits. This give us:

$\binom{1000000}{100000}$ Combinations.

Now to put the two's, we have 900000 positions and 100000 '2's, so:

$\binom{900000}{100000}$ Combinations.

And so on.

We have finally:

$\binom{1000000}{100000} * \binom{900000}{100000} * ... * \binom{100000}{100000} = \dfrac{1000000!}{100000!*900000!} * \dfrac{900000!}{100000!*800000!} ... \dfrac{100000!}{100000!*0!}$


Total combinations of exactly 100000 of each digits= $\dfrac{1000000!}{100000!^{10}}$

The total combinations overall is $10^{10^6}$.


Probability = $\dfrac{\dfrac{1000000!}{100000!^{10}}}{10^{10^6}}$


  • 1
    $\begingroup$ Looks right to me. $\endgroup$ – saulspatz Oct 28 '18 at 12:52
  • 1
    $\begingroup$ That's right; I agree. $\endgroup$ – kimchi lover Oct 28 '18 at 14:19
  • $\begingroup$ Thanks for your help. $\endgroup$ – Carlitos_30 Nov 7 '18 at 14:25

Your Answer

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

Browse other questions tagged or ask your own question.