Assignment1 Prop - Logic
Assignment1 Prop - Logic
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.
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
(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.
(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.
converse:
contrapositive:
inverse:
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.
Problem 5 Express these system specifications using the logical connectives and following propositions:
(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 :
page 6 of 12
Name: NIM: Class:
Problem 7 Determine whether the following system specifications are consistent or not.
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:
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