You are on page 1of 8

B.Tech II (CSE)-MATHEMATICAL FOUNDATION OF COMPUTER SCIENCE Dt: 13.08.

11

Mathematical Logic
Assignment 1.1 (Review Exercises) 1. What is a proposition? 2. What is a truth table?

3. What is the conjunction of p and q? How is it denoted? 4. Give the truth table for the conjunction of p and q. 5. What is the disjunction of p and q? How is it denoted? 6. Give the truth table for the disjunction of p and q. 7. What is the negation of p? How is it denoted? 8. Give the truth table for the negation of p. Assignment 1.2 Determine whether each sentence in Exercises 18 is a proposition. If the sentence is a proposition, write its negation. (You are not being asked for the truth values of the sentences that are propositions.) 1. 2+5= 19. 2. Waiter, will you serve the nutsI mean, would you serve the guests the nuts? 3. For some positive integer n, 19340 = n. 17. 4. Audrey Meadows was the original Alice in The Honeymooners. 5. Peel me a grape. 6. The line Play it again. Sam occurs in the movie Casablanca. 7. Every even integer greater than 4 is the sum of two primes. 8. The difference of two primes. Assignment 1.3 Ex 912 refer to a coin that is flipped 10 times. Write the negation of the proposition. 9. Ten heads were obtained. 11. Some heads and some tails were obtained. 10. Some heads were obtained. 12. At least one head was obtained.

Given that proposition p is false. Proposition q is true, and proposition r is false, Determine whether reach proposition in Exercises 13-18 is true or false. 13.p q 14. p q 15. p q 16. p (q r)

17. (p q) (pr)

18. (p r) ((q r) (r p))

Write the truth table of each proposition in Exercises 1926.

B.Tech II (CSE)-MATHEMATICAL FOUNDATION OF COMPUTER SCIENCE Dt: 13.08.11 19. p q 20. (pq) p 21. (pq) p 22. (p q) p

23. (pq) (pq)

24. (p (r q) p) 26. (p q) (qr)

25. (p q) (pq) (pq) (p q) Assignment 1.4

In Exercises 2729. Represent the given proposition symbolical by letting p: 5<9. q: 9<7, r: 5<7. Determine whether each proposition is true or false. 27. 5 <9 and 9 <7. 28. It is not the case that (5 < 9 and 9 < 7).

29. 5 < 9 or it is not the case that (9 < 7 and 5 < 7). In Exercises 3035, Formulate the symbolic expression in words using P: Lee takes computer science. 30. p 31. p q 32. p q q: Lee takes mathematics. 33. p q 34. p q 35. p q

In Etercises3640, formulate the symbolic expression in words using p Today is Monday: 36. p q q : It is raining: 38. (pq) r r : It is hot. 39.(p (r p) q)

37. p (qr)

40. (p (q r)) (r (q p)) Assignment 1.5 In Exercises 4146. Represent the proposition symbolically by letting p: There is a hurricane: 41. There is no hurricane. q : It is raining. 42. There is a hurricane and it is raining.

43. There is a hurricane, but it is not raining. 44. There is no hurricane and it is not raining. 45. Either there is a hurricane or it is raining (or both). 46. Either there is a hurricane or it is raining, but there is no hurricane. In Exercises 4752, represent the proposition symbolically by letting P: You heard the Flying Pigs rock concert, q: You heard the Y2K rock concert: r: You have sore eardrums.

47. You heard the Flying Pigs rock concert, and you have sore eardrums. 48. You heard the Flying Pigs rock concert, hut you do not have sore eardrums, 49. You heard the Flying Pigs rock concert, you heard the Y2K rock concert, and you have sore eardrums. 50. You heard either the Flying Pigs rock concert or the Y2Krock concert, but you do not have sore eardrums.

B.Tech II (CSE)-MATHEMATICAL FOUNDATION OF COMPUTER SCIENCE Dt: 13.08.11 51. You did not hear the Flying Pigs rock concert and you did not hear the Y2K rock concert, hut you have sore eardrums. 52. It is not the case that: You heard the Flying Pigs rock concert or you heard the Y2K rock concert or you do not have sore eardrums. 53. Give the truth table for the exclusive-or of p and q in which p exor q is true if either p or q. but not both, is true. Assignment 1.6 1. What is a conditional proposition? How is it denoted? 2. Give the truth table for the conditional proposition. 3. In a conditional proposition, what is the hypothesis? 4. In a conditional proposition, what is the conclusion? S. What is a necessary condition? 7. What is the converse of p q? 6. What is a sufficient condition? 11. State De Morgans laws for logic.

8. What is a biconditional proposition? How is it denoted? 9. Give the truth table for the biconditional proposition. 10. What does it mean for P to be logically equivalent to Q? 12. What is the conrapositive of p q? Assignment 1.7 In Exercises 17, restate each proposition in the form of a conditional proposition. 1. John will pass the discrete mathematics exam if he studies hard. 2. Rosa may graduate if she has 160 quarter-hours of credits. 3. A necessary condition for Ramu to buy a computer is that he obtain $2000. 4. A sufficient condition for Katrina to take the algorithms course is that she pass discrete mathematics. 5. When better cars are built, Buick will build them. 6. The audience will go to sleep if the chairperson gives the lecture. 7. The program is readable only if it is well strctured. 8. Write the converse of each proposition in Exercises 17.9. Write the contrapositive of each proposition in Exercises 17. Assuming that p and r are false and that q and s are true, find the truth value of each proposition in Exercises 10 17. Assignment 1.8 10. p q : 11. pq 12. (pq) 13. (p q) (q r) 13. What is the invers of p q?

B.Tech II (CSE)-MATHEMATICAL FOUNDATION OF COMPUTER SCIENCE Dt: 13.08.11 14. (pq) r 15. p (q r) 16. (s (p r)) ((pb (r s) q)) 17. ( (pq) (q ) (s r) q) Exercises 182 7 refer to the propositions p, q, and r; p is true, q is false, and r s status is unknown at this time. Tell whether each proposition is true, is false, or has unknown status at this time. 18, pr 19. pr 20. pr 21. q r 26. qr) r 22. r p 23. rq

24. (pr) r 25. (pr)r Assignment 1.9

27. (q r) r

In Exercises 2831, represent the given proposition symbolically by letting p: 4<2, q: 7<l0. r: 6<6. 29. lf(4 < 2 and 6< 6). then 7 < 10.

28. 1f4 <2, then7 <10.

30, If it is not the case that (6 < 6 and 7 is not less than 10). Then 6 <6. 31. 7 < 10 if and only if (4 < 2 and 6 is not less than 6). In Exercises 323 7. formulate the symbolic erpression in words using p: Today is Monday, 32. p q q: It is raining, r: It is hot. 35. (p q) ) r

33. q (r p)

34. p (q r)

36. (p (qr)) (r p)) (q

37. (p (p (q r))) (p (rq))

In Exercises 3839, write each conditional proposition symbolically. Write the converse, inverse and contrapositive of each proposition symbolically and in words. Also, find the truth value of each conditional proposition, its converse, inverse and its contrapositive. 38. If 4 < 6, then 9> 12. Assignment 1.10 For each pair of propositions P and Q in Exercises 425 1. state whether or not P Q. 42. P=p, Q=p q 43. P=pq, Q=p q 44. P=pq, Q=p q 39. If 4> 6, then 9 > 12.

45. P=p (q r),Q=p r) (q 47. P=pq, Q=q p 49. P=(pq) (qr),Q=pr

46. P=p r),Q=(p r) (q q) (p 48. P = p q. Q = p q 50. P=(pq) r, Q=p(q r)

51. P = (s (p r)) ((p (r q)) s). Q = p t Assignment 1.11 Exercises 52 and 53 provide further motivation for defining p q to be true when p is false. We consider changing the truth table for p q when p is false. For the first change, we call the resulting operator imp1 (Exercise 52), and, for the second change, we call the resulting operator imp2 (Exercise 53). In both cases, we see that pathologies result.

B.Tech II (CSE)-MATHEMATICAL FOUNDATION OF COMPUTER SCIENCE Dt: 13.08.11 52. Define the truth table for imp1 by (T 52): Show that p impl q q imp1 p. (T 52) pq T T T F F T F F p imp1 q T F F T (T 53) p T T F F q T F T F p imp2 q T F T F

53. Define the truth table for imp2 by (T 53): (a) Show that (p imnp2 q) (q imp2 p) p q is not true (E53) (b) Show that (E53) remains true if we change the third row of imp2s truth table to FT F. 54. Verify the second Dc Morgan law. (p q) p 9. 55. Show that (p q) ( p q). Assignment 2.1(44) I. What is a propositional function? 2. What is a domain of discourse? 3. What is a umversally quantified statement? 4. What is a counterexample? 5. What is an existentially quantified statement? 6. State the generalized Dc Morgan laws for logic. 7. Explain how to prove that a universally quantified statement is true. 8. Explain how to prove that an existentially quantified statement is true. 9. Explain how to prove that a universally quantified statement is false. 10. Explain how to prove that an existentially quantified statement is false. Assignment 2.2 In Exercises 16, tell whether the statement is a propositional Function. For each statement that is a propositional function, give a domain of discourse. 1. (2n + 1)2 is an odd integer. 2. Choose an integer between I and 10.

B.Tech II (CSE)-MATHEMATICAL FOUNDATION OF COMPUTER SCIENCE Dt: 13.08.11 3. Let x be real number. 4. The movie won the Academy Award as the best picture of 1955. 5. 1 + 3 = 4. 6. There exists x such that x < y (x, y real numbers). Let P(n) be the propositional function n divides 77. Write each proposition in Exercises 7 - 11 in words and tell whether it is true or false. The domain of discourse is the set of positive integers. 7. P(11) 8. P(1) 9. P(3)

Assignment 2.3 27. Write the negation of each proposition in Ex 1926 symbolically and in words. Let P(x) denote the statement x is an accountant. and let Q(x) denote the statement x owns a Porsche. Write each statement in Exercises 28-31 symbolically. 28. All accountants own Porsches. 30. All owners of Porsches are accountants. 31. Someone who owns a Porsche is an accountant. 32. Write the negation of each proposition in Ex 2831 symbolically and in words. Determine the truth value of each statement in Exercises 3338.The domain of discourse is the set of real numbers. Justify your answers. 33. x(x2 > x) 34. x(x2 > x) 35. x(x > I x2 > x) 36. x(x> I x2 > x) 37. x(x > I x/(x2 + 1) < 1/3) Assignment 2.4 39. Write the negation of each proposition in Ex 3338 symbolically and in words. What is the literal meaning of each statement in Exercises 4149? What is the intended meaning? Clarify each statement by rephrasing it and writing it symbolically. 41. From Dear Abby: All men do not cheat on their wives. 42. From the San Antonio Express-News: All old things dont covet twenty-some things. 43. All 74 hospitals did not report every month. 44. Economist Robert J. Samuelson: Every environmental problem is not a tragedy. 45. Comment from a Door County alderman: This is still Door County and we all dont have a degree. 46. Headline over a Martha Stewart column: All lampshades cant be cleaned. 47. Headline in the New York Times: A World Where All Is Not Sweetness and Light. 48. Headline over a story about subsidized housing: Everyone cant afford home. 38. x(x> I x/(x2 + l < 1/3) 29. Some accountant owns a Porsche.

B.Tech II (CSE)-MATHEMATICAL FOUNDATION OF COMPUTER SCIENCE Dt: 13.08.11 49. From Newsweek: Formal investigations are a sound practice in the right circumstances, but every circumstance is not right. 50. (a) Use a truth table to prove that if p and q are propositions, at least one of p q or q p is true. 30. Disprove the statement: For every positive integer n, n22n. Formulate the arguments of Exercises 3135 symbolically and determine whether each is valid. Let p: I study hard. Assignment 2.15 31. If I study hard, then I get As. (I study hard )/ I get As. 32. If I study hard, then I get As.( if I dont get rich, then I dont get As.)/ I get rich 33. I study hard if and only if I get rich.( I get rich)/ I study hard. 34. If I study hard or I get rich, then I get As. ( I get As.) / If I dont study hard, then I get rich q: 1 gel A s. r: I get rich.

35. III hard, then I get As or I get rich. (I dont get As and I dont get rich.)/ I dont study hard in Exercises 3640. write the given argument in words and determine whether each argument is valid. Let p: 4 megabytes is better than no memory at all. q: We will buy more memory, 36. p r , p q p (r q) r: We will buy a new computer. 37. p(rVq), r q P r 40. p r, r + q p

38. pr, r q q Assignment 2.16

39. rp, r p

Determine whether each argument in Exercises 4145 is valid. 41. p q, q q 42. p q, q p 43. p A p, q 45. (p q) A (r . s), P V r P V r

44. p(q r), q ( qr) (pvq)r 47. Comment on the following argument:

Floppy disk storage is better than nothing Nothing is better than a hard disk drive. .. Floppy disk storage is better than a hard disk drive. movie is too long. No had movie is short enough. Love actually is good, but it is too long. For each argument in Exercises 49-50, tell winch rule of inference is used. 49. Fishing is a popular sport. Therefore. Fishing is a popular sport or lacrosse is wildly popular in California. 48. Analyze the following comments by film critic Roger Ebert: No good

B.Tech II (CSE)-MATHEMATICAL FOUNDATION OF COMPUTER SCIENCE Dt: 13.08.11 50. It fishing is a popular sport, then lacrosse is wildly popular in California. Fishing is a popular sport. Therefore, lacrosse is wildly popular in California. Assignment 2.17 51. Fishing is a popular sport or lacrosse is wildly popular in California. Lacrosse is not wildly popular in California. Therefore, fishing is a popular sport. 52. Every rational number is of the form p/q. where p and q are integers. Therefore. 9.345 is of the form p/q. In Ex: 53-58. give an argument using rules of inference to show that the conclusion follows from the hypotheses. 53. Hypotheses: If there is gas in the car, then I will go to the store. If I go to the store. then I will get a soda. There is gas in the car. Conclusion: I will get a soda. 54. Hypotheses: If there is gas in the car, then I will go to the store. If I go to the store, then I will get a soda. I do not get a soda. Conclusion: There is not gas in the car, or the car transmission is defective. 55. Hypotheses: If Jill can sing or Dweezle can play, then Ill buy the compact disc. Jill can sing. Ill buy the compact disc player. Conclusion: Ill buy the compact disc and the compact disc player. 56. Hypotheses: Everyone in the class has a graphing calculator. Everyone who has a graphing calculator understands the trigonometric functions. Conclusion: Ralphie, who is in the class, understands the trigonometric functions. 57. Hypotheses: Ken, a member of the Titans, can hit the hall a long way. Everyone who can hit the ball a long way can make a lot of money. Conclusion: Some member of the Titans can make a lot of money. 58. Hypotheses: Everyone in the discrete mathematics class loves proofs. Someone in the discrete mathematics class has never taken calculus. Conclusion: Someone who loves proofs has never taken calculus.

You might also like