Browse · MathNet
PrintMongolian Mathematical Olympiad
Mongolia counting and probability
Problem
A number whose digits first increase and then decrease is called a mountain-shaped number. For example, is mountain-shaped, while , , , and are not mountain-shaped. How many four-digit mountain-shaped numbers are there in total?
Solution
Let the four-digit number be , where , , , are its digits and .
A four-digit mountain-shaped number must satisfy: - The digits first increase, then decrease. - That is, there exists an index () such that (up to position ), then (from position onward).
But since there are only four digits, the only possible way is: - (the peak is at ), or - (the peak is at ).
But in the problem, 'first increase then decrease' means the digits strictly increase, then strictly decrease, and the peak is not at the first or last digit.
So, the only possible form is .
Let us count the number of such numbers.
Let , , , be digits such that and .
Since is the first digit, .
Let us fix first. The digits , , are distinct and increasing, and , , are digits from to .
Let us choose , , such that and .
The number of ways to choose , , with , is , since can be to , and are larger digits, and all three are distinct.
For each such triple, is a digit such that (since ), and can be any digit from to , except that can be equal to or (since otherwise the digits would not first increase then decrease), but the problem does not specify that all digits must be distinct, only that the digits first increase then decrease.
But let's check: For , is it allowed for to be equal to or ? Let's look at the example: is mountain-shaped, and repeats. So, digits can repeat, except that the sequence must first strictly increase, then strictly decrease.
So, (strictly increasing), (strictly decreasing from to ), but can be equal to or .
So, for each choice of , can be any digit from to (since ), including possibly or .
Therefore, for each , the number of possible is (since ).
So, the total number is:
Let us compute this sum.
Let us fix , , with , , .
For from to : - from to - from to
Let us compute the sum:
For each , , , add .
Let us fix and . For each from to , sum .
The sum
Let us compute for each :
For : - from to - For : from to (i.e., ) - For : from to () - For : from to () - For : from to () - For : from to () - For : from to () - For :
Let us sum for each : - : - : - : - : - : - : - :
Sum:
Now, : - from to - : to : - : - : - : - : - :
Sum:
: - : - : - : - : - :
Sum:
: - : - : - : - :
Sum:
: - : - : - :
Sum:
: - : - :
Sum:
: - :
Sum:
Now, sum all these:
Therefore, the total number of four-digit mountain-shaped numbers is .
A four-digit mountain-shaped number must satisfy: - The digits first increase, then decrease. - That is, there exists an index () such that (up to position ), then (from position onward).
But since there are only four digits, the only possible way is: - (the peak is at ), or - (the peak is at ).
But in the problem, 'first increase then decrease' means the digits strictly increase, then strictly decrease, and the peak is not at the first or last digit.
So, the only possible form is .
Let us count the number of such numbers.
Let , , , be digits such that and .
Since is the first digit, .
Let us fix first. The digits , , are distinct and increasing, and , , are digits from to .
Let us choose , , such that and .
The number of ways to choose , , with , is , since can be to , and are larger digits, and all three are distinct.
For each such triple, is a digit such that (since ), and can be any digit from to , except that can be equal to or (since otherwise the digits would not first increase then decrease), but the problem does not specify that all digits must be distinct, only that the digits first increase then decrease.
But let's check: For , is it allowed for to be equal to or ? Let's look at the example: is mountain-shaped, and repeats. So, digits can repeat, except that the sequence must first strictly increase, then strictly decrease.
So, (strictly increasing), (strictly decreasing from to ), but can be equal to or .
So, for each choice of , can be any digit from to (since ), including possibly or .
Therefore, for each , the number of possible is (since ).
So, the total number is:
Let us compute this sum.
Let us fix , , with , , .
For from to : - from to - from to
Let us compute the sum:
For each , , , add .
Let us fix and . For each from to , sum .
The sum
Let us compute for each :
For : - from to - For : from to (i.e., ) - For : from to () - For : from to () - For : from to () - For : from to () - For : from to () - For :
Let us sum for each : - : - : - : - : - : - : - :
Sum:
Now, : - from to - : to : - : - : - : - : - :
Sum:
: - : - : - : - : - :
Sum:
: - : - : - : - :
Sum:
: - : - : - :
Sum:
: - : - :
Sum:
: - :
Sum:
Now, sum all these:
Therefore, the total number of four-digit mountain-shaped numbers is .
Final answer
630
Techniques
Algebraic properties of binomial coefficientsSums and products