Re:Coding Horror: Monty Hall, Monty Fall, Monty Crawl
by amalcon on Monday June 22, 2009 @04:25PM
(#669385)
Paul's second algorithm, as stated, is exactly equivalent to the following:
1) Choose a random parent with exactly two children
2) If that parent has two boys, announce that they do not have two girls. If that parent has two girls, announce that they do not have two boys.
3) If that parent has a boy and a girl, randomly announce one of the above results.
It's easy to see that this has the same results as the first option. Counterintuitively, if that last step is nonrandom, you get the more intuitive result. Say, for example, that we did this:
1) Choose a random parent with exactly two children
2) Announce the gender of the eldest child.
This way, you get even odds that the other child is male or female. It's really counterintuitive, but that's how it works out.
1) Choose a random parent with exactly two children
2) If that parent has two boys, announce that they do not have two girls. If that parent has two girls, announce that they do not have two boys.
3) If that parent has a boy and a girl, randomly announce one of the above results.
It's easy to see that this has the same results as the first option. Counterintuitively, if that last step is nonrandom, you get the more intuitive result. Say, for example, that we did this:
1) Choose a random parent with exactly two children
2) Announce the gender of the eldest child.
This way, you get even odds that the other child is male or female. It's really counterintuitive, but that's how it works out.