4 ms·
Thank you. My original version 8 years ago included a short tour into "The Inclusion-exclusion principle" which is how I eventually derived the pattern to use e
by bdg 7y ago
Thank you. My original version 8 years ago included a short tour into "The Inclusion-exclusion principle" which is how I eventually derived the pattern to use even/odd sums of bits in the ABC=111 encoding. I cut it out because I felt it was distracting for most of my readers.
I eventually summarized it this way after a few wordy paragraphs that explained the way the equation worked:
> The sum of all the intersections would mean (if we had 4 items, A, B, C, D) adding together A, B and C and D. The second line would mean we subtract the sum of AB, AC, AD, BC, BD, and CD. The third line means we add the sum of ABC, ABD, and BCD, the fourth line means we subtract the value of ABCD. The pattern here is we alternate the operation (adding or subtracting a sum) based on the cardinality (how many items are in a set) of something. Even cardinalities are subtracted, odd cardinalities are added. We sum together all combinations of that cardinality.