SatisfiabilityCount

SatisfiabilityCount[bf]
counts the number of possible combinations of variable values that yield True when supplied as arguments to the Boolean function bf.

SatisfiabilityCount[expr, {a1, a2, ...}]
counts the number of possible combinations of the that make the Boolean expression expr be true.

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Count the number of cases for which yields true:

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

This corresponds to the number of times True appears in the truth table:

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

Count the number of truth cases for a pure Boolean function:

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

The corresponding table:

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

Count the truth instances in an expression with 2000 variables:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
New in 7
New to Mathematica? Find your learning path »
Have a question? Ask support »