Bunuel
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?
(A) 1024
(B) 1524
(C) 1533
(D) 1536
(E) 2048
Increasing Numbers: First of all, 0 cannot be a part of these numbers because it must be the first digit to be in increasing order but 0126 is the same as 126.
So we have only 9 digits (1 - 9).
Note that we need numbers such as 129, 3789, 257 etc. To understand this, look at your number row on the keyboard. The condition is that you have to start from 1 and end at 9 and for each digit you have choice whether you press it or not going from left to right. You cannot go back.
So for each digit, you have to choice to pick it or not. Say you pick 1. Next, you don't pick 2, 3 and 4. Next you pick 5 and 6. Next you don't pick 7. Next you pick 8 and 9.
You get 15689 which will be monotonous. This will give you all 1 digit, 2 digit, 3 digit till 9 digit numbers in which the digits will be in increasing order.
You get 2*2*2.. *2 = 2^9 distinct numbers.
But this includes a number in which you pick nothing so you need to exclude it.
You get 2^9 - 1 numbers.
Decreasing Numbers: Here, you can end the number with a 0 so you have 10 possible digits. Use the same logic but start with 9 this time and go on till 0.
No of numbers = 2*2*2*... 2 = 2^10 numbers.
But as before, it includes the number in which you pick nothing.
Also, it includes all 1 digit numbers again (we have already included them above) so we remove 9 numbers out of this.
Also, you need only positive integers so only 0 cannot be a monotonous number.
You get 2^10 - 1 - 9 - 1 = 2^10 - 11
Total number of numbers = 2^9 - 1 + 2^10 - 11 = 1524
Answer (B)