CmSc 180 Discrete mathematics Homework 03, due section A: 02/05 , section DM: 02/06, by 5 pm 1. R epresent as “if-then” sentences the following sentences: Example: Tom is a student or Tom is a broker Let A = Tom is a student, B = Tom is a broker The logical expression of the sentence is: A v B We know that P → Q = ~P V Q Therefore A v B = ~A → B = ~B → A Therefore the sentence “Tom is a student or Tom is a broker” is equivalent to 1) If Tom is not a student then Tom is a Broker 2) If Tom is not a broker then Tom is a student a. We have to take the bus now or we have to wait 3 hours for the next bus If we don't take the bus now we will have to wait 3 hours If we don't want to wait 3 hours, we have to take the bus now. b. Tom is on team A or Peter is on team B If Tom is not on team A then Peter is on team B If Peter is not on team B then Tom is on team A c. You should have obtained 2 as an answer to this problem or you have not solved the problem correctly If you have not obtained 2 as an answer to this problem then you have not solved the problem correctly If you have solved the problem correctly then you should have obtained 2 as an answer to this problem 2. R epresent as “if-then” sentences the negations of the following sentences: Example: They were unsure of the address but they didn't telephoned Let A = They were unsure of the address, B = they telephoned The logical expression of the sentence is: A Λ ~B By De Morgan's laws ~( A Λ ~B) = ~A v B By the equivalence P → Q = ~P v Q, we have ~A v B = A → B Therefore the negation of the sentence is: If they were unsure of the address they should have telephoned a. We attended the seminar but we didn't get extra credit 1 Negation: If we attend the seminar we will get extra credit b. This polygon is a triangle and the sum of its interior angles is 180 Negation: If this polygon is a triangle then the sum of its interior angles is not 180 c. A new hearing is not granted and payments are due by the end of the month. If a new hearing is not granted then the payments are not due by the end of the month 3. C omplete the logical equivalences PΛP= P PVP= P P V ~P = T P Λ ~P = F PVT= T PΛT= P PVF= P PΛF= F P Λ (P V Q) = P P V (P Λ Q) = P P V (P Λ ~Q) = P De Morgan’s Laws: ~( P V Q) = ~P Λ ~Q ~( P Λ Q) = ~P v ~Q 4. F or each conditional below write its contrapositive, converse, inverse , disjunctive representation and negation. If necessary, apply De Morgan's laws. contrapositive converse inverse Disjunctive repr. negation P→Q ~Q → ~P Q→P ~P → ~Q ~P v Q P ~P → Q ~Q → P Q → ~P P → ~Q PvQ ~P Λ ~Q ~P → ~Q Q→P ~Q → ~P P→Q P v ~Q ~P Λ ~Q ΛQ 2 ΛQ P → ~Q Q → ~P ~Q → P ~P → Q ~P v ~Q P (P Λ Q ) → R ~R → (~P v ~Q) R → (P Λ Q) (~P v ~Q) → ~R ~P v ~Q v R P Λ Q Λ ~R Λ R) (~Q v ~R) → ~P (Q Λ R) → P ~P → (~Q v ~R) ~P v (Q P → (Q Λ~Q) R → (P v Q) (P v Q) → R ~R → (~P P → (Q v R) (~Q Λ ~R) → ~P (Q v R) → P P → (~R Λ ~Q) (R v Q) → ~P (~R Λ R) P Λ (~Q v ~R) (~P Λ ~Q) → ~R (~P Λ ~Q) V R (P v Q) Λ ~R ~P → (~Q Λ ~R) ~P V Q V R P Λ ~Q) → P ~P → (R v Q) ~P v (~R Λ ~Q Λ ~R Λ ~Q) P Λ (R v Q) 5. G ive direct proof of the following statement: The sum of three consecutive integers is divisible by 3 Let the three consecutive numbers be n, n+1, and n+2 Then we have: n + n + 1 + n + 2 = 3n + 3 = 3(n + 1) The sum is a multiple of 3, therefore the sum is divisible by 3 6. I n the back of an old cupboard you discover a note signed by a pirate famous for his bizarre sense of humor and love of logical puzzles. In the note he wrote that he had hidden treasure somewhere on the property. He listed five true statements (a – e below) and challenged the reader to use them to figure out the location of the treasure. a. If the house is next to a lake, then the treasure is not in the kitchen b. If the tree in the front yard is an elm, then the treasure is in the kitchen c. This house is next to a lake d. he tree in the front yard is an elm or the treasure is buried under the flagpole e. If the tree in the back yard is an oak then the treasure is in the garage T Where is the treasure hidden? Hint: see the solution of Sherlock Holmes problem at http://faculty.simpson.edu/lydia.sinapova/www/cmsc180/LN180_Johnsonbaugh-07/L07-problems.htm First we will assign propositional variables to the given statements: P1 = the house is next to a lake P2 = the treasure is in the kitchen P3 = the tree in the front yard is an elm P4 = the treasure is buried under the flagpole P5 = the tree in the back yard is an oak P6 = the treasure is in the garage We are looking to prove one of P2, P4, or P6 3 We will represent the givens as logical expressions: (1) P 1 → ~P2 represents (a) (2) P 3 → P2 represents (b) (3) (4) P3 v P4 represents (d) (5) P5 → P6 represents (e) P1 represents (c) From (1) and (3) by MP we have (6) ~P2 From (2) and (6) by MT we have (7) ~P3 From (4) and (7) by DS we have (8) 4 Therefore the treasure is buried under the flagpole P 7. S harky, a leader of the underworld, was killed by one of his own band of four henchmen. Detective Sharp interviewed the men and determined that all were lying except for one. He deduced who killed Sharky on the basis of the following statements: a. Socko: Lefty killed Sharky b. Fist: Muscles didn't kill Sharky c. Lefty: Muscles was shooting craps with Socko when Sharky was knocked off d. Muscles: Lefty didn't kill Sharky Hint: If you read carefully the statements, you will find that two of them are certainly false, and they will show you the answer. The statements (a) and (d) are contradictory, so one of them is true, the other is false, and the statements (b) and ( c) are false. From (b) being false it follows that Muscles killed Sharkey 8. S ome of the arguments below are valid by universal modus ponens or universal modus tollens, others are invalid and exhibit the converse or the inverse error. Represent the 4 arguments in predicate logic (using appropriate predicates and the quantifiers andFor each argument state whether it is valid or invalid. If valid determine the inference rule (MP or MT), if invalid determine the type of the error (converse or inverse) a. All young people do outdoor sports. Helen does outdoor sports Helen is young x young(x) → do_outdoor_sports(x) do_outdoor_sports(Helen) young( Helen) invalid converse error b. Senior students have to take a capstone class Peter is a senior student Peter has to take a capstone class x senior(x) → take_capstone_class(x) senior(Peter) take_capstone_class(Peter) valid MP c. Young people do outdoor sports. Peter is not young Peter does not do outdoor sports x young(x) → do_outdoor_sports(x) ~young( Peter) do_outdoor_sports(Peter) invalid inverse error d. Honest people pay their taxes Tom is not honest Tom does not pay his taxes x honest(x) → pay_taxes(x) ~honest(Tom) ~pay_taxes(Tom) e. Honest people pay their taxes Tom does not pay his taxes Tom is not honest x honest(x) → pay_taxes(x) invalid inverse error valid MT 5 ~pay_taxes(Tom) honest(Tom) 6