Close
Close window
Parity - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

Logic

Parity

return parity function

Calling Sequence

Parity(e1,e2,...,en)

Parameters

e1,e2,en

-

names, functions, or logical expressions

Description

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.

Examples

>

withLogic:

>

Paritytrue,false,true

false

(1)

Illustrate the simplification of repeated inputs.

>

Parity`$`x,m,`$`y,n,xassumingm::even,n::odd

Parityx,y

(2)

Illustrate the difference in expression size between the parity function and its three different output forms (see Convert ).

>

pParityx,y,z,w

pParityw,x,y,z

(3)
>

lengthConvertp,form=CNF

280

(4)
>

lengthConvertp,form=DNF

287

(5)

Compatibility

The Logic[Parity] command was introduced in Maple 2017.

For more information on Maple 2017 changes, see Updates in Maple 2017 .


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /