MathCastle
Counting & ProbabilityChallengeExpected Value, Linearity & Advanced Probability

Expected Value, Linearity & Advanced Probability · Challenge problem

The numbers 1,…,101,\dots,10 are placed in a row in uniformly random order. Call a position a peak if its value exceeds all of its (one or two) immediate neighbors. Find the expected number of peaks.

The answer is a fraction mn\tfrac{m}{n} in lowest terms; find m+nm + n.