BooleanCountingFunction

BooleanCountingFunction[kmax,n]

represents a Boolean function of n variables that gives True if at most kmax variables are True.

BooleanCountingFunction[{k},n]

represents a function of n variables that gives True if exactly k variables are True.

BooleanCountingFunction[{kmin,kmax},n]

represents a function that gives True if between kmin and kmax variables are True.

BooleanCountingFunction[{{k1,k2,}},n]

represents a function that gives True if exactly ki variables are True.

BooleanCountingFunction[spec,{a1,a2,}]

gives the Boolean expression in variables ai corresponding to the Boolean counting function specified by spec.

BooleanCountingFunction[spec,{a1,a2,},form]

gives the Boolean expression in the form specified by form.

Details

Examples

open allclose all

Basic Examples  (1)

At most two conditions are true:

In[1]:=
Click for copyable input
Out[1]=

Convert to a disjunctive normal form:

In[2]:=
Click for copyable input
Out[2]=

Scope  (6)

Applications  (4)

Properties & Relations  (6)

Neat Examples  (1)

See Also

Majority  Xor  Xnor  Equivalent  BooleanFunction  BooleanConsecutiveFunction  BooleanConvert  SymmetricPolynomial

Introduced in 2008
(7.0)