You are on page 1of 26
Tic is central to the theme of Discrete Structures, A discrete icture is defined by 2 set of axioms. Properties of the ructure are then derived from the axioms as theorems. These theorems are proved using valid rules of reasoning, The science Tof logic provides rules by which one can determine whether any cular proof (argument) i valid or not. These rules should be famed in a language which is precise and unambiguous. An inary language is unsuitable for this purpose, since languages prone to be misinterpreted or misconstrued. For example der the statement "He ties to study hard” and "He ties hard “study’. A mere shuffing of the words, changes the entie Tearing. To avoid such mistakes/@ formal language is developed sing spn oe defined rule CHAPTER 1 : BASIC LOGIC Ai) Bring that book! (li). When is your interview? (iv) What a beautiful painting! () This statement is false, Example (i)is not a statement, since its truth value depends on the value of x Ifx = 2, the sentence is true; ifx 2, the sentence false. Its in fact a propositional function. Examples i), (i) (iv) are not declarative sentences; one is @ command, the other is @ question while the third isan ‘exclamation, Hence these are not statements. Example (v), although a declarative sentence cannot be assigned a ‘truth value, it is neither true nor false. Hence it is also not a proposition, 1.1.2 Notation ‘The statements in Examples 1.1. are sentences, which cannot be further split or broken down into simpler sentences. Such statements are called Primary, Primitive or Atomic statements. We denote primary statements by the lower case letters p. 4... In Mathematics, we have the concept of real or complex variable. Similarly in logic; we have the concept of Propositional Variable ‘or Statement Variable. We denote statement variables also by ‘the same symbols p, qr. This dual use of the same symbols to denote either 2 definite statement, called a Constant, or an arbitrary statement called a Variable, should not cause any confusion, as its use will be clear from the context. (Qiote that when 'p' is used as a statement variable, it has no truth value and hence is not a statement. It should be replaced only by a statement and then its truth value canbe determined --). For ‘example, we may replace p by a true statement "2 + 3 = 5* or by It is possible to form new and rather complicated statements from the primary statements by using certain connecting words, with whose usage: we are already familiar in the English language. ‘These statements are called Compound Statements, In our everyday use of the English language, we use the words not’, "and", “or, "but", "while" etc, to connect two or more statements. However, these connectives, being quite flexible in their usage, ead to inexact and ambiguous interpretations. Hence we shall borrow only some of these connectives, redefine and <= symbolize them, to suit our purpose. Ma, Dr SCRETE MATHEMATICS (BATU) ; cee me case Ip" denotes a statement, then negation ofp is denoted by (or). he tut vale ofp etre then the rath value of = PS false. Ifthe truth value of is fase, then the truth value of ~ pis ‘ue. Consider the following examples If p is the statement “I am going for a walk’, ~ p is the statement “L am not going fora walk’ or “I isnot the C356 that Iam going fr a walk’ (If gis the statement "3 is not a prime number’ ~ q is the statement "3 isa prime number’ 2.2.2 Conjunetion ("And") (© _Letus consider the statements P + Thesunis shining. q+ The birds are singing. ‘Then _p.Aqis the statement” The sun is shining and the birds are singing." () Let.p + 2is.a prime number. @_ : Ramis an intelligent boy. Then p Aq is the statement "2s a prime number and Ram is {an intelligent boy." : This statement is perfectly acceptable in logic, although it makes no sense in our everyday language, as we cannot see the connection between the two statements The words "but" and “while” are treated as equivalent words to "and". Consider the following examples: ‘Translate into symbolic form the statement ‘Amar is poor but happy. Solution: Let,p_: Amaris poor. q_: Amaris happy. ‘Then the given statement in the symbolic form is pa (jv) Translate into symbolic form the statement We watch television while we have dinner. Solution: Let, p : We watch television. q_: We have dinner. ‘Then the given statement in the symbolic form is PA q ine data Is wrong, — . anevorinte 9090" Ther ane ean eerie te PTE Tae eo Thea n he PC v4 mer data is wrong: i aed nite seene becomeane oC eae st one possibility exists or even both sense, ie. at [e2s possibilities evs. Consider the nest exemple ” Let, p+ Iwill read a book. iq. + Lui go to seep: = jal ead a book or 90 10 sTeeP. ‘as this example demonstrates ive sense, ie. either or forgo to leer Then pv In everyday. longuag? connective “or Is Us the other activity ean hoP pen, ‘used in the inclusive sense ONY; Wha Voi the symbol" wow ¢clusive or” is to be used, we use we wish to specify that "ex correct nota the above example, the more the relation “or” is Normally in our everyday language, etween two statements, which have some kind of rel eteen them. In logic, this is not necessary 25 the folg example demonstrates. Let, p_ Itisraining todsy. q: Aartiis an inteligent gil. Then vq: Its fining today and Aarti is an inte gir This Statement makes perfect sense in logic, though | English 1.24 Conditional ("If ... then") Ifp and q are statements, the compound statement “If p then denoted by p> qiscaled a conditional statement or implication pis called the antecedent or hypothesis, while q is call consequent. F The converse of p> q is the conditional q -> p,-andlt contrapositive of p> ais the conditional ~ q-> ~ p. Examples: o Let.p Hari works hard. i 4. Hasiwill pass the exam, Then pq : If Hari works hard, then he will pas Iitrains, then I carry an umbrella Solution: Let,p : ttrains 4: Learty an umbrella, CRETE MATHEMATICS (BATU) Converse of -* 915 gp: I lcarryan umbrella then it rains Contrapostve of p+ is IFT do not carry an umbrella, then it does not rain, ordinary usage, the conditional statement may not always have the form "if. then’. While putting the statement into symbolic ‘we have to interpret the statement correctly. Consider the examples. Farmers will face hardship i the dry spell continues. li + Farmers will face hardship. + The dry spell continues, is the correct symbolic representation of the given Js) vtein stot om he statement Peahats her wl buy him a computer ony he pases he sxam, sino OS 2 Let p+ Rahul's father wil buy him a comple. Rahul pases the exam vith stincin p+ aisthe correc symbolic version of the statement \Wte nyt form the statement ificient condition for a function to be continuous is that the ions difeentable, em Lesp : The uncon i feretable 4 Thefuncion continuous Sitement hat tobe nterprted as p's uct for @ on tion: Let pA candidat gets admision + The candidate has passed the entrance I reach the station on time. wil miss the train. Basic LOGIC nditional (“If and only if") If p and q are statements, the compound statement" iq’, denoted by p «9 4, is called a bi-conditional statement. ‘Often “if and only itis shortened as “if. , p49 qis also read as “Ip then g, and conversely’, ‘Many of the theorems in Mathematics are of the type “if and only a Examples: ()Aninteger is even if and only iit s visible by 2. (il) A right angled triangle is isosceles if and only ifthe other two angles are equal to forty five degrees, (iy_ Two lines are parallel if and only if they have the same slope. 3 PROPOSITIONAL OR’STATEMENT FORM) 2] ‘We know what a statement variable is (refer to article 1.12). Using the logical connectives defined above, we can construct or form ‘an expression, involving the statement variables. ‘The following are examples of statement forms: © -@va>p W) @>de—a~a Gil ((Pagviea~n) > (pana) ‘One can thus construct any number of complicated statement forms, from the statement variables by using the logical connectives. A statement form has no fixed truth value. Itis.only when the statement variables in a form, are assigned definite truth values, that we obtain the truth value of the statement form. Hence the truth value of a statement assumes the truth value "true" or the truth value “false”, depending on the truth values assigned to the statement variables, appearing in the statement form. eieicoeia We denote by 'T' the truth value true, and 'F by 'F the truth value false. a In circuit logic, Tis den ys i J ‘Bxample 1: Using the following statements: Ps Mohan is rch 9.1 Mohan is happy lwrite the following statements in symbolic form, (@ Mohan is ich but unhappy. 4 (G0 Mohan is poor but happy. (i). Mohan is neither rich nor happy. @) Mohan is poor or he is both rich and unhappy. Solution: @ pang °c SS ae BASIC Logie DISCRETE MATHEMATICS (gaTu) ws : oo i Letp + Lamina good mood ~ PV Qor~prmq 2 ime “a 1: Twill go fora movie Using the following statements: . en (~pv~ at Rojantis tall thas ep a. 4 Rojan beutil rite the folowing statements in syle frm. © Rojanis tat and beaut Rojan tol but not beoutfut Gi) tes false that Rojantis short or beoutiu Gi) Rojans taller Rojan is short ond beoutfa. Solution: © pag ® pa-q i) ~~pv@ pv(pag. Egret 8 irae oing nator Iwi study cscret structures Iwi go to movie 11am ina good mood rite the folowing statements in symbole form © ham notin a good mood, then | will ge toa movie wit not go to.a move and wil ty discrete structures Gi) 1 will go 10 @ movie only if 1 wil not study dscrete structures. (09 If 1 will not study dscrete structures, then! am net in @ good mood. Solution: plied @ ~anp Gi a> =p igo -pper ee cample A Writ the following statements in symbol orm: Ke @ Indians will win the world-cup if their felding improves. (@ tf 10m notin «good med or tam nt busy, then I wil 90 fora movie (i If you know Object Oriented Programming ond Oracle, then you wil et job Gv) 1 wil score good marks inthe exam if and only if study hard Solution: @ —_Letp = Indians wil win the word-cup. Their fielding improves. ‘Then q> pis the requlred form. > q (ii) Let,p + You know Object Orient q_: Youknow Oracle, Ft Youwill get ajob. shen p a a+ ris the required symbolic fOr™ rks in the exam, (i) Let:p + Iwill score good marks in q: Istudy hard. ‘Then p ¢ ais the required sont fam — into symbolic form: | ‘Example 5: Put te allowing stotements into s7mee cel (Whenever weather is rice, then only we wil mee i id ether Anil tokes Mathematics or Aparna tokes Bio then Deepa will oke Chemisty. (iv. Program is readable only if itis well structured. {God Unless he studies, he will fail in the examination. Solution: Let. + Weather is ice q_ : Wewill have a picnic. , ‘The statement is equivalent to ‘we will have a picnic on the weather is nice Hence > p isthe required form. i) Let p + Anil takes Mathematics. 4: Aparna takes Biology: Deepa will take Chemistry. Then (pv q) ~ ris the required form. (ii) Let. p= Program is readable. = Program is well structured, ‘Then p ~> qs the required form. (let: Hestudies _: He will fil in the examination, ‘The statement is equivalent to the statement “If he does study, then he wil fallin the examination”. Hence ~ p> gis the required form. ‘Example 6: To describe the various restaurants in the cit, le denote the statement ‘the food is good’, q the statement *u service s good" and r the statement “the rating is three-star", the following statements in symbolic form: (tay 93), (Either the food is good or service i good, or both (Either the food is good or service & good, but not both. id The food is good while the service is poor. 4 (iy) tis not the case that both the food is I three-star. ‘900d and the rating piscreTE MATHEMATICS (BATU) (nif bath the food and service ore goed, then the rating is threes. i its not tv thot 0 threestor rating alwoys means good food and good service. Solution: {As *v" means “inclusive oF, the statement required is pya ( We hve to use “exclusive or Lec Hence the statement isp ¥ a. Equivalently the statementis also pag vB aq. i) "While is interpreted a5 “ond”. Hence the statements p ana (ou) “eis not the case” implies negation Hence the statement is = (0 (0) Thestatementis (9.09) -F (ui) Were we have negation of implication. Hence the (9 (p04). statements “Beample 7: Using the following propositions: p : lamBored 4g Lom woiting for one hour 1s Thereis no bus translate the folowing ito English 0 @va~p @ -9>-P Gi) >) vee) Solution: : (fam wating for one hour or there is no bus, then I get bored. 4 (@ 11am pot waiting for one hour, then tam not bored. {Gy 12m waiting for one hour then 1 am bored, or if there is nobus then Tam be ‘Example & Wit the logical negation ofthe following statements inthe symbolic form: (© Gopoisinteligent and rich (@ Gopatsintligent but not rch (Gi) Gopatseitheriteligent o ich, Solution: Let p+ Gopalisinteligent. 4 Gopalis ich © = @ nq) whichis equivalent to ~ py ~ 4. @ ~(A~q)uwichis equivalent to ~ pva {i_~ (pve) whichis equivalent to ~ pa~ 4. ‘Example 3 Transat the fellowing statements into symbolic form: 1 the ult cost goes up or the request fr addtional funding is desire, then o new computer wil be purchased if and only if we an show that the current computing facilities are indeed not adequate as) BASIC LOGIC Solution: Let,p : The utility cost goes up. 1: The request for additional funding is desired + Anew computer will be purchased. : We can show that the current computing faclities are indeed adequate. Then (p vg) > (r x= 3 ‘Example 10: Consider the following advertisement for 0 game: (@ There are three statements in this advertisement. (Two of them are not true. (iy The average increase in IQ scores of people who learn this game is more than 20 points. 1s the statement (i) true? Justify your answer. Solution: Let us suppose statement (i) i false. Statement (9 is true since there are actually three statements in the advertisement. This leaves us with statement (i), Statement (i) cannot be true, since if it s0, we shall have only one statement Which is false, which contradicts statement (i) itselt, Her. statement (i) is false, which means that there are actually two statements which are true, Hence statement (ji) cannot be false. It hhas to be a true statement) ‘Example 11: Write the following statements in symbolic form: (@ The sunis bright and humidity isnot high G@ Itis beady 900 am, I should stort my job. (ip if the requirement of Computer Engineers is increased, then more seats will be offered by University and more computers wil be purchased by the University Computer Department ifthe rates are competitive Solution: () Let, p: The sunis bright, q: Humidity of high ‘Then the given statement in symbolic form isp A ~ q- (—Letr + Itisalready 900m, 5 + Lshould start my job. ‘Then the statement in symbolic form is: rs. Gi) Let. p= The requirement of Computer Engineers i, creased, 1: More seats will be offered by University, + More computers will be purchased by the University Computer, Department s : Therates are competitive, P> Garcon Then the n statement in symbolic form DISCRETE MATHEMATICS (saru) or : EXERCISE 1.1 St p denote the statement, “The materials interesting”, and q denote the statement, "Thecnereses tt Challenging’, and r denote the statement, “The course is enjoyabl ‘Write the following statements in symbolic form: (The material is interesting and the exercises are challenging, (i) The materia is uninteresting, the exercises are not challenging and the course is not enjoyable, 1 the material is not interesting and the exercises ‘re not challenging, then the course is not enjoyable. ‘The material is interesting means the exercises are challenging and conversely. Either the materials interesting, or the exercises are challenging, but not both. Let the propositions: Gopal is tall 4 : Gopal is handsome, Write the following sentences in symbolic form, using p, Gand appropriate connectives. (Gopal is tall and handsome. Gopal is tll but not handsome. Git ttis false that Gopal is short or handsome. (@¥) Gopal is neither tall nor handsome. (©) Gopatis tall means he is also handsome. (i) tis not true that Gopal is short or not handsome. Write the following staterients in symbolic form: (The sun is bright and humidity is not high (i). IFT finish my homework before dinner and it does not rain, then Iwill go to the ball game. (i) Ifyou do not see me tomorrow, it means Ihave {gone to Chicago. Let'p' be the proposition “high speed driving is dangerous" and ‘q be the proposition "Rajesh was ‘Write down the meaning of the fllowing propositions: Opaq fi) ~pag i) - (PA) @) PAQV(-pa-q — W (pva)a~ipng) Write the following compound statements in symbolic form: (0 tis humid and cloudy, or itis raining, but at the ‘same time it s false that Its both humid and raining (Being able to type is sufficient to learn word processing, (ii) If Manisha isnot sick then jf she goes to the picnic, ‘she will have a good time. {iv) can study only if am not tired or hungry. «i w ” State the converse and contrapositve of each of the Table 11 Table 1.2 following statements: eae aes — (0. fitrains, lam not going to the city. T A e af page (i) Ican't complete the task iff don't get help. F t z T (ip. Twill come only if am not too busy. [ fF n (iv) Ifyou complete ths job, you can take a holiday. F Fr 5 E E F as) 7 10, in propositional form: | ea ood and service js ™ In stall restaurants the food in 9! od Vic ite je 5,00 in the evening re then more scats will be offered by ; Increase nee computers willbe purchased @) rag @ ~avr 8) ~(pva) @ pyer . un. and contrapostive statements. Ihe is considerate of others, then a man is a gentleman, Ifa steel roat is stretched, then it has been heated, ® corresps [1.4 TRUTH TABLES ee eee A table giving all possible truth values of a, statement forry| called a tuth table. ronding to the’ truth values assigned to its variables, contain 2 = 4 values. tft consists of three distinct variables, it wll contain Gistinct variables, then the table will contain 2" values, ~P.PAG PYap—>qandpeg 2 values. In general, if a statement form contains in) scnere MATHEMATICS (BATU) an BASIC LOGIE Table 13. ued Table15 | (i) |p | q |r |-p|-pr| pxq | -rnalexad 2 pogipoa} elated thr{rfel + [ot T a a t/t] t tir] t ryyt eller ral dr thrfefel or for 1 BET lel & alrite tle|rfel or | or F ae e lel + ele| + tlefele| r |r F Note the flowing important points: elr}r|r] or | or F as shown in Table 12 p aq has th value Tif and only if Flrfe[r| re | F both p and q have truth values T rle|r[r| + | or 1 (iy he shown in Table 13 pv @ has truth value only when both altel Fell erd| ee 5 | pond q have ath ales F. Otherwise, thas tah vale T. ip he shown in Table 14 p ~>q has tut value F only when p : has truth valve Tand has truth value F If p has truth value ppg tap pad ait fF pq has tah value T, whatever may be the truth value 0 en | cae | uy a Fe tir]el}e F F (op p evahas truth value T only when both have the same truth thefr| oe F F values ; rlefe] e F F “Truth table for "Exclusive or", eia]r| oo 7" 1 pecal that p qimplies either p or qs true but not both. Hence eja]erl oo 1 F we have: eFlefr] oo F F Table 1.6 Pia | el | | 6 F Pp a eva tT tif e cpagvigan) (Coaav@nn- To] oe Alper T a e {rf F t Fs |e F 1 ‘SOLVED EXAMPLES 4 1 Fede I: Constvct the wuth tables forthe flowing stotement 7 1 forms: 7 F @ epvara F T @ -oA9 vox) F 1 Gi) (p99 40 x9) Example Z:lfp > ais fle, determine the wath value of Gu) (pag viaan or Co-a-a ae Solution: p -> q has trth value F only when p has truth value T - and q has truth value F. Now, we have o [2 [a | =p | -pve alee Saeco 7 Pla psa |=oaa | coraoa thele F T 7 4 - rl |e _ ; Hence the tuth value of © (p A) => ais false. onesie 7 Example 3:Ifp and q are false proposition, fad the truth value of va al-pv~9) [o [a [one] -eaa[exa]-eaovoxal | ; a Tivialo@ ott pla [eve =a | =pv-a | pv@atev=a ele{e[r{+] + F : ae ee ' Example 4 IFp — qis true, can we determine the rath value of ~ pv (p> 4)? Explain your answer. ete | ev fear =f at 1 Solution: Since p —> is true, we have to consider the following possible truth values ofp and q DASIC LOGI: DISCRETE NATIEAYATICS (naTU {Caso TI: The native always les. In this case, the truth table for p gy . ee vor F T 1 as | ela] 5 ; . a | pea | | oe r a E + f Yes its possible to dtomine the tth vale of = pv (p> a) | Stee «2 a Fond p sas F, then a must be nd it, Lenco ths caso alo, we find that there Is gold on the island Example $: Given the truth values of p andl 9 as Toned that of ‘and sas F, fd the tuth values ofthe following © Pv@an Wpreay Wid AlQ.An) v = lp va) ate v9). 0) p | 2 tae Boras) te F F E a, p_ |e t gar Balaatl tft F E F Pvalrvel! va | -(eva |) (ealaaniv atta) | atv ey | alovelatevs) (ytelT : 1 Some interesting problems frameil on the bicondtional p « q are given belo Example 6: An island has two tribes of natives. Any native rom the firs tribe aways tells the truth, while any native from the ether tribe always les, We arrive atthe island and ask a native if there is gold on the istand, He answers, “There is gold on the island if and ‘only if ways tell the truth”: Which tribe is he from? I there gold (on the island? Solution: We cannot determine the tribe from which the native is. However, we can determine if there is gold on the island. Let p+ He abways tells the truth 4. There is gold on the island, Then the native's answer is q «> p. or equivalently pe» q, We shall consider the following two cases. (Case I The native always tells the truth, Then in this case, the truth table for px 9 (o) is esas oa T r r Since p 6 q is T and p is T, then q has tobe T. Hence inthis case, there is gold on the island. Now consider, case I Example 7: A certain country is inhobited only by people wha either alvays tells the truth or always tells lies, and who wit respond fo questions only witha "yes" or “no'. A tourist comes fa 4 fork in the road, where one branch leads to the copital and the ‘other does not. There is no sign indeating which branch to take, but there isan inhabitant, Mr Z, standing ot the fork. What single Auestion should the tourist ask him to determine which Branch to tate? Solution: Let,p : "Mr. Z always els the truth’ + “Theleft-hand branch leads to the capita leva: peg ‘Then the single question which the tourist should ask Me. Zi, “A true? ‘We shall consider two cases Case I: Mr. Z always speaks the truth, Consider the following table: » 4 pea ‘Answer ofNieZ T i T Yos tr F FE No Hence when Mr.Z says "Yes qs, Le. the letchand branch leads tothe capital Now let us consider, case I (Case It Mr.Z always tls es. Consider the truth table: . a pea | Antweroftiaz F T F Yes: E F tT No IW Mr. Z answers “Yes, in this case also q being T, the tourist wil {ake the letshand branch leading tothe capital Example 8: Given that the value of p -»4q is foe, determine the truth value of p v= 9) 4. (ay 2010) Solution: Consider the truth table. pila | pa] =pl| <4 ie pvno tle} e [et r F Example 9: Given that the value of pq is true, can you determine the value of =p vip +4)? (tay 2010) —— wa = fai] oo op | pea | -pvboa T T 7 7 eit] 7 T F t F F + esate | acceso fe have seen how to construct the truth table of various | [ip[va'| pAa|pva'| ipVan | @aajasival teat ig calied 9 Tatology, if ci Hence (p 4 .q) + p is a tautology. as 4 ee . Fa i eon tl F F 1 aoa FT if T SOLVED EXAMPLES {Example 1: Construct truth tables to determine whether each of the folowing iso tautology, a contingency or a contradiction. — @ Pap) @ @rga~ova) i aq >p 0) 99 @v=P) © BA-pvaanq lution: (Consider the truth table: Hence (p> @) © (qv ~ p) isa tautology. (Consider the ruth able: fp [patev@ |-alipacovaya-a tirfFl ot 1 |F F tlefel F roft F elr]t} t Flr F elelr| + e |r E Hence (p (= pv q)) A~ qise contradiction ‘Example 2: Show that (p Alp —»q)) —» q 1s « tautology, without using truth table. Solution: We have only to show that wherever p a (p ~>q) is tue, is also true, since inthe other cases (p »(p -» @) -» gis anyway te, Now ps (p+) is T implies p iT and p -» is T. These together means that q is. Hence the required form isa tautology. Example 3: Show that (pq) A~q + ~ pis tautology. DISCRETE MATHEMATICS (uatu) Solution: We need only to show that p> ¢ and = 4 both te Imply ~ p is true Since truth vatuo of ~ qT, truth value of q iF, Sino p -> als {Wu his means that pis fase, Le, tut va of = psf, Hence the proof [1.6 EQUIVALENCE OF STATEMENT FORMS. The concept of equivalence of statement forms fs similar to the Concept of equality of algebrale expresslons in mathematles Definition: porno ‘Two statement forms are logleally equivalent If both hava the ‘same truth values, whatever may be the tuth values assigned 10 the statement vorlables, occurring In both the forms. In other words, if we consider the truth tables for both the statement forms, the final colurnns in both the tables should be identical, Examples: 2. _pand p pare logically equivalent (Kdempotenco) Solution: Consider the truth table P PAP, T T F F Since the truth tables for p and p -» p are entical, it follows that p and p> p are logically equivalent, 2. The following are somo basic logically equivalent forms. Proofs ae lft as exercises for the students. (@ paqand q apare logically equivalent, i) pv qanda vp are logically equivalent, 7 7 a “phe (Wi) pand ~ (~ p) are logically equivalent. T T T F 3% pq and = q > ~ p are logically equivalent 1 F F T (Contrapositive) F 1 F 1 Solution: E £ £ 1 Vaile Saale 5 ela loa a P ap z zi = ea tilt] + F F 1 cs = = 5 5 tle] F T F F 1 F F 1 1 eli] ot F T 1 F 1 T F 1 elel + fr 1 1 F E t 1 1 10) ae paca vo ap nn eae (piste Seaton: Code tho oon th able ‘o —_ p eaaal T T t T 1 F 1 F F T F T F F +] #1 oo Pe [eae ' T z T T F T F F F F F F F £ F The last columns In both (2) and (b) are identical. Hence the two, forms ae logically equivalent. 5. pv (aanand (pv) a (p v9) are logically equivalent. Proof |s similar to (4) and islet as an exercise. 6. = (A @) and ~ p v= q are logically equivalent (Be Morgan's laws) Solution: Consider the following truth tables: Note that the columns for p> q and ~ q -> ~ pare identical. Hence p»q and ~ q ~~ pare logically equivalent forms. The lagical equivalence proved above is very often practiced ja everyday language. Consider the two statements "He will pass if he works hard” and “If he does not work hard, he will not pass the exam. Both these statements obviously convey the same meaning, ‘The last columns in both the tables are identical. Hence ~ (p aq) and = pv = q are logically equivalent. ; 7. = (p vq) and ~ p a~ q are logically equivalent. Proof is left Examples: ‘The following examples on logical equivalence show that the conditional can be replaced by the connectives ~ and v. RETE MATHEMATICS (BATU) p> qand ~ pv.a are logically equivalent (Eimination of onditiona)- aay Slition Hence either both A and B are true or both are false ES 4 pq = bya Therofore A «> Bie a tautology. r T 7 T F T Conversely if A c» Bisa tautology, it means that wherever A is . F F F F tue, B is true (and conversely), and wherever A is flse,B is Z 7 1 7 also false (and conversely), 4 fF t fa q Therefore A and B are logically equivalent. BASIC LOGIC ‘assignment of truth vals to the statement varables in A and: a imilaly, we have the next example, in which the bicondltional ‘ean also be eliminated. 19, pcx qis logically equivalent to (p -» q) »(q — p) which in turn i logically equivalent to (~ p vq) a(~ qv pi. Proof is left as an exercise to the students, Notation: Hereafter we shall denote logical equivalence by the symbol =! modifying the equal sign =" in Mathematics, “The following is list of some important equivalences (many of wich have been alteady provee), called as identities. [2.7 LOGICAL IDENTITIES: 7h Idompotence ofv Idempotenc of a [1.9 NORMAL FORMS ‘One of the main problems in logie ie to determine whether @ siiven statement form is a tautology or a contradiction, Constructing truth tables for this purpose may not always be practical (even with the help of a computer, especially where the statement form may contain a large number of varlables or has a complicated structure. Hence it is necessary to consider alternate methods, suci’ 9s reducing the statement form to s0 called normal forms. 1L,_Disjunetive Normal Form (nf): ‘A conjunction of statement variables and (6) thelr negation called 2s a Fundamental Conjunction. (tis also called as a min term). CCommuatviy of v For example, p= conjunctions. PAG PAG PA~ paqare fundamental 1 2 a 4 5. oviavd=ovavr 6 % 8 stibutvlyofv over 3 | pvignt = bvadawy PAGE AAD Cornmiyot We know that p A~ p is always false. Hence if a fundamental | Asocoityot conjunction contains atleast one pal of factors, in which one is paGad= Dadar | Associattyota’ the negation of the other, it will be false. pave GAdvpat | DsrtuniytAoary 7 statement form which consists of @ Dijunction) Fandamental Conjuctions scaled » Dijuncive Norma | iim obbreviaied sch : Students ae edie to workout the proof ofthe Aborpion Ine as on ec The following theorem relates ogcal equilance and 2 ttc. 1.8 THEOREM TEtA ord 8 be oo snament forme Then A & lily quien ios and only Ae Bisa taology | Proofi am Let A and Bbe logically equivalent. ‘Then A and_B éssume.the. same truth. values” for sony, | os-to) Double negation 10. | ~pve) = -pang De Morgan’ is Examples of dn: 41, | ~pag =-pv-a De Morgan's laws @ @rdv-a 2, | py =p = Tawskoy BE ee nO = @ Prganv@r~ovqan 48. | pa=p = Contadcton meena 14. |pvipad= Absorption as WGnaxouse 15. [pave sp eae ee In the following illustrative examples, we will reduce the given statement form to dn, by using logical equivalence. Examples: 11. Obtain the dnf of the form (p -> a) A(~ pag) Solution: pq =~ pvq_ (Elimination of biconditional) Hence = (p>q)atepag) pv aa(~pag = pan padviqn=pag) ~PA@v(an~p) (by using the distibutive laws, idempotence “laws and ‘commutative laws, DISCRETE MATHEMATICS (OATU) (nay 2. Obtain the dnf of (pa (pq) > 4, Solution: (p 4 (pq) > q a = (pal-pygiyq = =py=(pvavq = =pvipanalva 3. Obtain the dof of the form ~ (p > (qn). Solution: ~ (p> (QA) pvqan) = =(-pv@an) B= (p)a~(aan (De Morgan's Laws) = pateqv~sildempotent laws and De Morgan's laws) a (ana (DA~0. 2._Conjunctive Normal Form (cnt) {A disjunction of talement variables and (or) their negations is called a Fundamental Disjunction or Maxterm. For example, p, ~ p, ~ pv q, PVG. PY ~ Pv qare fundamental slsjunctions. We know that p v ~ pis abiays true, Hence if sjunction contains atleast one pair of factors, the negation of the other, i will be true (p v ~ p vq is logically equivalent toa tautology). 'K statement form which consists of @ Conjunction of Fundamental Disjuntions, is éalled @ Conjunctive Normal Form (abbreviated as cn). z [Note that a enf i a tautology if and only if every fundamental lisjunction contained in it is @ tautology. ples of ent ® pag () ~pawva fundamental which one is amples: () Obtain the cnf ofthe form (~ p—r1) A( a) ion: CP >nrpog = PI nalo>qala—p)) Fe BG PVO A P@at-qve)) = VDA pva)at-ave) (i) Obtain the caf ofthe form (pag) v (= PAGAN. Solution: (PA@Y (= Pag nn) FOYE PAGAN AGY (= Pagan Bene eam Atay pagan) = (PY = PAD YA Av Alay = navangva ayn F PV@APYOAQY~Pagacgve. , 3, Truth Table Method (to find dnt): Let P bea statement form containing n variables Py, Pz: Pn. We: obtain its dof from the truth table as follows. For each row in ‘which P assumes value T, form the conjunction py A P2 ‘auc APn where we take pif there is Tin the k-th position inthe row and ~ pif there is F in that position. Such a term is called rminterm. The disjunction of the minterms is the dnf of the give fore. Examples: 1. Find the dof ofthe form (~ p>) a(px@)- Solution: Consider the truth table. plate [-pl-p5r lee) ern aoog | tit]tfe] +r ] T tltfefe| rr 1 tle|rje] + fe F tlelele| + ] F e[r{r{r] 7 |e F el/tfe|r] fF | fF F Fle|t{r] + |r 1 FlelFit F T F E Consider the rows of p, qj Fin which T appears in the last column. ‘Then the required dnfis (pAqany(pAqa~1) ve pa~aanh 2, The statement form f (p, 4,1) is given by the following table. Find its df punta [teans F F T F F F F T 1 F 1 F T F 1 T F F T 1 F 1 r 1 r Then the required dafis(= pA~qA~AV(~paga~f) Vipa~aa~fvipaaan Example 1: Prove that the following formulae are logically ‘equivalent and show thatthe operator “Exclusive or” is symmetric. @ pvqondgvp. @ @Vaer andp Vavn. Solution: (), Consider the truth tables. CRETE MATHEMATICS (BATU) \ i ek op van i T F F 7 fF 1 T F role Hence “bclusive of” 16 @ symmetric operator and also the two {ormulae are logically equivalent. (i) Consider the truth tables. ela] el ove lords r Hrfrfr] & T tirfF] & F t F thelr] t F T P tele] t t F 1 rir{r| t F F F rl[r{F] t 1 T 1 rle|t] & t T 1 rlelrl F e F ‘The columns for (pv q)¥ rand p v(q vA) are identical. Hence the formulae are logically identical ‘Example 2: Eliminating conditional and biconditional, find the logical equivalent forms of © GI >e>9 @ poo a ~~ (ote that 3 is ~@) G@vp = ave Sol oP: pog=@ vq G2) e740 = Gb 6 va). Unavp = send pvget then we haves ot =(5 vt) 5 = ave) AB (byDe Morgan's law) aap. Svt=@apve va = G@ vB va AYE va) (by Distributive law = (@v@vp)ateveva) Gvpatva = TaTat, “The given form is logically equivalent to a tautology. @ \ BASIC LOGIC se pew va 096 VMAw va>P) @ v@ vanatova) vP) @ vBv Maw nave) @ V@AWPagve) @ Alpagv Pv @ alipaavpd @ apagv i aplv@ apag) v@an = (cag)vev(cap)v@ Ap) = cvevev Gap = pag Example 1: Eliminating conditional and biconditional, find logical equivalent forms of 0 Peavn>P @ (@>d>d->P Solution: () Here we shall solve the problems, by using the truth table method, ie. finding form in dnf which is logically equivalent to the given form. E Consider only the values ofp, a rcortesponding to Tin the last column ofthe truth table, Then the logically equivalent form: is Ad ATV@ agnnv® aganvG ng advie ng an Wi) (ed >9>P tir] 7 T T tle| F T T Fit] T F Fle| t F a The logically equivalent form is (pa) v(p.a@)v@ 4a) yr wiser 7 MISERETE MATIIEMANCS oATU) no a NLL, aay lample 4: Prove that p=» (q-y yand pai) -» @ avo foie ene EPC an 9) Solutios ame] pa za aaa aa ale ‘The marked columns are identical. Hence the two forms are logically equivalent. ‘Example 5: There are two restaurants next to each other, One has sign thet soys "Good food isnot cheap" and the other has a sign that says “Cheap food is not good': Are the signs saying the same thing? Solution: We shall show that the two statements are logically equivalent. let p+ Foods good. 4: Foodis cheap, ‘Then the symbolic form of "Good food isnot cheap" is p-» ~ q ‘and symbolic form of “Cheap food is not good” is q-» ~ p. pata | q-p T F F F pt Fle] T TOW tlt [he a my Feber: r Teel ‘marked columns are identical. Hénce the two fotms are equivalent. Example 6: Show that p vq and (p vq) A~ (p aq) are logically equivalent Solution: Consider the ruth ables ea |psal eva] pa |=WAal|levan-pag thrh e ft [ rl F theft fr fe] s 1 elrf tf fer] o 1 cle] e{e}el| rs F BASIC Loic » Since the marked columns are identical (p ¥ a) and (Pv a) = (p “a a0 fail equivalent ‘Example 7: Obtain the dsunctve normal frm of| 0 PA Pag, @ @A~ >a ~4 Solution: () p> logically equivalent to ~ pv q (D0) A (pagal pvgat- pad HPA = PAgv(Gn~PAd) (padvian~ph (AIP) 942A pvanva © ~py=(-pvaiva B ~pyparava Example 8: Show that the following statement is tautological br) 4 Sol Ora = ~a-pvanvg = (-pye(pvalva (Pvipa~ayva (py-ava ~pyt Example 9: Obtain the conjunctive normal form and djunctive ‘normal form ofthe following formulae given below: © papa @ ~pva Solution: OPAlp4a) = pa(~pwa) ~cnt PAM PVa = PA~PIVIEAG) = Fv(pag) = (Aq) ~ dat (asingle conjunet) ® -pva? erg = = PvaverMapag v=ipva)) = (PVA viEAgal~pv~q ve pa~a) @va@al~py~av~p) at pv~qv~q) Ova py-qarpv=a (va) At~pv~q) ~cnf 2 pag Further, (vq) a Pv @=l@v@a~P) vipvga~a) = @A~PIV@A~p)v(PA~q) viaa~a) = FV@a~plvipa~auyF © (@A~p) vipa~q) ~ dat. \ _ epee MATHEMATICS (OATU) aay BASICLOGIC >. te 40: Find the conjunctive normal form and disunctive | Solution: for forte follow: 0 papva = pa~pviong ee = evipa@ =paq 0 ov ° Siialy ( pow va an~lpna) = aat-py~a) ution: = (Gan piv(qn~al= @a~pive va)oas va va eet Meva a Here, (p 4 (~ py dv (qa~ (8.04) = @aadva = (PAgy(an~p) =(Pv~ PAG += Bava ~ dot =TAqeq i: See Gi) @y~ dae pv~-a va @ aga = PA Alava) = py ~avala-py~ava = pv@aqrent Wo px@ vane & VO vaNAW@ varve) = @ vb va) A a4ve) = @ va) Alpyp) Atay) @ va)apatavp)-ent @ pv apy acave) (Fv @ apap) @ apratave) @apagv@ Apap) apy @ ap) = Fv@ ap) @ np) = anf (Single conjunet) cample 11: Find the conjunctive and dsunctive normal forms for 1e following without using truth table. @ > 900-7) @ (@re> 09) ution: Dp rq) Aa>p) =~ PYaat~avp) = (enN other, using the dstributve lw onthe above cn, we have, PVaA-aviPvaapl=(-PA-gviqn~av(~P, plviaap) (pa~a)= @ap) > dnt pape aano (i) Soltionin7 6. smple 12:Ifp and q are false propositions, state whether (pv DA P= @)istueor false. Very. ution: The statements false Consider the tu table felal=5| a [oval =pv=a | vaatev- fele[r{ +e | + - E cample 13: Show tat Dip A(= Pv @) v(aA~ (PAGS valent oq SW (ov~@at-pv~q) vaisa tautology. a = pyTAtpvD aT st ‘Example 14: Obtain cof of each ofthe following @ promo fo ~@vaerpag Gi q VR A~Q) v(~-pA~ 9) Solution: ©, PAlpa) = (PAt-Pva) pa~p)vipadecv pag (pag) ~enf (i) Solved Ex.9 Gi) qvipa~ay(-pa~@ = (av eln@y~@vi-pa~@ qv plaTv(-pa~@ = Gv pv-pa~a i @vev~palanpy~a @vDatevav~@=Taipyn sTAT = Ts vp) a Gngledsiune In other words, whenever A is true, B should be true | The following are some basic examples of logical implication. ‘Examples 15: Find DNF of (p > q) A(q -*P) v. Find CNF of p ep y~9). Solution : (p+ @) (4p) v P=((~ PVA AC GV PNY i PatavedViaat- ave) yp BA PA~@v (= PAPIY(GA~ DV (AAP) VP (pan av FVEVG@apive = (PA QvQaplvp) Pol py-a)=(p(- py ~q)) a py~a) >) = pve py~ Qa ((py~@vp) (PY = @A(ipAgvp) py-aa@ve)atave) (onr) (cn (~pv=Qapatpva) {CRETE MATHEMATICS (aaTU) SOLVED EXAMPLES Example 16: Show that (p nq) = (p 9) Solution: Consider the trath table A a | pag | pa | bad boe tor T T ua tle F F T Flor F T a Fle F 1 1 Heneelp ng) = @5@ Example 17: Show that (p = @) => p > (p aa) without constructing truth table Solution: ‘We have to show that fp qis te, then sos p= (p Aah Suppose this isnot the ease ‘Then this means that p> (p «has tuth vale F, Paaisk. ‘This can happen only when q is F Bu pisTand Is F, then sos p, since we assume p -» qi. ‘This contradicts the truth value of p which iT. Hence p —>(p 4) is true. Hence, this the logical implication) Fxample 18: Prove that (p-~»(q > 1) =>((p > ) > 1). ‘Solution: Consider the truth table Plal rl gr por | (pee) tr or fa fs 7 tel] | or fe |r r tirlel e | ork lade F tele} | or Je |e 1 Fir} | or for | or r Fler] r | or fa dit 1 Frit | or fr | 1 Flele] s] + |r| + 1 Since the given statement forms have the same truth valves, each {ogically implies the other, Le. they are in fact equivalent forms eR EXERGSE LATE 1L Show thatthe truth values ofthe following forms are independent of their components: ® (Papaya @ POME(rav-Pr~a) 2. Determine which of the forms given below are tautologies, contradictions or neither. © @>-P>-P @ GFG>9 (P9359 Gi) EVMa~P>g @) (P>daq>n>O>9 O Pade p. 3, Show that p> (4 ai (= pa~ @) are logic a ntfane gander (OP tauiaent ah "truth table method. ono> a @ om 7, Obtain enf of ( (~ P> 8 Seeman of aie 946 ically imply (P > @) > (p- pag) (PAP >9)~ 4 9, Show that (p —» (4) lost 0. 10, Without const @ Gra 92 Pva ructing truth tables, show that co} wad= Pd a4 i 31 Show eos Wit ng frst i al forms, 12, Obtain the conjunctive and disjunctive normal forms, — 0 prood i) (py-d>9 we nti sa poate ing statements ae auolesal @ @r~ra—a . f @>de@v~P) j 14, Find the daf of @) aya (pag q ‘method, 15, A computer has been built to answer any yes oF no. question but it has been programmed either to ar all questions truthfully orto give incorrect answers toa {questions If we wish to find out whether Fermat's I Theorem is true, what question should we put to computer, so that it will give a correct answer. [a1 METHODS OF PROOF. Whenever an assertion is made, which is claimed to be true, one has to state an argument, which establishes the truth of the assertion In Mathematics, we prove theorems; a theorem being 2 mathematical assertion which is shown to be true. A proof consists of a sequence of statements. Some ofthese statemer ray be axioms (universal rath) some may be previously p theorems and other statements may be hypothesis (assumed to be tue), To construct a prof, we need to deve new assert {rom existing ones, This is done using Rules of Inference. Before we discuss some of these rues of inference, let us formally define 2 Valid Argument. Definition: (Avalid argument i a nite sequence of statements py av called as Premises together witha statement C caed the onclusion such that pia pa An Cis a tautology, “This concept s used inthe following methods DISCRETE MATHEMATICS (ATUL aan Basic Locic “Tr iwodus Ponens (Law of Detachment); Mis windy This rule is presented inthe felling form m Then te inferential form is pa pva P =P a a ‘the assertions above the horizontal line ate called premises for eee typothess. vypothese “4. Hypothetical syllogism: Rue isin the form “The assertion below the line is called the conclusiot: This rule constitutes 9 valid argument since (p 4 (p> @) —» 4 ‘a tautology. Poa gar Framples If Suresh ge 9 Fst cbs, he wil get a job easly ‘Suresh gets a fst els. Therefore he will get a job easly. Let p. : Suresh gets fst class. + Sureshwil get a job easily ‘Then the premises are pq and ps the conclusion sq “The nfereniaform is thus P peee wa Hence this form of argument vali 2, Modus Tollens (Law of Contrapositio “This ules presented if the following form ‘Example: If Suresh gets first class, he wil get a job. Suresh does. not get a job. Therefore Suresh does not get a first class. Let. p + Suresh gets a fist class. + Suresh gets ajob. ‘Then the inferential form is po =4 a7P Hence the above argument is vali. 13. Disjunctive Syllogisms: The rule of inference is presented | in the form pva oP ae Note that (p vq) a ~ p> qs a tautology (~ pis. pvqisT implies qisD (Ee Example: Either itis raining or it is windy. It is not raining. ‘Therefore itis windy. =Poe Note that (p -» 4) (a>) — (Ps a tautology. Hence the above argument isa valid argument. | Example: I Suresh studies hard, he will obtain a frst clas. If he obtains a fist class, he will get a good job. Therefore if Suresh studies hard he will get a good job. Let p : Suresh studies hard, tHe obtains a fist class, f+ Hewill get a good job. Hence the inferential form is. po4 qor poh) Hence the argument is valid. SOLVED EXAMPLES | fixxample 1: Determine whether the following is a volid argument: If Geeta goes to class, she ison time. But Geeta i late She will therefore miss class. Let. p.: Geeta goes to class. @ : Geetais on time The rule of inference is Solution: pra P This is the law of contraposition or Modus tollens. Hence the ple 2: | happy ifmy program runs. A necessary ondlion or the program to run isi should be eror fee. @m not happy. Therefore the program i nt error fee. Solution’ Let,p : Lam happy. 4: Myprogram runs 1 Ttshould be error fre. let pi tis raining. ‘Then the argument is DISCRETE MATHEMATICS (@ATU) Ee a3) aoe a the following assignment of truth values to p, f Lethe uth values ofp, 4, be F, FT respectively. Then q -» pis ris T and ~ pisT. But the conclusion ~ ris Hence the above arguments invalid ample 3: I today is Tuesday, then there is atest in Computer “fence or in Discrete Mathematics, If the Discrete Mothematicy Professor is sick, there will be no test in Discrete Mathematics Teter is Tuesday and the profesor of Discrete Mathematics is sick lence there willbe atest in Computer Science. Solution: Let.p : Today sTuesdy. + Theteisa testin Computer Science 1: Theresa testin Discrete Mathematics. 5 5 Discrete Mathematics professors sick Arguments Poave Pas =a Wherever P(g), 8 ~ pas ae tue qisalso te. Thisis because “8 : Pasis implies pis T.sisT.s ie Timplies ~ ris, P> (avis Fimplies gis, risk, a9 basic ises are inconsistent mat the following premises a7e a Brampte 5: Shows through illest, then he (If Jack misses many classes high school (a flac fil high choot, then he is Ga ock reads lot of books, en hei mt HET Go) Jock misses many cosses through ness then he a lot of books Solution: Let,p_: Jack misses many 1q.¢Jack fails high schoo! Jack is uneducated Jack reads a fot of books: yneducated. not uneducat lasses through i Then the premises are: pa aon p> Consider the followin assignment of truth values t0 Pr a p 4 £ T 1 T Then p> aisT, aor, e-)-tisT. out po sisk Hence, the premises ae inconsistent. 7 Example 6: Determine the validity ofthe argument given: Si: If lke Mathematics then 1 will study. Hence the arguments vali Sp Ether wil study or wil fait imple 4: Ramesh is studying ORACLE or he ts not studying aa er cane acre JAVA If Ramesh is studying AVA then he isnot studying ORACLE. | Solution: Let,p + Ilike Mathematics Therefore he is studying ORACLE 4: Twi study Wie the above statement in symbolic form and test the validyof swift the argument using laws of logic Spa Solution: Let.p : Rameshis studying ORACLE. Stave 4: Ramesh is studying JAVA, syieoep ‘Argument i Z For vad, S15 should logically imply. py-a Assign the uth values T, 7,7 U T.T to pg, respectively, Then $4 52s T but is false Hence the argument i invalid a SAA] Sxompte 7: Test the vty ofthe ‘Argument is invalid, since consider the following assignment of twat values top and 9, Lt the truth values of p and q be both F respectively. Then pv ~ has truth vale Land q-> ~ p has truth value T. Hence forvaldty of the argument p should have truth yale, which not the ease S— ‘ergument: Ifo person is ‘he & unboppy. If @ person is unhappy, he dies young, ‘poor person dies young. Solution: Let, p + Persons unhappy Person's poor © Petson dies young CRETE MATHEMATICS (BATU) otic form the argument is Spa Siaoe spor above argument is the value of Hypothetical syllogism. nce itis valid reratively, et pre F. then p is Tand ris F. itp» qis 7, mn qisT, But q ~ 5 F Hence, conclusion is fase implies one the premises is false, Therefore the argument is vali imple &: Determine whether the argument given is valid or not. 1 ty hard end I ave tatent, then Twill become a musician. If ‘a musician, then I wll Be hoppy sofore, Iwill not be happy. then I did not ty hard or Ido not olent tet ps Hy hard q+ Thave talent olution: + Twill become a musician 5+ Twillbe hoppy 1 argument is then pat in symbolic form as Ss Pagar Sits Si -socpy-q suppose argument is invalid. This means that for some ignment of truth values, Sis T, Sis T, but Sis F. S will ave uth value Fis ~ sis 7, and ~ pv~qis Fie.sis F,pisTandq T. Since we have assumed S2 to be true, the truth values of r fand 5 are both F. since S is also, by assumption, true, r is F implies either p or q is F. This is a contradiction, since by sumption both p and q ate T. ven arguments valid [1.12 PREDICATE LOGIC( FIRST ORDER LOGIC) >redicate Logic alto called as First Order Logic, is an extension of ropositional Logic. to analyse general statements involving riables and quantifers, In Propositional Logic statements are 2s independent entties,even if they have some common Ft Words dencting quantification such as “all,’some’ “every” sy no significance inPLHence afguments involving such words not be tested for validity in Predicate Logic. Consider the ing argument All men are mortal Socrtesis aman Herce r Socrates is mortal “(2.9 ASIC Loic ‘The above argument representation as p « 1, is obviously not a valid formula since the relationship between the statements is ‘ot considered at al. The above drawbacks are overcome in predicate logic. The ‘components in predicate logic are () variables (i) predicates (ii) quantifiers to indicate if the statement is always. true, sometimes true or never true. Some examples” All men are mortal, “There exists n x such that x is a bied and x can fly," No odd number is visible by 2° Rebbtionshin between the predicates canbe sated using logical Connectvs. Al the tues, definitions and theorems in Predicate Logic are naturally extended to Predicate Logic Remark The term “st order in Predicate Logic indicates that voribles are quantied only over objets, whereas second order Consider the following sentences ("els tall and handsome” (i) "e632 5° GD Kaye IO ‘These sentences are not propositions, since they do not have any truth value, However, if values are assigned to the variables, each fof them becomes a proposition, which is either true or false. For ‘example, the above sentences can be converted into, ("Hei tall and handsome". ( 24325" iy 2+ 5210" Hence we have the following definition. (true statement) (false statement) ‘an assertion tht contains one or more variables is called @ predicate; its truth valu is predicated ater assigning trth values ots varioble A predicate P containing a variables x, 33 srplace predicater~ ‘Examples () and (i are oneplace preicats wile Example i is a 2-place predicate. - If we want to specily the variables ina predicate, we denote the predicate by P(x, x2, » xp). Each variable x; is also called as anargument: in is called an For example, (“eis a city in India” is denoted by P (2). (id) “xis the father of y"is denoted by P (xy). ii) “evry 2 2" is denoted by P (xy. 2) ‘The values which the vatiables may assume constitute collection or (a) set called as the universe of discourse. ee DISCRETE MATHEMATICS (oATU) When wo 5 ely 9 value fra vable appeatng in a pret, ‘wo bind that variable, ee " A predicate becomes a propos here ‘Proposition only when alls valables aro Consider the following examples (0 Porxeaes, ese unre of elicourse be the sto al tae. Bning Putting x © ~2, we get a false proposition. Binding x by Putting x= 2, we get a tue proposition 6 PG yhx + y © 20.Let the universe of ascours be the set of natural numbers, Putting x 2. we get the oneplace predate Py: 2 + y= 10 Further seing y= 0, we obtain the propstonP,9weh rue However two sey 1, P (10 fe propostion. In tach case, we have bound both the variables (by Ly by 9 and bay (by Ly by Band y ‘second method of binding individual vrabes ina prelate Is by quantitation ofthe variable 2.22.2 Universal Quantifier 1 Pts) is & predicate wih the individual valable x as an argument: then the assertion "Fr all x, Pat which Interpreted as “Fr all values of x, the assertion Ps e's a statement in which the variable Is said to be universally quantified, iy ‘We denote the phase "Fora by V, called the universal uantifer. The mearing of Wis for all” or "For every r “For each’. 8 11 Pais we for every possible value of then V x POI tu otherwise W x Pale value of y, there yy "for each ‘vy ax Poy) the propose ‘an x such that Psy Bs Ue a ay P (xy) Is the proposition | value ofy such that PO yHI88UE «yi the proposition “FOr tion “There ent 2 vale of a 11 values of x andy, pf consider the universe as the Set of all jcate x+y = 10 tvxay Poe is interp ists an integer ¥ Examp! Let Pts, y) denote the pred Then the symbolic statemen For every Integer % there © wey =10(ey=10~ (a) Now consider the statemer is ea as “hee ets ani aixey = 10" This statement | a The statement ax By P 991s read as “there est ti uch that x+y = 207 This sa true statement rantified Statement spt ay ¥ x PO yh This integer ¥ 50 that forall ney is of course false. mm xandy 1.12.4 Negation of a Qu di ‘Coneldar tho statement Vx P Od. ls negation fs Tet ‘ase that forall, P (i tre”, This means that for so ay not tue, o nother words there exists an suc ta le is true, Hence v x P(e) is logical i Example: Consider the example “AI the invited guest a present forthe dinner” 1 “The negation i: “Al the invited guests were NOt Present fot) dinner, equivalent Some guests were not present were, for the dinner, Le. 3x (= x: xlsaguest P(x)_:_ was present forthe dinner. ‘Example: Let P(e) be the predicate “x 2 0% where xis any postive Integer. Then the proposition W x P(e) is true. However if xis any real number, then V x P(e isa false proposition, ‘Example: Consider the statement "There is a student inthis ‘who is not familiar with C programming”. The negation above statement is “Al students in this class are familiar (1.12.3 Existential Quantifier programming”. Suppose forthe predicate ox, ¥ xP fale but there exists] | Hene® symbolically, 3x (~ PU) and Vx (Ped) are. a atleast one vale ofx for which Pf tue then we say that in | | eauvatent this proposition x's bound by exlstental quantiiation, We summarize these results inthe following table We denote the words “there exists" by the symbol 3. ‘Statement, Negation © Then the notation 3x Pa) means “ere ext a value of (in| vx) axcPmy il ‘the universe of discourse) for which Plo s tue: 3x(- PA) VxPG) Example: Let Pe be the predicate "x + 3 = S'and|et the universe Yetta) axPO) of discourse be the set of al integers. Then the proposition 3x i P(x is true (by setting x = 2) but Vx P69 is false, Let P (xy) be a two-place predicate, then ax Vy P(x, y) is the proposition “There exists a value of x such that forall values of y, PCy is true” for arguments involving propos IATICS (BATU) TE MATHEM have the famous lines: aii men are morta Socrates is 2 ma therefore Socrates mortal. sis a universally quantified statement, about an attibute of sty tat is of mortality, over the universe of men. The Y is thot Socrates Being a member ofthe set, satisfies the bute. is form of argument i called as universal instantiation, as we tating a prtcalr instance of general (versal statement above type of statement can be formulated in symbolic guage a yx Pra) here xis an element ofthe universe, P(x) the attribute of x and a, particular member of the universe, at, we have a second type of statement, as illustrated by the lowing example: is a square-re integer. Therefore, there are integers, that are uare free symbolic fom, we can express the above statement as: Pla) = 3x POD such a type of statement is called as Existential generalization. at is making a general statement, from a particular instance ule 6f universal instantiation leads to the following rules: vx) KX) Pia = O15) ¥% (Pe) —> Qf) ta = Pj ‘SOLVED EXAMPLES. “Example 1: Allaw-obiding citizens obey the tof rules. Mr. Joshi isa law-abiding citizen, Therefore he obeys the trafic 4 Universal Modus Ponens: 2 Universal Nodes Tons: to symbolic language, we have, Yeu > 700) La Te) ere the uriverse of discourse is citizens, LX) = x is a law~ abiding citizen - obeys the trafic ules. ll the fist year students know C-programming nisho is 0 fest year student. Therefore, Manisha knows C- mening, azn basic Locic In symbolic form, the statements: Vx (Cb9 > PO), ta Poa} ‘Example 3: All cats lke milk, Timmy does not like milk, Therefore, Timmy is nota cat. symbolically, x (Coo) -» Moo) = Mo) = Cla} ‘Apart from these standard forms, we test the validity of quantified forms of argument, along similar lines as we did in the case of propositional arguments. Example 4: Determine the voidty of the following argument: Si: Ally friends are musicians Sp: John is my frend. 51: None of my neighbours are musicians. 5+ John is not my neighbour. Solution: Let the universe of discourse be the set of people. Let Fe) xis my friend Me): xis @ musician No): xi my neighbour Then argument in symbolic form is St Wie (F) > MOO) Sa :7Fl@) (a = John) Ss_+_ We (NO) > ~ Mod) S = Ne) Suppose ~ N(a) has value Fie. N(a) is T. Since Sy is T, we must have ~ M(a) is Tor M(a) is F. But Sis, hence we must have F(a) ‘to be false, but this is a contradiction. Hence, if Sis false, either of, Si r should be false. Hence argument i valid. Example 5: Babies are illogical. Nobody is despised who can manage a crocodile. logical persona is despised. Therefore, babies cannot manage crocodiles. Solution: Leta be the domain of people. < Let, 80) + xis a baby. Ue) = xis logical D(®) : xis despised. Co). + x can manage a crocodile. Statement sas follows: Sk VC (B(e) > ~ LO] Sr VIC > ~ DO) Sy Vel~ Loo > doa Se WXIBG) 3 ~ COO) Suppose Vx [8(x)-» Chis DISCRETE MATHEMATICS (axTUy This means 3. = Tee Means 3X = a such thats Bs T and ~ Cl) Fe. Cl) 9" $2 be, this means that = Da) s To Dl) iF For Ss tere Jument is va Ten mPle 6: Suppose the universe of discourse isthe set of integer. et P (& 9) be the predicate x ~ y = 0. indicate which of the ‘Propositions are true and which are false, © Pax w Pay Go vn ayP oy () 3x vyP yx Solution: O PR aVistale ( PG.3istrue, (i) For each value of x sety = x ie.ifx = 0,y = 0, =lete Then P (sy) is tue, Hence V x3 P (x y) is true (In this tase, there should be a specifi value x = xo such that PY.) s true, no matter what the value of y is This means xo ~y = 0 for any vale of y, obviously false. Exampie 7: Tronseribe the following into logical notation. Let the universe of discourse be the real numbers. xeLy @ For any volue of x, is non-negative For every value of x, there is some value of y such thot x yeh id. There ore positive volues of x and y such that x-y > 0 (G2) There is @ value ofx such thot ify is positive, then x + y és negative. (For every value of, there is some volue of y such that x yet. Solution: © vxpteo (@ vxayte-y=¥ Gi) 3x3y i> Hay > Oate-y> On Gi) BxVYIY> 0 ->6e+y <0) z 0) vray be ‘Example 8 Negate the following in such a way thatthe symbol ~ doesnot eppear outside the square brackets. © vxpe20) (Ix fe-2=1) vray beeyed x Wy [oe > y) > 6 > AI SS) a2 Solution: vere is a value fy Negation of the statements “Tete : em ical notation is 3 statement i 1 | Hence Negation of the ; <0. (a) Negation i “For all values 0 form i faux 2A vxte-223) ere uch that for all values {iy Negation is “There is 2 valu xy e3" Hence the requis Trample 9: Write the following statements quantifies @ Als (ip There i 0 gir student In Je of x5 od form is 3xV YB ‘in symbolic form) students have token o course in communication the class who is also 0 59g person {i Some students ae intligent but not hardworking Solution: (Let Pox: Student x has taken 2 skis ‘Then the statement can be course in com waltten as Vx PO). (i) Let Pe + isa student QW: xisagil RG): is a sports person. and x is a sports person, Hence this statement vritten a5 3x (ts) a QU) 4 ROD: (ii) There sts an x such that x is intelligent, but x. 3 XIPO) A ~ QU0) ‘Example 10: For the universe of al integers, let PO. Qs, and Ts) be the following statements: Po) : x>0 Q0) : xiseven AO): xis 9 perfect squore So) vis divisible by 4 To) + xis divisible by 5 Waite the following statements in symbolic form ( Atleost one integer is even, There exists a positive integer that is even. Gy If xis even then xis not divisible by 5. (ia) No even integer is divisible by 5. (0 There exists an even integer divisible by 5, wo BAe een ond x 0 pret sue, then x is di Solution: © 30% . (310) 0 Q001 {ETE MATHEMATICS (BATU on iy vx 1900 > ~ TOO G) vxtQea > ~ TH (v) 3x1Qo) 9TH) (a) Vx[QQ) a ROO > S09} the above example, determine the truth table of each ment ution: (0, (Os and war foe te 11 Rewrite the following statements using quontifer bes and predicate symbols : ()albieds coy (i) Notall bids can fh. {i Some men ate geivs. () Some numbers are not rational here is a student who likes, Mathematics but not Geos ey. Eachintegers ether even of odd. Gv) and (ui are true statements, Statements (i) Fo): “Then the statement can be written as: x 160) > Fs. G 3x{659 A~ Fe] or equivalently ~ tv x (BO) — Fes (ii) Mo) xisaman Go): xisa genius Statement is interpreted as 3 IMCs) 9 Gt (NO) = xisanumber Rid : xisational Statement is in symbolic form, 3.x ING)» ~ Rbd) oF equivalently ~ [2x (N69 —> ROO] So) + xisastudent Mg): likes Mathematics ia) + xlikes Geography > ‘Statement is:3 x (Sha « M(x) a ~ God) (16) = xis aninteger. 6): xiseven uy : xisadd symbolic form: x 1) > Ee) v O04 [Bcample 12: Negate each ofthe following statements: O vxblex @ By Pex elution: () 3x bem (i) Vartan [Example 43: Determine the truth value of each of the statement i negate every statement. @ %x+2=% @ Vues I> tion: (J Ve x+ 24x (DT Suxtlsx ansic Lostc [1.14 TECHNIQUES OF THEOREM PROVING ‘The properties of quantifiers that we have studied in the previous section, help us to evolve techniques for theorem proving. The ‘word theorem at once reminds us of some of the most famous theorems in mathematics such as Pythagoras Theorem, Binomial Theorem ote [A theorem is nething but an exercise in logical reasofing or ‘argument. It consists of two distinct parts ~ hypothesis and “conclusion. Hypothesis is a set of statements, which iftnie, implies the conclusion, Hence a theorem is usualy inthe form ‘of a conditional or biconditiana statement form. ‘2 function is differentiable, then its continuous. Example Example 2: For real numbers xy; 32 = y? © x =24y. However, there are also many theorems, which are not strictly in the form of conditional or biconclitional Example 3:/2 is an irrational number. Example 4: Every postive integer isa product of prime numbers. In what follows, we shall consider some typical examples, wich llustrate some of the techniques of theorem proving, ‘An important principle applied in theorem proving is the Rule fof universal. specification, which states that if PO) is @ statement for a given universe, and if Vx Pts is true, then (a) is true for each a in the universe. ‘The following example illustrates this idea, All men are mortal Socrates isa man ‘Therefore Socrates is mortal Inthe above argument, if Pow) QW): xis mortal, then let s represent the particular person Socrates, then the argument in symbolic form is WIPO) > Qoo Ps, ai (Observe that in the above example we have used the rule of universal specification in conjunction with Modus Ponens (or the rule of detachment), ‘Another example in similar vein, All integers are rational numbers. ‘nis not a rational number. Therefore xis not an integer. {In symbolic form, we present the argument as: Let, PO): xis an integer Q)_ + isa rational number. Let a represent = ee Then the argumentis y. % (PO) —» Qoo) in the above argument we have combined the rule of universal Specification together with Modus Tolens, and hence the ‘argument is va 22%) Pla) i, renzo ratnah Furor bein Hence, Im were ad #0, be #0- this conrad fat hams abo oy prising, Le"? = Oris tua Shea nis disblo by 6, is dsb by 2, 2 berg @ factor 6, Hence nt is divisible by jStus now tum our attention to some theorems in mathematics. Heree Theorem t: [nis isi by 6 tan? is dsb by 4 Proof, Theorem 5: Fora pie real nubers xi Producti pear and, hen _ x2 70Cy? 7. Lelnte aniniepe. Prove tat 7? + Sis even Proot We conser te flowing caces is even, ‘Since the product ofan even itager and any negeis ‘even, To and Sn a eve ‘consider he negaton ofthe cancusion, > 7 or 3 15 suppose 0 Q" is true, its logical equivalence ase need. Thworem | There anil any pine numbers ‘The product of integers edd and sumo Wo od root: | Letusassume te contra. : Inegesis even, Hence lat, a -» Pa be exhaustive listo al pin : Hence n? +50 is een ad she sm of evenintegers ‘urbes nin number. LetPy Pa <= ~ Pris proved to be true Theorem 4: |i anon-zerratona number, and ms an iran umber, then iis iratonal. Proof: LeL Pisa non-zero ratoral umber Qin is iatonal ‘We prove be conraposive,ie.*=Q-> ~ Prise, ‘Suppose iis not ational hen Ins ater. Hee, wcoenpessinasin= 2, wheroa 0, be 0. Then isaratensl unter Hencewecanexness 2 as V3 =a where panda arp ino, having no conmen fc Swtng we on? =p a Hencap? = 2%. Thi imps that is even an hen steven Here enna acura ‘Stee! = p2,oPis even and therefore q should le Pendqhavea || common acer ober ban. cs ence cea be nl ones toa ETE MATHEMATICS (BATU) 25) fof another important theorem (teal numbers are table) is based on the same principle ~proof by adietion and wil be discussed inthe chapter on sets, ‘ve howe to aeat with statements in mathematics, which o be proved or disproved. To disprove a given statement, Nhat we have to 42 8 t0 produce a counter example, Here are ilustrations. ‘SOLVED EXAMPLES Te i: Prove or disprove n? + Ain + 4 1s @ prime number every integer ution: ifn = 1, expression = 43 and for n = 2, iti 47, both rime numbers, However, this by no means imply that the beri prime for all n. Consider n = 41, Then 41? + 41 + 41 a counter example. a3, Hence, n= A ple 2 Prove o dsprove: If nd bare iettonal then oP is irotonal ution: Courter ample 1 Consider e199 ? = 20r3 Je Br Let A ond 8 be two matrices, with product AB vai 48 =0-0A=00r8 = 0. lution: Counter eve tea 3). 9-03) seas - (63) G3) Co) cS ETS De ee re mmampenin, ap tdon't graduate, it means that 1 did not pass cBinputer. ‘Therefore, fke computer scence, then Iwill graduate. 2. 161 stay up late, watching: TY, then I will be late nest ~— moming. ~~ eid not stay up late ‘Therefor, [am nat late the next morning © 3. Ff study, then twill pass. IfTdo not go toa movie, then Iwill study. I passed. Therefore, aid not go to @ movie. 4, If Ram's computer program is correct, then he will be able to complete his assignment in almost 2 hours. Intakes Ram over two hours to complete his assignment. Therefore Ram's computer program is not correct 5. If dive to work, then Iwill ative tired. 1 do not drive to ‘wore Therefore I vill ot artve tried. aASICLOGIC 6. twill become famous or Iwill not become a writer. wll become a write, Therefore, twill become famous. 7. 1 work, 1 eannot study either 1 work, of T pass Mathematics. passed Mathematics. Therefore, studied 8. fsa prime number, thon 2 does not divide 5. Ether 41 not even or 2 dvds 5. ut 4 i even Therefore, 3 nota prime number. 9. Al integers are rational numbers. The real numbers xis nok a rational number. Therefore, xis not an integer. 10. No human beings are quedrupeds. All men are human beings Therefore, no man isa quadruped. 11. Ina heterogeneous group of students, there are some who ae feshers, soma seniors and some are aleady graduates. There are students who are specialising in Mathematics of Physics or Computer science (0 student can specialise fn ‘only one). Considering the above description, write the following statements using quantifiers (There is a senior student, who is not specialising in ‘Mathematics 7 (i) No graduate student specialises in Physics. {i Some graduate students are nether Mathematics nor Physics (Every senior student in the group Is specializing in Mathematics or Computer Science, 12. Write each of the folowing in terms of quantifiers: (Every integers ether odd or even, (i) There are no even prime numbers. (ii) The sum of two odd integers is even. (9) Al primo numbers are not odd. 13. Let Pls, y) denote the sentence "x divides y", where the universe for both x and y comprises al integers. Determine the truth value of : WW, Vy 3x PO MKS YW PEE). Ai WV HPO I) 6 PY, D> I 14, Let POs y, 2) be the predicate x-y = the following into English. . @ Pe3m G) vxayP iy” Gi VP LY) Go) ByBXP ayn) 15. Let the universe of discourse be the set of real numbers. ‘Transcribe the following into an English sentence and indicate which are true and which ae false. @ axh=2) @ axv yryey Gi ay3zVx bey =2] (v) BzVxVyEe-y=2] 36. Negate each of the following in such a way so that the symbol ~ does not appear before a quantifier. © axvybeoy ——-@ vy3xb? =y1 Gi) Vey ly > 0) 6-y> OF 7. Giyea direct proof ofthe following: taking Transctibe each of DISCRETE MATHEMATICS (BATU) 18, 19, 20. a, For all integers m and o, if both m and n are even, then m+ nis even. (For all integers if both m and n are even, then mn is Give an indirect proof ofthe fllowing: xs y2100, then x2 50 or y2 50. (i Ihn?is odd, then nis odd. Prove by contradiction the following: If the average of four different integers is 9, then at least ‘one number should be greater than 10 Prove that if x is an ierational number, then 1 ~ inational Prove that if two lines are each perpendicular to a third line, in the plane, then the two lines are paral also POINTS TO REMEMBER ‘A proposition or statement is a declarative sentence uihich is ether tue or false, but not both. Combining primary statements using certain connecting ‘words lke “not’, “and”, “or “but, “while” ete is called Compound Statements. The negation of a statement is formed either by introducing the word “not” at @ proper place or by prefving the statement with the phrase It not the case that’. IF p and q ate the statements, the compound statement “p and q’ is called as the conjunction of p and aj and is denoted by pag. If p and q are statements, then the compound statement “p or q's called asthe disjunction of p and q, and is denoted by pvq It p and q are statements, the compound statement "fp then q's) denoted by p > q (hich) ie called a

You might also like