Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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!

share|improve this question
    
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
add comment

migrated from stats.stackexchange.com Oct 4 '12 at 9:16

This question came from our site for people interested in statistics, machine learning, data analysis, data mining, and data visualization.

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$?

share|improve this answer
add comment

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?

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.