construct a random Boolean function - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Logic : Boolean : Logic Package : Logic/Random

Logic[Random] - construct a random Boolean function

Calling Sequence

Random(alpha, opt)

Parameters

alpha

-

list or set of symbols representing the alphabet

opt

-

(optional) equation of the form form=fname, where fname is one of CNF, DNF, or MOD2.

Description

• 

The Random command returns a random Boolean expression in a specific canonical form.  By default, disjunctive normal form is used. The Boolean expression returned is in normal form with respect to the symbols in alpha.

Examples

withLogic:

Randoma,b

a &and b

(1)

Randoma,b,c,form=DNF

a &and b &and c &or a &and b &and &notc &or a &and c &and &notb &or a &and &notb &and &notc &or b &and c &and &nota &or b &and &nota &and &notc

(2)

Randoma,b,form=CNF

b &or &nota

(3)

Randoma,b,c,form=MOD2

abc+ac+bc+b+c+1

(4)

See Also

Logic


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam