Professional Documents
Culture Documents
Assignment 2: Predicate Logic: Mathematical Logic (CII1B3)
Assignment 2: Predicate Logic: Mathematical Logic (CII1B3)
1. This assignment is due Wednesday, November 4, 2020 at 5:00 p.m.. Please submit your work to the
corresponding submission slot in LMS CeLOE. You need to submit a readable .pdf file of this
assignment to the provided submission slot in CeLOE. You can contact your class instructor for more
detailed information. Please make sure that your file size do not exceed the maximum file size
allowed.
2. Please upload your assignment to the LMS CeLOE under the file name: A2-cstudent ID>.pdf,
for example: A2-1301208888.pdf.
a.You print this assignment and write your answer using HB/2B pencil or pen with blue/black ink
(handwritten answer). You may add additional A4-sized papers. Afterwards you submit the
scan/photograph of this assignment.
b.You use a .pdf editing tools and write your answer directly using blue/black colored writing.
c.You copy the problem from this assignment to a text/word processing program and type your answer
neatly.
d.You rewrite the problem from this assignment in an A4-sized paper and submit the scan/photograph
of your work.
4. 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.
5. 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.
6. This assignment consists of 8 problems, each but Problems 6 and 7 are worth 10 points. Problems 6
and 7 are worth 20 points each.
7. Please retain yourself from copying answers from elsewhere without understanding the steps. Such an
attitude will not enhance your knowledge. This assignment is an individual evaluation.
page 1 of 9
Problem 1 (10 points) Let P (x) be the statement “fi‡x2 ≤ 3x”. Complete the following table concerning
the truth value of these formulas. Provide a relevant reason for each answer.
Truth Value
Part Formula (circle either T or F) Reason [1 point]
[0.25 points]
a. P (—fi) T/F .
b. P (fi) T/F
c. Ix P (x) T/F
d. 6x P (x) T/F
e. Ix ¬P (x) T/F
f. 6x ¬P (x) T/F
Problem 3 (10 points) Suppose ⓟ (x, y) is the predicate x ‡ 2y ≤ 2x — y. Determine the truth of the
following predicate formulas.
(b). [2 points] “Everyone in your class has studied mathematical logic and programming”.
The domain is D := (x | x is a human being} and the predicates are C (x) := “x is in your class”,
M (x) := “x has studied mathematical logic”, and P (x) := “x has studied programming”.
ANSWER:
(c). [2 points] No one in your school owns both a bicycle and a motorcycle.
The domain is D := (x | x is a human being} and the predicates are S (x) := “x is a person in
your school”, B (x) := “x owns a bicycle”, and M (x) := “x owns a motorcycle”.
ANSWER:
(e). [2 points] Everyone in your school was born in the twentieth or twenty-first century.
The domain is D := (x | x is a human being} and the predicate are S (x) := “x is a person in
your school”, T (x) := “x was born in the twentieth century”, and F (x) := “x was born in the
twenty-first century”.
ANSWER:
Problem 6 (20 points) Verify whether each of these arguments is valid or not. Explain which rules of
inference are used for each step.
(a). [5 points] “Linda, a student in this class, owns a red car. Everyone who owns a red car has gotten
at least one speeding ticket. Therefore, someone in this class has gotten a speeding ticket.” Use the
following predicates: C (x) := x is a student in this class, R (x) := x owns red car, T (x) := x has
gotten a speeding ticket. Suppose the domain for x is the set of all persons.
ANSWER:
(b). [5 points] “A convertible car is fun to drive. Isaac’s car is not a convertible. Therefore, Isaac’s car
is not fun to drive.” Use the following predicates: C (x) := x is a convertible car, F (x) := x is fun to
drive. Suppose the domain of x is the set of all cars.
ANSWER:
(c). [5 points] “All movies produced by Steven Spielberg are exciting. Steven Spielberg produced
a movie about dinosaurs. Therefore, there is an exciting movie about dinosaurs.” Use the
following predicates: S (x) := x is a movie produced by Steven Spielberg, E (x) := x is an
exciting movie, D (x) := x is a movie about dinosaurs. Suppose the domain of x be the set of
all movies.
ANSWER:
(d). [5 points] “There is someone in this class who has been to France. Everyone who goes to France
visit the Louvre. Therefore, someone in this class has visited the Louvre.” Use the following
predicates: C (x) := x is in this class, F (x) := x has been to France, G (x) := x has visited Louvre.
Suppose the domain of x be the set of all persons.
ANSWER:
Problem 7 (20 points) Mowgli lives in an Indian rainforest and recently he learned following facts:
(b). [10 points] Mowgli thinks only one of the following conclusion is correct:
What is the correct conclusion? Explain your reasoning using rule of inference in predicate logic.
ANSWER:
Problem 8 (10 points) Suppose we have the following Prolog knowledge base.
plant(herbs). eats(deer,shrub).
plant(grass).
eats(grasshopper,grass).
plant(shrub).
eats(rabbit,herbs).
animal(caterpillar).
animal(deer). eats(crow,caterpillar).
animal(grasshopper). eats(crow,herbs).
animal(rabbit). eats(crow,grasshopper).
animal(crow). eats(fox,rabbit).
animal(fox). eats(frog,caterpillar).
animal(frog). eats(frog,grasshopper).
animal(snake). eats(snake,frog).
animal(hawk). eats(snake,rabbit).
animal(lion).
eats(hawk,crow).
eats(caterpillar,grass). eats(hawk,snake).
eats(caterpillar,herbs). eats(lion,deer).
eats(deer,herbs). eats(lion,fox).
Suppose the above knowledge base is supplemented with the following rules:
Determine the output of the following queries if the program is run using SWI-Prolog:
ANSWER: