Live data from Hacker News

Steve Ballmer's incorrect binary search interview question

blog.jgc.org

31–40 of 257 posts

Re: Steve Ballmer's incorrect binary search interview question

#31

Earlier quoted context omitted.

And then if Ballmer assumes the other party assumes he's being adversarial we get into game theory.

The way forward is to make Ballmer pay with time for screwing with you, which gets us into geopolitics, and then using the resulting MAD dynamics to make the game fair again. That's how adults with keys to the nukes do it :).

And then everyone gets nukes, or at least anti-matter mined in some vacuum chamber copperstatue configuration.

Re: Steve Ballmer's incorrect binary search interview question

#32
post #20

As an interviewee my first question would be – are you going to play fair, and how can I verify it?

“As a SWE, I seek to understand important context first, before jumping to build or code. First, I’d like to ask if you’ll guess randomly and fairly, or adversarially?”

“Secondly, when significant money is involved, I make sure to verify any inputs. I’m considering the situation, not you personally, untrusted. How can I verify it, or do you want me to proceed assuming that’s verified?”

Those are great questions, but it’s also about how you ask it. SWE is not pure engineering. Communications is vitally important.

Re: Steve Ballmer's incorrect binary search interview question

#33
post #3

Title is wrong in implying Balmer is incorrect and the article shows that the title is wrong. If clickbait is misleading, then this is worse than clickbait, no? > Ballmer states that the answer is "No" for two reasons: firstly, because he can pick numbers that'll be the most difficult for you... The article goes on to show that there are numbers where a binary search always has the guesser paying $1

the article focuses on the next part of that sentence

> secondly because the expected value of the game (assuming Ballmer chooses randomly) is negative: you end up paying Ballmer

Re: Steve Ballmer's incorrect binary search interview question

#34
post #29

"Should you accept to play this game?" Absolutely yes. I like games. The purpose of games is to have fun. This seems like a fun game for like the first $20, a sum I can afford to play a fun game for 10 minutes. Then at the end, I get to say "I once lost $20 to Steve Balmer playing binary search", which is a fun sentence I can dine out on, and is worth more than $20 to me. I feel like perhaps this is why MS under Balm…

I don't know why you'd make this comment... I find it hard to believe you're actually stupid enough to not understand the implicit "(i.e. is your expected profit greater than 0)".

If you answered like this in an interview I would definitely not give you the job. I did actually interview someone once who was like this - "How would you do this?" "Well you shouldn't do it. I think you should do this other thing.". He did not get the job.

Re: Steve Ballmer's incorrect binary search interview question

#35
post #3

Title is wrong in implying Balmer is incorrect and the article shows that the title is wrong. If clickbait is misleading, then this is worse than clickbait, no? > Ballmer states that the answer is "No" for two reasons: firstly, because he can pick numbers that'll be the most difficult for you... The article goes on to show that there are numbers where a binary search always has the guesser paying $1

Also the number only exists in Ballmer's mind, so if he wanted to, he could change it to be unfavourable should you make a lucky guess. Here, you can play the game with me. Higher. Lower. Higher. Higher. Lower. Correct. Six guesses, you owe me $1.

Yes, and a SWE should consider external inputs untrusted until proven otherwise.

Re: Steve Ballmer's incorrect binary search interview question

#36
post #2

Didn't Steve Ballmer start off at MSFT essentially in a biz ops role, supporting execs when the company was super small? Interesting how he became technical as the company grew. Pretty rare.

It's surprising the extent to which the tech community overfits towards classifying intelligent individuals as either exclusively technical or nontechnical. Recruiters are especially weak in this regard, e.g., if you've ever been effective at sales or people leadership, you are likely ineffective at swe or data science or vice versa. The most intelligent folks I've worked with are very diverse in their interests and abilities. You can see this in an elementary school GT classroom. Why does the tech community believe this is always an either/or proposition?

Re: Steve Ballmer's incorrect binary search interview question

#37
post #29

"Should you accept to play this game?" Absolutely yes. I like games. The purpose of games is to have fun. This seems like a fun game for like the first $20, a sum I can afford to play a fun game for 10 minutes. Then at the end, I get to say "I once lost $20 to Steve Balmer playing binary search", which is a fun sentence I can dine out on, and is worth more than $20 to me. I feel like perhaps this is why MS under Balm…

Underrated comment. His point was to see how they approached the problem regardless of the answer, which is a much different criteria than having the right answer.

Re: Steve Ballmer's incorrect binary search interview question

#38
post #10

The article implies that the interviewee assumes that the number is being chosen randomly, when Ballmer could actually be choosing adversarially. However, if the interviewee assumes that Ballmer is being adversarial, then you can pick a different value as your initial guess, which causes the probabilities to shift. Even the OP assumes that the interviewee will start guessing with 50, but, because of the way binary se…

> you can select an initial guess that is offset from 50

Given that 7 guesses covers 128 numbers, you can offset by +/- 14 without actually affecting the "worst case" of the algorithm (i.e. provided you have at most 64 either side of your guess). As you say, randomly selecting this offset would neuter most adversarial examples (purposefully chosen to fall into the gaps of binary search) and would possibly completely remove the benefits from adversarial choice (though a tailored distribution on offset might be required there).

I'd be interested in such an analysis too.

Re: Steve Ballmer's incorrect binary search interview question

#39
post #2

Didn't Steve Ballmer start off at MSFT essentially in a biz ops role, supporting execs when the company was super small? Interesting how he became technical as the company grew. Pretty rare.

It's surprising the extent to which the tech community overfits towards classifying intelligent individuals as either exclusively technical or nontechnical. Recruiters are especially weak in this regard, e.g., if you've ever been effective at sales or people leadership, you are likely ineffective at swe or data science or vice versa. The most intelligent folks I've worked with are very diverse in their interests and…

> The most intelligent folks I've worked with are very diverse in their interests and abilities.

> as either exclusively technical or nontechnical

This applies outside of tech or generally in any role e.g. if you're a backend engineer they assume you don't know frontend or if you're a marketing specialist you're not good at sales.

I never get it either. We're people not machines but most people have this assumption like we're a game character - you get a job / trait and that's it.

Re: Steve Ballmer's incorrect binary search interview question

#40
post #17
post #3

Title is wrong in implying Balmer is incorrect and the article shows that the title is wrong. If clickbait is misleading, then this is worse than clickbait, no? > Ballmer states that the answer is "No" for two reasons: firstly, because he can pick numbers that'll be the most difficult for you... The article goes on to show that there are numbers where a binary search always has the guesser paying $1

Although Ballmer could still be incorrect, because a 'sufficiently logical' player would also presumably know that he could pick numbers that'll be the most difficult to find via binary-search, so by the same logic you could also meta-game it, and assume any number that can be found in 5 steps with a binary search is immediately out. This would narrow the search space to only 37 numbers, which can then easily be foun…

There isn't much of metagame if number is only in Ballmers mind. No matter what guesses you choose he can force you to make at least log_2(100) guesses. Doing anything except splitting in half will only increase amount of guesses. There are two things that can change the game, requiring Baller to write the number on a piece of paper before the start. Other thing you could do is writing a number on piece of paper yourself halfway during the game. If opponent is changing the number adversarially with goal of maximizing guesses you can force them to "pick" a specific number. Afterwards you can open the piece of paper and claim that you actually guessed the number with the first attempt.
Post reply on HN