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.
with⁡Logic:
Parity⁡true,false,true
false
Illustrate the simplification of repeated inputs.
Parity⁡`$`⁡x,m,`$`⁡y,n,xassumingm::even,n::odd
Parity⁡x,y
Illustrate the difference in expression size between the parity function and its three different output forms (see Convert).
p≔Parity⁡x,y,z,w
p≔Parity⁡w,x,y,z
length⁡Convert⁡p,form=CNF
280
length⁡Convert⁡p,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