Sie sind auf Seite 1von 12

Name: NIM: Class:

Assignment 1: Propositional Logic


Mathematical Logic - A (MSH1B3)
First Term 2017-2018
Instructions:

1. This assignment is due Monday September 18, 2017 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 Thursday September 14, 2017 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 Indonesia. 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 is 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 12
Problem 1 (2 points 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 wealthy but not wise.


A NSWER :

(b). John is not wealthy, but he is healthy and wise.


A NSWER :

(c). John is neither healthy, wealthy, nor wise.


A NSWER :

(d). John is neither wealthy nor wise, but he is healthy.


A NSWER :

(e). If John is healthy, then he is either wealthy or wise, but not both.
A NSWER :

page 2 of 12
Name: NIM: Class:

Problem 2 (1.25 points each) Determine whether the following statements are true or false.

(a). 2 + 2 = 4 if and only if 1 + 1 = 2


A NSWER :

(b). 1 + 1 = 2 if and only if 2 + 3 = 4


A NSWER :

(c). 1 + 1 = 3 if and only if monkeys can fly


A NSWER :

(d). 0 > 1 if and only if 2 > 1


A NSWER :

(e). If 1 + 1 = 3, then unicorns exist.


A NSWER :

(f). If 1 + 1 = 3, then dogs can fly.


A NSWER :

(g). If 1 + 1 = 2, then dogs can fly.


A NSWER :

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

page 3 of 12
Problem 3 State the converse, contrapositive, and inverse of each of these conditional statements.

(a). [3 points] If it snows tonight, then I will stay at home.


A NSWER :

converse:

contrapositive:

inverse:

(b). [3 points] I go to the beach if it is a sunny summer day.


A NSWER :

converse:

contrapositive:

inverse:

(c). [4 points] When I stay up late, it is necessary that I sleep until noon.
A NSWER :

converse:

contrapositive:

inverse:

page 4 of 12
Name: NIM: Class:

Problem 4 Determine the value of x after each of these statements is encountered in a computer program,
if x = 2 before the statement is reached.

(a). [3 points] if (1 + 1 = 3) OR (2 + 2 = 3) then x := x + 1


A NSWER :

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


A NSWER :

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


A NSWER :

Problem 5 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 points] Access is granted whenever the user has paid the subscription fee and enters a valid
password
A NSWER :

(b). [3 points] Access is denied (not granted) if the user has not paid the subscription fee
A NSWER :

(c). [4 points] If the user has not entered a valid password but has paid the subscription fee, then access
is granted
A NSWER :

page 5 of 12
Problem 6 For each of the following propositional formulas, construct its corresponding truth table and
determine whether the formula is (1) valid, (2) satisfiable, (3) contradictory/ unsatisfiable, and (4) a contin-
gency. Provide relevant arguments for your answer.

(a). [5 points] p _ q ! :p :q
A NSWER :

(b). [5 points] (p q) $ (:p q) _ (p :q)


A NSWER :

page 6 of 12
Name: NIM: Class:

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 :

page 7 of 12
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 :

page 8 of 12
Name: NIM: Class:

Problem 9 In the following problems, you may use truth table.

(a). [3 points] Determine whether (p ! q) ^ (p ! r) and p ! (q ^ r) are logically equivalent.


A NSWER :

(b). [3 points] Determine whether (p ! r) _ (q ! r) and p ! (q _ r) are logically equivalent.


A NSWER :

page 9 of 12
(c). [4 points] Determine whether :p ! (q ! r) and q ! (p _ r) are logically equivalent.
A NSWER :

page 10 of 12
Name: NIM: Class:

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 points]
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 :

(b). [4 points]
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 :

page 11 of 12
(c). [3 points]
I am either dreaming or hallucinating (but not both).
I am not dreaming.
If I am hallucinating, I see elephants running down the road.
A NSWER :

page 12 of 12

Das könnte Ihnen auch gefallen