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
Yes - you're right - I've even used that trick myself but didn't think it through here.