Every New Yorker knows the pain that is the apartment search.
You desperately hunt for the perfect place, only to find the competition fierce and nabbing any halfway decent apartment often means dropping a down payment on the spot.
You see one place you like. It’s in your budget, the location is good, but the shower’s in the kitchen. Or it’s above a noisy bar.
The question so many have faced is: How do we know when it’s time to stop looking and pull the trigger, giving ourselves the greatest chance of selecting the best apartment?
As it turns out, math has the answer. You should reject all the available options to the fraction of approximately 1/2.718 (also known as Euler’s number), which works out to .3679 or 37 percent.
Mathematicians recommend you spend just 37 percent of your time looking for an apartment — 11 days out of a month, for example.That magic percentage is the key to something called optimal stopping, a mathematical algorithm used to determine the moment you should act when faced with numerous choices while information about future options is limited.
The algorithm can help you figure out when to stop looking for a parking space and just pull in already, or when to buy a particular item.
In the case of that dreaded apartment search, you should spend 37 percent of your time (11 days if you’re giving yourself a month, for example) exploring your options.
In other words, visit apartments, noting what’s available and the pluses and minuses of each, and after 11 days, take the first apartment you see that’s better than the previous options.
“This doesn’t work every time but it gives you the best chance mathematically,” says Kit Yates, a British mathematical biologist and the author of “The Math of Life & Death: 7 Mathematical Principles That Shape Our Lives” (Scribner), out now.
Yates’ book aims to find stories of everyday people “in which math has had an impact,” he told The Post.
The idea of “optimal stopping” has been around since the 19th century, with mathematicians using the formula to calculate industrial production during World War II, and on Wall Street to value stock options.
But you can also deploy it for more mundane tasks.
Wondering which checkout line to join at the supermarket? If there are 10 available, walk past the first four then choose the first one that’s shorter.
Yates uses it when boarding a train, in search of the car that’s the least crowded. Pass up the first 37 percent of cars and settle on the first thereafter that’s less crowded.
Optimal stopping is often called the “secretary problem,” because mathematicians have used it to analyze hypothetical hiring dilemmas.
Let’s say a manager was going to interview 100 candidates and had to inform each prospect at the end of the interview whether or not he/she got the job.
The best way to maximize the potential to hire the best candidate is to evaluate the first 37 then offer the job to the first person who surpasses those.
Mathematicians use Euler’s number to estimate “optimal stopping” — which helps determine the moment you should act.Shutterstock / jackhollingsworthThere’s a chance the absolute best candidate might get rejected among the first 37, or would have come after the person you’ve already hired, but this “probabilistic rule” gives the manager the highest success rate of finding the best option at a 37 percent chance, versus 1 percent if the manager had simply chosen at random.
And the principle can even be used in romance. Wanting to get married but not sure when to settle down with The One?
If you’re 18 and might date one person seriously per year until you’re 35, “optimal stopping suggests that you play the field for about six or seven years,” Yates writes. “After that, you should stick with the first person who comes along who’s better than all of the others you’ve dated so far.”
It’s ruthless but efficient. There is one catch, of course: Your potential mate will have to say yes.
“Which they probably won’t because you’re such a cold-hearted bastard,” Yates says.




