You are on page 1of 6

Information Technology Department, Duta Wacana Christian University

Midterm Test
Mathematical Logic

June 21, 2010


Time Limit = 2 hours

Importance Note
1. Exam is closed books, closed computer, three note quarto pages allowed, open
dictionary.
2. Do not collaborate.
3. Please answer the question in the space provided below the question.
4. There are 11 problems and all problems have equal weight.

Name :

ID :

Signature :

Problem 1
Translate the following sentence into logic. Define P1 to mean “John knows C,” P2 to
mean “John knows Java”, and P3 as”John knows Prolog.” Q stands for “John enjoys
working with people,” and R means “John is senior programmer.”
John knows either C, Java, or Prolog, and he enjoys working with people.
Otherwise, he would not be senior programmer.
Answer :

¬ ¬ ¬
Problem 2
Prove that P ∧ (S ⇒ W) ⇒ (Y ⇒ Z ) ≡ P∨ Y ∨ Z ∨ (S ∧ W). Use statement
algebra in your proof.
Answer :

1
Problem 3
Solve this famous logic puzzle, attributed to Albert Einstein, and known as the zebra
puzzle. Five men with different nationalities and with different jobs live in consecutive
houses on a street. These houses are painted different colors. The men have different pets
and have different favorite drinks. Determine who owns a zebra and whose favorite drink
is mineral water (which is one of the favorite drinks) given these clues : The Englishman
lives in the red house. The Spaniard owns a dog. The Japanese man is a painter. The
Italian drinks tea. The Norwegian lives in the first house on the left. The green house is
immediately to the right of the white one. The photographer breeds snails. The diplomat
lives in the yellow house. Milk is drunk in the middle house. The owner of the green
house drinks coffee. The Norwegian's house is next to the blue one. The violinist drinks
orange juice. The fox is in a house next to that of the physician. The horse is in a house
next to that of the diplomat. [Hint: Make a table where the rows represent the men and
columns represent the color of their houses, their jobs, their pets, and their
favorite drinks and use logical reasoning to determine the correct entries in the table]
Answer :

Problem 4
Prove this argument by natural derivation
1. U ⇒ W
2. X ⇒ Y
3. Z ⇒ W
4. X ⇒ A
5. W ⇒ X
6. [U ⇒ Y) ∧ (Z ⇒ A)] ⇒ (U ∨ Z)

Y∨ A
Answer :

2
Problem 5
Prove this argument by natural derivation
1. A ⇒ (B ∧ C)
2. (B ∨ D) ⇒ E
3. D ∨ A

E
Answer :

Problem 6
Prove this argument by resolution

¬
1. U ⇒ W

¬
2. W

3. U ⇒ X∨ Y

¬
4. X ⇒ Z
5. A ⇒ Z
6. A

Y
Answer :

3
Problem 7
Construct a formal proof of validity for the following argument, using the abbreviations
suggested.
If Tom received the message, then Tom took the plane, but if Tom did not take the
plane, then Tom missed the meeting. If Tom missed the meeting, then Dave was
elected to the board, but if Dave was elected to the board, then Tom received the
message. If either Tom did not miss the meeting or Tom did not receive the
message, then either Tom did not take the plane or Dave was elected to the board.
Tom did not miss the meeting. Therefore, either Tom did not receive the message
or Tom did not miss the meeting.
(R : Tom received the message. P : Tom took the plane. M : Tom missed the
meeting. D : Dave was elected to the board )
Answer :

Problem 9
Give a formal derivation to prove the following sentences.Use the suggested notation.
If there are any geniuses, then all great composers are geniuses. If anyone is
temperamental, all geniuses are temperamental. Therefore, if anyone is a
temperamental genius, then all great composers are temperamental.
( G(x) : x is a genius. C(x) : x is a great composer; P(x) : x is a person.
T(x) : x is temperamental.)
Answer :

4
Problem 10
Prove the following by derivation
∀x [I(x) ⇒ P(x) ∧ (M(x) ∧ S(x))]
∃X (I(x) ∧J(x))

∃X (J(x) ∧ M(x))
Answer :

Problem 11
Give a formal derivation to prove the following sentences.Use the suggested notation.
The universe of discourse is animals.
All birds have wings and feathers. Therefore, all birds have feathers.
( B(x) : x is a bird. W(x) : x has wing; F(x) : x has feather)
Answer :

5
Good Luck