Name for this family of operations

37 Views Asked by At

Given some True / False propositions $A,B,C,D, \dots$ I would like to know if there is a name for these operations:

$ONE(A,B,C)$ - true if exactly one of $A, B$ and $C$ is true, false otherwise

$TWO(A,B,C)$ - true if exactly two of $A, B$ and $C$ is true, false otherwise

$ONE(A,B,C,D, \dots)$ - true if exactly one of $A, B, \dots \;$ is true, false otherwise

A sensible notation to me would be $\#OF(A, B, C, \dots)$ where the # is replaced by some positive integer. I.e.

$2OF(A,B,C,D)$ would be true if exactly two of $A,B,C$ and $D$ are true.

Interestingly the boolean algebra formulas for these operations are very predictable.

$2OF(a,b,c,d)=ab+ac+ad+bc+bd+cd-3(abc+abd+acd+bcd)+6abcd$

Higher versions simply use more coefficients from Pascal's triangle with an alternating sum.

Thanks in advance, Ben

1

There are 1 best solutions below

16
On

As a Boolean algebra expression, I would say:

$2OF(a,b,c,d)=(ab+ac+ad+bc+bd+cd)(abc+abd+acd+bcd)'$

"At least two, but (and) not at least 3"