Section 4.3. Boolean functions

Similar documents
6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer.

Infinite Sequences and Series

Lecture Notes for CS 313H, Fall 2011

CHAPTER I: Vector Spaces

Resolution Proofs of Generalized Pigeonhole Principles

Convergence of random variables. (telegram style notes) P.J.C. Spreij

Mathematical Induction

1. By using truth tables prove that, for all statements P and Q, the statement

Chapter 0. Review of set theory. 0.1 Sets

Relations Among Algebras

Product measures, Tonelli s and Fubini s theorems For use in MAT3400/4400, autumn 2014 Nadia S. Larsen. Version of 13 October 2014.

Bertrand s Postulate

Math 155 (Lecture 3)

Statistics 511 Additional Materials

Lecture Overview. 2 Permutations and Combinations. n(n 1) (n (k 1)) = n(n 1) (n k + 1) =

Chapter 6 Infinite Series

10. Comparative Tests among Spatial Regression Models. Here we revisit the example in Section 8.1 of estimating the mean of a normal random

Chapter IV Integration Theory

The multiplicative structure of finite field and a construction of LRC

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

Basic Sets. Functions. MTH299 - Examples. Example 1. Let S = {1, {2, 3}, 4}. Indicate whether each statement is true or false. (a) S = 4. (e) 2 S.

Definition 4.2. (a) A sequence {x n } in a Banach space X is a basis for X if. unique scalars a n (x) such that x = n. a n (x) x n. (4.

Structural Functionality as a Fundamental Property of Boolean Algebra and Base for Its Real-Valued Realizations

Math 61CM - Solutions to homework 3

CS284A: Representations and Algorithms in Molecular Biology

MA131 - Analysis 1. Workbook 2 Sequences I

Theorem: Let A n n. In this case that A does reduce to I, we search for A 1 as the solution matrix X to the matrix equation A X = I i.e.

lim za n n = z lim a n n.

Math F215: Induction April 7, 2013

Measure and Measurable Functions

2 Geometric interpretation of complex numbers

Sequences I. Chapter Introduction

Exercises 1 Sets and functions

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +

It is always the case that unions, intersections, complements, and set differences are preserved by the inverse image of a function.

Beurling Integers: Part 2

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22

TEACHER CERTIFICATION STUDY GUIDE

CALCULATION OF FIBONACCI VECTORS

Some examples of vector spaces

THE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS

Lecture 2. The Lovász Local Lemma

SNAP Centre Workshop. Basic Algebraic Manipulation

1. ARITHMETIC OPERATIONS IN OBSERVER'S MATHEMATICS

Lecture Notes for Analysis Class

CSE 1400 Applied Discrete Mathematics Number Theory and Proofs

Square-Congruence Modulo n

Chapter 3. Strong convergence. 3.1 Definition of almost sure convergence

a 2 +b 2 +c 2 ab+bc+ca.

Enumerative & Asymptotic Combinatorics

Model Theory 2016, Exercises, Second batch, covering Weeks 5-7, with Solutions

An analog of the arithmetic triangle obtained by replacing the products by the least common multiples

Math 299 Supplement: Real Analysis Nov 2013

Chapter 4. Fourier Series

Math 4400/6400 Homework #7 solutions

Lesson 10: Limits and Continuity

Matrix Algebra 2.2 THE INVERSE OF A MATRIX Pearson Education, Inc.

4 The Sperner property.

[ 11 ] z of degree 2 as both degree 2 each. The degree of a polynomial in n variables is the maximum of the degrees of its terms.

Riesz-Fischer Sequences and Lower Frame Bounds

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Chimica Inorganica 3

subcaptionfont+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0 subcaption ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, 2/16/2016

Goodness-of-Fit Tests and Categorical Data Analysis (Devore Chapter Fourteen)

The Borel hierarchy classifies subsets of the reals by their topological complexity. Another approach is to classify them by size.

R is a scalar defined as follows:

Recurrence Relations

Summary: CORRELATION & LINEAR REGRESSION. GC. Students are advised to refer to lecture notes for the GC operations to obtain scatter diagram.

Polynomial Functions and Their Graphs

An Introduction to Randomized Algorithms

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

2.4 Sequences, Sequences of Sets

If a subset E of R contains no open interval, is it of zero measure? For instance, is the set of irrationals in [0, 1] is of measure zero?

The Growth of Functions. Theoretical Supplement

LONG SNAKES IN POWERS OF THE COMPLETE GRAPH WITH AN ODD NUMBER OF VERTICES

6.3 Testing Series With Positive Terms

Problem Set 2 Solutions

42 Dependence and Bases

U8L1: Sec Equations of Lines in R 2

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 15

Once we have a sequence of numbers, the next thing to do is to sum them up. Given a sequence (a n ) n=1

7.1 Convergence of sequences of random variables

Lecture 3 The Lebesgue Integral

(for homogeneous primes P ) defining global complex algebraic geometry. Definition: (a) A subset V CP n is algebraic if there is a homogeneous

Hoggatt and King [lo] defined a complete sequence of natural numbers

DIVISIBILITY PROPERTIES OF GENERALIZED FIBONACCI POLYNOMIALS

11. FINITE FIELDS. Example 1: The following tables define addition and multiplication for a field of order 4.

(b) What is the probability that a particle reaches the upper boundary n before the lower boundary m?

Determinants of order 2 and 3 were defined in Chapter 2 by the formulae (5.1)

The Structure of Z p when p is Prime

Assignment 2 Solutions SOLUTION. ϕ 1 Â = 3 ϕ 1 4i ϕ 2. The other case can be dealt with in a similar way. { ϕ 2 Â} χ = { 4i ϕ 1 3 ϕ 2 } χ.

Lecture XVI - Lifting of paths and homotopies

Proof of Goldbach s Conjecture. Reza Javaherdashti

On a Smarandache problem concerning the prime gaps

Topic 1 2: Sequences and Series. A sequence is an ordered list of numbers, e.g. 1, 2, 4, 8, 16, or

17. Joint distributions of extreme order statistics Lehmann 5.1; Ferguson 15

Pb ( a ) = measure of the plausibility of proposition b conditional on the information stated in proposition a. & then using P2

(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row:

Axioms of Measure Theory

Basics of Probability Theory (for Theory of Computation courses)

Transcription:

Sectio 4.3. Boolea fuctios Let us take aother look at the simplest o-trivial Boolea algebra, ({0}), the power-set algebra based o a oe-elemet set, chose here as {0}. This has two elemets, the empty set, which is (bottom), ad the set {0}, which is. Let us write 2 for this algebra; thus, 2 = {, }, with the total orderig give by <. t is obvious, either because we are havig a two-elemet total orderig, or because we are havig a algebra of sets, that the Boolea operatios are as follows: = = = = = = = = - = - =. We read as true, as false ; we read the operatio as ad, as or, - as ot. this way, the two-elemet Boolea algebra becomes a algebra of truth-values, ad becomes the basis of propositioal logic. propositioal logic, we aalyze seteces ito costituet parts out of which the setece is built up usig the coectives: (cojuctio; "ad"), (disjuctio; "or"), (egatio; "ot"; the differece to the "mius" sig, -, is iessetial), ad two more: (coditioal; "if..., the...") ad (bicoditioal; "if ad oly if"). We also call a setece of the form A B a cojuctio, its terms A ad B the cojucts i the setece. As idicated i the previous paragraph, the operatio of cojuctio is the oe that forms A B out of A, B. A B is a disjuctio; A ad B are its disjucts. A B is a coditioal; A is its atecedet, B its succedet. A B is a bicoditioal. 22

Cosider the followig seteces: " is divisible by 2, or is divisible by 3." " is divisible by 2, ad is divisible by 3." "f the greatest commo divisor of ad 6 is ot, the is divisible by 2, or is divisible 3." " is divisible by 6 if ad oly if is divisible by 2 ad is divisible by 3." By deotig the setece " is divisible by 2 " by A ; also A " is divisible by 2 "; B " is divisible by 3 ", C " is divisible by 6 ", D " The greatest commo divisor of ad 6 is ", the above seteces may be aalyzed, respectively, as E A B, F A B, G ( D) (A B), H C (A B). 23

The truth or falsity of the last four composite seteces deped o the truth-values of their costituets A, B, C ad D. (Of course, the truth-value of each of A, B, C ad D deped o the value of the, which we assume to be a fixed, but uspecified, atural umber.) The depedece of the truth-value of E is exactly accordig to the truth-table give above describig the effect of the operatio of (cojuctio) o the two truth-values. That is to say, if A ad B are both true, so is E A B ; i ay other of the three cases cocerig the values of A ad B : (, ), (, ), ad (, ), the value of A B is false. This correspods to the ordiary use of the coective "ad". The truth-value of F A B is computed accordig to the truth-table for (disjuctio) give above. E.g., if = 6, or if = 2, or if = 3, A B is true; i fact, accordig to the first three lies of that table, i the give order. However, if =, the A B is false; this correspods to the last lie of the table. Notice that disjuctio as we are describig it here is o-exclusive "or" ; a disjuctio is true if, i particular, both disjucts are true. The setece i questio is, i more explicit form, "Either is divisible by 2, or is divisible by 3, or both." Let us ote that i mathematics, "or" (disjuctio) is always iteded as o-exclusive "or". (With exclusive "or", a disjuctio would be true just i case precisely oe disjuct is true.) This may be see e.g. o the setece G that is regarded as beig true, o matter what is. f = 6, the the succedet of the coditioal, A B is true uder the o-exclusive iterpretatio, but ot uder the exclusive oe. The coective of egatio as used i mathematical laguage, clearly correspods to the table give for it above. f = 5, the D (with D the setece deoted by D above) is true, ad D is false; if = 2, the D is false, ad D is true. The coective of the coditioal also correspods to a operatio i the two-elemet algebra 2 as follows: =, =, =, =. 24

This table says that a coditioal is true uless the atecedet is true, ad the succedet is false. particular, the coditioal is true wheever the atecedet is false, idepedetly of the truth-value of the succedet: "false implies everythig". We may verify that this correspods to the usual mathematical use by cosiderig that the setece that is, C A, "f is divisible by 6, the is divisible by 2 ", should be true o matter what the value of is. f = 6, = 2, =, we obtai the seteces "f 6 is divisible by 6, the 6 is divisible by 2 ", "f 2 is divisible by 6, the 2 is divisible by 2 ", "f is divisible by 6, the is divisible by 2 ". These are of the respective forms,,. As said, ordiary mathematical usage attributes the value true to these forms, i agreemet with the table for the coditioal above. The fact that a coditioal is true oce the atecedet is false is also reflected i the geeral approach to the proof of a coditioal, which is that we start by assumig that the atecedet is true. fact, we may just as well do so, sice if the atecedet is false, the whole coditioal is automatically true, ad we ca rest i our task of provig the coditioal to be true. 25

The coditioal ca be expressed i terms of egatio ad disjuctio: x y = (-x) y () is a idetity true for ay values of x ad y i 2 (verify!). Thus, i priciple, the coditioal could be dispesed with; setece G may be paraphrased as "Either the greatest commo divisor of ad 6 is, or is divisible by 2, or is divisible by 3." The bicoditioal has the followig truth-table: = = = =. other words, the bicoditioal is true just i case its terms have equal truth-values. The bicoditioal ca also be expressed i terms of previous coectives: x y = (x y) (y x) (2) (verify!). fact, this correspods to our geeral attitude towards the proof of a bicoditioal, which is that it ivolves the proof of two coditioals. The equalities (), (2) may be cosidered as iitios of the coditioal ad the bicoditioal as operatios i a arbitrary Boolea algebra. case that algebra is (B), the power-set algebra, the, for sets X ad Y B, we have that ad X Y = (-X) Y X Y = ((-X) Y) ((-Y) X). 26

Next, we itroduce a geeral costructio o Boolea algebras. Let = (A, ) be ay Boolea algebra, ay set. We cosider all fuctios from ito A as the elemets of a ew Boolea algebra deoted ; read " -to-the-power- ", or more simply, " -to- ". The uderlyig set of is, as we said, A, the set of all * fuctios ξ: A. The orderig i,, is ied compoetwise from : for ξ, ζ A, * ξ ζ ξ(i) ζ(i) for all i. * There are several thigs to check: firstly, that is ideed a order o A ; further, that this order has all the requisite properties to make =(A, * ) a Boolea algebra. fact, what * * * * * happes is that the Boolea operatios,,,, ad - i are all computed compoetwise: for all ξ, ζ A ad i, we have: * (i) =, * (i) =, (ξ ζ)(i) = ξ(i) ζ(i) * (we should have writte ξ ζ, but it is ot ecessary to be that pedatic...). (ξ ζ)(i) = ξ(i) ζ(i) (-ξ)(i) = -(ξ(i)) The proof of all these assertios is easy. For istace, the assertio for is that the fuctio η A for which η(i) = ξ(i) ζ(i) for all i is, i fact, the meet of ξ ad ζ i. Accordig to a display o page 80 i Sectio 3.2, the best way to prove this is showig that for all χ A, * χ η χ ξ ad χ ζ. 27

Whe we put i the iitio of η ad that of *, we get for all χ A, χ(i) ξ(i) ζ(i) χ(i) ξ(i) ad χ(i) ζ(i), which, for each i, is a istace of the same relatio o page 80 i Sectio 3.2 for the origial Boolea algebra. Let us apply the power-costructio to the algebra =2. The elemets of the Boolea algebra 2 are the fuctios {, } ; for ξ, ηε{, }, ξ η iff ξ(i) η(i) for all iε. Also ote that sice 2 has just two elemets ad, ad <, ξ(i) η(i) is equivalet to sayig that if ξ(i) =, the η(i) =. The power-algebra 2 () : is i fact a very familiar oe: it is isomorphic to the power-set algebra () 2. Let us specify the isomorphism, i fact, i both directios: f () 2 :: g for X ε (), f(x) is the fuctio {, } for which if u ε X f(x)(u) = if u X ad for ay fuctio ξ ε {, }, g(ξ) is the subset of give as g(ξ) = {uε ξ(u) = }. 28

These mappigs f ad g respect the orders, ad they are iverses of each other; these facts are easily checked (exercises). other words, f is a isomorphism f: () 2. Note that, for X (), f(x) is what we call the characteristic fuctio of X. This represetatio of power-set algebras provides a direct proof that ay idetity that holds i the 2-elemet algebra 2 holds i ay power-set algebra, ad hece, i ay Boolea algebra whatsoever. The reaso is that, as it is see by ispectio, a idetity that holds i a algebra holds also i a power of it; also remember that we said i the previous sectio that all idetities i set-algebras hold i all Boolea algebras. See i the light of the last statemet, the iitio of "Boolea algebra" is just a summary of what idetities hold i the algebra of the two truth-values! Note carefully that, if we take this "iitio" of "Boolea algebra" as basic, it is ot obvious -- although ow kow by us -- that the Boolea laws are all cosequeces of the few that we earlier explicitly specified as the Boolea laws. Whe people talk about "Boolea fuctios", they mea fuctios of possibly several variables, all of which rage over the set {, }, ad whose values are also i {, }. (Very ofte (specially i computer sciece), we write for, ad 0 for ; but we will stick to the, -otatio.) f the fuctio f i questio has variables P,..., P [we write P for the variables, sice they are see as "propositios"; i fact, they simply take the values ad ], the f is a fuctio f : {, } {, } ; for ay P,..., P {, }, f(p,..., P ) is agai a elemet of {, }. (2 ) With the fixed, ote that the umber of distict -variable Boolea fuctios is 2. A Boolea fuctio f ca be represeted by a truth-table listig all possible systems of argumet-values, ad the correspodig fuctio-values. For istace, whe =3, the 29

truth-table might be like this (we write P, Q, R for P, P, P ): 2 3 P Q R f(p, Q, R) (3) Now, regard the set {, } as the uderlyig set of 2. The the -variable Boolea fuctios form the uderlyig set of the power-algebra 2, where ={, }. other words, for a fixed, the -variable Boolea fuctios themselves form a Boolea algebra. Let us write P to abbreviate P,..., P. The Boolea operatios o the power-algebra ({, 2 } ), the Boolea algebra of -variable Boolea fuctios, is ied compoetwise: (f g)(p) = f(p) g(p), ad similarly for the other operatios. ({, We write, more simply, BF[] for 2 } ), the Boolea algebra of -variable Boolea fuctios. The most atural examples for Boolea fuctios are the Boolea polyomials: these are the fuctios that ca be writte dow by repeated use of the basic Boolea operatios. For istace, whe =3, the followig are Boolea polyomials : ( (((P R) (Q R)) )) R (R Q). 30

The fact that the last does ot cotai the variable P does ot make it illegitimate as a three-variable polyomial: this oe simply does ot deped o P. Boolea polyomials should be see as aalogs to ordiary (algebraic) polyomials. The differeces are that, Boolea polyomials are fuctios o the truth-values, istead of umbers; ad the basic Boolea operatios figure i them, istead of the ordiary arithmetical operatios +,, etc. A Boolea polyomial is (or, deotes) a Boolea fuctio: substitutig iite truth-values for the variables, ad usig the basic Boolea operatios o truth-values, we get a iite value for the polyomial. For istace, here are all the values of the first of the two listed polyomials: P Q R ( (((P R) (Q R)) )) R Calculatig the value, for istace i the third lie, looks like this: ( (((P R) (Q R)) )) R. 7 2 5 4 3 6 8 this, first, we wrote the value of every variable uder each occurrece of the variable, icludig the value uder the costat i the polyomial; ext, we proceeded to calculate the values of the part-expressios from the iside out; there are as may as there are coectives, occurreces of,, ad -. The umbers idicate the order i which we go through all costituet expressios util we reach the total expressio i stage 8 ; the fial result is that above 8,. There is a slight ambiguity i the meaig of the expressio "Boolea polyomial". We 3

sometimes mea the formal expressio itself, rather tha the fuctio deoted by it. However, the official meaig should remai the fuctio itself; whe oe wats to refer to the formal otio, oe should say "formal polyomial". This remark is relevat i the light of the fact that two formally differet Boolea polyomials may be equal to each other. the first of the last two examples, the values i the value-colum coicide with the values of R ; the polyomial coicides (deotes the same fuctio as) the simple polyomial ("moomial") R. Of course, this pheomeo is familiar i the case of ordiary (algebraic) polyomials. E.g, 2 2 the two formal polyomial expressios (x-y)(x+y) ad x -y deote the same polyomial. We ca see this by usig the basic algebraic laws. The situatio with Boolea polyomials is similar. stead of goig through the tables of values (which ted to be very large eve with a moderate umber of variables), we may use the Boolea idetities to establish that two formal Boolea polyomials are the same polyomial. For istace, i the example at had: ( (((P R) (Q R)) )) R = ( (((P Q) R) )) R (distributive law) = ( ((P Q) R) ) R (uit law) = ( (P Q) R) ) R (De Morga) = ( (P Q) R) ) R (double egatio) = R (commutative law, absorptio) fact, what we said about all idetities of Boolea algebras beig true i 2 meas that every time two formal Boolea polyomials are the same fuctio o the truthc-values, this fact ca be deduced by usig the Boolea idetities aloe. Note that the Boolea operatios o the Boolea polyomials as Boolea fuctios are performed by formally applyig the operatio i questio. For istace, if the three variable polyomials metioed above are briefly called f ad g, the f g is (( (((P R) (Q R)) )) R ) (R Q). What this meas is that 32

the Boolea polyomials form a subalgebra of BF[]. Cosider ow the variables P, P 2,... P themselves as such Boolea fuctios, i fact, Boolea polyomials. P i is the fuctio that satisfies P (ε,..., ε,..., ε ) = ε ; i i i here, each ε,, ε is a truth-value, or. (This is similar as whe the sigle variable say y is regarded as oe of the ordiary polyomials i variables x, y, z.) We clearly have that the particular elemets P i polyomials. of BF[] geerate the Boolea subalgebra of Boolea Now, claim that the Boolea fuctios P, P 2,... P are idepedet i the Boolea algebra of all -elemet Boolea fuctios. What we have to see is that, for ay distributio of the values ε,, ε i {, }, the meet-expressio ε P ε P... ε P 2 2 is differet from i the Boolea algebra of Boolea fuctios; here, εp meas P if ε =, ad -P if ε =. But if we give the value ε to P, we get that ε P takes i i i i the value : (P)(P= ) = ; (-P)(P= ) = ; thus, (ε P ε P... ε P )(P =ε,..., P =ε ) =... =. 2 2 Sice the fuctio takes the value the -fuctio, which is costat. at at least oe system of argumets, the fuctio is ot Remember that a idepedet family of elemets geerate a Boolea subalgebra of size (2 ) (2 2. t follows that there are exactly 2 ) distict Boolea polyomials. But the 33

(2 whole algebra BF[] is of the same size, 2 ). t follows that all Boolea fuctios are (represeted by) Boolea polyomials. fact, all Boolea fuctios ca be writte as jois of complete meet expressios i terms of the variables. The expressios P ad P (or, P ) are also called literals. The expressio of a Boolea i i i fuctio as a joi of distict complete meets of literals is called the disjuctive ormal form (df) of the fuctio. We have that every fuctio has a uique df: the complete meets of literals appearig i the df are determied as those atoms of BF[] that are below the give fuctio. Applyig duality, oe also gets a cojuctive ormal form. The last-stated fact has cocerig the existece of the df also has a direct proof, together with a simple method of producig the df of a fuctio, based o the truth-table of the fuctio. The result is this. Cosider the truth-table of the -variable Boolea fuctio f. Select those lies i the table i which the value of f is case are, 2,..., k. ; say the lies i which this is the Each lie j ( j=,..., k ) has a certai system of the values of the variables. Let us deote the value of P i lie i j by ε ji (ad ot ε ij, because j deotes the k "row-umber", i the "colum-umber"). The df of f is ε ji P i ; or i more j=i= detail, ε P ε 2 P 2... ε P ε 2 P ε 22 P 2... ε 2 P... ε P ε P... ε P. k k2 2 k Here we used the covetio applied before: P is P, P is P. To give a example, cosider the fuctio whose truth-table is (3). There are five lies where 34

the value is. The df is PQR PQR PQR PQR PQR. The proof that this is a correct procedure has to show that the df costructed assumes the same values at each system of values for the variables. Now, the df is if ad oly if oe of its disjucts is. But each disjuct correspods to a lie, say j, where the value of f is. The correspodig disjuct is ε P ε P... ε P, (4) j j2 2 j ad this will take the value iff each cojuct ε P takes the value ji i, which is the case if ad oly if P i takes the value ε ji. This meas that the uique system of truth-values where the value of (4) is is precisely the oe i lie j! We have cocluded that the df takes the value exactly i the lies j, for j=,..., k, which are also exactly the lies where f is. This proves that the df ad f are idetical fuctios. The df of a Boolea fuctio may be extremely large already i case of a moderate umber of variables. The problem of Boolea realizatio is to fid a possibly small formal Boolea polyomial represetig a give Boolea fuctio. 35