Live data from Hacker News

The expected value of the game is positive regardless of Ballmer’s strategy

gukov.dev

141–150 of 166 posts

Re: The expected value of the game is positive regardless of Ballmer’s strategy

#141
post #88

When Ballmer said 'adversarial', I considered this strategy: he's not actually required to pick a fixed number at the start at all. He can simply give the answer to each guess which leaves the largest number of possible numbers remaining, guaranteeing a loss regardless of strategy.

His wording of the rules implies he chooses a number and sticks with it. He "has a number in mind". Of course some interviewers like to play mind games and twist things up to make themselves feel smart but I don't think that's his intent here.

Re: The expected value of the game is positive regardless of Ballmer’s strategy

#142
post #2

And this, friends, is the perfect example of why the modern tech interview process is pure insanity.

I think this is a good question, there are many veins of potential discussion which is what you want. It’s not likely a binary question.

Is it fair? Does he change his choice or pre-record it? Can you play multiple times?

Purely random distribution, totally fair? Sure play the game every time, the math pans out. It’s not that though.

It’s about showing your work

Re: The expected value of the game is positive regardless of Ballmer’s strategy

#143
post #125
post #10

Earlier quoted context omitted.

Is this a perfect example of broken modern tech interviews? Balmer's question seems fair for the complexity of the answer he was expecting. As the interviewee you would presumably provide the (mathematically) wrong answer, but you'd show your thinking along the way, including a small demonstration of CS principles. Keep in mind that Balmer had a long career, so if he ever asked this question, it was probably back in…

I think you're missing my point. The problem isn't the question - it's the fact that Balmer was objectively wrong about the answer - and he never changed that determination after having conversations about it however many times. ("I asked this question all the time.") It doesn't matter that it was difficult to prove he was wrong. The issue is that it was impossible to prove he was right. And if anyone ever tried to b…

You are claiming things that are absent from and contradicted by the interview.

Re: The expected value of the game is positive regardless of Ballmer’s strategy

#144
post #88

When Ballmer said 'adversarial', I considered this strategy: he's not actually required to pick a fixed number at the start at all. He can simply give the answer to each guess which leaves the largest number of possible numbers remaining, guaranteeing a loss regardless of strategy.

This should be higher.

The OP's article is interesting, but it assumes a very weak notion of "adversarial", in which Ballmer still commits to some initial choice.

Interestingly it's actually possible for a player to know this is the case if Ballmer uses a commitment scheme [1]. For example, at the start of the game Ballmer could generate 500 random bits, append his chosen number in the range 1-100 to this, hash the result and then send you that hash: At the conclusion of the game, he sends you the 500 random bits, and you can check that concatenating his chosen number (now revealed) to those bits and hashing the result produces the hash he originally sent. (If Ballmer lies and changes his number, he would need to somehow come up with 500 bits that when concatenated with this different number still produce the original hash. This is hard.)

[1]: https://en.wikipedia.org/wiki/Commitment_scheme

Re: The expected value of the game is positive regardless of Ballmer’s strategy

#145
post #45

Earlier quoted context omitted.

> Same reason you wouldn't go all in every time you get a poker hand that's "expected" to win. Because you'll (very probably) be bankrupt in a few hands. You're calling an all-in 100% of the time in a cash game if your expected value is positive. If you don't, you can't afford to play at that table. You're not going all-in with any hand expected to win because that's not how you maximize profit. It has nothing to do…

Calling an all-in and going all-in are two totally different things, unless the all-in (that you'd be calling) is for an amount greater than you have. Otherwise, it's just "bet a lot, but you can keep trying if you lose". Going all in, on the other hand, is "bet it all, and if you lose you're done". The risk on the later is much greater. Any time there is no chance for recovery on failure, your risk analysis changes…

But in a cash game, if you're properly bankrolled (a common number people recommend is to have at least 40 buy-ins worth of cash set aside for the stakes you're playing), the one buy-in you lose if you lose an all-in is relatively small and you can just buy in again and keep playing. Going back to what OP said, if you shove every time you get aces you will profit over time as long as you have a properly managed bankroll, it's just not the most profitable way to play aces in most situations. It's different in tournaments because when you're late enough into a tournament, losing your stack actually does mean losing everything since you can't re-buy

Re: The expected value of the game is positive regardless of Ballmer’s strategy

#146
post #143
post #125

Earlier quoted context omitted.

I think you're missing my point. The problem isn't the question - it's the fact that Balmer was objectively wrong about the answer - and he never changed that determination after having conversations about it however many times. ("I asked this question all the time.") It doesn't matter that it was difficult to prove he was wrong. The issue is that it was impossible to prove he was right. And if anyone ever tried to b…

You are claiming things that are absent from and contradicted by the interview.

You need to explain what you think those things are.

Re: The expected value of the game is positive regardless of Ballmer’s strategy

#147
post #88

When Ballmer said 'adversarial', I considered this strategy: he's not actually required to pick a fixed number at the start at all. He can simply give the answer to each guess which leaves the largest number of possible numbers remaining, guaranteeing a loss regardless of strategy.

His wording of the rules implies he chooses a number and sticks with it. He "has a number in mind". Of course some interviewers like to play mind games and twist things up to make themselves feel smart but I don't think that's his intent here.

>I don't think that's his intent here.

Well, rereading what he (was reported to have) said, I now think that probably was his intent, and he was just sloppy. At least, he can't have it both ways: Either he genuinely commits to a number at the outset, and uses the word "adversarial" to mean a very weak form of adversary (one that is defeated in expectation by TFA's mixed strategy), or he is using "adversarial" in the standard (strong) sense, in which case he must be lying about committing to a number, which is a shifty mind game as you say.

Re: The expected value of the game is positive regardless of Ballmer’s strategy

#148

Earlier quoted context omitted.

While it does seem that Ballmer doesn't have an understanding of the deepness of the problem, in his defence, he outscored BillG on the math SAT with a perfect score of 800, and graduated Harvard with a degree in applied mathematics. Which makes me wonder if it's related to another 'simple' game theory problem that came up in Matt Levine's money stuff: "They made me do the math on 1000 coin flips. EV(heads) (easy), s…

Is the interview for an engineering position or for sales? If you're hiring a software developer, I am going to assume all probabilities are about physical processes or data distributions or such, and there is no "if we're asking it means we have something up our sleeve". The data going to be sorted by merge sort is not going to have anything up its sleeve, or set any traps for me.

> Is the interview for an engineering position or for sales?

Either way. The coin-flip example and Ballmer's binary search game could apply with simple extensions to complicated processes like SLAs on cloud services.

> The data going to be sorted by merge sort is not going to have anything up its sleeve

That's a curious example, since one reason to use mergesort rather than quicksort is the latter's susceptibility to pessimal inputs.

Re: The expected value of the game is positive regardless of Ballmer’s strategy

#150
post #80

Here is a chart for probabilities for starting value: https://docs.google.com/spreadsheets/d/e/2PACX-1vThljkK2nUIL... I find it interesting: it is definitely symmetrical, but I did not expect that in the final result 1/98 could be more important as a starting value, while 2-17/82-97 are not used at all.

This really depends on the pure strategies that you choose.

The initial set of strategies wasn't very diverse and compensated for the binary search "weaknesses" on the ends of the spectrum by sometimes guessing 1 and 98.

But after adding some more pure strategies to the set, we've got a far better mixed strategy that prefers the numbers between 28-70 as the first pick: https://github.com/gukoff/ballmer_puzzle#winning-strategy

Post reply on HN