unique children of a point in a boolean lattice

24 Views Asked by At

I am working with two-element boolean algebra, e.g. points composed of strings of $0$s and $1$s and bit-wise $AND$ and $OR$ to find maxima and minima.

In the domain I'm working in, I need to assign counts to points in this type of boolean lattice. The count of a point $P$ is the total number of possible points in $\Downarrow P$, minus those which are contained in any $\Downarrow Q$, where $Q$ is a real child of $P$, and no child $Q_i$ is in an ordered relationship with any other child $Q_j$.

I apologize if I fail in terminology here, but let me give an example.

Find the children of $10000$, whose children are $11000$, $10010$, and $10001$. Notice that none of the children are orderable with respect to each other, i.e. $11000\wedge10010 = 10000$, etc.

The number of possible points in of $\Downarrow 10000$ is $2^4$, or 16, because there are 4 zeroes that can be replaced with ones in any permutation ($10000$, $10001$, $10010$, $10011$, etc.). The size of each of the children is $2^3 = 8$, because they each have three zeroes to permute into ones. However, the count of $10000$ is definitely not $16-8*3 = -4$.

The numbers can't be simply subtracted like this because the three children share many of the same possible children. For example, all three of them contain $11111$, while $10001$ and $10010$ both contain $10011$. The actual count is 2, and the 2 permutations not taken over by the children are $10000$ and $10100$.

My only idea has turned out to be flawed. The idea was to count the number of bits which are zero in the parent and do not appear as a zero in any child, and then raise two to this power. However, this is not correct. For example if the parent were $0000$ and the child where $1001$, this approach would give the same number as if $1000$ and $0001$ had been given as children, and the results there are clearly different.

Can anyone tell me a way to quickly (without using exhaustive search) determine the count of a lattice point? The application here is an algorithm for analogical modeling, if you're curious.