1 / 34

Umm Al- Qura University College of Computer Science & Information systems Discrete Structures

Umm Al- Qura University College of Computer Science & Information systems Discrete Structures. Teaching assistant : Mounira Alotaibi Email : mdotaibi@uqu.edu.sa Office Hours: Sunday (3,4,5) Academic Advising: Tuesday (6 ).

zulema
Download Presentation

Umm Al- Qura University College of Computer Science & Information systems Discrete Structures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Umm Al-QuraUniversityCollege of Computer Science & Information systems Discrete Structures HW1 Solutions

  2. Teaching assistant : MouniraAlotaibi Email: mdotaibi@uqu.edu.sa Office Hours: Sunday (3,4,5) Academic Advising: Tuesday (6) HW1 Solutions

  3. Which of these are propositions? What are the truth values of those that are propositions? a) Do not pass go. b) What time is it? c) There are no black flies in Maine. d) 4 + x = 5. e) The moon is made of green cheese. f ) 2n ≥ 1¬. HW1 Solutions

  4. 1. Which of these are propositions? What are the truth values of those that are propositions? a) Do not pass go. b) What time is it? c) There are no black flies in Maine. The truth value = F d) 4 + x = 5. e) The moon is made of green cheese. The truth value = F f ) 2n ≥ 1¬. HW1 Solutions

  5. 3. What is the negation of each of these propositions? a) Mei has an MP3 player. b) There is no pollution in New Jersey. c) 2 + 1 = 3. d) The summer in Maine is hot and sunny. HW1 Solutions

  6. 3. What is the negation of each of these propositions? • Mei has an MP3 player. Mei does not have an MP3 player. b) There is no pollution in New Jersey. There is pollution in New Jersey. c) 2 + 1 = 3. 2 + 1 ≠ 3. d) The summer in Maine is hot and sunny. The summer in Maine is not hot and sunny. HW1 Solutions

  7. 8. Let p and q be the propositions p : I bought a lottery ticket this week. q : I won the million dollar jackpot. Express each of these propositions as an English sentence. a)¬p b) p ∨ q c) p → q d) p ∧ q e) p ↔ q f) ¬p →¬q g) ¬p ∧¬q h) ¬p ∨ (p ∧ q) HW1 Solutions

  8. 8. Let p and q be the propositions p : I bought a lottery ticket this week. q : I won the million dollar jackpot. Express each of these propositions as an English sentence. a)¬p I did not buy a lottery ticket this week. HW1 Solutions

  9. 8. Let p and q be the propositions p : I bought a lottery ticket this week. q : I won the million dollar jackpot. Express each of these propositions as an English sentence. b) p ∨ q I bought a lottery ticket this week , orI won the million dollar jackpot. HW1 Solutions

  10. 8. Let p and q be the propositions p : I bought a lottery ticket this week. q : I won the million dollar jackpot. Express each of these propositions as an English sentence. c) p → q If I bought a lottery ticket this week, then I won the million dollar jackpot. HW1 Solutions

  11. 8. Let p and q be the propositions p : I bought a lottery ticket this week. q : I won the million dollar jackpot. Express each of these propositions as an English sentence. d) p ∧ q I bought a lottery ticket this week, and I won the million dollar jackpot. HW1 Solutions

  12. 8. Let p and q be the propositions p : I bought a lottery ticket this week. q : I won the million dollar jackpot. Express each of these propositions as an English sentence. e) p ↔ q I bought a lottery ticket this week if and only if I won the million dollar jackpot. HW1 Solutions

  13. 8. Let p and q be the propositions p : I bought a lottery ticket this week. q : I won the million dollar jackpot. Express each of these propositions as an English sentence. f) ¬p →¬q If I did not buy a lottery ticket this week, then I did not win the million dollar jackpot. HW1 Solutions

  14. 8. Let p and q be the propositions p : I bought a lottery ticket this week. q : I won the million dollar jackpot. Express each of these propositions as an English sentence. g) ¬p ∧¬q I did not buy a lottery ticket this week , and I did not win the million dollar jackpot. HW1 Solutions

  15. 8. Let p and q be the propositions p : I bought a lottery ticket this week. q : I won the million dollar jackpot. Express each of these propositions as an English sentence. h)¬p ∨ (p ∧ q) I did not buy a lottery ticket this week, or I bought a lottery ticket this week and I won the million dollar jackpot. HW1 Solutions

  16. 12. Let p, q, and r be the propositions p :You have the flu. q :You miss the final examination. r :You pass the course. Express each of these propositions as an English sentence. • p → q If you have the flu, thenyou miss the final examination. b) ¬q ↔ r You do not miss the final examination iff you pass the course. OR: You do not miss the final examination if and only if you pass the course. c) q →¬r If you miss the final examination, then you do not pass the course. HW1 Solutions

  17. p :You have the flu. q :You miss the final examination. r :You pass the course. --- d) p ∨ q ∨ r You have the flue, or you miss the final exam, or you pass the course. e) (p →¬r) ∨ (q →¬r) If you have the flu, then you do not pass the course, or, if you miss the final, then you do not pass the course. f ) (p ∧ q) ∨ (¬q ∧ r) You have the flu and miss the final exam, or you don’t miss the final exam and pass the course. HW1 Solutions

  18. 27. State the converse, contrapositive, and inverse of each of these conditional statements. • If it snows today, I will ski tomorrow. • I come to class whenever there is going to be a quiz. • A positive integer is a prime only if it has no divisors other than 1 and itself. HW1 Solutions

  19. 27. State the converse, contrapositive, and inverse of each of these conditional statements. Converse: q →p Contrapositive: ¬q →¬p Inverse: ¬p →¬q • If it snows today, I will ski tomorrow. P= it snows today q= I will ski tomorrow Converse: If I will ski tomorrow, then it snows. Contrapositive: If I will not ski tomorrow, then it does not snow. Inverse: If it does not snow today, I will not ski tomorrow. HW1 Solutions

  20. 27. State the converse, contrapositive, and inverse of each of these conditional statements. Converse: q →p Contrapositive: ¬q →¬p Inverse: ¬p →¬q b) I come to class whenever there is going to be a quiz. The proposition can be written “If there is going to be a quiz, then I will come to class.” P= there is going to be a quiz q= I come to class Converse: I come to class, then there will be a quiz. Contrapositive: If I don’t come to class, then there won’t be a quiz. Inverse: If there is not going to be a quiz, then I don’t come to class. HW1 Solutions

  21. 35. Construct a truth table for each of these compound propositions. a) p →¬q b) ¬p ↔ q c) (p → q) ∨ (¬p → q) d) (p → q) ∧ (¬p → q) e) (p ↔ q) ∨ (¬p ↔ q) f ) (¬p ↔¬q) ↔ (p ↔ q) HW1 Solutions

  22. 40. Explain, without using a truth table, why (p ∨¬q) ∧ (q ∨¬r) ∧ (r ∨¬p) is true when p, q, and r have the same truth value and it is false otherwise. HW1 Solutions

  23. 10. Show that each of these conditional statements is a tautology by using truth tables. a) [¬p ∧ (p ∨ q)] → q b) [(p → q) ∧ (q → r)] → (p → r) c) [p ∧ (p → q)] → q d) [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r HW1 Solutions

  24. 15. Determine whether (¬q ∧ (p → q))→¬p is a tautology. HW1 Solutions

  25. 15. Determine whether (¬q ∧ (p → q))→¬p is a tautology. (can be solved by 2 ways) (¬q ∧ (p → q))→¬p ≡ ¬( (¬q ∧ (p → q) ) ) ∨¬p 1 ≡ ( q ∨ ¬(p → q) ) ∨¬p 2 ≡( q ∨ ¬(¬p ∨ q) ) ∨¬p 3 ≡( q ∨ ( p ∧¬ q) ) ∨¬p 4 ≡ ( ( q ∨ p) ∧ (q ∨ ¬ q) ) ∨¬p 5 ≡ ( ( q ∨ p) ∧ T ) ∨¬p 6 ≡( q ∨ p) ∨¬p 7 ≡ q ∨ ( p ∨¬p) 8 ≡ q ∨ T 9 ≡ T 10 HW1 Solutions

  26. HW1 Solutions

  27. 22. Show that (p → q) ∧ (p → r) and p → (q ∧ r) are logically equivalent. HW1 Solutions

  28. 22. Show that (p → q) ∧ (p → r) and p → (q ∧ r) are logically equivalent. p → (q ∧ r) ≡ ¬ p ∨ (q ∧ r) ≡ (¬ p ∨ q) ∧ (¬ p ∨ r) ≡ (p → q) ∧ (p → r) p → q ≡ ¬p ∨ q p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) HW1 Solutions

  29. 22. Show that (p → q) ∧ (p → r) and p → (q ∧ r) are logically equivalent. Another solution: (p → q) ∧ (p → r) ≡ (¬ p ∨ q) ∧ (¬ p ∨ r) ≡ ¬p ∨ (q ∧r) ≡p →(q ∧r) p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) p → q ≡ ¬p ∨ q HW1 Solutions

  30. 32. Show that (p ∧ q) → r and (p → r) ∧ (q → r) are notlogically equivalent. • If we let P be true and r and q be false, then (p → r) ∧ (q → r) will be false, but (p ∧ q) → r will be true. • If we let p and r be false and q be true, then (p → r) ∧ (q → r) will be false, but (p ∧ q) → r will be true. HW1 Solutions

  31. 34. Find the dual of each of these compound propositions. • p ∨¬q • p ∧ (q ∨ (r ∧ T)) • (p ∧¬q) ∨ (q ∧ F) HW1 Solutions

  32. 34. Find the dual of each of these compound propositions. a) p ∨¬q p ∧ ¬q b) p ∧ (q ∨ (r ∧ T)) p ∨ (q ∧ (r ∨ F)) c) (p ∧¬q) ∨ (q ∧ F) (p ∨ ¬q) ∧ (q ∨ T) HW1 Solutions

  33. The dual of a proposition The dual of a proposition is defined for which contains only ∧ ,∨ ,¬. It is for a compound proposition that only uses ∧ ,∨ ,¬ as operators We obtained the dual replacing every ∧ with an ∨ , every ∨ with an ∧, every T with a F and every F with a T HW1 Solutions

  34. 61. Determine whether each of these compound propositions is satisfiable. a) (p ∨¬q) ∧ (¬p ∨ q) ∧ (¬p ∨¬q) It is satisfiable. When the truth value of p and q is false the this compound proposition will be true. b) (p → q) ∧ (p →¬q) ∧ (¬p → q) ∧ (¬p →¬q) It is not satisfiable. c) (p ↔ q) ∧ (¬p ↔ q) It is not satisfiable. HW1 Solutions

More Related