Finding the number of partitions of logical truth over an operator.

36 Views Asked by At

How many ways can I break up a logical expression and combine them over the XOR operator to be the equivalent expression?

For example, let A and B be the operands.

There is only one way to get A AND B, that being (A AND B).

There are two ways to get A XNOR B, those being (A XNOR B), and that of ((A AND B) OR (not A AND not B)). That is, we have one the possibility of doing it with one operator (XNOR), or with two expressions over an operator (OR)

From my calculations, there are 5 ways to get A OR B, those being (A OR B), (B OR (A AND not B)), (A OR (B AND not A)), ((A AND B) OR (A XOR B)), and ((A AND B) OR (A AND not B) OR (not A AND B)).

If I'm right, there are 20 ways to get (A TAUTOLOGY B) = 1 e.g. one way is ((A XOR B) OR (A XNOR B)).

It seems as if this is something like somehow breaking down the expressions into sets of N unique sub-expressions, for example, if N = 4, then (3+1), (2+2), (2+1+1),and (1+1+1+1), but the 3 and 2 can also be broken down to 3 = (2+1) and (1+1+1), and the 2 can be broken down to (1+1). Not sure if this is a useful approach or how to start creating a sequence or possibly a generating function.