0% found this document useful (0 votes)
15 views16 pages

Discrete Mathematics

The document contains solutions to various problem sets in discrete mathematics, focusing on propositional logic and logical connectives. It includes exercises that express compound propositions in English, determine truth tables, and analyze conditional statements. Additionally, it demonstrates how to identify tautologies using truth tables.

Uploaded by

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

Discrete Mathematics

The document contains solutions to various problem sets in discrete mathematics, focusing on propositional logic and logical connectives. It includes exercises that express compound propositions in English, determine truth tables, and analyze conditional statements. Additionally, it demonstrates how to identify tautologies using truth tables.

Uploaded by

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

Discrete Mathematics: Solutions to Problem Sets

Problem Set 1: Propositional Logic Basics


Q1
Let p, q, and r be the propositions:
• p: The student has submitted the assignment.
• q: The professor has graded the assignment.
• r: The student receives a passing grade.
Express each of these compound propositions as an English sentence:
a. p ∧ ¬q: The student has submitted the assignment, but the professor has not graded it.
b. p ∨ r: The student has submitted the assignment or the student receives a passing grade.
c. p → q ∧ r: If the student has submitted the assignment, then the professor has graded it and the
student receives a passing grade.
d. p ↔ q: The student has submitted the assignment if and only if the professor has graded it.
e. ¬r ∧(¬p∨¬q): The student does not receive a passing grade, and either the student has not submitted
the assignment or the professor has not graded it.

Q2
Let p, q, r, and s be the propositions:
• p: The student has submitted the research paper.
• q: The student has attended all workshops.
• r: The student has participated in group projects.
• s: The student will receive a degree with honors.
Express each of these compound propositions as an English sentence:
a. p ∨ (q ∧ ¬s): The student has submitted the research paper, or the student has attended all workshops
but will not receive a degree with honors.
b. ¬p ∨ (q ∧ r): The student has not submitted the research paper, or the student has attended all
workshops and participated in group projects.
c. (p ∧ r) → s: If the student has submitted the research paper and participated in group projects, then
the student will receive a degree with honors.
d. (p ∧ q) ↔ r: The student has submitted the research paper and attended all workshops if and only if
the student has participated in group projects.
e. (p → q) ∧ (r → s): If the student has submitted the research paper, then the student has attended
all workshops, and if the student has participated in group projects, then the student will receive a
degree with honors.
f. ¬(p ∧ s) ∨ (q ∧ r): Either the student has not submitted the research paper or will not receive a degree
with honors, or the student has attended all workshops and participated in group projects.

1
Q3
Let p and q be the propositions:
• p: The weather is sunny.
• q: We will go to the beach.
Write these propositions using p and q and logical connectives:

a. It is sunny and we go to the beach: p ∧ q.


b. It is sunny but we do not go to the beach: p ∧ ¬q.
c. It is not sunny and we do not go to the beach: ¬p ∧ ¬q.
d. Either it is sunny, or we go to the beach (or both): p ∨ q.
e. If it is sunny, then we go to the beach: p → q.
f. Either it is sunny or we go to the beach, but not both, and if it is sunny, then we do not go to the
beach: (p ⊕ q) ∧ (p → ¬q).
g. That it is sunny is necessary and sufficient for going to the beach: p ↔ q.

Q4
Let p, q, and r be the propositions:
• p: The campground is open for visitors.
• q: Campfires are allowed in the campground.
• r: The river nearby is safe for swimming.
Write these propositions using p, q, and r and logical connectives:

a. The campground is open for visitors, but campfires are not allowed: p ∧ ¬q.
b. Campfires are allowed, and the river is safe for swimming, but the campground is not open for visitors:
q ∧ r ∧ ¬p.
c. If the campground is open, then campfires are allowed if and only if the river is safe for swimming:
p → (q ↔ r).
d. Campfires are not allowed, but the campground is open and the river is safe for swimming: ¬q ∧ p ∧ r.
e. For campfires to be allowed, it is necessary and sufficient that the campground be open and that the
river is not safe for swimming: q ↔ (p ∧ ¬r).
f. Campfires are not allowed whenever the campground is open and the river is safe for swimming:
(p ∧ r) → ¬q.

Q5
Let p and q be the propositions:
• p: The project is complete.
• q: The team has been informed.
Express each of these compound propositions as an English sentence:

a. ¬p: The project is not complete.


b. p ∨ q: The project is complete or the team has been informed.
c. ¬p ∧ q: The project is not complete, but the team has been informed.

2
d. q → p: If the team has been informed, then the project is complete.
e. ¬q → ¬p: If the team has not been informed, then the project is not complete.
f. ¬p → ¬q: If the project is not complete, then the team has not been informed.
g. p ↔ q: The project is complete if and only if the team has been informed.
h. ¬q ∨ (¬p ∧ q): The team has not been informed, or the project is not complete and the team has been
informed.

Q6
Let p, q, and r be the propositions:
• p: You solve the practice sheet.
• q: You pass the test.
• r: You get a good grade.
Express each of these compound propositions as an English sentence:

a. ¬q ↔ r: You do not pass the test if and only if you get a good grade.
b. q → ¬r: If you pass the test, then you do not get a good grade.
c. p ∨ q ∨ r: You solve the practice sheet, or you pass the test, or you get a good grade.
d. (p → ¬r) ∨ (q → ¬r): If you solve the practice sheet, then you do not get a good grade, or if you pass
the test, then you do not get a good grade.
e. (p ∧ q) ∨ (¬q ∧ r): You solve the practice sheet and pass the test, or you do not pass the test but get
a good grade.
f. (q ∧ r) ↔ (p ⊕ ¬r): You pass the test and get a good grade if and only if either you solve the practice
sheet or you do not get a good grade, but not both.

Q7
Determine the converse, contrapositive, and inverse of each of these conditional statements:

a. If it rains tomorrow, the outdoor concert will be canceled.


• Converse: If the outdoor concert is canceled, then it rained tomorrow.
• Contrapositive: If the outdoor concert is not canceled, then it did not rain tomorrow.
• Inverse: If it does not rain tomorrow, then the outdoor concert will not be canceled.
b. An angle is a right angle only if it measures 90 degrees.
• Converse: If an angle measures 90 degrees, then it is a right angle.
• Contrapositive: If an angle does not measure 90 degrees, then it is not a right angle.
• Inverse: If an angle is not a right angle, then it does not measure 90 degrees.
c. A polygon is a triangle only if it has three sides.
• Converse: If a polygon has three sides, then it is a triangle.
• Contrapositive: If a polygon does not have three sides, then it is not a triangle.
• Inverse: If a polygon is not a triangle, then it does not have three sides.
d. You are eligible for the scholarship if your CGPA is at least 3.7 and you have completed 30 credits.
• Converse: If you are eligible for the scholarship, then your CGPA is at least 3.7 and you have
completed 30 credits.

3
• Contrapositive: If you are not eligible for the scholarship, then your CGPA is less than 3.7 or
you have not completed 30 credits.
• Inverse: If your CGPA is less than 3.7 or you have not completed 30 credits, then you are not
eligible for the scholarship.
e. A figure is a square only if it has four equal sides and four right angles.
• Converse: If a figure has four equal sides and four right angles, then it is a square.
• Contrapositive: If a figure does not have four equal sides or does not have four right angles, then
it is not a square.
• Inverse: If a figure is not a square, then it does not have four equal sides or does not have four
right angles.
f. The machine will shut down if the temperature exceeds 100°C and the system pressure drops below
the minimum threshold.
• Converse: If the machine shuts down, then the temperature exceeded 100°C and the system
pressure dropped below the minimum threshold.
• Contrapositive: If the machine does not shut down, then the temperature did not exceed 100°C
or the system pressure did not drop below the minimum threshold.
• Inverse: If the temperature does not exceed 100°C or the system pressure does not drop below
the minimum threshold, then the machine will not shut down.

Q8
How many rows appear in a truth table for each of these compound propositions?

a. p → ¬p(p ∨ ¬r) ∧ (q ∨ ¬s): There are 4 variables (p, q, r, s), so 24 = 16 rows.


b. q ∨ p ∨ ¬s ∨ ¬r ∨ ¬t ∨ u: There are 6 variables (p, q, r, s, t, u), so 26 = 64 rows.
c. (p ∧ r ∧ t) ↔ (q ∧ t): There are 4 variables (p, q, r, t), so 24 = 16 rows.

Q9
Construct truth tables for each of the following compound propositions:

p ¬p p ∧ ¬p
a. p ∧ ¬p: T F F
F T F

p ¬p p ∨ ¬p
b. p ∨ ¬p: T F T
F T T

p q p ∨ ¬q (p ∨ ¬q) → q
T T T T
c. (p ∨ ¬q) → q: T F T F
F T F T
F F T F

p q r (p ∨ q) ∧ r
T T T T
T T F F
T F T T
d. (p ∨ q) ∧ r: T F F F
F T T T
F T F F
F F T F
F F F F

4
p q r (p ∧ q) ∨ r
T T T T
T T F T
T F T T
e. (p ∧ q) ∨ r: T F F F
F T T T
F T F F
F F T T
F F F F

p q p→q ¬q → ¬p (p → q) ↔ (¬q → ¬p)


T T T T T
f. (p → q) ↔ (¬q → ¬p): T F F F T
F T T T T
F F T T T

p q r p ∨ (q ∧ r) (p ∨ (q ∧ r)) → (r ∨ p)
T T T T T
T T F T T
T F T T T
g. (p ∨ (q ∧ r)) → (r ∨ p): T F F T T
F T T T T
F T F F T
F F T F T
F F F F T

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


T T F F T
h. ¬(p ∧ q) ↔ (¬p ∨ ¬q): T F T T T
F T T T T
F F T T T

p q r p → (q ∨ r) q→r (p → (q ∨ r)) ∧ (q → r)
T T T T T T
T T F T F F
T F T T T T
i. (p → (q ∨ r)) ∧ (q → r): T F F F T F
F T T T T T
F T F T F F
F F T T T T
F F F T T T height

p q r s (p ∨ q) ∧ (r ∨ s) p∧s ((p ∨ q) ∧ (r ∨ s)) → (p ∧ s)


T T T T T T T
T T T F T F F
T T F T T T T
T T F F T F F
T F T T T T T
T F T F T F F
T F F T T T T
j. ((p ∨ q) ∧ (r ∨ s)) → (p ∧ s): T F F F F F T
F T T T T F F
F T T F T F F
F T F T T F F
F T F F F F T
F F T T T F F
F F T F F F T
F F F T F F T
F F F F F F T

5
Q10
Show that each of the following compound propositions is a tautology using the truth table:

p ¬p p ∨ ¬p
a. p ∨ ¬p: T F T The last column is always true, so p ∨ ¬p is a tautology.
F T T

p q r p→q q→r (p → q) ∧ (q → r) → (p → r)
T T T T T T
T T F T F T
T F T F T T
b. (p → q) ∧ (q → r) → (p → r): T F F F T T The last
F T T T T T
F T F T F T
F F T T T T
F F F T T T
column is always true, so the proposition is a tautology.
p q p↔q ¬p ↔ q (p ↔ q) ∨ (¬p ↔ q)
T T T F T
c. (p ↔ q) ∨ (¬p ↔ q): T F F T T The last column is always
F T F T T
F F T F T
true, so the proposition is a tautology.
p q r p ∨ q ¬p ∨ r (p ∨ q) ∧ (¬p ∨ r) → (q ∨ r)
T T T T T T
T T F T F T
T F T T T T
d. (p ∨ q) ∧ (¬p ∨ r) → (q ∨ r): T F F T F T The last
F T T T T T
F T F T T T
F F T F T T
F F F F T T
column is always true, so the proposition is a tautology.
p q r ¬p → q (¬q → p) ∨ r (¬p → q) → ((¬q → p) ∨ r)
T T T T T T
T T F T T T
T F T T T T
e. (¬p → q) → ((¬q → p) ∨ r): T F F T T T
F T T T T T
F T F T T T
F F T F T T
F F F F F T
The last column is always true, so the proposition is a tautology.
p q r ¬(p ∧ ¬p) ¬(p ∧ ¬p) ∨ (q ∧ r)
T T T T T
T T F T T
T F T T T
f. ¬(p ∧ ¬p) ∨ (q ∧ r): T F F T T The last column is always true,
F T T T T
F T F T T
F F T T T
F F F T T
so the proposition is a tautology.

6
Q11
Show that each of these pairs of propositions are logically equivalent using truth tables:

p q p→q ¬q → ¬p
T T T T
a. p → q and ¬q → ¬p: T F F F The columns for p → q and ¬q → ¬p are identical,
F T T T
F F T T
so they are logically equivalent.
p q p↔q ¬p ↔ ¬q
T T T T
b. p ↔ q and ¬p ↔ ¬q: T F F F The columns for p ↔ q and ¬p ↔ ¬q are identical,
F T F F
F F T T
so they are logically equivalent.
p q p ∧ q ¬p ∧ ¬q (p ∧ q) ∨ (¬p ∧ ¬q)
T T T F T
c. (p ∧ q) ∨ (¬p ∧ ¬q) and p ↔ q: T F F F F The columns for
F T F F F
F F F T T
(p ∧ q) ∨ (¬p ∧ ¬q) and p ↔ q are identical, so they are logically equivalent.

p q r p → (q ∧ r) (p → q) ∧ (p → r)
T T T T T
T T F F F
T F T F F
d. p → (q ∧ r) and (p → q) ∧ (p → r): T F F F F The columns for
F T T T T
F T F T T
F F T T T
F F F T T
p → (q ∧ r) and (p → q) ∧ (p → r) are identical, so they are logically equivalent.

p q ¬(p → q) p ∧ ¬q
T T F F
e. ¬(p → q) and p∧¬q: T F T T The columns for ¬(p → q) and p∧¬q are identical,
F T F F
F F F F
so they are logically equivalent.
p q r p ∧ (q ∨ r) (p ∧ q) ∨ (p ∧ r)
T T T T T
T T F T T
T F T T T
f. p ∧ (q ∨ r) and (p ∧ q) ∨ (p ∧ r): T F F F F The columns for p ∧ (q ∨ r)
F T T F F
F T F F F
F F T F F
F F F F F
and (p ∧ q) ∨ (p ∧ r) are identical, so they are logically equivalent.

p q ¬(p ∨ q) ¬p ∧ ¬q
T T F F
g. ¬(p∨q) and ¬p∧¬q: T F F F The columns for ¬(p∨q) and ¬p∧¬q are identical,
F T F F
F F T T
so they are logically equivalent.

7
p q r p ∨ (q ∧ r) (p ∨ q) ∧ (p ∨ r)
T T T T T
T T F T T
T F T T T
h. p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r): T F F T T The columns for p ∨ (q ∧ r)
F T T T T
F T F F F
F F T F F
F F F F F
and (p ∨ q) ∧ (p ∨ r) are identical, so they are logically equivalent.

p q r p → (q → r) (p ∧ q) → r
T T T T T
T T F F F
T F T T T
i. p → (q → r) and (p∧q) → r: T F F T T The columns for p → (q → r)
F T T T T
F T F T T
F F T T T
F F F T T
and (p ∧ q) → r are identical, so they are logically equivalent.

p q r (p ∨ q) → r ¬r → (¬p ∧ ¬q)
T T T T T
T T F F F
T F T T T
j. (p ∨ q) → r and ¬r → (¬p ∧ ¬q): T F F F F The columns for
F T T T T
F T F F F
F F T T T
F F F T T
(p ∨ q) → r and ¬r → (¬p ∧ ¬q) are identical, so they are logically equivalent.

Q12
Show that, ”In the Olympic Games, either the USA will win the gold medal or both Canada and Australia
will win medals” and ”The USA will win a medal or Canada will win a medal, and the USA will win a
medal or Australia will win a medal” are logically equivalent using truth tables.
Let:

• p: The USA will win the gold medal.


• q: Canada will win a medal.
• r: Australia will win a medal.
The first statement is p ∨ (q ∧ r), and the second statement is (p ∨ q) ∧ (p ∨ r).
p q r p ∨ (q ∧ r) (p ∨ q) ∧ (p ∨ r)
T T T T T
T T F T T
T F T T T
T F F T T
F T T T T
F T F F F
F F T F F
F F F F F
The columns for p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are identical, so the two statements are logically
equivalent.

8
Q13
Let D(x) denote ”x donates to charity regularly,” where the domain consists of all people in a city.
Express each of these statements in English:

a. ∃xD(x): There exists at least one person in the city who donates to charity regularly.
b. ∀xD(x): Every person in the city donates to charity regularly.

c. ∃x¬D(x): There exists at least one person in the city who does not donate to charity regularly.
d. ∀x¬D(x): No person in the city donates to charity regularly.

Q14
Translate these statements into English, where T (x) means ”x is a teacher” and R(x) means ”x reads
every day.” The domain consists of all individuals in a neighborhood
a. ∀x(T (x) → R(x)): Every teacher in the neighborhood reads every day.

b. ∃x(T (x) ∧ R(x)): There exists at least one teacher in the neighborhood who reads every day.
c. ∀x(T (x) ∧ R(x)): Every individual in the neighborhood is a teacher and reads every day.
d. ∃x(T (x) → R(x)): There exists at least one individual in the neighborhood such that if they are a
teacher, then they read every day.

Q15
Let E(x) represent ”x is enrolled in an art class,” B(x) means ”x is in a beginner’s course,” G(x) means
”x has a good grade,” and S(x) represent ”x likes studying.” The domain consists of some students in
an art class. Translate each of these statements into English:

a. ∀x(E(x) → G(x)): Every student enrolled in an art class has a good grade.
b. ∃x(B(x) ∧ S(x)): There exists at least one student in a beginner’s course who likes studying.

c. ¬∀x(B(x) → (G(x) ∨ S(x))): Not every student in a beginner’s course has a good grade or likes
studying.

Q16
Translate each of these statements into logical expressions using predicates, quantifiers, and logical
connectives. Let F (x) denote ”x is a family member,” and K(x) denote ”x is kind.”

a. At least one family member is kind: ∃x(F (x) ∧ K(x)).


b. All of your family members are kind: ∀x(F (x) → K(x)).
c. Not every family member is kind: ¬∀x(F (x) → K(x)) or ∃x(F (x) ∧ ¬K(x)).

d. Everyone is either a family member or is kind: ∀x(F (x) ∨ K(x)).


e. Not everyone is a family member or there is someone who is not kind: ¬∀x(F (x) ∨ ∃x¬K(x).

Q17
Let L(x) represent ”x knows how to play an instrument,” and let M (x) represent ”x is a member of a
band.” Express each of these statements in terms of L(x), M (x), quantifiers, and logical connectives.
The domain for quantifiers consists of all students at a school.

a. There is a student at your school who knows how to play an instrument and is a member of a band:
∃x(L(x) ∧ M (x)).

9
b. There is a student at your school who knows how to play an instrument but is not a member of a
band: ∃x(L(x) ∧ ¬M (x)).
c. Every student at your school either knows how to play an instrument or is a member of a band:
∀x(L(x) ∨ M (x)).
d. No student at your school knows how to play an instrument or is a member of a band: ∀x(¬L(x) ∧
¬M (x)).

Q18
Let P (x), Q(x), and R(x) be the statements ”x is a scientist,” ”x is curious,” and ”x likes to experiment,”
respectively. Express each of these statements using quantifiers, logical connectives, and P (x), Q(x), and
R(x), where the domain consists of all people.

a. All scientists are curious: ∀x(P (x) → Q(x)).


b. All curious people like to experiment: ∀x(Q(x) → R(x)).
c. No scientists like to experiment: ∀x(P (x) → ¬R(x)).

Q19
In a university, we define the following predicates:
• S(x): x is a student.
• P (x): x is a professor.
• C(y): y is a course.
• T (x, y): x takes course y.
• E(x, y): x teaches course y.
Express each of these statements using quantifiers and logical connectives:

a. Every student takes at least one course: ∀x(S(x) → ∃y(C(y) ∧ T (x, y))).
b. For every professor, there exists a course that they teach: ∀x(P (x) → ∃y(C(y) ∧ E(x, y))).
c. There exists a student who takes every course: ∃x(S(x) ∧ ∀y(C(y) → T (x, y))).
d. For every course, there exists a student who is enrolled in that course: ∀y(C(y) → ∃x(S(x)∧T (x, y))).
e. Every professor teaches at least one student in their course: ∀x(P (x) → ∃y(C(y) ∧ E(x, y) ∧ ∃z(S(z) ∧
T (z, y)))).
f. For every student, there exists a professor who teaches at least one course they are taking: ∀x(S(x) →
∃y(P (y) ∧ ∃z(C(z) ∧ T (x, z) ∧ E(y, z)))).

Q20
State the converse, contrapositive, and inverse of each of these conditional statements:

a. The ground will be wet unless it is not raining.


• Converse: If the ground is wet, then it is raining.
• Contrapositive: If the ground is not wet, then it is not raining.
• Inverse: If it is not raining, then the ground will not be wet.
b. Having fuel is necessary for running the car.
• Converse: If the car is running, then it has fuel.
• Contrapositive: If the car is not running, then it does not have fuel.

10
• Inverse: If the car does not have fuel, then it will not run.
c. Being sunny is sufficient for the picnic to be enjoyable.
• Converse: If the picnic is enjoyable, then it is sunny.
• Contrapositive: If the picnic is not enjoyable, then it is not sunny.
• Inverse: If it is not sunny, then the picnic will not be enjoyable.
d. I wake up whenever the alarm rings.
• Converse: If I wake up, then the alarm rings.
• Contrapositive: If I do not wake up, then the alarm does not ring.
• Inverse: If the alarm does not ring, then I do not wake up.
e. The streets get wet when it rains.
• Converse: If the streets are wet, then it is raining.
• Contrapositive: If the streets are not wet, then it is not raining.
• Inverse: If it does not rain, then the streets do not get wet.

Q21
Let p and q be the propositions:
• p: The security system is activated.
• q: The alarm will sound.

• r: There is a breach.
Write these propositions using p, q, and logical connectives (including negations):

a. The security system is activated, but the alarm does not sound: p ∧ ¬q.
b. The alarm sounds, and the security system is not activated: q ∧ ¬p.
c. If the security system is activated, then the alarm will sound if and only if there is a breach: p →
(q ↔ r).

d. For the alarm to sound, it is necessary and sufficient that the security system is activated and there
is a breach: q ↔ (p ∧ r).

Q22
Let r and s be the propositions:
• r: I studied for the exam.
• s: I passed the exam.
Express each of these propositions as an English sentence:

a. ¬r: I did not study for the exam.

b. r ↔ s: I studied for the exam if and only if I passed the exam.


c. ¬r ⊕ s: Either I did not study for the exam or I passed the exam, but not both.
d. (r ↔ s) ∧ (¬r ⊕ s): I studied for the exam if and only if I passed the exam, and either I did not study
or I passed, but not both.

11
Q23
Let p and q be the propositions:
• p: You drive over 65 miles per hour.
• q: You get a speeding ticket.
Write these propositions using p and q and logical connectives (including negations):
a. You do not drive over 65 miles per hour: ¬p.
b. You drive over 65 miles per hour, but you do not get a speeding ticket: p ∧ ¬q.
c. You will get a speeding ticket if you drive over 65 miles per hour: p → q.
d. If you do not drive over 65 miles per hour, then you will not get a speeding ticket: ¬p → ¬q.
e. Driving over 65 miles per hour is sufficient for getting a speeding ticket: p → q.
f. You get a speeding ticket, but you do not drive over 65 miles per hour: q ∧ ¬p.
g. Whenever you get a speeding ticket, you are driving over 65 miles per hour: q → p.

Q24
State the converse, contrapositive, and inverse of each of these conditional statements:
a. If it snows today, I will ski tomorrow.
• Converse: If I ski tomorrow, then it snows today.
• Contrapositive: If I do not ski tomorrow, then it does not snow today.
• Inverse: If it does not snow today, then I will not ski tomorrow.
b. I come to class whenever there is going to be a quiz.
• Converse: If I come to class, then there is going to be a quiz.
• Contrapositive: If I do not come to class, then there is not going to be a quiz.
• Inverse: If there is not going to be a quiz, then I do not come to class.
c. A positive integer is a prime only if it has no divisors other than 1 and itself.
• Converse: If a positive integer has no divisors other than 1 and itself, then it is a prime.
• Contrapositive: If a positive integer has divisors other than 1 and itself, then it is not a prime.
• Inverse: If a positive integer is not a prime, then it has divisors other than 1 and itself.

Q25
Show that ¬(p ∧ q) ≡ ¬p ∨ ¬q.
p q p ∧ q ¬(p ∧ q) ¬p ∨ ¬q
T T T F F
T F F T T
F T F T T
F F F T T
The columns for ¬(p ∧ q) and ¬p ∨ ¬q are identical, so they are logically equivalent.

Q26
Show that the proposition p → (p ∧ (q → p)) is a tautology.
p q q → p p → (p ∧ (q → p))
T T T T
T F T T
F T F T
F F T T
The last column is always true, so the proposition is a tautology.

12
Q27
Construct the truth table for (p → q) ↔ (¬q → ¬p).
p q p → q ¬q → ¬p (p → q) ↔ (¬q → ¬p)
T T T T T
T F F F T
F T T T T
F F T T T
The last column is always true, so the proposition is a tautology.

Q28
Construct the truth table for (p ⊕ q) → (p ⊕ ¬q).
p q p ⊕ q p ⊕ ¬q (p ⊕ q) → (p ⊕ ¬q)
T T F T T
T F T F F
F T T F F
F F F T T
The last column is not always true, so the proposition is not a tautology.

Q29
Show that, ”In the FIFA World Cup either Germany will reach the final or England and Argentina will
reach the final” and ”Germany or England will reach the final, and Germany or Argentina will reach the
final” are logically equivalent.
Let:

• p: Germany will reach the final.


• q: England will reach the final.
• r: Argentina will reach the final.
The first statement is p ∨ (q ∧ r), and the second statement is (p ∨ q) ∧ (p ∨ r).
p q r p ∨ (q ∧ r) (p ∨ q) ∧ (p ∨ r)
T T T T T
T T F T T
T F T T T
T F F T T
F T T T T
F T F F F
F F T F F
F F F F F
The columns for p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are identical, so the two statements are logically
equivalent.

Q30
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 exists at least one student who spends more than five hours every weekday in class.
b. ∀xP (x): Every student spends more than five hours every weekday in class.
c. ∃x¬P (x): There exists at least one student who does not spend more than five hours every weekday
in class.

d. ∀x¬P (x): No student spends more than five hours every weekday in class.

13
Q31
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 comedian and is funny.

c. ∃x(C(x) → F (x)): There exists at least one person such that if they are a comedian, then they are
funny.
d. ∃x(C(x) ∧ F (x)): There exists at least one comedian who is funny.

Q32
Translate these statements into English, where:
• A(x): x teaches CSE230.

• T (x): x likes STA201.


• F (x): x has a Facebook page.
• C(x): x likes to cook.
The domain consists of all faculties in a university.

a. ∀x(T (x) → F (x)): Every faculty who likes STA201 has a Facebook page.
b. ∃x(T (x) ∧ A(x)): There exists at least one faculty who likes STA201 and teaches CSE230.

c. ¬∀x(T (x) → (F (x) ∨ C(x))): Not every faculty who likes STA201 has a Facebook page or likes to
cook.

Q33
Translate each of these statements into logical expressions using predicates, quantifiers, and logical
connectives.

a. No one is perfect: ∀x¬P (x).


b. Not everyone is perfect: ¬∀xP (x) or ∃x¬P (x).
c. All your friends are perfect: ∀x(F (x) → P (x)).

d. At least one of your friends is perfect: ∃x(F (x) ∧ P (x)).


e. Everyone is your friend and is perfect: ∀x(F (x) ∧ P (x)).
f. Not everybody is your friend or someone is not perfect: ¬∀xF (x) ∨ ∃x¬P (x).

Q34
Let P (x) be the statement “x can speak English” and let Q(x) be the statement “x knows programming
language Python.” Express each of these sentences in terms of P (x), Q(x), quantifiers, and logical
connectives. The domain for quantifiers consists of all students at your school.

a. There is a student at your school who can speak English and who knows Python: ∃x(P (x) ∧ Q(x)).
b. There is a student at your school who can speak English but who doesn’t know Python: ∃x(P (x) ∧
¬Q(x)).
c. Every student at your school either can speak English or knows Python: ∀x(P (x) ∨ Q(x)).
d. No student at your school can speak English or knows Python: ∀x(¬P (x) ∧ ¬Q(x)).

14
Q35
Let P (x), Q(x), and R(x) be the statements “x is a professor,” “x is ignorant,” and “x is vain,” respec-
tively. Express each of these statements using quantifiers, logical connectives, and P (x), Q(x), and R(x),
where the domain consists of all people.
a. No professors are ignorant: ∀x(P (x) → ¬Q(x)).
b. All ignorant people are vain: ∀x(Q(x) → R(x)).
c. No professors are vain: ∀x(P (x) → ¬R(x)).

Q36
Let C(x) mean ”x is a core course,” T (x, y) mean ”Student y has taken course x,” and G(y) mean ”Student
y has met graduation requirements.” The domain consists of all students and courses. Formulate the
following statements using quantifiers:
a. For every student, if they have taken all core courses, they meet the graduation requirements:
∀y(∀x(C(x) → T (x, y)) → G(y).
b. There exists a student who has not taken every core course but still meets the graduation requirements:
∃y(∃x(C(x) ∧ ¬T (x, y)) ∧ G(y).
c. For every core course, there is at least one student who has not taken it: ∀x(C(x) → ∃y¬T (x, y)).

Q37
Let S(x) mean ”x submitted a research paper,” R(x, y) mean ”Reviewer y read x’s paper,” and A(x, y)
mean ”Reviewer y approved x’s paper.” The domain consists of all researchers and reviewers. Express
the following statements using nested quantifiers:
a. Every researcher has at least one reviewer who has read and approved their paper: ∀x(S(x) →
∃y(R(x, y) ∧ A(x, y))).
b. There exists a reviewer who has read every paper but has not approved at least one of them:
∃y(∀x(S(x) → R(x, y)) ∧ ∃x(S(x) ∧ ¬A(x, y))).
c. For every research paper, if it was read by a reviewer, then there exists another reviewer who did not
read it: ∀x(S(x) → (∃yR(x, y) → ∃z¬R(x, z))).

Q38
Let P (x, y) mean ”Person x can work on a project with Person y,” Q(x) means ”Person x knows Python,”
and R(x) means ”Person x is a project manager.” The domain consists of all people in a software
development team. Express the following statements using quantifiers and logical connectives:
a. There exists a project manager who can work with everyone on the team who knows Python: ∃x(R(x)∧
∀y(Q(y) → P (x, y))).
b. For every person who knows Python, there is at least one other person they can work with who is not
a project manager: ∀x(Q(x) → ∃y(¬R(y) ∧ P (x, y))).
c. For every person, if they are a project manager, there exists at least one person on the team with
whom they cannot work: ∀x(R(x) → ∃y¬P (x, y)).

Q39
Let S(x) represent ”x is skilled in software development,” M (x) represent ”x has managerial experience,”
and Q(x, y) represent ”Person x qualifies for Job y.” The domain consists of all applicants for the job,
and there are multiple types of jobs.
a. Describe, using quantifiers, the condition where there exists a job such that only applicants with both
software skills and managerial experience qualify: ∃y∀x(Q(x, y) ↔ (S(x) ∧ M (x))).
b. Write the condition, using quantifiers, for a job that requires at least one applicant without software
development skills but with managerial experience to qualify: ∃y∃x(¬S(x) ∧ M (x) ∧ Q(x, y)).

15
Q40
Let A(x) represent ”x is an applicant,” S(x) represent ”x has strong academic scores,” and E(x) represent
”x participates in extracurricular activities.” The domain consists of all college applicants.

a. Express with quantifiers the requirement that all applicants participate in extracurricular activities
only if they have strong academic scores, but there is at least one applicant who has strong academic
scores and does not participate in extracurricular activities: ∀x(E(x) → S(x)) ∧ ∃x(S(x) ∧ ¬E(x)).
b. Write the condition that for an applicant to be admitted, they must either have strong academic scores
or participate in extracurricular activities, but not necessarily both: ∀x(A(x) → (S(x) ∨ E(x))).

16

You might also like