For a 5N-digit base-2N positive integer X, determine the probability (in terms of N) that X contains each of the digits from 0 to 2N-1 at least twice but at most thrice.
Note: N is a positive integer ≥ 2, and X does not contain any leading zero.
Without all the corrections, the solution is as follows:
1) Ignore (initially) the requirement that the leading digit cannot be zero.
a) Then, the total number of all possible numbers is (2N)^(5N)
b) Half of the 2N digits must appear twice, and the other half must appear three times. The N digits that appear three times can be selected in C(2N,N) different ways.
c) And how many ways can the digits (0,0,1,1,...N,N) Union ((N+1),(N+1),(N+1),(N+2), ... 2N, 2N, 2N) be arranged?
It is (5N)!/(2!)^N*(3!)^N = (5N!)/12^N
d) Putting it all together,
the numerator is C(2N,N) * ((5N!)/12^N),
the denominator is ((5N)^(2N)),
and the desired probability is
C(2N,N) * ((5N!)/12^N) / ((5N)^(2N))
2) The requirement that the leading digit cannot be zero reduces both the numerator and the denominator by the same percentage, (2N-1)/N. Thus the original formula given above, C(2N,N) * ((5N!)/12^N) / ((5N)^(2N)), is also correct if the leading digit cannot be zero.
Edited on June 22, 2010, 4:03 pm