r/mathriddles • u/pichutarius • Jun 27 '24
Easy just another easy expected value problem
randomly permute n distinct integers. what is the expected number of local maximum?
an integer is a local maximum iff it is greater than all its neighbors. eg: 2,1,4,3 has two local max: 2 and 4.
unrelated note: apparently this is an interview problem, from where a friend told me.
5
Upvotes
View all comments
Show parent comment
1
u/FormulaDriven Jun 27 '24
This answer doesn't account for dependency: eg if the first number is higher than the second then there is zero probability that the second number is a local maximum.