({{, (RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[k,n]
represents the k(^th) minterm in n variables.}, {, (RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[{(Subscript[k, 1]),(Subscript[k, 2]),…},n]
represents the disjunction of the minterms (Subscript[k, i]).}, {, (RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[{{(Subscript[u, 1]),…,(Subscript[u, n])},{(Subscript[v, 1]),…},…}]
represents the disjunction of minterms given by the exponent vectors (Subscript[u, i]), (Subscript[v, i]), ….}, {, (RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[spec,{(Subscript[a, 1]),(Subscript[a, 2]),…}]
gives the Boolean expression in variables (Subscript[a, i]) corresponding to the minterms function specified by spec.}, {, (RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[spec,{a,(Subscript[a, 2]),…},form]
gives the Boolean expression in the form specified by form.}})

OpenersNotesSection(Spacer1)Details

(RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[{{(Subscript[u, 1]),(Subscript[u, 2]),…}},{(Subscript[a, 1]),(Subscript[a, 2]),…}] gives (Subscript[b, 1])∧(Subscript[b, 2])∧… where (Subscript[b, i])==(Subscript[a, i]) if (Subscript[u, i]) is (RefLink[True, paclet:ref/True]) and (Subscript[b, i])=¬(Subscript[a, i]) if (Subscript[u, i]) is (RefLink[False, paclet:ref/False]).

The (Subscript[u, i]) etc. can be either (RefLink[True, paclet:ref/True]) and (RefLink[False, paclet:ref/False]) or 1 and 0.

(RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[k,n] is equivalent to (RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[{(RefLink[IntegerDigits, paclet:ref/IntegerDigits])[k,n,2]}].

(RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[spec] gives a Boolean function object that works like (RefLink[Function, paclet:ref/Function]).

(RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[spec][(Subscript[a, 1]),(Subscript[a, 2]),…] gives an implicit representation equivalent to the explicit Boolean expression (RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[spec,{(Subscript[a, 1]),(Subscript[a, 2]),…}].

(RefLink[BooleanConvert, paclet:ref/BooleanConvert]) converts (RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[spec][vars] to an explicit Boolean expression.

In (RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[spec,{(Subscript[a, 1]),(Subscript[a, 2]),…},form], the possible forms are as given for (RefLink[BooleanConvert, paclet:ref/BooleanConvert]).

(RefLink[BooleanMinterms, paclet:ref/BooleanMinterms])[spec,{(Subscript[a, 1]),(Subscript[a, 2]),…}] by default gives an expression in DNF.

OpenersPrimaryExamplesSection(Spacer1)Examples  (9)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Equivalent ways of specifying the same minterm:

BooleanMinterms[{{True,False,True}},{a,b,c}]

BooleanMinterms[{{1,0,1}},{a,b,c}]

BooleanMinterms[{5},{a,b,c}]

Specify a disjunction of minterms:

BooleanMinterms[{1,3,5},{a,b,c}]

An equivalent way to specify a disjunction of minterms:

Or@@Table[BooleanMinterms[{i},{a,b,c}],{i,{1,3,5}}]

TautologyQ[Equivalent[%%,%]]

Return a (RefLink[BooleanFunction, paclet:ref/BooleanFunction]) object representing the disjunction of minterms:

BooleanMinterms[{1,3,5},3]@@{a,b,c}

BooleanMinterms[{1,3,5},{a,b,c}]

TautologyQ[Equivalent[%%,%]]

Enumerate all minterms of three variables:

Table[BooleanMinterms[{i},{a,b,c}],{i,0,2^3-1}]

OpenersExampleSection1(Spacer1)Scope  (1)

Specify different forms for the result:

BooleanMinterms[{1,3,5},{a,b,c},"DNF"]

BooleanMinterms[{1,3,5},{a,b,c},"CNF"]

BooleanMinterms[{1,3,5},{a,b,c},"ANF"]

OpenersExampleSection3(Spacer1)Properties & Relations  (4)

The indices correspond to positions of (RefLink[True, paclet:ref/True]) in the default ordering for (RefLink[BooleanTable, paclet:ref/BooleanTable]):

BooleanTable[BooleanMinterms[{0,3,7},{a,b,c}],{a,b,c}]

Length[%]-Position[%,True]

(RefLink[BooleanMinterms, paclet:ref/BooleanMinterms]) can represent any (RefLink[BooleanFunction, paclet:ref/BooleanFunction]):

f=BooleanMinterms[{1,5,7},3]

g=BooleanFunction[FromDigits[{1,0,1,0,0,0,1,0},2],3]

f===g

The mapping from minterms to index:

mindex[l_,k_]:=FromDigits[Table[If[MemberQ[l,i],1,0],{i,2^k-1,0,-1}],2]

mindex[{1,5,7},3]

The mapping from index to minterms:

indmin[m_,k_]:=Flatten@Position[Reverse[IntegerDigits[m,2,2^k]],1]-1

indmin[162,3]

Using bit vectors:

With[{m=123,k=4},BooleanMinterms[Select[Range[0,(2^k)-1],BitAnd[(2^(#)),m]≠0&],k]===BooleanFunction[m,k]]

Use (RefLink[Subsets, paclet:ref/Subsets]) to enumerate all possible Boolean functions using (RefLink[BooleanMinterms, paclet:ref/BooleanMinterms]):

BooleanMinterms[#,{a,b}]&/@Subsets[Range[0,2^2-1]]

(RefLink[BooleanMaxterms, paclet:ref/BooleanMaxterms]) is related to (RefLink[BooleanMinterms, paclet:ref/BooleanMinterms]):

f=BooleanMaxterms[{1,3,5},3]

g=BooleanMinterms[{1,3,5},3]

TautologyQ[Equivalent[f[a,b,c],¬g[¬a,¬b,¬c]]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[BooleanMaxterms, paclet:ref/BooleanMaxterms])  ▪  (RefLink[BooleanFunction, paclet:ref/BooleanFunction])  ▪  (RefLink[And, paclet:ref/And])  ▪  (RefLink[BooleanConvert, paclet:ref/BooleanConvert])  ▪  (RefLink[BooleanMinimize, paclet:ref/BooleanMinimize])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Boolean Computation, paclet:guide/BooleanComputation])}})}})