27.09.2013 Views

a modern C++ library for the manipulation of Boolean functions

a modern C++ library for the manipulation of Boolean functions

a modern C++ library for the manipulation of Boolean functions

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The ∧ operator has precedence over <strong>the</strong> ∨ operator.<br />

For each f ∈ F, we define f (sometimes denoted as ¬f) as <strong>the</strong> <strong>Boolean</strong> function<br />

such that ∀a ∈ A : f(a) = 1 ⇐⇒ f(a) = 0. For each i, t, e ∈ F we also define<br />

if i <strong>the</strong>n t else e def<br />

= i ∧ t ∨ i ∧ e .<br />

Finally, we need a notation <strong>for</strong> <strong>Boolean</strong> <strong>functions</strong> obtained by <strong>for</strong>cing some variables<br />

in ano<strong>the</strong>r <strong>Boolean</strong> function to a given truth value. For each valuation a ∈ A, each<br />

x, y ∈ Vars, and each c ∈ {0, 1}, <strong>the</strong> valuation a[c/x] ∈ A is defined as<br />

a[c/x](y) def<br />

=<br />

<br />

c, if x = y;<br />

a(y), o<strong>the</strong>rwise.<br />

We extend this to a set <strong>of</strong> variables by defining, <strong>for</strong> each X = {v1, v2, . . . vn} ⊆ Vars,<br />

<strong>the</strong> <strong>Boolean</strong> valuation a[c/X] def<br />

= a[c/v1][c/v2] . . . [c/vn]. Now we can define, <strong>for</strong> each<br />

f ∈ F, each x ∈ Vars, each a ∈ A and each c ∈ {0, 1}, <strong>the</strong> <strong>Boolean</strong> function<br />

f[c/x] ∈ F (also denoted as f |x←c) as f[c/x](a) def<br />

= f(a[c/x]). Like we did with<br />

<strong>Boolean</strong> valuations, we define <strong>for</strong> each X = {v1, v2, . . . vn} ⊆ Vars <strong>the</strong> <strong>Boolean</strong> function<br />

f[c/X] def<br />

= f[c/v1][c/v2] . . . [c/vn]. We also define <strong>for</strong> each f ∈ F, each x, y ∈ Vars, and<br />

each a ∈ A, <strong>the</strong> <strong>Boolean</strong> function f[x/y] ∈ F as f[x/y](a) def<br />

= f(a[a(x)/y]).<br />

1.1.3 Notable sets <strong>of</strong> variables<br />

We now introduce, <strong>for</strong> any given <strong>Boolean</strong> function f, <strong>the</strong> set <strong>of</strong> variables on which f<br />

depends, <strong>the</strong> sets <strong>of</strong> its entailed and disentailed variables, and <strong>the</strong> equivalence relation<br />

representing its equivalent variables; calculating <strong>the</strong>m is necessary <strong>for</strong> many applications.<br />

Definition 3. (Variable dependency. Entailed, disentailed and equivalent variables.)<br />

For each f ∈ F, <strong>the</strong> set <strong>of</strong> variables on which f depends, <strong>the</strong> set <strong>of</strong> entailed<br />

variables <strong>for</strong> f, <strong>the</strong> set <strong>of</strong> disentailed variables <strong>for</strong> f, and <strong>the</strong> equivalence relation representing<br />

<strong>the</strong> equivalent variables <strong>for</strong> f are given, respectively, by:<br />

vars(f) def<br />

= x ∈ Vars ∃a ∈ A . f a[0/x] = f a[1/x] ,<br />

true(f) def<br />

= x ∈ Vars ∀a ∈ A : f(a) = 1 =⇒ a(x) = 1 ,<br />

false(f) def<br />

= x ∈ Vars ∀a ∈ A : f(a) = 1 =⇒ a(x) = 0 ,<br />

equiv(f) def<br />

= (x, y) ∈ Vars 2 ∀a ∈ A : f(a) = 1 =⇒ a(x) = a(y) .<br />

1.1.4 Equivalence relations over sets <strong>of</strong> variables<br />

Let L be <strong>the</strong> set <strong>of</strong> all equivalence relations over a finite set <strong>of</strong> variables and consider a<br />

particular equivalence relation L ∈ L. We define <strong>the</strong> leader <strong>of</strong> an equivalence class in L as<br />

<strong>the</strong> minimum variable in <strong>the</strong> equivalence class; we also say that variable vl is <strong>the</strong> leader <strong>of</strong><br />

variable vi <strong>for</strong> L when vl is <strong>the</strong> leader <strong>of</strong> <strong>the</strong> equivalence class in L that contains vi (note<br />

that each leader is <strong>the</strong> leader <strong>of</strong> itself), and define λL(vi) def<br />

= vl. The set <strong>of</strong> all leaders <strong>for</strong><br />

1.1 Fundamental concepts 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!