Find the number of sets of ten 2-digit numbers (with a leading 0 allowed) such that
For example, there are 3 such sets of four 2-digit numbers when using only the digits and
Note: In this problem, numbers starting with a leading are considered to have 2 digits.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
We'll solve the problem in the general case, namely for n distinct digits, using recurrence relations. Let the answer be a n . Notice that a 0 = 1 , a 1 = 0 , a 2 = 0 .
Let's consider the digits with which the two 0 's are paired. Call them x and y . If the second x is paired with the second y , we have a n − 3 ways to pair off the rest of the digits. If on the other hand x is paired with, say, z , we now consider the second y and the second z 's relation: if they're paired together, there's a n − 4 ways to pair the rest, otherwise let the second z be paired with α , and so on.
In general, if the cycle binding x and y together lasts for k numbers, we have:
( k − 1 n − 1 ) ⋅ 2 ( k − 1 ) ! ⋅ a n − k = 2 ⋅ ( n − k ) ! ( n − 1 ) ! ⋅ a n − k
solutions. That is true, because there's ( k − 1 n − 1 ) ways to pick the k digits (0 is always included), and ( k − 1 ) ! ways to make a cycle of length k with those digits. Since we order the digits in each number such that the first is smaller than the second, we've counted each cycle twice - once properly and once in reverse.
So we've arrived at the recurrence relation:
a n = k = 3 ∑ n 2 ⋅ ( n − k ) ! ( n − 1 ) ! ⋅ a n − k = k = 0 ∑ n − 3 2 ⋅ k ! ( n − 1 ) ! ⋅ a k
We sum from k = 3 because it's impossible for the cycle containing the two 0 's, x 's and y 's to be of length shorter than 3 .
Multiplying by n , it's easily seen the equation is equivalent to a n + 1 = n ⋅ a n + ( 2 n ) a n − 2 .
Plugging in successively larger values for n , one finds a 1 0 = 2 8 6 8 8 4 .