logic and boolean algebra

Download Logic and Boolean Algebra

Post on 10-Feb-2018

215 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • 7/22/2019 Logic and Boolean Algebra

    1/141

    Barron's Educational Sertes, Inc. $6.95

    LOGCANDI " hu+dities and in the social and management sciences. " 1 *

    IPresupposesonly somehigh school

    algebra0

    Providesslow

    cultivationof manipulative

    skil ls

  • 7/22/2019 Logic and Boolean Algebra

    2/141

    LGE

    WOODBURY, NEW YORK

  • 7/22/2019 Logic and Boolean Algebra

    3/141

    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.-.,.. " -.., - - *

  • 7/22/2019 Logic and Boolean Algebra

    4/141

    T O O U R M E N T O R S

    JOE L. MOTTKURT SCHUTTE

  • 7/22/2019 Logic and Boolean Algebra

    5/141

    Contents

    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

    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

  • 7/22/2019 Logic and Boolean Algebra

    6/141

  • 7/22/2019 Logic and Boolean Algebra

    7/141

    Preface

    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.

    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.

    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.

    Tallahassee,Florida

  • 7/22/2019 Logic and Boolean Algebra

    8/141

    Introduction

    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.

    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.

    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.

    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.

    v i i i

  • 7/22/2019 Logic and Boolean Algebra

    9/141

    Sentence Composition1.1The Basic Logical Operations

    Compound sentences are often formed from simpler sentences bymeans of the five basic logical operations. These operations and theirsymb ols are:

    conjunction Adisjunction vnegation 1implication -,bi-implication -

    The symbols ar e usually read as follows:

    I 1 II not I

    S Y M B O LA

    I -, 11 if ... hen. . . I

    TRANSLATIONand

    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."

    If th e letters A and B denote particular sentences, you can use thelogical opera tions t o form these com poun d sentences:

    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

  • 7/22/2019 Logic and Boolean Algebra

    10/141

    2 SENTENCE COMPOSITION

    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

    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

    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.

  • 7/22/2019 Logic and Boolean Algebra

    11/141

    1.2 TRUTH VALUES 3TABLE FOR A ("AND")

    Examples. Use the table jus t g iven t o f ind th e t ruth va lues of thesecom pou nd sentences:

    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 .

    ANSWERS: a ) Firs t label each par t of t he sentence with i ts owntru th value.

    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.

    b) Labeling each pa rt with i ts truth value, we get

    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.

  • 7/22/2019 Logic and Boolean Algebra

    12/141

    4 SENTENCE COMPOSITION

    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

    sentence has the trut h value t.We m ake the tables for the other four logical opera tions in a similarway:

    TABLE FOR TABLE FORv ( 4 6 0 ~ ) -I ("NOT")

    TABLE FOR -, TABLE FOR -("IF . THEN . ") ("IF ANDONLY IF ")

    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 a