You are on page 1of 30
«ti DISCRETE MATHEMATICS UNIT-1 Propositions Chapter Four Logic and Propositional Calculus 44 INTRODUCTION Many proofs in mathematics and many algorithms in computer science use logical expressions such as “IFpTHEN g” or “IF p, AND p;, THEN g, OR q,” Itis therefore necessary to know the cases in which these expressions are either ‘TRUE or FALSE: what we refer to as the truth values of such expressions. We discuss these issues in this section. = We also investigate the truth value of quantified statements, which are statements wich use the logical quantifiers “for every” and “there exists”. az PROPOSITIONS AND COMPOUND PROPOSITIONS A proposition (r statement) i a declarative sentenee which isgther te o alse, but not both. Consider, fr example, the following eight sentences: Cie Tet (i) Paris is in France. (i) 141=2. (ii) 2+2=3. (iv) London is in Denmark. ) 9<6 (vi) x=2 is solution of 7 = 4, (vii) Where are you going? (Vili) Do your homework. All f them are propositions except (vii) and (vi). Moreover, (), (i), and (vi) ae true, whereas (i, (0), and (V) are false, Re Discrete Mathematics tons composed of subpropositions and vari, ind ite, that i “8 Connectives discus: Compo" ans composi ropositions are called compound Propositions. A Proposition ig said ea yey pres ‘composite r own into simpler propositions, that is, if it is not composite. cpsoneTt broken sanoequen cannot DE ry mee ail avi sare ue" js a compound proposition with subpropositions “Roses “| s rR are blue. ngs . y are red” and “Violets studies every night” is a compound proposition with subpropositions : t (GP studi J 7 9” FA sintligent” and “John studies every night S ropositions (i) through (vi) are all primitive propositions; they cannot be broken iv a ple propositions. cs ah BASICLOGICAL OPERATIONS se section discusses the three basic logical operations of conjunction, disjunction, and negation which co. bes sod respectively, tothe English words “and”, “or”, and “not ! 7PEP DeMorgan’s laws Gta) 3@VQ)=PAg (10b) 3@AQ)=E=pVv—y 4” CONDITIONAL AND BICONDITIONAL STATEMENTS Mary statements, particularly in mathematics, are of the form “if p then g”. Such statements are calla tional stxements and are denoted by p>q Tie comdtionl p — gis frequently read “p implies q” or “p only if q”. = Statement is of the form “p if and only if q”. Such statements are called biconiit Statens and are denoted by peg The i Tet fD-¢ andp gare defined by the tables in Fig. 4.7. Observe that: inh, when pis fle se OY When the first part p is true and the second part q is false. A? ® The Boonton tional p —> g is true regardless of the truth value of q. The tah table of the og ne MERE and g have the same truth values and false ote Paes? identi Ve a! appears in Fig. 4.8. Observe that the truth a Pq. = be 0p v6 thats, ©Y are both false only in the second case. Ac P>G=Apvq ’ a2 24 « thr] v rye] or rhe Patan rie] ot apva moe Meee Fig. 4.7 Fig 48 In other words, the conditional statement “If p then q” is logically equivalent to the statement “Not p oF 4g’ which only involves the connectives v and — language. regard p> gas an abbreviation for an oft-recurring cactus tome saan a 4&9 ARGUMENTS ‘An argument is an assertion that a given set of propositions P,, P;, .» Py called premises, yields (has consequence) another proposition Q, called the conclusion, Such an argument is enoted by . Py Ppro Pat Q ‘The notion of a “logical argument” or “valid argument” is formalized as follows: Definition 4.4: An argument P,, P,,.. P, | Q is said to be valid if @ is true whenever all the premises P,, Pry oop Py are true. ‘An argument which is not valid is called a fallacy. (a) The following argument is valid: . p.p > +4 (Law of Detachment) The proof of this rule follows from the truth table in Fig. 4.9. Specifically, p and p — q are true simultaneously only in Case (row) 1, and in this case q is true. The following argument is a fallacy: PIUdEP (b) For p > q and q are both true in Case (row) 3 in the truth table in Fig. 4.9, but in this case p is false. a propositions Py, Pp, =» Py are true simultaneously if and only if the proposition p Eee Tae the arguement Pi, Pr P, + @ is valid if and only if Q is true whenever p'** Pei eee oc eeu athe proposition (Py A Py A> 4 Py) —> Q is & tmutology” We say gh P, + Q is valid if and only if the proposition (p AR Theorem 4.3: The argument Pj, Pz --» AP.) > Gis a tautology. ‘We apply this theorem in the next example. A fundamental principle of logical reasoning states: | “Tf p implies q and q implies r, then p implies 7.” | That is, the following argument is valid: | p7>aqg>rkp 8 (Law of Syllogism) This fact is verified by the truth table in Fig. 4.10 which shows that the following proposition isa | mes Ie>ag0@72N20>7 Equivalently, the argument is valid since the premises p —> g and q —> rare true simultaneously only in Cases (rows) 1, 5, 7 and 8, and in these cases the conclusion p —> ris also true. (Obsent that the truth table required 2° = 8 tines since there are three variables p, q and r.) pie r[@ 7 9 « @© > ® > © 3 T T T T T Ry T T T T T T T T T T F T T z F T F F T T FI] F T F T 1 |cF F F F t.| x) t it T F F T F F F F T F T T rl F . rir} rf] rf] tr] tr] rf] rt} rf rf} rf] er] ty] t F T F F T T F T F F T F T F F F T F T F T F T T T F a | f rer] rel r{t}] ef] rt} el] tt] er] rt] rite ‘Seep rf2?t:r!f3f3f2faf7«fif2!'! Fig. 4.10 a ze that We now apply the above theory to arguments involving specific statements. We emphasizé ee validity of an argument does not depend upon the truth values nor the content of the seam int illustra’ ing in the argument, but upon the particular form of the argument. This is i ‘appearit Consider the following argument: $,: If a man is a bachelor, he is unhappy Sz If a man is unhappy, he dies young. jachelors die young. Here the statement S below the line denotes th $, and 5, above the line denote the the argument is of the form conclusion of the argument, and the statements premises. We claim that the argument 5,, 5, + Sis valid. For P>q.q9>r-por where p is “He is a bachelor”, q is “He is unhappy” and ris “He dies young”; and by Example 4.6 this argument (Law of Syllogism) is valid, 440 LOGICAL IMPLICATION A proposition P(p, q, ...) is said to logically imply a proposition Op, gq, ...), written Pea. ifQp, q, .) is true whenever P(p, q, .. We claim that p logically implies p v q. For that consider the truth table in Fig. 4.11. Observe that p is true in Cases (rows) 1 and 2, and in these cases p v q is also true. Thus p => pv q. Now if Q(p, q, ...) is true whenever P(p, q, ...) is true, then the argument PCD, G++») + Q(p, g, »-+) {s valid; and conversely. Furthermore, the argument P |- Q is valid ifand only if the conditional statement P Q is always true, i.e., 4 tautology. We state this result formally. Imo |" iy do aS 4 — = " ye werst of art “implien” inte oe We note that some fogekane atl Ian hai va ie He dintinct conceP!® an i implies", and wo they efistinguiah bet rave there: intimately related as seen in the a QUANTIFIERS ve of condition) defined \A11, PROPOSITIONAL FUNCTIONS, n xontene function on A isan | Let A be a piven set. A propositional {or an ope’ expression pe) ae nae A That It PO) a a sta : blo.x, The set A the truth ser of pe). 1, 3 1¥ pix)} rm of an equation oF inequality which has the property that ay is treo false fOr en value) whenever any Based a eeuatitted forte varia fd for which, p(a) is true is called tl the set J, ofall elernents o «A, p(a) in true) oF tho condition p(x) has the fo 1" Frequently, when 4 is some set of nuribers involving the variable x. Find the truth set of each propositional function p(x) defined on the set N of positive integers. (a) Let p(x) be “x +2>7% Its truth set is fcxe Nx42>7) = (6, 7, 8} consisting of all integers greater than 5, (b) Let p(x) be “x +5 <3" Its truth set is fcxeNxt5<3}2@ the em; Rprerereter Srecoallelcaionatiy {exe Nx+5>1}aN Thus Pls i tve fo vey aamentin tif) is a proposit aset A then p(x) could be itional function defined on. nox € A. The next two subsections discuss quanti mee tifiers related to DE tstd: Consider the expression YEP) “tan if Contrapositive Let R be the proposition that says. “If I study hard, 1 shall succeed”. Here p is ‘I study hard and q is ‘I shall succeed’. Now is the proposition p —+ q. Now the proposition g —+ pis its converse and the proposition ~g — ~pis called its contrapositive. ~ is ‘If Study hard, I shall succeed’ ate 2 ~ pis ‘If succeed, I study hard? '% — ~p is ‘If | don’t succeed, Idon’t study hard” Exempre ae ‘dood BS ‘IF it rains, then I get wet’ for this proposition, ‘not rain, I won't get wet. Converse: IfI get wet, then it rains. itive: If don’t get wet, then it does not rain. consaPiet pq be “If tell the truth, then gold exists? Now for this proposition p —* q, its Hwerse: ~p —* ~9: ‘If I do not tell the truth, then gold does not exist” Converse: q — p: ‘If gold exists, then I tell the truth’, conrpositve ~~ ~p If gold doesnot exist, then I don’ tel the tt Leta be any flower. Now the statement ‘All flowers are blue” can be wrifiéa as “F . (a), is called predicate that states the property that the subject of statement (here abject a thats fe fave, Since p(a) involves one variable, it is a unary predicate. The set of all values that x can have are called as universe of discourse. For the current example, universe of discourse is a set of al flowers. 'A predicate with two variables is called a binary predicate and a predicate with n variables is a nary predicate. Find the dnf of (~p 1) A (per q) The truth table for the same is as: Table 4.2 Plalr|~p|ep sn |@weg| Ceo DARD T/T/T| F T T T T\T|F/ F T T T T/FIT|F T F F T/F/F] F T F F F/T|T| T T F F F|T/F| T F F F F/F/T| T T T T FLFIJF[T F T F Here the rows of p, q, rin which has truth value T appears in the last column. pA~gAn Hence the required dnf is (p Ag Ar) v (p Ag A~r) v (~ J PROPOSITIONS AND LOGICAL OPERATIONS, 47/Lstp be “Its cold” and let q be “It is raining”. Give a simple verbal sentence which describes each H csive following statements: (a)p; (b)pag; ()pvq (d)qv—p. In each case, translate ~, v, and ~ to read “and”, “‘o then simplify the English sentence, (@ Itisnotcold. («> (©) Itis cold or it is raining, . 1”, and “It is false that” or “not”, respectively, and (b) Itis cold and raining. '»> (4) Itis raining or it is not cold. Letp be “Erik reads Newsweek”, let q be “Erik reads The New Yorker”, and let be “Erik reads Time”. ‘Write each of the following in symbolic form: ~ . (@) Erik reads Newsweek or The New Yorker, but not Time. (b) Erik reads Newsweek and The New Yorker, or he does not read Newsweek and Time. (©) Itisnot true that Erik reads Newsweek but not Time.” . (@ tis not true that Erik reads Time or The New Yorker but not Newsweek. Use v for “or”, « for “and” (or, its logical equivalent, “but"), and — for “not” (negation). @ @vganr 0) @Agvawan; © 7@Asn; @ ICV 4) asp). TRUTH VALUES AND TRUTH TABLES 49/ Determine te truth value ofeach oft following statement 3=9.6 (&) 3+ Le (d) 3+ The statement “p and q” is true only when both substatements are true, Thus: (a) false; (b) true; (© false; (4) true, PAG: Rives both methods for constructing the truth tale, Vip lal-riapae pl al =| ya 4 Tit] Fl e ot[tlele lets T)F|F F T)F) Fl Fl ele FiT|T T Fit) tl t]r|r FRI T F FL F/T) Fle} ep Step 2) 34 (@) Method 1 (6) Method 2 ™— 4.8 Verify that the proposition p v —(p a q) is tautology. Construct the truth table of p v — (p A q) as shown in Fig. 4.13. Since the truth v,, PY -—(p 4g) isT for all values of p and g, the proposition is a tautolgy. x yaad) aaa]? Fig. 4.13 46 Show that the propositions - (p ~ q) and +p vq are logically equivalent. Construct the truth table for = (p -.q) and p v ~g asin Fig. 4.14. Since the truth tables are the Sy (both propositions are false in the first case and true in the other three cases), the propositions apry and sp v ~vg are logically equivalent and we can write a(pagenpyaq td Palawan T Tl F T F r F F t F riot @ poo () spynq Fig. 4.14 4.7. Use the laws in Table 4.1 to show that — (p vq) v (4paq)=—p. Statement Reason (WD A@YQVipAg) SGpangvepag DeMorgan’s law Q) Bapatqvg Distributive law @) =apaT Complement law (4) =p Identity law CONDITIONAL STATEMENTS ¥ ‘Rewrite the following statements without using the conditional: (a) Ifit is cold, he wears a hat. (b) if productivity increases, then wages rise. Recall that “If p then q” is equivalent to “Not p or q”; that is, p > q = ap v q. Hence, (a). It is not cold or he wears a hat. ~"(b) Productivity does not increase or wages rise. ergy ‘the contrapositive ofeach statement: Ys If John is a poet, then he is poor; ~ 6p) Only if Marc studies will he pass the test. (a) The contrapositive of p — g is 4g — |p. Hence the contrapositive of the given statement is If John is not poor, then he is not a poet. (b) The given statement is equivalent to “If Mare passes the test, then he studied”. Hence its contra- positive is If Marc does not study, then he will not pass the test. (eset the conditional proposition p —> g. The simple propositions q > p, - p > = q, and 147 7p we called, respectively, the converse, inverse, and contrapositive of the conditional pq. Which if any of these propositions are logically equivalent to p —> q? Construct their truth tables as in Table 4.3. Only the contrapositive —. g -> +p is logically equivalent to the original conditional proposition p — q. . Table 4.3 Conditional | Coverse Inverse Contrapositive p_| q | sp | 79 p>4q q>p =p>ag a4>-P T | T F F T. T T T T| F F T F T T F F T T F T F F T F fF T T T T T T- negation of each statement as simply as possible: 2 ‘he works, she will earn money. ' swims if and only if the water is warm. [Ait snows, then they do tot drive the car. (@) Note that s (p + q) = p Aq; hence the negation of the statement follows: She works or she will not earn money. 0) Note that — (p > 9) =p 9 = q =—p © g; hence the negation of the statement is either of the following: He swims if and only if the water is not warm. He does not swim if and only if the water is warm. ©). Nob that gig) ap A>g=p ag. Hence the negation of the statement follows: It snows and they drive the car. g: Gilda is beautiful. ‘Write following statement in symbolic forms. 1. Gilda is tall and beautiful. :p Aq “2. Gilda is tall but not beautiful. : p 0-7 3. It is false that Gilda is short and beautiful :-(pVQSPa-d {4+ Gilda is tall or Gilda is short and beautiful: p v (~p 9) 433 na WS _ Indians will win world cup if their fielding improves. p: Indian fielding improves. 4: Indians will win world cup. p>4 2, If]am not in good mood or I am not busy then I will go for movie, “ees 7 p:1am in good mood. q: Lam busy. Iwill go for a movie. CPv-9 r= [-@agr 3,, Ifyou know OOP and Oracle, then you will get a job. = @agrr Here P: You know OOP, q; you know oracle and r is you will get job. #/ I will score good marks if and only if I study hard. peq Here P: I score good marks and q: I study hard. - (A: Write the following statement in symbolic'forms. © Program is readable only if it is well structured. Let p: program is readable. q: fit is well structured. peq or qep 12, Unless he studies he will fail in examination. Let p: He studies, 4g: He passes in examination. Pq oO ~pr>~q 3. There will be no test examination tomorrow if professor is out of town or there is transporters” site al : ; p: There is test examination tomorrow. q: professor is out of town. r: There is transporters’ strike. @vr>~p) 4, If temperature is above 30°C, we shall go to beach. Cp: temperature is above 30°C - q: we shall go to beach. 1. Ifp and @ are false, is (p v q) 4 [(~ p) v (~ @)] true or false? Here’p and q are false, Hence a ae (vAATvDI / Fa(t=F X rete ¢: Service is good. r. Restaurant is 5-star. Write following in symbolic notations, (a) Either food is good or the service 1s good of both ya) (0) Either food is good or service is good but not both. PYya o (p@q) (c) Food is good while the service ig poor. (pred) : ing is five star, (d) It is not the case that both food is good and rating ~(pan ing will be 5-star. (¢) Jf both the food and service are good then the rating will z oagor cd service © iS not true that 5 star rating always means good food and goo gf ~(r (png) G30) There are two shopping malls next two each other, one with sign board as ‘Goo en hey “And second with sign board as ‘cheap items are not good". Do they mean same’ Let p denote proposition ‘Items are good’ and 4 denote proposition ‘Sterns are cheap’. First shopping mall board means ‘if p then not q’, that is p —» 7. Second shopping mall board means if q then not p, that is q ~. Let us construct truth table for p -+ 7 and g +5. . Table 4.12 P\a\P\G\|p-alq—p EE, 0)\ ti | ts fear. Fit|tlel r | TIFlFlt] rt | 7 title|r| ¢ | f¢ ee Since truth values of the propositions p ~> 7 and q ~» p agree for all sai a yi og values ofp and qt follows that these propositions are logically equates eee mnasens oe sign boards mean the same, so Fopstract the table for A © @vb) O(a) Ac) > A0) Table 4.14 @ ble |~a)~ahe | bAc | (Ha)Ac)—(bAc) | aVb | (av b) > [(~a) Ac) > (BAC) “gS \ Write éontrapositive, converee and inverse of the following: en . “Indian team wins whenever match is played in Kolkata, home town of Ganguly’ 7 Letp denote “Indian team wins” and q quote “match in Kolkata, home town of Ganguly’ The given statement is p whenever g can also be expressed as q «+ p. Hence, it can also be writes; “If match is in Kolkata, home town of Ganguly, the Indian team will win” “If Indian team does not win then match is not in Kolkata home town of Ganguly” Now, contrapositive of this is The converse is “If Indian team wins then match is in Kolkata, home town of Ganguly” The inverse is “The match is not in Kolkata, home town of Ganguly, Indian team does not win”. Find the da forthe statement form f(y, g,r) given inthe following Table 4.16. ee Table 4.16 L(P,9,7) Basan aa als Raa naa aS aaaa anal Honma wane’ Then the required difis (~ pA~q A~r)v (~pAg A~r)v(p A~q~r) v(p Aq Mr) EO@29ACP 59, WOR 39) 34 @ pis logically equivalent to ~p v q P99) ACP 9) = CPV a) A(~pvq) =p A~pAq)A(PA~pAq) “P AQ) v (qA~p). ~@ACPYa)v4a ~PY~CPYQ)VG ~Pv@A~a)va @ CAQG>g)> ait Which of the following propositions is tautology? ® @va)>p () pv(@qp) © pvesq) @ p>@>p) he proposition is p A (~p v q) is (@) A tautology (b) acontradiction 4) Logically equivalent to p a q (d) none of these i ping is/are tautology : ) anb>brc ) @ asb> 630) dq be propositions. Using only the truth table decide whether P © q does not imply (>) False [ase a (‘Ss (Pv Q)A(P +8) 4(Q > S) is equivalent to A (a) SAR (b) SAR fe) SVR (d) none of these 4.6 Consider two well-formed formulas in prepositional logic FP + 1PR2:(P> 1P)v PP) (a) Flis satisfiable, F2 is valid (b) Fl is unsatisfiable, F2 is satisfiable (s) Fl is unsatisfiable, F2 is valid (@) Fland F2 are both 47 Leta, b,c and d be propositions. Assume that equivalences a ++ (b v 16) and Bc bold Th truth-value of the formula (a « b) — ((a Ac) v d) is always 4a) True (b) False (©) Same as the truth value of b (a) same as the truth value of d 48 Which of the following if FALSE? Read as AND, v as OR, ~ as NOT, - as one way implica and ¢ as two way implication? (a) (x y)ax)ry (0) (xy) ACA) XE ©) @>@vw) Md) (xvypeocxv~y) 49 P(QR) is equivalent to “ fa) (PAQ)>R (b) (PY Q)R ©) PvQ)>-R (d) (PAQ)>-R (p > q) A (r > q) is equivalent to Se) PYG (b) pv(r—p) © pvr) ) P>q@—>r) [AND LOGICAL OPERATIONS: 1-Let p be “Audrey speaks French” and let qbe “Audrey speaks Danish 2D Waich describes each ofthe following: Danish”. Give a simple verbal sent (@pvg ©)prg PAVE O@>Pv-G (Wp. Pr ten pot ad eaeary” wc ene and : Messe 0 and bie forma O7parng, 438 Discrete Mathematics ee ge aa nay \Ad__ Incach case, translate a, v, and — to read “and”, “or”, and “It is false that”’ or “not”, especty then simplify the English sentence, hg (a) Audrey speaks French or Danish. (b) Audrey speaks French and Danish. (©) Audrey speaks French but not Danish. (@) Audrey does not speak French or she does not speak Danish. (@) Itis not true that Audrey does not speak English. ( Ttis not true that Audrey speaks neither French nor Danish, 42, @pr3g Waparg Oqrap, @apeng. 4.3. The truth tables appear in Table 4.17. Table 4.17 Plq|7q| pv-g Plq|-p|7q =p Anq] cya era eer, ty) ae Brel sre eer, T|F\ T] 7 TIFIL F/T] F Fit/F| F RT| Bee Flrit| tr Firit|{r] (@) ) 44° Itisa contradiction since its truth Table 418 is false forall values of p and g, Table 4.18 P\4| PAG! pVG|=(pV aq) (ADA>(PVq) T/T) T |r F F TIF) Ft F F Flt} Ff] oo F ae F Flr] F [op Tr F 4.5. First translate the arguments into symbolic form using, $4 follows', . iB for “It rains” and g for “Brik is sick”ss @) P>4->pb74, <. OP ang-p By Solved Problem 4.12, angument a) isa fallacy. By Problera 1 3, argument) svat p be" study”, 9 bet fail mathematics”, and rbe (play basketball” » the given argument has PS PIG rp oe fruth Table 4:19 where the premises p > 9, only in the fh line of the table, and in that ease the conn vali Se rp, ris al and ¢ are true simultaneoiisly So tue, Hence the argument is ; Logic and Propositi iS nS topostional Colcuy 5 tL ar @ o a @) ) © @ (a) The teacher is absent (b) Some of the students di (©) Alll the students complete: (@) (Vx € Ax +3 # 10). () Gre Ax +3 2 10). = ()(Wxe Ax +3 25). @ Gre Ale +3>7)- (@ Here 5, 7, and 9 are counterexamples. (b) The statement is true; hence no ¢ (©) Here 9 is the only counterexample. @ The statement is true; h + _ ag a[r — TIT =p TIE T FIT T Flr a TIT a TIF a Flelt F Flrlr Tt Construct the truth tables of : ‘ PAG andy 6 gas the fist ine ofthe table where p Sg ae st Table 4.20(0). Noe that pg is true oniy in Constru b les of p > —g and art in the second line of the table where p> is faloe toe #200): Note that «> 9 i true Table 4.20 P\Q|PAG| pg P\a|-q] ponq|peq T/|T) T T T/T/F F T TiF| F | F tlrlr] r | F F/T] F | F Flt{r| 7 | or Flr] F | t Flr{t| Fr |r (@) oO The open sentence in two variables is preceded by two quantifiers; hence itis a statement. More- over, the statement is true. The open sentence is preceded by one quantifier; hence it isa propositional function ofthe other variable. Note that for every y € A,X +) < 14 if and only if x= 1, 2, or 3. Hence the truth set is {1, 2, 3}. It is a statement and it is false: if xp = 8 and yo =9, then x, It is an open sentence in x. The truth set is A itself. and all the students completed their: homework. id not complete their homework or the teacher is absent. 1d their homework and the teacher is present. + yp < 14 is not true. ounterexample exists. rence there is no counterexample.

You might also like