Logic
Parity
return parity function
Calling Sequence
Parameters
Description
Examples
Compatibility
Parity(e1,e2,...,en)
e1,e2,en
-
names, functions, or logical expressions
The Parity command returns the Boolean expression corresponding to the parity function on a set of variables: that is, the function which is true if and only if an odd number of inputs are true.
The parity function is symmetric in its inputs: the order of true or false values is unimportant, only the number of true inputs.
withLogic:
Paritytrue,false,true
false
Illustrate the simplification of repeated inputs.
Parity`$`x,m,`$`y,n,xassumingm::even,n::odd
Parityx,y
Illustrate the difference in expression size between the parity function and its three different output forms (see Convert).
p≔Parityx,y,z,w
p≔Parityw,x,y,z
lengthConvertp,form=CNF
280
lengthConvertp,form=DNF
287
The Logic[Parity] command was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
See Also
Logic[Convert]
Logic[Satisfy]
Download Help Document