You are on page 1of 9

Higher Colleges of Technology

Computer and Information Science Faculty

Answers to Exercises 1.1 (Propositional Logic)

1. Which of these sentences are propositions? What are the truth values of those that are propositions?
a) Boston is the capital of Massachusetts.
Yes, True.
b) Miami is the capital of Florida.
Yes, False.
c) 2 + 3 = 5.
Yes, True.
d) 5 + 7 = 10.
Yes, False.
e) x + 2 = 11.
Not a proposition. Truth value cannot be determined as x is not specified.
f) Answer this question.
Not a proposition. The statement is not a fact.

2. Which of these are propositions? What are the truth values of those that are propositions?
a) Don’t go.
No.
b) What time is it?
No, a question is not a proposition.
c) There are no black flies in Maine.
d) 4 + x = 5.
No.
e) The moon is made of green cheese.
Yes, False.
f) 2n ≥ 100.
No.

3. What is the negation of each of these propositions?


a) Mei has an MP3 player.
Mei does not have an MP3 player, OR, It is not the case that Mei has an MP3 player.
b) There is no pollution in New Jersey.
There is pollution in New Jersey, OR, It is not the case there is no pollution in New Jersey.
c) 2 + 1 = 3.
2 + 1 ≠ 3.
d) The summer in Maine is hot and sunny.

CIS 2203: Section 1.1 Exercises Answers Page 1 of 5


Higher Colleges of Technology
Computer and Information Science Faculty

The summer in Maine is not hot or it is not sunny, OR, It is not the case that the summer in Maine is hot and
sunny.

4. Suppose that Smartphone A has 256 MB RAM and 32GB ROM, and the resolution of its camera is 8 MP; Smartphone
B has 288 MB RAM and 64 GB ROM, and the resolution of its camera is 4 MP; and Smartphone C has 128 MB RAM and
32 GB ROM, and the resolution of its camera is 5 MP. Determine the truth value of each of these propositions.
a) Smartphone B has the most RAM of these three smartphones.
False
b) Smartphone C has more ROM or a higher resolution camera than Smartphone B.
True
c) Smartphone B has more RAM, more ROM, and a higher resolution camera than Smartphone A.
False
d) If Smartphone B has more RAM and more ROM than Smartphone C, then it also has a higher resolution camera.
False

5. Let p and q be the propositions


p : I bought a lottery ticket this week.
q : I won the million dollar jackpot.
Express each of these propositions as an English sentence.
a) ¬p
I did not buy a lottery ticket this week.
b) p ∨ q
I bought a lottery ticket this week or I won the million dollar jackpot.
c) p → q
If I bought a lottery ticket this week, then I won the million dollar jackpot.
d) p ∧ q
I bought a lottery ticket this week and I won the million dollar jackpot.
e) p ↔ q
I bought a lottery ticket if and only if I won the million dollar jackpot.

6. Let p and q be the propositions “Swimming at the New Jersey shore is allowed” and “Sharks have been spotted near the
shore,” respectively. Express each of these compound propositions as an English sentence.
a) ¬q
“Sharks have not been spotted near the shore.”
b) p ∧ q
“Swimming at the New Jersey shore is allowed, and Sharks have been spotted near the shore.”
c) ¬p ∨ q
“Swimming at the New Jersey shore is not allowed, or Sharks have been spotted near the shore.”
d) p →¬q
“If swimming at the New Jersey shore is allowed, then Sharks have not been spotted near the shore.”

7. Let p and q be the propositions


p : It is below freezing. q
: It is snowing.
Write these propositions using p and q and logical connectives (including negations).
a) It is below freezing and snowing.
p˄q

b) It is below freezing but not snowing.

CIS 2203: Section 1.1 Exercises Answers Page 2 of 5


Higher Colleges of Technology
Computer and Information Science Faculty

p ˄ ¬q

c) It is not below freezing and it is not snowing.


¬p ˄ ¬q

d) It is either snowing or below freezing (or both).


p˅q

e) If it is below freezing, it is also snowing.


pàq

8. Determine whether these biconditionals are true or false.


a) 2 + 2 = 4 if and only if 1 + 1 = 2.
True
b) 1 + 1 = 2 if and only if 2 + 3 = 4.
False
c) 1 + 1 = 3 if and only if monkeys can fly.
True
d) 0 > 1 if and only if 2 > 1.
False

9. Determine whether each of these conditional statements is true or false.


a) If 1 + 1 = 2, then 2 + 2 = 5.
False
b) If 1 + 1 = 3, then 2 + 2 = 4.
True
c) If 1 + 1 = 3, then 2 + 2 = 5.
True
d) If monkeys can fly, then 1 + 1 = 3.
True
e) If 1 + 1 = 3, then dogs can fly.
True
f) If 1 + 1 = 2, then dogs can fly.
False

10. How many rows appear in a truth table for each of these compound propositions?
a) p →¬p
1 proposition, 21 = 2 rows
b) (p ∨¬r) ∧ (q ∨¬s)
4 propositions, 24 = 16 rows
c) (q →¬p) ∨ (¬p →¬q)
2 propositions, 22 = 4 rows
d) (p ∨¬t) ∧ (p ∨¬s)
3 propositions, 23 = 8 rows

11. Construct a truth table for each of these compound propositions.


a) p ∧¬p

p ¬p p ∧¬p
T F F
F T F

CIS 2203: Section 1.1 Exercises Answers Page 3 of 5


Higher Colleges of Technology
Computer and Information Science Faculty

b) p ∨¬p

p ¬p p ˅¬p
T F T
F T T

c) (p ∨¬q) → q

p q ¬q p ˅¬q (p ˅¬q)àq
T T F T T
T F T T F
F T F F T
F F T T F

d) (p ∨ q) → (p ∧ q)

p q p˅q p˄q (p ˅ q)à (p ˄ q)


T T T T T
T F T F F
F T T F F
F F F F T

e) (p → q) → (q → p)

p q pàq qàp (p à q)à (q à p)


T T T T T
T F F T T
F T T F F
F F T T T

12. Find the bitwise OR, bitwise AND, and bitwise XOR of each of these pairs of bit strings.
a) 101 1110, 010 0001

101 1110
010 0001
111 1111 bitwise OR
000 0000 bitwise AND
111 1111 bitwise XOR

b) 1111 0000, 1010 1010

Do yourself

c) 00 0111 0001, 10 0100 1000

00 0111 0001
10 0100 1000
10 0111 1001 bitwise OR
00 0100 0000 bitwise AND
10 0011 1001 bitwise XOR

CIS 2203: Section 1.1 Exercises Answers Page 4 of 5


Higher Colleges of Technology
Computer and Information Science Faculty

d) 11 1111 1111, 00 0000 0000

Do yourself

CIS 2203: Section 1.1 Exercises Answers Page 5 of 5


Exercise
1. Show that ¬(¬p) and p are logically equivalent.

P ¬p ¬(¬p) So , ¬(¬p) and p are logically equivalent


T F T
F T F

2. Use truth tables to verify the commutative laws


a) p ∨ q ≡ q ∨ p. b) p ∧ q ≡ q ∧ p.

p Q p∨ q q∨ p
p q p∧ q q∧ p
T T T T
T T T T
F T T T
F T F F
T F T T
T F F F
F F F F
F F F F
From the truth table, p ∨ q ≡ q ∨ p. From the truth table, p ∧ q ≡ q ∧ p.
Hence Verified. Hence Verified.

3. Use truth tables to verify the associative laws


a) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r).

p Q r p∨ q (p ∨ q)∨ r (q ∨ r) p ∨ (q ∨ r)
T T T T T T T
T T F T T T T
T F T T T T T
F T T T T T T
T F F T T F T
F T F T T T T
F F T F T T T
F F F F F F F

b) (p ∧ q) ∧ r ≡ p ∧ (q ∧ r).

Self checking
4. Show that each of these conditional statements is a tautology by using truth tables.

a) (p ∧ q) → p

P q p∧ q (p ∧ q) → p
T T T T
F T F T
T F F T
F F F T

Since the truth values for the given proposition (p ∧ q) → p is all True, it is therefore a
Tautology.

b) p → (p ∨ q)

P q P∨ q p → (p ∨ q)
T T T T
F T T T
T F T T
F F F T
Since the truth values for the given proposition p → (p ∨ q) are all True, it is therefore a
Tautology.

c) ¬p → (p → q)

P q ¬p (p → q) ¬p → (p → q)
T T F T T
F T T T T
T F F F T
F F T T T

Since the truth values for the given proposition ¬p → (p → q)are all True, it is therefore a
Tautology.
Higher Colleges of Technology
Computer and Information Science Faculty

Exercises 1.4: Predicates & Quatifiers

1. Let P(x) denote the statement “x ≤ 4.” What are these truth values?
a) P(0)
True
b) P(4)
True
c) P(6)
False

2. Let P(x) be the statement “the word x contains the letter a.” What are these truth values?
a) P(orange)
True
b) P(lemon)
False
c) P(true)
False
d) P(false)
True

3. Let Q(x, y) denote the statement “x is the capital of y.” What are these truth values?
a) Q(Denver, Colorado)
True
b) Q(Detroit, Michigan)
Find answers yourself for b, c, and d.
c) Q(Massachusetts, Boston)
d) Q(NewYork, NewYork)

4. Let P(x) be the statement “x spends more than five hours every weekday in class,” where the domain for x consists of
all students. Express each of these quantifications in English.
a) ∃xP(x)
There is some student who spends more than five hours every weekday in class. (or) There are some students who
spend more than five hours every weekday in class.
b) ∀xP(x)
All students spend more than five hours every weekday in class.

5. Let N(x) be the statement “x has visited North Dakota,” where the domain consists of the students in your school.
Express each of these quantifications in English.
a) ∃xN(x)
There is a student who has visited North Dakota.
b) ∀xN(x)
Every student has visited North Dakota.

6. Translate these statements into English, where C(x) is “x is a comedian” and F(x) is “x is funny” and the domain
consists of all people.
a) ∀x(C(x) → F(x))
Every comedian is funny.
b) ∀x(C(x) ∧ F(x))
Every person is a funny comedian/ Every person is comedian and funny.
c) ∃x(C(x) → F(x))
There exists a person such that if she or he is a comedian, then she or he is funny.
d) ∃x(C(x) ∧ F(x))

CIS 2203: Section 1.4 Exercises & Answers Page 1 of 2


Higher Colleges of Technology
Computer and Information Science Faculty

Some comedians are funny.

7. Let P(x) be the statement “x = 𝑥2.” If the domain consists of the integers, what are these truth values?
a) P(0)
T
b) P(1)
T
c) P(2)
F
d) P(−1)
F
e) ∃xP(x)
T
f ) ∀xP(x)
F

8. Let Q(x) be the statement “x + 1 > 2x.” If the domain consists of all integers, what are these truth values?
a) Q(0)
T
b) Q(−1)
T
c) Q(1)
F
d) ∃xQ(x)
T
e) ∀xQ(x)
F

9. Suppose the domain of the propositional function P(x, y) consists of pairs x and y, where x is 1, 2, or 3 and y is
1, 2, or 3. Write out these propositions using disjunctions and conjunctions.

a) ∃x P(x, 3)
P(1,3) ∨P(2,3) ∨P(3,3)
b) ∀y P(1, y)
P(1,1) ∧ P(1,2) ∧ P(1,3)

CIS 2203: Section 1.4 Exercises & Answers Page 2 of 2

You might also like