# Mountain Number Probability

I'm trying to calculate the probability that a five digit mountain number (i.e. a number in which the first three digits are in ascending order i.e. $a< b< c$, and the last three are in descending order i.e. $c> d> e$) does not contain any repeated digits. I've calculated that there are $2892$ mountain numbers, simply by looking at how many possibilities there are on each side with each peak (i.e. $36^2+28^2+...+1^2$). I wrote a small program that output the number of mountain numbers without repeating digits($1512$), but I'm not sure how I would get to that number with out the help of a computer. Could anybody help me out here? Thanks!

-

This is not probability, this is combinatorics. Also, please use the homework tag for any exercise like this. – Douglas Zare Oct 4 '12 at 4:08

## 3 Answers

A few hints:

In how many ways can you choose the five digits to be used?

When the five digits have been chosen, how many mountain numbers can you form with them?

What corrections are needed to avoid a leading $0$?

-

Deal with mountain numbers that don't have zeroes first.

Determine how many unique combinations you can select. To calculate the permutations that are mountain numbers, rather than thinking of how many of the digits can fill each position, think of how many possible positions each digit can be placed in. The highest number can only go in one position. The lowest number can only go in one of two places, et cetera. That will give you the number of mountain numbers you can create without zeroes.

Now you'll need to add to that the number that do contain zeroes. Use the same procedure hinted at above. Now your lowest digit (zero) can only go in how many places?

-

Your initial answer is $$\sum_{n=2}^{9} {n \choose 2}^2$$ presumably because if the middle digit is $n$ then you need to choose two of the $n$ smaller digits (remember $0$) for the left hand side and similarly for the righthand side.

For your second question a similar argument gives $$\sum_{n=4}^{9} {n \choose 4}{4 \choose 2}$$ as you need to choose four of the $n$ smaller digits and then put two of these four on one side and the others on the other side.

Divide the latter by the former for a probability if all such strings are equally probable.

Some versions of the question might not permit a leading $0$ on the left. Others might allow something like 45673 as a "mountain number". Each of these would change the answer.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 11, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9364724159240723, "perplexity_flag": "head"}