Programming: Everyday Decision-Making Algorithms
Kühne Logistics University Hamburg - Winter 2025
Question: Anybody know what optimal stopping is?
Anybody an
example of
optimal stopping?
Photo by Aditya Ghosh on Unsplash
Photo by Scott Graham on Unsplash
Photo by Shelby Deeter on Unsplash
Photo by Joseph Pearson on Unsplash
Note
The name is a bit misleading, as the problem is not about hiring a secretary, but about finding the best candidate. It comes from the 1960s and thus a little outdated.
n
candidatesQuestion: Anybody know what ordinal ranking is?
Question: Anybody an idea how we can fail?
Ideas?
The optimal strategy is to:
Question: Anybody see a pattern?
n/e
1e
is the base of the natural logarithm (≈ 2.718)Percentage of options to look at: 0.368%
Look at first 7.358 candidates
Note
No worries if you don’t understand the code! We are essentialy just using the formula to calculate the percentage of candidates to look at.
Let’s visualize the success of a simulation with 20 candidates:
Question: Imagine a dating scenario, where the other person can also reject you. Optimal stopping point?
What if we don’t have a fixed number of candidates, but rather a fixed amount of time?
Question: How should we behave?
Note
Side note for drivers: An increase in occupancy from 90 to 95% doubles the search time for all drivers!
Question: Can you imagine a scenario where it would be unwise to use optimal stopping?
Questions?
Note
That’s it for todays lecture!
We now have covered a brief introduction into optimal stopping and seen how to set up Python. Now we can start with the tutorials!
Note
Think Python is a great book to start with. It’s available online for free. Schrödinger Programmiert Python is a great alternative for German students, as it is a very playful introduction to programming with lots of examples.
For more interesting literature, take a look at the literature list of this course.
Lecture I - Optimal Stopping | Dr. Tobias Vlćek | Home