# 2008 iTest Problems/Problem 54

## Problem

One of Michael’s responsibilities in organizing the family vacation is to call around and ﬁnd room rates for hotels along the route the Kubik family plans to drive. While calling hotels near the Grand Canyon, a phone number catches Michael’s eye. Michael notices that the ﬁrst four digits of $987-1234$ descend $(9-8-7-1)$ and that the last four ascend in order $(1-2-3-4)$. This fact along with the fact that the digits are split into consecutive groups makes that number easier to remember. Looking back at the list of numbers that Michael called already, he notices that several of the phone numbers have the same property: their ﬁrst four digits are in descending order while the last four are in ascending order. Suddenly, Michael realizes that he can remember all those numbers without looking back at his list of hotel phone numbers. “Wow,” he thinks, “that’s good marketing strategy.” Michael then wonders to himself how many businesses in a single area code could have such phone numbers. How many $7$-digit telephone numbers are there such that all seven digits are distinct, the ﬁrst four digits are in descending order, and the last four digits are in ascending order?

## Solution

We approach the problem by using casework on the middle number (since the middle number is the smallest). The six larger numbers can be split into two groups of three (the left group and the right group), and there is one way to arrange the numbers in order (descending or ascending).

• If the middle number is $0$, there are $9$ digits to choose $6$ from, so there are $\binom{9}{6} \binom{6}{3} = 1680$ telephone numbers with $0$ in the center.
• If the middle number is $1$, there are $8$ digits to choose $6$ from, so there are $\binom{8}{6} \binom{6}{3} = 560$ telephone numbers with $1$ in the center.
• If the middle number is $2$, there are $7$ digits to choose $6$ from, so there are $\binom{7}{6} \binom{6}{3} = 140$ telephone numbers with $2$ in the center.
• If the middle number is $3$, there are $6$ digits to choose $6$ from, so there are $\binom{6}{6} \binom{6}{3} = 20$ telephone numbers with $3$ in the center.
• If the middle number is $4$ (or more), there are less than $6$ digits to choose $6$ from, so there are no telephone numbers in this case.

Altogether, there are $1680 + 560 + 140 + 20 = \boxed{2400}$ telephone numbers that meet the conditions.