Re:The question is wrong
by nostrademons on Sunday January 04, 2009 @12:05AM
(#419014)
I thought it might be instructive to implement both algorithms side-by-side in the same loop:
Output (ignoring the actual printouts for each person):
I liked tromino's explanation best: it's really an ambiguity in the English language. Under your 2nd algorithm, 1/4 of parents can't truthfully announce "I have a girl" - but in ordinary conversation, this doesn't matter, because they'd just truthfully say "I have a boy" and we don't make a distinction. It's only when we explicitly filter out parents who don't have a boy that we change the probabilities.
[ Parent
| on HN ]
There are no comments on this comment yet.