SatisfiabilityInstances

SatisfiabilityInstances[bf]
attempts to find a choice of variables that makes the Boolean function bf yield True.

SatisfiabilityInstances[expr, {a1, a2, ...}]
attempts to find a choice of the that makes the Boolean expression expr be True.

SatisfiabilityInstances[b, ..., m]
attempts to find m choices of variables that yield True.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Generate a single instance where the Boolean expression is true:

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

Generate multiple instances; in this case only two instances exist:

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

Find 3 instances for a pure Boolean function:

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

When the input is not satisfiable, an empty list is returned:

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 »