# Logic and Boolean Algebra

Post on 10-Feb-2018

213 views

Embed Size (px)

TRANSCRIPT

<ul><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 1/141</p><p>Barron's Educational Sertes, Inc. $6.95</p><p>LOGCANDI " hu+dities and in the social and management sciences. " 1 *</p><p>IPresupposesonly somehigh school</p><p>algebra0</p><p>Providesslow</p><p>cultivationof manipulative</p><p>skil ls</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 2/141</p><p>LGE</p><p>WOODBURY, NEW YORK</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 3/141</p><p>All rights reserved.N o part o f this book may be reproducedin any form. by photos tat, microfilm, xerography, o rany other m eans, or incorporated into any informationretrieval system, electronic o r mechanical, withoutthe written perm ission of the copyright owner.Al l inquiries should beaddressed to:Barron's Edu cation al Series, Inc.1 I3 Crossw ays Park DriveWoo dbury, New York 11797Librory of Congress Catalog No. 75-1006Intern ationa l Standar d Book N o. 0-81 20-0537-6t i z ~ ~j-e~wrSJslaLcvitz, Ka thleen .Logic a n d Boolean algebra.Bibliography:Includes tndex.1. Logic, Symbolic an d math ema tical. 2, Algebra,Boolean. I. Levitz, Hilbert, joint au tho r. 11 T~ tl e.-.,.. " -.., - - *</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 4/141</p><p>T O O U R M E N T O R S</p><p>JOE L. MOTTKURT SCHUTTE</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 5/141</p><p>Contents</p><p>PREFACE viiINTRODUCTION viii1 sentence Composition 11.1 Th e Basic io g ic al Operations 11.2 T ru th Values 21.3 Alternative Translations 71.4 Converses and Contrapositives 81.5 Logic Fo rm s and Truth Tab les 91.6 Tautologies, Co ntrad iction s, and Con tingencies 141.7 Sen tential Inconsistency 151.8 Constructing Logic Fo rm s from Tru th Tables 162 Algebra of Logic 212.1 Logical Equivalence 212.2 Basic Equivalences 232.3 Algeb raic M anip ulatio n 242.4 Conjunctive No rma l Form 292.5 Reduction to Conjunctive No rma l Form 302.6 Uses of Conjunctive No rma l Form 332.7 Disjunctive No rma l Form 352.8 Uses 6f Disjunctive N or m al Fo rm 382.9 Interdependence o f the Basic Logical Opera tions 403 Analysis of Inferences 453.1 Sententia l Validity 453.2 Basic Inferences 493.3 Checking Sentential Validity of Inferences by R e</p><p>peated Use of Previously Proven Inferences 504 Switching C h i t s 534.1 Representing Switching Circuits by Logic Fo rm s 534.2 Simplifying Switching Circu its 58</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 6/141</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 7/141</p><p>Preface</p><p>T h i s book was intended for s tudents who plan to s tudy in the hu-manities and in the social and management sciences. Students in-terested in the physical and natural sciences, however, might alsofind its study rewarding. All tha t is presupposed is som e high schoolalgebra. Th e au tho rs strongly urge tha t th e topics be studied in theorder in which they appear an d th at no topics be skipped.</p><p>In recent years there has been considerable divergence of opinionamong mathematics teachers as to the degree of abstraction, rigor,formality, and generality that is appropriate for elementary courses.We believe tha t th e trend lately h as been t o go too far in these direc-tions. Quite naturally, this book reflects our views on this question.Although the subject matter is considered from a modern point ofview, we have consciously tried to emulate the informal and lucidstyle of the better writers of a generation ago. Manipulative skillsare cultivated slowly, and the progression from the concrete t o th eabstract is very gradu al.</p><p>We wish to extend ou r than ks to ou r typist Susan Schreck a nd toMatthew M arlin and Ann e Park , w ho were students in a course fromwhich this book evolved. We also wish to thank the editorial con-sulta nts of Barron's fo r their helpful suggestions.</p><p>Tallahassee,Florida</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 8/141</p><p>Introduction</p><p>L o g i c is concerned with reasoning. Its central concern is to dis-tinguish good argum ents from poor ones. On e of the first persons t oset down some rules of reasoning was A ristotle, the esteemed philoso-pher of ancient Greece. For almost two thousand years logic re-mained basically as Aristotle had left it. Studen ts were required t omemorize and recite his rules, a nd generally they accepted these ruleson his autho rity.</p><p>At th e end of the eighteenth century Ka nt, one of the great philoso-phers of modern times, expressed the opinion that logic was a com-pleted subject. Just fifty years later, however, new insights a nd resultson logic started to come forth as a result of the investigations ofGeo rge Boole and others. In his work, Boole employed symbolism ina manner suggestive of the symbolic manipulations in algebra. Sincethen, logic and mathematics ha ve interacted to the po int tha t it nolonger seem s possible to draw a bou nda ry line between the two.</p><p>Du ring the last forty years som e deep and astounding results abou tlogic have been discovered by the logician Kurt GBdel and others.Unfortunately, these results are too advanced t o be presented in thisbook. We hope that what you learn here will stimulate you to studythese exciting results later.</p><p>Finally, we must tell you th at complete agreement does not yetexist o n the question of w hat constitutes correct reasoning. Even inmathematics, where logic plays a fundamental role, some thoughtfulpeople disagree on the correctness of certain types of argum entation .Perhaps someday, someone will settle these disagreements once a ndfor all.</p><p>v i i i</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 9/141</p><p>Sentence Composition1.1The Basic Logical Operations</p><p>Compound sentences are often formed from simpler sentences bymeans of the five basic logical operations. These operations and theirsymb ols are:</p><p>conjunction Adisjunction vnegation 1implication -,bi-implication -</p><p>The symbols ar e usually read as follows:</p><p>I 1 II not I</p><p>S Y M B O LA</p><p>I -, 11 if ... hen. . . I</p><p>TRANSLATIONand</p><p>I - 11 if and only if INote t ha t a good way to keep from confusing the symbols A and v is t oremember that A look s like the first letter of the w ord "AND."</p><p>If th e letters A and B denote particular sentences, you can use thelogical opera tions t o form these com poun d sentences:</p><p>A A B , read A a n d BA v B, read A or Bi , read it is not the case that AA -+ B, read if Athen BA - B, read A i f a n d o n l y i f B</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 10/141</p><p>2 SENTENCE COMPOSITION</p><p>Examples. Let A be the sentence: "Snow is white."Let B be the sentence: "Grass is green."Then A A B is the sen tence: "Snow is white and grass isgreen."Let A be the sentence: "Hum pty Dum pty is an egg."Then 1 A is the sentence: "It is no t the case that</p><p>Humpty Dum pty is an egg."Let A be: "Jack is a boy."Let B be: "Jill is a girl."Then A -+ B is: "If Jack is a boy, then Jill is a girl."Let A be: "Birds By."Let B be: "Bees sting."Let C be: "Bells ring."Then -IA -, B v C) is: "If it is not the case that birds</p><p>fly, then bees sting o r bells ring."No te tha t in the last example, the "not" sign applies only to the sen-tence A. If we had wanted to negate the entire sentence A -+ (B v C),we would have enclosed it in parentheses and written 1 A- B v C ) ] .Then it would read, "It is no t the case that if birds fly, then bees stingor bells ring."A property of declarative sentences is that they are true or false, butnot both. If a sentence is true, it has truth value t. If it is false, it hastruth value f. You can com pute the truth value of a compound sentencebuilt from simpler sentences and logical operations if you know thetruth values of the simpler sentences. This can be done by means oftables. The table for the con junction operation is given below. Here ishow to read it. On a given row, the extreme right-hand entry showsthe truth value th at the com pound sentence A A B should have if thesentencesA and B have the truth values entered for them in that row.</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 11/141</p><p>1.2 TRUTH VALUES 3TABLE FOR A ("AND")</p><p>Examples. Use the table jus t g iven t o f ind th e t ruth va lues of thesecom pou nd sentences:</p><p>a ) Gian ts a re small and New York i s large.b) New York i s la rge an d g ian ts a re smal l.c ) America is la rge and Russia is la rge .</p><p>ANSWERS: a ) Firs t label each par t of t he sentence with i ts owntru th value.</p><p>f tT_-A----7&Glants a r e smal l] A [New Y ork is large].N ow look in the table t o see which ro w h as the va luesf , t ( in tha t o rder) entered in th e two left -hand col-umns . This tu rns ou t to be the th ird row (be low theheadings). Looking to th e extreme r ight o f tha t row,you will f ind that the entire sentence has the truthvalue f.</p><p>b) Labeling each pa rt with i ts truth value, we get</p><p>No w look in the tab le t o see which row has the va luest , f (in tha t order) e ntered in th e tw o left -hand col-umns . This tu rns ou t t o be the second row. Loo kingt o the extreme r ight of tha t row, you will f ind tha tthe en t i r e sentence has the t ru th va lue f.</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 12/141</p><p>4 SENTENCE COMPOSITION</p><p>C ) First label the parts:t A[Am erica is largJ A [ R u s s ~ as large].The first row of the table indicates that the entire</p><p>sentence has the trut h value t.We m ake the tables for the other four logical opera tions in a similarway:</p><p>TABLE FOR TABLE FORv ( 4 6 0 ~ ) -I ("NOT")</p><p>TABLE FOR -, TABLE FOR -("IF . THEN . ") ("IF ANDONLY IF ")</p><p>According to the table for v, the disjunction A v B is a true sen-tence if A is true, if B is true, or if both A an d B are true. Unfor-tunately, in ordin ary conversation people d o not alw ays use "or" thisway. However, in mathematics and science (and in this book), thesentence A v B is considered true even in the case where A and B areboth true.</p><p>The implication operatio n presents a similar problem. Q uite often"if A, then B" indicates a cause-and-effect relationship as in the sen-tence:</p><p>If it rains, thegame will have to bepostponed.M athematicians and scientists, however, d o not require such a cause-and-effect relationship in affirming the truth of A- , and our</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 13/141</p><p>1.2 TRUTH VALUES 5</p><p>table has been set up in acco rdan ce with their t ime-hono red conven-tions.Examples. Use the ta b b s just g iven t o com pute the t ru t h va lues of</p><p>the f o l l o & g sen tences:a ) A W e qu al s six , then th re e e qu al s th re e.b) (5 = 7) v (6 = 8).c ) I t is not the case that three equa ls three.d ) [(2 = 4) v ( 3 = 3)] - (5 = 0) A (6 = I ) ] .</p><p>ANSWERS: First label the par ts with their t rut h values:f t-&) [ tw o equals s ix]+ [ three equals three]The th i rd row of the table for + hows tha t the</p><p>entire sentence gets the t r uth value t .</p><p>The four th row of the tab le fo r v shows t ha t t he e n -t i re sentence gets the t ru th value f .</p><p>iihree equals three]Th e f irst row of th e table for 1 shows tha t t he e n -tire sentence gets the tru th value f.</p><p>d ) This on e will involve the use of three tables becausei t contains three logical ope rat ion symbols.First label the elementary parts:</p><p>From the th i rd row of the t ab le fo r v you can seetha t the pa r t t o the le ft o f the a r row ge ts the t ru thva lue t . From the four th row of the t ab le fo r A , you</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 14/141</p><p>6 SENTENCE COMPOSITION</p><p>can see that the part to the right of the arrow getsthe truth value f. Now labeling the p arts to the leftan d right of the arrow w ith the truth values just com -puted for them, you have</p><p>f\From the second row of the table for + you can</p><p>see th at the entire sentence should hav e the truthvalue f.</p><p>Exercises 1.21. Let A deno te "Geeks are foobles" and let B denote "Dobb ies ar etootles." W rite the English sentences corresponding to t he following:</p><p>2. Let A deno te "Linus is a dog," let B den ote "Linus barks," an d letC den ote "Linus has four legs." W rite each of th e following sentencesin symbolic form:</p><p>(a) Linus is a dog a nd Linus barks.(b) Linus is a dog if and only if Linus barks.(c ) If it is not the case that Linus is a dog , then Linus barks.(d) If Linus is a d og, then (Linus ba rks o r Linus has four legs).(e) If (Linus b arks and Linus has four legs), then Linus is a dog.( f ) (I t is no t the case that Linus barks) if an d only if Linus is a do g.(g) It is not th e case that (L inus is a dog if and only if Linus barks).</p><p>3. Let A d enote " 1 + 1 = 2" an d let B denote "2 - 2 = 2." Use thetables to find the t ru th values of th e following sentences:(a) A v B ( h ) B-.A -(b) A v 1B ( i ) 1A + ( ~ B A )(c) 1A v B ( j ) i - B(d) 1A A B ( k ) 1 B - - t A(e) A A -I B ( 1 ) ( 1 A v B) ~ ( A A)( f ) 1 A - B (m ) (B v A) v i (B v A)(g) l A - - 1 B ( n ) ( B + A ) - ( A * B)</p><p>t . at I</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 15/141</p><p>1.3 ALTERNATIVE TRANSLATIONS 74. Let A an d B be sentences. Assuming that B has truth value f, usethe tables to find those truth values for A which make the followingsentences true,(a ) 5 -+A(b) A A B(c) 1 A - B</p><p>(d) (A v B) + B(e ) (1 B - A)- A1.3Alternative Translations</p><p>In English there ar e many w ays of saying the sam e thing. He re is a listof some of the alternative ways which can be used to translate thelogical ope ration symbols.</p><p>A - B</p><p>A and B Not only A but BA but B A although BBoth A and BAorB Either A or BA or B or both A and/or B[found in legal</p><p>documents1A doesn't holdIt i s not thecase that AIf A, then B. A s a sufficientcondition for BA only if B B is a necessarycondition for AA mplies BB providedthat AA if and onlyif BA exactlywhen B</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 16/141</p><p>8 SENTENCE COMPOSITIONExercises 1.3</p><p>1. Let A be: peter is a cana ry.Let B be: Joe is a parakeet.Let C be: Peter sing s.Let D be: Jo e sings.Tra nslate the following into sym bols.</p><p>(a ) Jo e is a parakeet an d Peter is a cana ry. =- 3-(b) Although Joe does not sing, Peter sings.(c ) Peter sings if and only if Joe does not sing.(d) Either Peter is a canary o r Joe is a parak eet.(e) Peter sings only if Jo e sings.</p><p>2. Let M be: Mickey is a rod ent .Let J be: Jerry is a rodent.Let T be: To m is a cat.Tran slate the following into sym bols.</p><p>(a ) Although Mickey is a rodent, Jerry is a rodent also.(b) Mickey a nd Jerry are rodents, but T om is a cat.(c ) If either Mickey or Jerry are rodents, then Tom is a cat.(d) Jerry is a ro dent provided th at Mickey is.(e) Either Mickey isn't a rode nt or Jerry is a roden t.(f ) Jer ry is a ro den t only if Mickey is.(g) To m is a cat only if Jerry isn't a rode nt.</p><p>@onverses and Contrapositives</p><p>Suppose you a re given an implication A + B. Two related implica-tions a re given special names.</p><p>B -+ A is called the converse of A + B..1 B 4 i is called th e contrapositive of A + B.</p><p>Th e tru th value of a n im plication an d its converse may or m ay notagree. Below ar e given som e examples t o show this. Later you w ill seethat an implication and its contrapositive always have the same truthvalue.</p></li><li><p>7/22/2019 Logic and Boolean Algebra</p><p> 17/141</p><p>1.5 LOGIC FORMS 9</p><p>Examples. Let A be: 1 = 2Let B be: 2 is an even num ber.Then A -, B has tr...</p></li></ul>

Recommended

View more >