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.

1 <strong>Boolean</strong> <strong>functions</strong><br />

1.1 Fundamental concepts<br />

1.1.1 Definition <strong>of</strong> <strong>Boolean</strong> <strong>functions</strong><br />

<strong>Boolean</strong> <strong>functions</strong> are <strong>functions</strong> that depend on a set <strong>of</strong> <strong>Boolean</strong> variables. The variables<br />

and <strong>the</strong> function itself have <strong>the</strong>ir values in {0, 1}. We will also refer to <strong>the</strong> elements 0 and<br />

1 as false and true respectively. Formally, we denote <strong>the</strong> infinite and numerable set <strong>of</strong><br />

<strong>Boolean</strong> variables as Vars. We also define a total order relation ≺ over Vars that allows<br />

us to assign an index i ∈ N to each variable xi ∈ Vars. We can now give <strong>the</strong> <strong>for</strong>mal<br />

definition <strong>of</strong> <strong>Boolean</strong> valuation and <strong>Boolean</strong> function.<br />

Definition 1. (<strong>Boolean</strong> valuations and <strong>Boolean</strong> <strong>functions</strong>.) The set <strong>of</strong> <strong>Boolean</strong><br />

valuations over Vars is defined as A def<br />

= Vars → {0, 1}. The set <strong>of</strong> <strong>Boolean</strong> <strong>functions</strong> is<br />

defined as F def<br />

= A → {0, 1}.<br />

Sometimes we may use variable assignment as a synonym <strong>for</strong> <strong>Boolean</strong> valuation.<br />

1.1.2 Denoting specific <strong>Boolean</strong> <strong>functions</strong><br />

We will use a simple notation to refer to specific <strong>Boolean</strong> <strong>functions</strong>, exploiting <strong>the</strong> fact<br />

that <strong>the</strong>y can all be obtained by applying a few simple operators on a few elementary<br />

<strong>functions</strong>. We can start by defining <strong>the</strong> <strong>Boolean</strong> <strong>functions</strong> ⊥ and ⊤ as <strong>the</strong> <strong>Boolean</strong><br />

<strong>functions</strong> which evaluate to false and true respectively in any given <strong>Boolean</strong> valuation.<br />

For each variable x ∈ Vars, we also write x to denote <strong>the</strong> <strong>Boolean</strong> function f such that<br />

∀a ∈ A : f(a) = 1 ⇐⇒ a(x) = 1. It should always be clear whe<strong>the</strong>r we are referring to<br />

<strong>the</strong> variable or to <strong>the</strong> function in a specific context.<br />

Now we define a few basic binary operations over F. For each pair <strong>of</strong> <strong>Boolean</strong> <strong>functions</strong><br />

f1, f2 ∈ F, we write f1 ∧ f2 to denote <strong>the</strong> <strong>Boolean</strong> function g ∈ F such that <strong>for</strong> each<br />

a ∈ A, g(a) = 1 ⇐⇒ (f1(a) = 1 ∧ f2(a) = 1). We define all o<strong>the</strong>r common operations<br />

analogously; here is a complete list:<br />

Definition 2. (Binary operators on <strong>Boolean</strong> <strong>functions</strong>.) ∀f1, f2 ∈ F :<br />

f1 ∧ f2 def<br />

= g ∈ F . ∀a ∈ A : g(a) = 1 ⇐⇒ f1(a) = 1 ∧ f2(a) = 1 ,<br />

f1 ∨ f2 def<br />

= g ∈ F . ∀a ∈ A : g(a) = 1 ⇐⇒ f1(a) = 1 ∨ f2(a) = 1 ,<br />

f1 ⊕ f2 def<br />

= g ∈ F . ∀a ∈ A : g(a) = 1 ⇐⇒ f1(a) = f2(a) ,<br />

f1 ⇔ f2 def<br />

= g ∈ F . ∀a ∈ A : g(a) = 1 ⇐⇒ f1(a) = f2(a) ,<br />

f1 ⇒ f2 def<br />

= g ∈ F . ∀a ∈ A : g(a) = 1 ⇐⇒ f1(a) = 0 ∨ (f1(a) = 1 ∧ f2(a) = 1) .

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

Saved successfully!

Ooh no, something went wrong!