2017 AMC 10 B

Complete problem set with solutions and individual problem pages

Problem 17 Medium

Call a positive integer monotonous if it is a one-digit number or its digits, when read from left to right, form either a strictly increasing or a strictly decreasing sequence. For example, 3,23578, and 987620 are monotonous, but 88,7434, and 23557 are not. How many monotonous positive integers are there? (2017 AMC 10B Problem, Question#17)

  • A.

    1024

  • B.

    1524

  • C.

    1533

  • D.

    1536

  • E.

    2048

Answer:B

Case 1: monotonous numbers with digits in ascending order.

There are \sum \nolimits_{n=1}^{9}\left({}\begin{array}{l} {9}\\{n} \end{array}\right) ways to choose n digits from the digits 1 to 9. For each of these ways, we can generate exactly one monotonous number by ordering the chosen digits in ascending order. Note that 0 is not included since it will always be a leading digit and that is not allowed. Also, \varnothing(the empty set) isn't included because it doesn't generate a number. The sum is equivalent to \sum \nolimits_{n=1}^{9}\left({}\begin{array}{l} {9}\\{n} \end{array}\right)-\left({}\begin{array}{l} {9}\\{0} \end{array}\right)=2^{9}-1=511.

Case 2: monotonous numbers with digits in descending order.

There are \sum \nolimits_{n=0}^{10}\left({}\begin{array}{l} {10}\\{n} \end{array}\right) ways to choose n digits from the digits 0 to 9. For each of these ways, we can generate exactly one monotonous number by ordering the chosen digits in descending order. Note that 0 is included since we are allowed to end numbers with zeros. However,\varnothing (the empty set) still isn't included because it doesn't generate a number. The sum is equivalent to \sum \nolimits_{n=0}^{10}\left({}\begin{array}{l} {10}\\{n} \end{array}\right)-\left({}\begin{array}{l} {10}\\{0} \end{array}\right)=2^{10}-1=1023.

We discard the number 0 since it is not positive. Thus there are 1022 here.

Since the 1-digit numbers 1 to 9 satisfy both case 1 and case 2, we have overcounted by 9. Thus there are 511+1022-9=1524 monotonous numbers.

Like Solution 1, divide the problem into an increasing and decreasing case:

Case 1: Monotonous numbers with digits in ascending order.

Arrange the digits 1 through 9 in increasing order, and exclude 0 because a positive integer cannot begin with 0.

To get a monotonous number, we can either include or exclude each of the remaining 9 digits, and there are 2^9=512 ways to do this. However, we cannot exclude every digit at once, so we subtract 1 to get 512-1=511 monotonous numbers for this case.

Case 2: Monotonous numbers with digits in descending order.

This time, we arrange all 10 digits in decreasing order and repeat the process to find 2^{10}=1024 ways to include or exclude each digit. We cannot exclude every digit at once, and we cannot include only 0, so we subtract 2 to get 1024-2=1022 monotonous numbers for this case. At this point, we have counted all of the single-digit monotonous numbers twice, so we must subtract 9 from our total.

Thus our final answer is 511+1022-9=1524.