Quiz Solution

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Quiz Solution

Q Show that
(A-B) – (B-C) = A-B (Proof using Set Identities)

Q Use the inference rules and find the conclusion. Also, name the rule. (5
marks)
• “It is not sunny this afternoon and it is colder than yesterday.”
• “We will go swimming only if it is sunny.”
• “If we do not go swimming, then we will take a canoe trip.”
• “If we take a canoe trip, then we will be home by sunset.”
Using the inference rules, construct a valid argument for the conclusion:
“We will be home by sunset.”

Solution
p: “It is sunny this afternoon.”
r: “We will go swimming.”
t: “We will be home by sunset.”
q: “It is colder than yesterday.”
s: “We will take a canoe trip

¬p ∧ q (Specialization)
¬p
R→ p (Modus tollens)
¬r
¬r → ¬s (Modus ponens)
S
S→t (Modus ponens)
t

Simplify the following expression


¬𝑝 𝑣 ¬𝑞 𝑣 (𝑝 ∧ 𝑞 ∧ ¬𝑟)
p=a ; q= b and c=r
Q Compute (f o g)(x) and (g o f)(x) for f(x) = x2 + 3,g(x) = √5 + 𝑥 2

Find (f o g)(x) (1)


9
Find (g o f)(x)(3)
Sqrt(149)

Q If f : Q ⇢ Q is given by f(x) = x2 , then find f-1(16).

Q Prove that (𝑝 𝑣 ¬𝑞) 𝛬 (¬𝑝 𝑣 ¬𝑞) is logically equivalent to ¬𝑞

Q You are about to leave for school in the morning and discover that you don’t have your
glasses. You know the following statements are true:
• If I was reading the newspaper in the kitchen, then my glasses are on the kitchen table.
• If my glasses are on the kitchen table, then I saw them at breakfast.
• I did not see my glasses at breakfast.
• I was reading the newspaper in the living room or I was reading the newspaper in the
kitchen.
• If I was reading the newspaper in the living room then my glasses are on the coffee table.
Where are the glasses?
Solution:
Let,
RK = I was reading the newspaper in the kitchen.
GK =My glasses are on the kitchen table.
SB =I saw my glasses at breakfast.
RL =I was reading the newspaper in the living room.
GC =My glasses are on the coffee table.
1. RK →GK by(a)
GK →SB by(d)

∴ RK →SB by transitivity

2. RK →SB by the conclusion of (1)

∼SB by (c)
∴ ∼RK by modus tollens
3. RL ∨ RK by(d)

∼RK by the conclusion of (2)


∴ RL by elimination

4. RL →GC by(e)

RL by the conclusion of (3)


∴ GC by modus ponens

Thus the glasses are on the coffee table.

Q Let Triangle(x), Circle(x), and Square(x) mean “x is a triangle,” “x is a circle,” and “x is a


square”; let Blue(x), Gray(x), and Black(x) mean “x is blue,” “x is gray,” and “x is black”; let
RightOf(x, y), Above(x, y), and SameColorAs(x, y) mean “x is to the right of y,” “x is above y,”
and “x has the same color as y”; and use the notation x = y to denote the predicate “x is equal to
y”. Let the common domain D of all variables be the set of all the objects in the Tarski world.
Use formal, logical notation to write each of the following statements, and write a formal
negation for each statement.
• For all circles x, x is above f .
• There is a square x such that x is black
• For all circles x, there is a square y such that x and y have
the same color.
• There is a square x such that for all triangles y, x is to the
right of y.

Solution

Q Write formal negations for the following statements:


• ∀ primes p, p is odd.
• ∃ a triangle T such that the sum of the angles of T equals 200◦.
Solution
∃ a prime p such that p is not odd
∀ triangles T, the sum of the angles of T does not equal 200◦.

Q The program for Tarski’s World provides pictures of blocks of various sizes, shapes, and
colors, which are located on a grid. Shown in Figure 3.1.1 is a picture of an arrangement of
objects in a two-dimensional Tarski world. The configuration can be described using logical
operators and—for the two-dimensional version—notation such as Triangle(x), meaning “x is a
triangle,” Blue(y), meaning “y is blue,” and RightOf(x, y), meaning “x is to the right of y (but
possibly in a different row).” Individual objects can be given names such as a,b, or c
Determine the truth or falsity of each of the following statements. The domain for all variables is
the set of objects in the Tarski world shown above.
• ∀t, Triangle(t) → Blue(t).
• ∀x,Blue(x) → Triangle(x).
• ∃y such that Square(y)∧ RightOf(d, y).
• ∃z such that Square(z)∧ Gray(z)

Q A college cafeteria line has four stations: salads, main


courses, desserts, and beverages. The salad station offers a
choice of green salad or fruit salad; the main course station
offers spaghetti or fish; the dessert station offers pie or cake;
and the beverage station offers milk, soda, or coffee. Three
students, Uta, Tim, and Yuen, go through the line and make
the following choices: Uta: green salad, spaghetti, pie, milk
Tim: fruit salad, fish, pie, cake, milk, coffee Yuen: spaghetti,
fish, pie, soda.
Write each of following statements informally and find its truth value.
• ∃ an item I such that ∀ students S, S chose I.
• ∃ a student S such that ∀ items I, S chose I.
• ∃ a student S such that ∀ stations Z,∃ an item I in Z such that S chose I.
• ∀ students S and ∀ stations Z,∃ an item I in Z such that S chose I

Q Show that (A - B) – C = A – (B ∪ C).


Q Use inference rules to reach to a conclusion.
• Larry is a student at the university.
• Hubert is a student at the university.
• Larry and Hubert are taking Boolean Logic.
• Any student who takes Boolean Logic can take Algorithms.
• ∴ Larry and Hubert can take Algorithms
Solution:
B(x): x is taking Boolean Logic
A(x): x can take Algorithms
• Larry is a student at the university. Hypothesis
• Hubert is a student at the university. Hypothesis
• B(Larry) ∧ B(Hubert) Hypothesis
• B(Larry) Simplification,3
• ∀x (B(x) → A(x)) Hypothesis
• B(Larry) → A(Larry) Universal instantiation, 1, 5
• A(Larry) Modus ponens, 4, 6
• B(Hubert) Simplification, 3
• B(Hubert) → A(Hubert) Universal instantiation, 2, 5
• A(Hubert) Modus ponens, 8, 9
• A(Larry) ∧ A(Hubert) Addition, 7, 10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy