0% found this document useful (0 votes)
23 views3 pages

Assignment 21 10

Practice questions and answers

Uploaded by

Nermeen Kamel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views3 pages

Assignment 21 10

Practice questions and answers

Uploaded by

Nermeen Kamel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Introduction to Logic Fall 2024

Cairo University

Homework Assignment #1

Due: Friday Nov 11, at 12:00 a.m.

Propositional Logic

For each of the following compound propositions give its truth table
(a) (p → q) → r

We write out the truth table:


p q r p→ (p → q) →
q r
T T T T T
T T F T F
T F T F T
T F F F T
F T T T T
F T F T F
F F T T T
F F F T F

(b) (p ∧ ¬q) ∨ (p ↔ r)

We write out the truth table:


p q r p ∧ ¬q p↔ (p ∧ ¬q) ∨ (p ↔ r)
r
T T T F T T
T T F F F F
T F T T T T
T F F T F T
F T T F F F
F T F F T T
F F T F F F
F F F F T T

(c) Complete the Truth Table below


p q r s r q ~(r q) p Λ ~(q V (~r Λ q ) (s V~q) (s Λ r ) (r Λ p)

1
s)
T T T T
T T T F
T T F T
T T F F
T F T T
T F T F
T F F T
T F F F
F T T T
F T T F
F T F T
F T F F
F F T T
F F T F
F F F T
F F F F

Translate the following propositional logic to English sentences.


p: Ghazi is eating.
q: Ghazi is hungry.
1. p q
- Ghazi is eating only if Ghazi is hungry.
2. p Λ ~q
Ghazi is eating and Ghazi is not hungry.
3. ~(q ~p)
- If Ghazi is not hungry then Ghazi is not eating.

A. Translate the following English sentences to Propositional Logic.


Propositions:
p: It is raining.
q: Ghazi is sick.
r: Raiyyan is happy.
s: Yeira owns a cat.
t. Talia is a dog owner.
1. It is raining if and only if Ghazi is sick.
-q
2. If Ghazi is sick then it is raining.
- pq
3. If Yeira owns a cat then Raiyyan is happy.
- pq
4. Raiyyan is happy if and only if Talia don’t have a dog.
- p  q

1. Translate the following sentences into propositional logic, making the meaning of
2
your propositional variables clear. See page 11 of the textbook for some examples
of translating English sentences into propositional logic.

(a) Neither the storm blast nor the flood did any damage to the house.
Solution: Let p and q represent “the storm blast damaged the house”
and “the flood damaged the house” respectively. Then the above can be
written as ¬(p ∨ q) or (¬p) ∧ (¬q).
(b) If global warming isn’t controlled, more forests will die in the Pacific
Northwest.
Solution:Let p and q represent “global warming isn’t controlled” and
“more forests will die in the Pacific Northwest” respectively.
Then the above can be written as p → q or (¬p) ∨ q
(c) Drivers should neither drive over 65 miles per hour nor cross the red light, or
they will get a ticket.
Solution: Let p, q and r represent “Drivers drive over 65 miles per
hour”, “Drivers cross the red light” and “Drivers will get a ticket”
respectively. Then the above can be written as ¬(p ∨ q) ∨ r or (p ∨
q) → r.

You might also like