Sets of two-digit numbers, such that...

Find the number of sets of ten 2-digit numbers (with a leading 0 allowed) such that

  • each digit (0~9) is used twice in the ten numbers;
  • for any of the ten numbers, the first digit is strictly smaller than the second one;
  • all ten of the numbers are distinct.

For example, there are 3 such sets of four 2-digit numbers when using only the digits 0 , 1 , 2 , 0,1,2, and 3 : 3:

  • { 01 , 02 , 13 , 23 } \{01,02,13,23\}
  • { 01 , 03 , 12 , 23 } \{01,03,12,23\}
  • { 02 , 03 , 12 , 13 } . \{02,03,12,13\}.

Note: In this problem, numbers starting with a leading 0 0 are considered to have 2 digits.


The answer is 286884.

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.

1 solution

Ivo Zerkov
Mar 20, 2018

We'll solve the problem in the general case, namely for n n distinct digits, using recurrence relations. Let the answer be a n a_n . Notice that a 0 = 1 , a 1 = 0 , a 2 = 0 a_0=1, a_1=0, a_2=0 .

Let's consider the digits with which the two 0 0 's are paired. Call them x x and y y . If the second x x is paired with the second y y , we have a n 3 a_{n-3} ways to pair off the rest of the digits. If on the other hand x x is paired with, say, z z , we now consider the second y y and the second z z 's relation: if they're paired together, there's a n 4 a_{n-4} ways to pair the rest, otherwise let the second z z be paired with α \alpha , and so on.

In general, if the cycle binding x x and y y together lasts for k k numbers, we have:

( n 1 k 1 ) ( k 1 ) ! 2 a n k = ( n 1 ) ! 2 ( n k ) ! a n k \large\binom{n-1}{k-1}\cdot\frac{(k-1)!}{2}\cdot a_{n-k}=\large\frac{(n-1)!}{2\cdot(n-k)!}\cdot a_{n-k}

solutions. That is true, because there's ( n 1 k 1 ) \large\binom{n-1}{k-1} ways to pick the k k digits (0 is always included), and ( k 1 ) ! (k-1)! ways to make a cycle of length k 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 ( n 1 ) ! 2 ( n k ) ! a n k = k = 0 n 3 ( n 1 ) ! 2 k ! a k \displaystyle a_{n}=\sum_{k=3}^{n} \frac{(n-1)!}{2\cdot (n-k)!}\cdot a_{n-k}=\sum_{k=0}^{n-3} \frac{(n-1)!}{2\cdot k!}\cdot a_{k}

We sum from k = 3 k=3 because it's impossible for the cycle containing the two 0 0 's, x x 's and y y 's to be of length shorter than 3 3 .

Multiplying by n n , it's easily seen the equation is equivalent to a n + 1 = n a n + ( n 2 ) a n 2 a_{n+1}=n\cdot a_n+\binom{n}{2}a_{n-2} .

Plugging in successively larger values for n n , one finds a 10 = 286884 a_{10}=286884 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...