TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Secretary Problem

90 pointsby nate_martinabout 11 years ago

17 comments

Cogitoabout 11 years ago
The section on experimental studies touches on it briefly, but it&#x27;s important to note that costs involved in the selection process are not considered in the standard construction of the problem.<p>From wikipedia:<p>&gt; <i>In large part, this work has shown that people tend to stop searching too soon. This may be explained, at least in part, by the cost of evaluating candidates.</i><p>and then<p>&gt; <i>For example, when trying to decide at which gas station to stop for gas, people might not search enough before stopping. If true, then they would tend to pay more for gas than they might had they searched longer.</i><p>So you might pay more for gas if you don&#x27;t use the optimal strategy, but waste more money in fuel costs searching for the cheaper price than you save buy purchasing at that price.<p>Perhaps most interestingly, there is a formulation of the problem that requires a decision to be made within a certain time period, from an unknown number of candidates who arrive over that time period. If you know (or can estimate) the arrival times of the candidates, you can use a very similar strategy to achieve optimal results.<p>Essentially, wait until you have seen 1&#x2F;e of expected candidates in the time frame you have allowed for (based on the arrival density function you know or estimated) then pick the next best option.<p>This puts a limit on the amount of searching you do, and so provides an optimal strategy with a bounded limit on how long you search for; it provides a bound on the cost involved in the search assuming the cost is related to time taken.<p>In the searching for gas example, you could use this strategy if you knew roughly how often you pass a gas station, and how long you are willing to search for.
评论 #7341833 未加载
philjohnabout 11 years ago
There&#x27;s a TV show in the UK that uses a spin on this - it&#x27;s called 4 rooms.<p>The premise is that people come on the show with, what they consider to be, a valuable artifact. They then have the chance to take it to 4 collectors who will offer them a sum of money for said artifact.<p>The aim is to come away with the best offer you can get - but you only get one shot with each collector, you can&#x27;t go back to a previous one because all other offers have been lower.
评论 #7339327 未加载
评论 #7339989 未加载
blinryabout 11 years ago
Note that if you want to optimize the quality of the candidate, not the probability of picking <i>the</i> best one, it&#x27;s better to stop after sqrt(n) candidates: <a href="https://en.wikipedia.org/wiki/Secretary_problem#Cardinal_payoff_variant" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Secretary_problem#Cardinal_pay...</a>
cschmidtabout 11 years ago
This gets posted on HN occasionally, and when it does I post this fun blog post by Michael Trick, a CMU Operations Research professor, who used the Secretary problem to pick his wife:<p><a href="http://mat.tepper.cmu.edu/blog/?p=1392" rel="nofollow">http:&#x2F;&#x2F;mat.tepper.cmu.edu&#x2F;blog&#x2F;?p=1392</a>
Johnieabout 11 years ago
The same strategy can be used in dating too.<p>When you live in a major city and the dating options are boundless, there is always someone around the corner that is &quot;perfect&quot; or more perfect than the current person that you are dating. Next thing you know, you&#x27;re in your late 30s and still single.
评论 #7338725 未加载
评论 #7338714 未加载
评论 #7339215 未加载
philbarrabout 11 years ago
Hmm, I wonder if this could be used to find a decent pub whilst in a strange city?<p>It&#x27;s always a problem when you&#x27;re on holiday and you know there are n pubs around, but you don&#x27;t want to spend all your time going around and checking each and every pub &#x27;cos that gets tedious. The question is - how many pubs should I visit before I give up?<p>As a general rule is this saying you should visit n&#x2F;e pubs and then just pick the next best one?
评论 #7339926 未加载
sk5tabout 11 years ago
Quite interesting that discarding the first n&#x2F;e candidates produces a 1&#x2F;e probability of choosing the optimal one...<p>As for real-world applications, the only one that comes readily to mind is rolling up a D&amp;D character, supposing one has only the patience for some predetermined n rolls. Somewhat ironically it is not a realistic fit for hiring, as there is seldom a need to accept or eliminate candidates immediately, interviewing more than 5-6 people for a role is torturous, and an interviewer uses his experience interviewing and interacting with people generally to have no mathematical prejudice against hiring the very first pretty-good option.
评论 #7339062 未加载
_xhokabout 11 years ago
Is it possible to explain in layman&#x27;s terms why 1&#x2F;e is the magic number?
评论 #7338382 未加载
zindlerbabout 11 years ago
Very interesting! I assume this is posted because it parallels how YC does their interview admissions. I think the YC method has some differences to this problem. YC has already seen the applications for groups, and probably already developed some kind of best to worse ranking of the applicants. The interview most likely functions as a confirmation that the teams live up to their great application. Additionally, YC expands its class to fit the number of qualified applicants. In this problem there is single spot to fill.<p>Edit: It is also totally possible many people upvoted this article only because it is interesting. If that is true ignore my post.
kokeyabout 11 years ago
Interesting. It describes roughly the strategy that I&#x27;ve settled on when looking for accommodation to rent. I think it also has the added advantage of making you feel you&#x27;ve made a good decision.
vijucatabout 11 years ago
I, like many others, used to have the attitude that &quot;puzzles are for interviews&quot;. But recently, I have started seeing that there can be practical applications for seemingly academic ideas.<p>For example, I know a proprietary trader who uses a concept similar to this from the field of Optimal Stopping for his trading system exclusively, i.e., his entire trading strategy, managing tens of millions of dollars for a big bank, is basically an application of Optimal Stopping to the markets!
vehementiabout 11 years ago
What about needing to hire M candidates out of N applicants?
评论 #7338701 未加载
评论 #7338984 未加载
评论 #7338468 未加载
评论 #7338482 未加载
评论 #7340159 未加载
jmtameabout 11 years ago
I worked on several iterations in the dating space for about a year, and this type of stuff was pretty interesting to me. Wrote a bit more about it here: <a href="https://medium.com/unfinished-thoughts/2cac1e6cc7b4" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;unfinished-thoughts&#x2F;2cac1e6cc7b4</a>
imdsmabout 11 years ago
Well, that was fun. (use console output)<p>Single candidate: <a href="http://jsbin.com/cupiloye/1/edit" rel="nofollow">http:&#x2F;&#x2F;jsbin.com&#x2F;cupiloye&#x2F;1&#x2F;edit</a><p>M candidates: <a href="http://jsbin.com/woyehiyu/1/edit" rel="nofollow">http:&#x2F;&#x2F;jsbin.com&#x2F;woyehiyu&#x2F;1&#x2F;edit</a>
cshimminabout 11 years ago
See also Feynman&#x27;s Restaurant Problem: <a href="http://www.feynmanlectures.info/exercises/Feynmans_restaurant_problem.html" rel="nofollow">http:&#x2F;&#x2F;www.feynmanlectures.info&#x2F;exercises&#x2F;Feynmans_restauran...</a>
forgotprevpassabout 11 years ago
On a related note, can someone suggest a good textbook optimal stopping?
评论 #7338587 未加载
FLUX-YOUabout 11 years ago
I&#x27;m going to be the dumb guy ranting here and say that I dislike this word problem since external knowledge of the world can change your strategy. I might be stopping too soon because the time cost of evaluating candidates is far too high compared to the work that needs to be done immediately. The sooner I get someone in, the sooner that work gets done, the less behind we all get, the less workload for the new secretary, the better he&#x2F;she will perform, and the better the first impression.<p>You might also be able to recognize a rock star secretary immediately or recognize obviously incompetent people. There&#x27;s a competence threshold that&#x27;s present here and has to be addressed if you dissect the analogy. Going for &#x27;best&#x27; here has diminishing returns beyond a certain level of competence. The immediate need to decline&#x2F;accept also really doesn&#x27;t make sense if we&#x27;re trying to explain this with a hiring analogy.<p>However, the Game of Googol nails it and I really like this approach much better when explaining this problem. It&#x27;s a game with arbitrary rules so I can&#x27;t easily use my worldly experience biases to solve the problem.
评论 #7338756 未加载
评论 #7339173 未加载
评论 #7342157 未加载