Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here's a different version of the problem.

It takes 10 minutes to walk home from the bus central. The bus is late but should be here any minute now. The bus takes one minute. Do you wait or walk?



10 minutes? Always walk. Walking then becomes a known quantity, unlike your bus, and your health will benefit. And, yeesh, it’s only a ten minute walk.


It's a problem from computer science, not Dr Oz.

You want to optimize for when you get home, not for your health or environment.


Always decide to walk, especially for just 10 minutes. Good for health, mental wellbeing and it's just easy.

If the question was 1h+ then maybe the answer would be different.


It's a computational problem, I thought (mistakenly) that the HN crowd would understand.


Your explanation was too good, people go straight for the answer to your example. There might be a bit of cheekiness too!


Don't you need to know the inter arrival time to solve this? I think the point is that it's a memory less distribution so you're expected to wait for the same time regardless of how long you've already waited.


Suppose you repeat this every day, and every day the bus arrives a random time between "now" and in (let's say) 30 minutes.

There is a strategy that allows you to never be worse than 2x if you knew exactly when the bus arrived: Wait for 10 minutes, and if the bus didn't arrive, walk home.

In all cases when the bus arrives between now and in 10 minutes, you do the optimal thing, and whenever the bus arrives after 10 minutes have passed, you will be home after 20 minutes, which is not worse than 2x worse than optimal.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: