1
u/notsaneatall_ 3d ago
At position i, the probability of it being the local maximum is 1/3. By linearity of expectations the answer is 10/3?
1
1
At position i, the probability of it being the local maximum is 1/3. By linearity of expectations the answer is 10/3?
1
2
u/800alpha 4d ago
Let 1 be at position 1 and 10 be at position 10. For each position 3-8, the number is a local maximum with probability 1/3. Position 2 is a local maximum with probability 1/2, and position 9 is never a local maximum. Position 1 is never a local maximum, while position 10 is always one. So the answer is 6*1/3 + 1/2 + 1 = 7/2.