Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The removal of duplication and the distinguishing between GB and BG are two completely different things.

If you're not meant to remove the duplicates, then why doesn't your enumeration of two gendered children run: BB, BG, GB, GG, BB, GB, BG, GG?

I number them merely to distinguish them. The "a child has 50% chance of being a boy, and 50% chance of being a girl" applies to a single child, so you need to enumerate their states independently. To do that you need to be able to distinguish between them.

It is this fact that each child's possible states should be treated independently that means you can't combine BG and GB, not any aversion to removing duplication. Because they are independent entities BG represents one - nominally called child 1 - is a B while the other - nominally called child 2 - is a girl. GB represents one - nominally called child 1 - is a G while the other - nominally called child 2 - is a B.

If the list were changes so that the fixed child is always in the list we wouldn't be enumerating all the possibilities for each child and then combining them. That would be falling into exactly the same mistake you are keen to avoid.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: