380 likes | 877 Views
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 ).
E N D
Umm Al-QuraUniversityCollege of Computer Science & Information systems Discrete Structures HW1 Solutions
Teaching assistant : MouniraAlotaibi Email: mdotaibi@uqu.edu.sa Office Hours: Sunday (3,4,5) Academic Advising: Tuesday (6) HW1 Solutions
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
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
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
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
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. 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
15. Determine whether (¬q ∧ (p → q))→¬p is a tautology. HW1 Solutions
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
22. Show that (p → q) ∧ (p → r) and p → (q ∧ r) are logically equivalent. HW1 Solutions
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
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
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
34. Find the dual of each of these compound propositions. • p ∨¬q • p ∧ (q ∨ (r ∧ T)) • (p ∧¬q) ∨ (q ∧ F) HW1 Solutions
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
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
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