Professional Documents
Culture Documents
Logic Notes
Logic Notes
gis. If Tcamy an umbrella, then it rains qP: Contrapositive of p> ais, ~q If do not camy an umbrella, then it does not rain ent may not ‘always have the form “If... then”. While In ordinary usage, the conditional statem: have to correctly interpret the statement. Consider the putting the statement into symbolic form, we following examples. Example 3: Write in symbolic form the statement: Farmers will face hardship if the dry spell continues. Solution: Let p< Farmers will face hardship qpis the correct symbolic representation of the given statement.Discrete Structures 26 Logie Example 4: ‘Write in symbolic form the statement : A sufficient condition for a function to be continuous is that the? function is differentiable Solution : Let pp: The function is differentiable 4: The function is continuous. The statement has to be interpreted as p is sufficient for q. Hené® the correct solution is p > q Example § : Wnite in symbolic form the statement Stavan’s father will buy him a computer only if he passes the ¢8am, with distinction. Solution : Let p+ Stavan's father will buy him a computer q+ Stavan passes the exam with distinction. ‘Then p—>» q 1s the correct symbolic version of the statement Example 6 : Put into symbolic form statement A necessary condition for a candidate to get admission ts to pass the entrance exam, Solution : Let Pp. Acandidate gets admission 4 The candidate has passed the entrance exam In this example. the statement q is necessary for p. Hence p +4 '5 the required symbolic form Example 7: Put into symbolic form the statement : Unless I reach the statio on time, I will miss the train. Solution : Let p< Lreach the station on time, q © Lwill miss the tra Then ~ p+ q is the required symbolic form, Hence it is IMPORTANT to REMEMBER that the statemer!/7s. Ifp, then q, qifp, ponly if q pis sufficient for q, is necessary for p. all are EQUIVALENT to the stateinent form naDiscrete Structures 27 ai Logie 2.2.5 Biconditional (If and only if) Lf p and q are statements, the compound statement 'p ifand only if q. denoted by p + q, is called a biconditional statement, Often “if and only if” is shortened as" p.© qisalso read as "If p then, and conversely” Many of the theorems in Mathematics are of the type “if and only i Examples : (i) Am integer is even if and only if itis divisible by 2 (ii) A right angled triangle is isosceles if and only if the other two angles are each equal to forty-five degrees ii) Two fines are parallel if and only if they have the same slope 42.37_Propositional or Statement Form : We know whata statement variable is (refer to Section 2.12), Using the logical connectives defined expression, involving the statement variables. The following are above, we can construct or form examples of statement forms ~@~vaop ) (Pao (Pr~4) (i) ((pagy (psn) Cpanya) ‘One can thus construct any number of complicated statement forms. from the statement variables by using the logical connectives ‘A Statement form hay no fived truth value. Itis only when tls assigned definite truth values, that we obtain the truth value of the statem Hence the tnith 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 We denote by ‘T the truth value tre, and by 'F' the truth value false In circuit logic, "Tis denoted by "I' and 'F by "0 2.3.4 Examples : Example 4: Using the following statements : p : Rajan is tall q.: Rajani is beautiful Write the following statements in symbolic form, (i) Rajani is tall and beautiful. (ii) Rajani is tall but not beautiful (iii) It is false that Rajani is short or beauuful (jv) Rajani is tll or Rajani is short and beautifulDiscrete Structures 28 Logie Solution ; @ paq i) pa~q (iti) ~(~pvq). @) py (~paag) Example 2: Express the proposition ‘Either my program nuns and it contains no bugs, or my program contains bugs’ in symbolic fort Solution : Let p My program nuns q_© My program contains bugs. Then the proposition can be written in symbolic form 38, (pa-qyya Example 3: Using the following statements p Iwill study discrete structures q Tull go toa move r . Lamina good mood Write the follow ng statements in symbolic form (i) If Fam not ma good mood, then I will go to a sO¥Ie. {a1} Lwill not go toa movie and I will study discrete stmuctures (iii) Twill go to a movie only if Twill not study discee€ structures (iv) Twill not studs discrete structures. then I am not iM 2 good mood, (Dee %) Solution: @ ~r34q Gi) ~qap (i) q>~p (iv) ~po~r Example 4: Write the following statements in symbolic form (Indians will win the world cup if their fielding igProves (ii) [f Lam not in a good mood or | am not busy, thet! will go fora movie. (iii) If you know object oriented programming and ortle, then you will pet a job, (iv) Lill score good marks in the exam if and only fl study hard.Discrete Structures 29 Logie Solution : ( Let p< Indians will win the world cup, q.: Their fielding improves. Then q -» pis the required form. (iy) Let p : Lam ina good mood. q: Fam busy. 1 Twill go fora movie. ‘Then ( ~ pv ~q) 91s the required symbolic form (iii) Let p_ You know object oriented programming q+ You know oracle 1. You will geta job ‘Then p 4 q— ris the required symbolic form (iv) Let p= Evil score good marks in the exam q: I study hard “Then p > q is the required symbolic form Example 5 : Translate the following statement into symbolic form : ( May 95) Trike uuty cost goes up oF the request for additional funding és desired, then a new ComPuGE will te purchased ifand only if we eam show thatthe curent computing facilities are indeed not adequate Solution : p © The utility cost goes up q+ The request for additional funding is desired fF Anew computer will be purchased s > We can show that the current computing facilities are indeed adquate, ‘Then (pv a) —? (re = SPIS the required symbolic form. Example 6: Write English sentences corresponding, to the following statement WCC PIADAE ww ro (pya Gin) (= -gy Pp) Ww) (av Epnet where p> Lwill study discrete structures, > Twill go toa movie 1 + Lam ina good mood. (Dec. 96}eaie Diacret Solution @ Gapraarert ICT do not sty discrete structures snd | po toa movie, then Tam in a pood mood rorya IC} am ina good mood, then { will study diserete structure oF {wil po to a movte 4 Naa {Fam not im good mood, then | will mot go toa movie oF L will study discrete structure Ww @verer Toll go toa movie off will not study discrete structure if and only af 1am jn a good mood Example 7 : Put the following statements info s¥mibolic form ()._Afeither Anit thes Mathematics or Aparna takes Biology, then Deepa will take cliemistry (38) Uns he stds, fhe wil fal in the examination Solution : (Let p> Aniftakes Mathematics Aim takes Biology 1 Deepa ill take Chemisty, ‘Then (p vq) ~¥ isthe requited forin (i) Let p © He studies 4) He will fal in the examination ‘The statement és equivitlent to the statement, "IT he does not study, then he will fail wn the Hence ~ p -»4 is the requited form Example 8 : To describe the various restaurants 1n the city, let p denote the statement “the food is good" rating is three-star", Write the following statement “the service is good" and r the statement "th statements in symbolic fora (May 93) (0 Either the food is good or service 1s good, oF both. (ii) Either the food is good or service is good, but not both {iid) The food is good while the service is poor. (iv) Ttis not the case that both the food is good and the rating is thuee-star (0) If both the food! and service are good, then the rating is three star (si) Tis not tme that a three star rating always means good food and good service,Discrete Structures 241 Solution : @ As"v" means “inclusive or”. the statement required is pv q. Hence the statement is p ¥ q. Equivalently the (i) We have to use "exclusive of” i. € statement is also p Aq v pq (iii) *While” is interpreted as “and”. Hence the statement is p a ~q (ix) “Iti not the case” implies negation Hence the statement is~(p #1). (s) The statement is (p Aq) > & a (vi) The statement is ~(r > (pq). Example 9: Using the following propositions - p : lambored q_: Tam waiting for one hour +: There is no bus translate the following into English. @ @vnap. (i) ~q>~p. (i) > p)v > PP. (May 94) Solution: (If am waiting for one hour or there is no bus. then I get bored. (i) If Lam not waiting for one hour. then I am not bored. (iil) If Lam waiting for one hour then | am bored, or if there is no bus, then I am bored Example 10: Write the logical negation of the following statements in the symbolic form (Gopal is intelligent and rich. (ii) Gopal is intelligent but not rich. (iii) Gopal is either intelligent or rich. Solution : Let p : Gopal q.: Gopal is rich (i) ~ (pq) which is equivalent to ~p v ~q intelligent Gi) ~ (pA~q) which is equivalem to ~ pv q (ii) ~ (pv q) which is equivalent © ~p a~qDiscrete Structures 242 Logic Example 11: Let phe “Jack speaks French" qbe "Jack speaks English" Give a simple verbal sentence which describes cach of the following. @ py qu) pan~q @) ~~P di) pag (n) ~py~q (wi) ~Cpa~@ Solution : @ pya: Jack speaks French or English (i) pray Jack speaks French and English. Git) pa~q: Jack speaks French but not English, ng (iw) ~Ppy~qa Jack does not speak French or he does not speak English Meme? = tis not true that Jack does not speak French, wi) ~(~pa~qQ: Ibis not truc that Jack speaks neither French nor English Example 12: Determine the contrapositive of each statement. If he has courage he will win. (ii) It is necessary to be strong in order to be a sailor. (iii) Only if he does not tire will he win. (iv) It is sufficient for it to be a square in order to be a rectangle, Solution : i) If he does not win, then he does not have courage. (ii) If he is not strong, then he is not a sailor. ii) If he tires, then he will not win, (iv) If itis not a rectangle, then it is not a square, (Dec 2000) Example 13 : Consider p : Youstay in Mumbai q_: Youvisit Hotel Taj Land. Determine converse, inverse and contrapositive of p + q i.e, If you stay in Mumbai, you visit Hotel Taj Land.Discrete Structures 213 Logic Solution : () Converse (q > P) “If you visit Hotel Taj Land, you stay in Mumbai (ii) Contrapositive (~ 4 ~P) “If you do not visit Hotel Taj Land, then you do not stay in Mumbai" (iii) Inverse (~p > ~9) "If you do not stay in Mumbai, then you will not visit Hotel Taj Land” Example 14 : Write the converse and contrapositive of the given propositions (i) Ihe teacher is absent then some students do not compete their homework (ii) If Lani not president of United States then I will walk to work. (iii) If Tam late then I do not take the brain to work (iv) UT have enough money then 1 will buy a car and | will buy a house Solution : (i) (a) Converse: If some students do not complete their homework then the teacher is absent (6) Contraposiive: Ifsome students complete their homework then the teacher is not absent Gi) (a) Converse : If Lwill walk to work then I am not president of United States. (b) Contrapositive: If will not walk to work then Tam president of United States. (iii), (a) Converse : If Ido not taken the brain to work then I am late. If | take the brain to work then Tam not late, (b) Conteapositiv (iv) (a) Converse = If twill buy a carand if | will buy a house then I have enough moncy INL will notbuy a car ora house then I do not have enough money (b) Contrapositiv Example 15 = Write down English sentences for th 250) is an even number’ he converse and contrapositive of: “If 250 is divisible by 4 then Solution : Let p< 250 is divisible by 4 q 250 is an even number Sentence takes the form p > 4 “The converse is q—> P, Which we can write as : "76250 is an even number then 250) is divisible by 4". “The contrapositive is, ~q—? ~P. Which we write as "1f 250 is not an even number then 250) is not divisible by 4"Discrete Structures: 214 Logic Example 16 : Consider the following advertisement fora game (May 95) (i) - There are three statements in this advertisement. (ii) Two of them are not true. (iii) The average increase in IQ scores of people who learn this game is more than 20 points, Is the statement (iii) trac? Justi your answer. Solution ; Let us suppose statment (tii) is false. Now statement (i) is true since there are actually three statement in the advertisement. This leaves us with statement (ii). Statement (ii) cannnot be true, since if itso, we shall have only one statement which is false, which contradicts statement (ii) itself. Hence statement (ii) ts false. which means that there are actually two statements which are true. Hence ‘statement (111) cannot be false. It has to be a tre statement. Example 17 : Write the following statements in symbolic form (The sun is bright and humidity is not high. Gi) [his already 900 am. should start my job Gili) If the requirement of computer Engineers is increased, then more seats will be offered by University and more computers will be purchased by the University computer Department if the rates are competable Solution : @ Let p © Ths sunis bright q: Humidity is high Then the given statement in symbolic form : Pa~q 00 a.m, Gi) Let r+ Mis already ss: I should start my job Then the statement in symbolic form ist A's Giiy Let p- The requirement of computer Engineess is increased. q¢ More seats will be offered by University 1 © More computers will be purchased by the University Computer Department s The rates are competable, Then the given statement in symbolic form is : p> (qa (s > 1) Example 18 : Prove that V2 is irrationalDiscrete Structures 215 Logic Solutio Let p be the statement, p > ¥2is irrational then p is the statement p : Vis rational We argue that p is false. If V2 is rational then there are integers m and n, with no common factor, such that, me V2 n a ni? ywaring BS = 2 Squaring 7 ie m= dn? ‘This implics that im? is even number, and therefore m is also even. Hence, we can write m= 2k, kis an integer. m= 4K? Now.sincen? = 4 nt was 2? Hence, n? is also even which implies that is even. But if both m and n are even, they have the factor 2 an common. This is a contradiction, since we have assumed that m and n have no common factors. Pp is False pis Tne and hence V2 is irrational (Note:p =p =->p=~p) Example 19: Suppose it is true that If Ram cones, so will Gopal and if Arjun will not come, then Gopal will not come Show that If Ram comes. then Arjun will come. Solution : Let p. q, r denote the propositions p : Ramcomes > Gopal will come ts Agjun will comeDiscrete Structures 216 Logic The given premises are : Pqand~ro~q If we assume ~ r—» ~q is true, then by contrapositive mile q—> ris also tme. Hence, p> qandq> er [Law of syllogism : Let p, q, r be three propositions If p> qand q > rare both trie, then p> ris true] By the law of syllogism, it is trie that p—> r ‘That is, if Ram comes, then Agjun will come, Example 20 ; Translate into symbolic form (May 98) IF play footba . Leannot study, Either I play football or I can pass DBMS. I played football, therefore 1 passed DBMS. Solution : Let p= Iplay football q + Lpass DBMS r : Teannot study @) IFT play football, I cannot study. In Symbolic form : p ->r (ii) Either 1 play football, or I can pass DBMS. In symbolic form | pv q (iii) 1 played football. therefore I passed DBMS. In symbolic form: pq. Example 21: Let p > Heistich q : Heishonest Write each of the following statements in symbolic forms using p and (i) To be poor is to be honest (ii) [tis necessary to be poor in order to be honest (iii) He is poor only if ie is dishonest iv) Ihe is po « he is dishonest Solution : @ ~paq Gi) ~poq Gi) ~pe~q — (s) ~pr~q Example 22: The converse of a statement is given. Write the inverse anid the contrapositive statements. "if T come carly, then I can get the car."Discrete Structures 27 Logic Solution : Converse of the statement 1s given. p Loan get the car. q : Tsome early. Inverse of the statement ts = = €1 cannotget the car, then I shall not come early Contrapositive of the statement is < + If 1 do not come early, then I cannot get the car.” Example 23 : ‘The conversc of a statem * Ife is considerate of others, then a manis 2 gentleman” nent is given. Write inverse and contrapositive statements Solution : Comverse of a statement is given, p > Manisa gentlergan, 4g < Heis considerate of others. Inverse of the statement ist + 1fa man is nota gentleman. then he i not considerate of others” Contrapositive of the statement is = " ithe is wot considerate of eters, then he man snot 2 gentleman Example 24: ‘The inverse of a statement 1s given, Write the converse ‘and contrapositive of the statement. “Ifa man is not a fisherman, then he is not isa swimmer.” ‘Solution : Inverse of the statement is given piA man isa fisherman, q.: Heisaswimmer. Converse of a statement is : = Ihe isa swimmer, then the man isa fisherman.” Contrapositive of a statement is : + tf he is not swimmer, then the man isa fisherman.”Logic Discrete Structures 2418 Example 25: The contrapositive of a statement is given as, "Hex <2, thenx +466" Write the converse Solution : Contrapositive of a statement is given, ps xtsr6 q x>2 Converse of the statement is "Ux > 2, then +4> 6." 2.3.2 Exercise : Example 1: The material is interesting and q denote the statement”. “The exercise Let p denote the statement are challenging’, and r denote the statement "The course i enjoyable” Write the following statements in symbolic form : “The material is interesting and the exercises are challenging, ‘The material is uninteresting, the exercises are wot chalanging and the course's not 8/0 able. If the matefial is not ineresing and the exercises are not challenging. then the course 15 not 0) Gi) (iii) enjoyable “The materia is interesting means the exercises are challenging, and conversely av) longing, bst not both, W Example 2: Let the propositions p Write the following sentences in symbolic form, using p, q and Either the material is interesting. or the exercises are into chal Gopal is tall q.: Gopal is handsome appropriate connectives. (Gopal is tall and handsome. Gopal is tall but not handsome. It is false that Gopal is short or handsome. Gopal is ncither tall nor handsome, Gopal is tall means he is also handsome. It is not tme that Gopal is short or not handsome, (iv) W) (wi) Example 3: Write the following statements in symbolic form (i The sunis bright and humidity isnot high ) Wt finish my homework before dinner and it does not rain, then | will go to the ball game. Gil (ii) ir you do not seem fomoros, it means Ihave gone to Chicago