Expected local maxima in a shuffle

The numbers 1,2,…,201, 2, \dots, 20 are arranged in a row in a uniformly random order. Position ii is a local maximum if its value is strictly greater than each of its immediate neighbors (an end position has only one neighbor). What is the expected number of local maxima? (For example, in the arrangement 5 1 3 2 4 65\,1\,3\,2\,4\,6 of 11–66, positions 11, 33, and 66 are local maxima.)

Show hints (2)+
  1. Define an indicator for each position being a local max and use linearity of expectation - you never need independence.
  2. An interior position is the max of its 3 relevant values with probability 1/31/3; an end position beats its one neighbor with probability 1/21/2. Count how many of each.

Answer

Reveal answer →

7

Create a free account to see the full worked solution and track your progress.

Interview format: Market Maker, Numerical Reasoning Tests

Related questions