|
SOLUTIONS
|
Mathematica
>
Mathematics and Algorithms
>
Discrete Mathematics
>
Boolean Computation
>
BooleanVariables
BUILT-IN MATHEMATICA SYMBOL
BooleanVariables
BooleanVariables[expr]
gives a list of the Boolean variables in the Boolean expression expr.
BooleanVariables[bf]
gives the number of Boolean variables in the BooleanFunction object bf.
DetailsDetails
- In BooleanVariables[expr], the expression expr can involve any combination of Boolean functions such as And, Or, Not, as well as BooleanFunction and related functions.
- In BooleanVariables[bf], the expression bf must be a single BooleanFunction object.
- BooleanVariables[expr] gives a list of variables in the order returned by Sort.
ExamplesExamplesopen allclose all
Basic Examples (2)Basic Examples (2)
Find the variables in a Boolean expression:
| In[1]:= |
| Out[1]= |
Find the number of variables for a pure BooleanFunction object:
| In[1]:= |
| Out[1]= |
New in 7
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
