LogMat + Jawaban

September 13, 2017 | Author: اوففا حيلال | Category: Logical Expressions, Epistemology, Logical Consequence, Truth, Mathematics
Share Embed Donate


Short Description

logmat dan jawaban...

Description

Name:

NIM:

Class:

Assignment 1: Propositional Logic Mathematical Logic - A (MSH1B3) First Term 2016-2017 Instructions: 1. This assignment is due Monday September 19 at 5:00 p.m.. Please submit your work at School of Computing academic roster (roster akademik Fakultas Informatika), room A203A (building A room A203A). Do not forget to write your identity on the space provided. You may submit this assignment as of Tuesday September 13 at 8:00 a.m.. 2. In order to prevent any academic misconduct, you also need to submit a readable scan or photograph of this assignment to the provided submission slot in IDEA. Please contact your class instructor for more detailed information. The due date of this online submission is the same as the hardcopy. Please make sure that your file size do not exceed the maximum file size allowed. 3. To save paper, you may print and reproduce this assignment on both sides of a paper. 4. Your answers should be handwritten. You may use: HB or 2B pencil, or pen with blue or black ink. 5. All problems in this assignment are adapted from the textbooks. The problems are written in English. If you are a student in a regular class, you may answer the problems in Bahasa. However, if you are a student in international class, your answers must be written in English – otherwise your assignment will not be graded. You may ask your class instructor or teaching assistant for helping you understanding the problem, but you should not ask them to give the solution of any problem. 6. Write your solutions on the space provided. If you need more space, you may use additional A4 papers and attach them to your assignment. 7. Be neat and write legibly. You will be graded not only on the correctness of your answers, but also on the clarity with which you express them. 8. This assignment consists of 10 problems, each problem worth 10 points. 9. Please retain yourself from copying answers from elsewhere without understanding the steps. This assignment is an individual evaluation. 10. Important: late submission without reasonable explanation will not be graded.

page 1 of 8

Problem 1 (2 pts each) Let h, w, and s be the following propositions h : “John is healthy”, w : “John is wealthy”, s : “John is wise” Write the following propositions using logical connectives, h, w, and s. (a). John is healthy and wealhy but not wise. A NSWER : h ˄ w ˄ ¬s

(b). John is not wealthy, but he is healthy and wise. A NSWER : ¬w ˄ h ˄ s

(c). John is neither healthy, wealthy, nor wise. A NSWER : ¬(h ˄ w ˄ s)

(d). John is neither wealthy nor wise, but he is healthy. A NSWER : ¬(w ˅ h) ˄ s

(e). John is wealthy, but he is not both healthy and wise. A NSWER : w ˄ -h ˄ ¬s

Problem 2 (2.5 pts each) Let p and q be the following propositions p : “stocks are increasing”, q : “interest rates are steady” Express each of the following compound propositions as an English sentence. (a). :q ! :p A NSWER : if interest rates are not steady, then stocks are not increasing

(b). :p ! :q A NSWER : if stocks are not increasing, then interest rates are steady

(c). p $ q A NSWER : stocks are increasing if and only if interest rates are steady

(d). :q _ (:p ^ q) A NSWER : interest rates are not steady or stocks are not increasing and interest rates are steady

page 2 of 8

Name:

NIM:

Class:

Problem 3 (1.25 pts each) Determine whether the following statements are true or false. (a). 2 + 2 = 4 if and only if 1 + 1 = 2 A NSWER : TRUE

(b). 1 + 1 = 2 if and only if 2 + 3 = 4 A NSWER : FALSE

(c). 1 + 1 = 3 if and only if monkeys can fly A NSWER : TRUE

(d). 0 > 1 if and only if 2 > 1 A NSWER : FALSE

(e). If 1 + 1 = 3, then unicorns exist. A NSWER : TRUE

(f). If 1 + 1 = 3, then dogs can fly. A NSWER : TRUE

(g). If 1 + 1 = 2, then dogs can fly. A NSWER : FALSE

(h). If 2 + 2 = 4, then 1 + 2 = 3. A NSWER : TRUE

page 3 of 8

Problem 4 State the converse, contrapositive, and inverse of each of these conditional statements. (a). [3 pts] If it snows tonight, then I will stay at home. A NSWER : converse: if I stay at home, then snow tonight contrapositive: if I not stay at home, then not snowing tonight inverse: if it not snows tonight, then i will not stay at home

(b). [3 pts] I go to the beach whenever it is a sunny summer day. A NSWER : converse: if I go to the beach, then it is a sunny summer day contrapositive: if I not go to the beach, then it is not a sunny summer day inverse: if it is not a sunny summer day, then i will not go to the beach

(c). [4 pts] When I stay up late, it is necessary that I sleep until noon. A NSWER : converse: if I sleep until noon, then its mean I stay up late last night contrapositive: if I not sleep until noon, then its mean I not stay up late last night inverse: if I not stay up late, then that I not sleep until noon

page 4 of 8

Name:

NIM:

Class:

Problem 5 Determine the value of x after each of these statements is encountered in a computer program, if x = 1 before the statement is reached. (a). [3 pts] if (1 + 1 = 3) OR (2 + 2 = 3) then x := x + 1 A NSWER : 1

(b). [3 pts] if (2 + 3 = 5) AND (3 + 4 = 7) then x := x + 1 A NSWER : 2

(c). [4 pts] if (1 + 1 = 2) XOR (1 + 2 = 3) then x := x + 1 A NSWER : 1

Problem 6 Express these system specifications using the logical connectives and following propositions: p : “the user enters a valid password” q : “access is granted” r : “the user has paid the subscription fee”. (a). [3 pts] “Access is granted whenever the user has paid the subscription fee and enters a valid password” A NSWER : (p ˄ r) → q

(b). [3 pts] “Access is denied if the user has not paid the subscription fee” A NSWER : ¬r → ¬q

(c). [4 pts] “If the user has not entered a valid password but has paid the subscription fee, then access is granted” A NSWER : (¬p ˄ r) → q

page 5 of 8

Problem 7 Determine whether the following system specifications are consistent or not. The diagnostic message is stored in the buffer or it is retransmitted. The diagnostic message is not stored in the buffer. If the diagnostic message is stored in the buffer, then it is retransmitted. The diagnostic message is not retransmitted. A NSWER :

I(p) = The diagnostic message is stored I(q) = The diagnostic message is retransmitted 1. I(p) ˅ I(q) 2. ¬I(p) 3. I(p) → I(q) 4. ¬I(q) A. For : I(p) = F ; I(q) = F C. For : I(p) = F ; I(q) = T 1. F ˅ F = F 1. F ˅ T = T 2. ¬F = T 2. ¬F = T 3. F → F = T 3. F → T = T 4. ¬F = T 4. ¬T = F (Not Consistent) (Not Consistent) B. For : I(p) = T ; I(q) = F D. For : I(p) = T ; I(q) = T 1. T ˅ F = T 1. T ˅ T = T 2. ¬T = F 2. ¬T = F 3. T → F = F 3. T → T = T 4. ¬F = T 4. ¬T = F (Not Consistent) (Not Consistent) So we can conclude that this system specifications are not consistent because no one get T value of all statement

Problem 8 Determine whether the following system specifications are consistent or not. If the file system is not locked, then new messages will be queued. If the file system is not locked, then the system is functioning normally, and conversely. If new messages are not queued, then they will be sent to the message buffer. If the file system is not locked, then new messages will be sent to the message buffer. New messages will not be sent to the message buffer. A NSWER :

I(p) = The file system is locked I(q) = New messages are queued I(r) = The system fuction norrmally and conversely I(s) = Sent to the message buffer 1. ¬I(p) → I(q) 2. ¬I(p) → I(r) 3. ¬I(q) → I(s) 4. ¬I(p) → I(s) 5. ¬I(s)

page 6 of 8

For : I(p) = T ; I(q) = T ; I(r) = F ; I(s) = F 1. ¬T → T = T 2. ¬T → F = T 3. ¬T → F = T 4. ¬T → F = T 5. ¬F = T Because all results is TRUE that mean this system specification is Consistent

Name:

NIM:

Class:

Problem 9 In the following problems, you may use truth table. (a). [3 pts] Show that (p ! q) ^ (p ! r) and p ! (q ^ r) are logically equivalent. A NSWER :

(b). [3 pts] Show that (p ! r) _ (q ! r) and p ! (q _ r) are logically equivalent. A NSWER :

(c). [4 pts] Show that :p ! (q ! r) and q ! (p _ r) are logically equivalent. A NSWER :

page 7 of 8

Problem 10 For each of these sets of premises, what relevant conclusion or conclusions can be drawn? Explain the rules of inference used to obtain each conclusion from the premises. Please explain your answer clearly. (a). [3 pts] “If I play hockey, then I am sore the next day.” “I use the whirlpool if I am sore.” “I did not use the whirlpool.” A NSWER :

p = I play hockey q = I am sore r = I use the whirlpool 1. p → q (Premise) 2. q → r (Premise) 3. ¬ r (Mremise) 4. ¬ q (Modus Tollens from 2 and 3) 5. ¬ p (Modus Tollens from 1 and 4) So the conclusion is I did'n play hockey (b). [4 pts] “If I work, it is either sunny or partly sunny (but not both).” “I worked last Monday or I worked last Friday.” “It was not sunny on Tuesday.” “It was not partly sunny on Friday.” A NSWER :

p = I work; q = is sunny; r = is partly sunny; s = is Monday; t = is Friday; u = is Tuesday 9. ¬ (p ˄ q) ˅ ¬ r (Assosiative 8) 1. p → ((q ˅ r) ˄ ¬(q ˄ r)) (Premise) 10. p ˄ (s ˅ t) (Distributive 2) 2. (p ˄ s) ˅ (p ˄ t) (Premise) 11. p (Elimination 10) 3. ¬ q ˄ u (Premise) 12. (q ˅ r) ˄ ¬(q ˄ r) (Ponens 11 & 1) 4. ¬ r ˄ t (Premise) 13. q ˅ r (Elimination 12) 5. ¬ p ˅ ((q ˅ r) ˄ ¬(q ˄ r)) (Change implication 1) 14. ¬ q (Elimination 3) 6. (¬ p ˅ (q ˅ r)) ˄ (¬ p ˅ ¬(q ˄ r)) (Distributive 5) (Addition 14) 7. (¬ p ˅ q ˅ r) ˄ (¬ p ˅ ¬ q ˅ ¬ r) (Associative & De Morgan law 6) 15. ¬ q ˅ ¬ t 16. r ˅ ¬ t (Resolution 13 & 15) 8. (¬ p ˅ ¬ q ˅ ¬ r) (Elimination 7) 17. ¬(p ˄ q) ˅ ¬ t (Resolution 9 & 16) (c). [3 pts] 18. ¬ p ˅ ¬ q ˅ ¬ t (De Morgan law 17) “I am either dreaming or hallucinating (but not both).” 19. ¬(p ˄ t) ˅ ¬ q (De Morgan law 18) “I am not dreaming.” 20. (p ˄ s) ˅ ¬ q (Resolution 2 & 19) “If I am hallucinating, I see elephants running down the road.” 21. p ˄ s (Disjunctive Sillogism 14 & 20) So the conclusion is I worked last Monday A NSWER : p = I am dreaming; q = I am hallucinating; r = I see elephants running down the road 1. (p ˅ q) ˄ ¬ (p ˄ q) (premise) 2. ¬ p (premise) 3. q → r (premise) 4. p ˅ q (Elimination from 1) 5. q (Disjunctive Sillogism from 2 and 3) 6. r (Modus Ponens from 3 and 5) So the conclusion is I see elephants running down the road

page 8 of 8

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF