Live data from Hacker News

A liar who always lies says "All my hats are green."

theguardian.com

391–400 of 419 posts

Re: A liar who always lies says "All my hats are green."

#391
post #386

Earlier quoted context omitted.

https://www.alexirpan.com/2015/09/09/the-other-two-envelope-... If your solution is the same as this article's, it's plain wrong. Even the natural number case is plain strong. It's very easy to demostrate as well: consider a trivia case where the distribution is just {P(1)=1/3, P(2)=1/3, P(3)=1/3} and you see 2 in the first envelope. There is no strategy to get a better chance than 50%. Therefore, any strategy that g…

Sorry, but you're simply wrong. You can read the answer I gave. You can read the answer Colin Wright gave. You can trust that we both have math degrees and know what we are talking about. Or, aw heck, you can try it with an actual program at https://www.perlmonks.org/?node_id=39630 . (Yes, I wrote that piece of hackery about a decade ago.) I don't actually care how you convince yourself. But the explanation is right.…

That code has the same problem that Colin Wright's explanation does. Your computation of the success rate explicitly uses the fact that you're between the two values, but till you've seen the second value you can't possibly know whether you are or are not and thus can't adjust your guess based on that fact.

Re: A liar who always lies says "All my hats are green."

#392
post #377

Earlier quoted context omitted.

You need some _known_ distribution though, and it's shocking because the distribution is ommitted from the question, and the presence of the same distribution is snuck into the answer.

I think you are wrong ... see my answer here: https://news.ycombinator.com/item?id=42371563

Not to be too dismissive, but the title text of this xkcd [0] seems relevant. No matter how nice the explanation is, the fact that the conclusion is wrong suggests that the reasoning has a flaw. I took a stab at what I think that flaw is when I responded to your rebuttal [1].

[0] https://xkcd.com/2217/

[1] https://news.ycombinator.com/item?id=42372285

Re: A liar who always lies says "All my hats are green."

#393
post #261

Earlier quoted context omitted.

I think the puzzle is better if the person "only speaks falsehoods" than if they "always lie" - depending on context, a true statement can be a lie.

This is called out in the article: >Note: this question was originally set in a maths exam, so the answer assumes some basic assumptions about formal logic. A liar is someone who only says false statements.

Yeah, my comment was just a suggestion that that wording be imported into the question, rather than living in a clarification.

Re: A liar who always lies says "All my hats are green."

#394
post #371

Earlier quoted context omitted.

You don't need a uniform distribution to get guaranteed better than even odds. And many nonuniform distributions work just fine. There are no hidden conditions. It is just a shocking result that we don't expect.

https://www.alexirpan.com/2015/09/09/the-other-two-envelope-... If your solution is the same as this article's, it's plain wrong. Even the natural number case is plain strong. It's very easy to demostrate as well: consider a trivia case where the distribution is just {P(1)=1/3, P(2)=1/3, P(3)=1/3} and you see 2 in the first envelope. There is no strategy to get a better chance than 50%. Therefore, any strategy that g…

> It's very easy to demostrate as well: consider a trivia case where the distribution is just {P(1)=1/3, P(2)=1/3, P(3)=1/3} and you see 2 in the first envelope.

Seeing 2 is only one of the many possible cases. You haven’t calculated the total probability.

Re: A liar who always lies says "All my hats are green."

#395
post #391
post #386

Earlier quoted context omitted.

Sorry, but you're simply wrong. You can read the answer I gave. You can read the answer Colin Wright gave. You can trust that we both have math degrees and know what we are talking about. Or, aw heck, you can try it with an actual program at https://www.perlmonks.org/?node_id=39630 . (Yes, I wrote that piece of hackery about a decade ago.) I don't actually care how you convince yourself. But the explanation is right.…

That code has the same problem that Colin Wright's explanation does. Your computation of the success rate explicitly uses the fact that you're between the two values, but till you've seen the second value you can't possibly know whether you are or are not and thus can't adjust your guess based on that fact.

The success is checked after the decision is made to, well, verify the decision. The guess isn't adjusted on whether the number is between two values.

The strategy is straightforward and bulletproof (if you allow a random generator of real numbers, otherwise you may keep tossing coins indefinitely): keep tossing coins until you get tails. If the number you saw is less than the number of heads you got, you don't switch.

For the simplest case assume that one envelope always contains 1 and another always contains 2. You choose one envelope randomly, so in 50% of cases you get 1, which you switch in 50% of cases. And in 50% of cases you get 2, which you switch in 25% of cases. Hence, you pick the higher number in 62.5% of cases. The same works with any numbers N, M; or any complex distributions; or even real numbers with a bit more complicated strategy. You don't have to know whether you are between two values in advance, you just have to guess.

Re: A liar who always lies says "All my hats are green."

#396
post #386

Earlier quoted context omitted.

https://www.alexirpan.com/2015/09/09/the-other-two-envelope-... If your solution is the same as this article's, it's plain wrong. Even the natural number case is plain strong. It's very easy to demostrate as well: consider a trivia case where the distribution is just {P(1)=1/3, P(2)=1/3, P(3)=1/3} and you see 2 in the first envelope. There is no strategy to get a better chance than 50%. Therefore, any strategy that g…

Sorry, but you're simply wrong. You can read the answer I gave. You can read the answer Colin Wright gave. You can trust that we both have math degrees and know what we are talking about. Or, aw heck, you can try it with an actual program at https://www.perlmonks.org/?node_id=39630 . (Yes, I wrote that piece of hackery about a decade ago.) I don't actually care how you convince yourself. But the explanation is right.…

You're correct. I realized that I completely misunderstoond the original problem after reading McDonnell's paper more carefully.

I thought you meant the strategy can make the winning chance always >50% even after the player opens the first envelope, which isn't possible.

However you actually meant the strategy can make the expected winning chance >50% before the player opens the first envelope, for any well-defined distribution of real number, even the distribution is not known to the player, which now I realize is true.

(I haven't thought through some edge case like Cantor distribution, but now I incline to it's true not just for "many distributions". Of course for a discrete distributions, we need to specifiy the two envelopes can't have the same number. Besides that, it seems to hold true for any distribution?)

Re: A liar who always lies says "All my hats are green."

#397
post #371

Earlier quoted context omitted.

You don't need a uniform distribution to get guaranteed better than even odds. And many nonuniform distributions work just fine. There are no hidden conditions. It is just a shocking result that we don't expect.

https://www.alexirpan.com/2015/09/09/the-other-two-envelope-... If your solution is the same as this article's, it's plain wrong. Even the natural number case is plain strong. It's very easy to demostrate as well: consider a trivia case where the distribution is just {P(1)=1/3, P(2)=1/3, P(3)=1/3} and you see 2 in the first envelope. There is no strategy to get a better chance than 50%. Therefore, any strategy that g…

Edit Edit: I was wrong. I completely misunderstood the problem. See my other comment below.

Re: A liar who always lies says "All my hats are green."

#398
post #392

Earlier quoted context omitted.

I think you are wrong ... see my answer here: https://news.ycombinator.com/item?id=42371563

Not to be too dismissive, but the title text of this xkcd [0] seems relevant. No matter how nice the explanation is, the fact that the conclusion is wrong suggests that the reasoning has a flaw. I took a stab at what I think that flaw is when I responded to your rebuttal [1]. [0] https://xkcd.com/2217/ [1] https://news.ycombinator.com/item?id=42372285

I dimissed it at first (you can see I made some embarrassing comments above), but the strategy is correct. I'd argue it's even intuitively correct once the problem in question is clarified.

It's not saying that after the player see the number in the first envelope, the strategy guarantees a >50% outcome.

It's saying that give any distribution, over all possible outcomes, >50% times the strategy will end up pick the larger number. You can say this >50% is the expected winning chance before the player see the number in the first envelope.

I'd say this is "intuitve" because, if your strategy can guarantee "when the player see a large number in the first envelope, he's less likely to switch than if he saw a small number", it would be better than blindly switching by coin toss. So intuitively such a strategy exists.

The only "trick" here is that since the player doesn't know the initial distribution, they can't tell "how large counts as large?" therefore they needs something that preserves some property over the whole real number line. That's why the strategy involves sampling from a another distribution whose PDF is non-zero everywhere.

Re: A liar who always lies says "All my hats are green."

#399
post #392

Earlier quoted context omitted.

I think you are wrong ... see my answer here: https://news.ycombinator.com/item?id=42371563

Not to be too dismissive, but the title text of this xkcd [0] seems relevant. No matter how nice the explanation is, the fact that the conclusion is wrong suggests that the reasoning has a flaw. I took a stab at what I think that flaw is when I responded to your rebuttal [1]. [0] https://xkcd.com/2217/ [1] https://news.ycombinator.com/item?id=42372285

Sorry, I was too dismissive. I'm not crazy about the explanation, but I think you're right.

Re: A liar who always lies says "All my hats are green."

#400
post #389

Earlier quoted context omitted.

This turns out not to be the case. Let's play this game exactly once. You choose two unequal real numbers. I don't know what they are, and I don't know the distribution from which you choose them. You write them down and put them in separate envelopes. I'm allowed to choose one envelope and open it to see the number inside, and my job is then to say which envelope holds the larger number. I claim I have a strategy no…

Why, exactly, are you allowed to know why some random guess is between the two numbers or not when computing your choice?

Sorry, too late to edit, I see you're describing how you know your choice was good/bad (I thought you were describing a probabilistic choice).
Post reply on HN