0% found this document useful (0 votes)
4 views5 pages

Exam Answers

The document contains answer keys for a midterm exam in Discrete Structures, covering topics such as logical translations, truth values, logical equivalences, and proofs. It includes various parts detailing student discounts, exam passing conditions, logical statements, and counterexamples. Additionally, it discusses arguments, relations, functions, and logical errors with examples and proofs.

Uploaded by

jazzzyyy0909
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)
4 views5 pages

Exam Answers

The document contains answer keys for a midterm exam in Discrete Structures, covering topics such as logical translations, truth values, logical equivalences, and proofs. It includes various parts detailing student discounts, exam passing conditions, logical statements, and counterexamples. Additionally, it discusses arguments, relations, functions, and logical errors with examples and proofs.

Uploaded by

jazzzyyy0909
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/ 5

ITCC42 – Discrete Structures

Midterm Exam Answer Keys

Note that some questions can be answered in variations. However, this examination
answer key will only provide one variation.

Created by:
Neil John J. Jomaya
Part I

1. All student passengers receive a discount.

𝐷: Student Passengers / 𝐷 ′ : Passengers

𝑄(𝑥): 𝑥 receives a discount, 𝑃(𝑥): 𝑥 is a student.

TRANSLATION (Either one):

∀𝑥 ∈ 𝐷, 𝑄(𝑥) OR ∀𝑥 ∈ 𝐷 ′ , 𝑃(𝑥) → 𝑄(𝑥)

2. Only a few examinees passed the CCNA Exam.

𝐷: Examinees, 𝑃(𝑥): 𝑥 passed the CCNA Exam.

TRANSLATION:

∃𝑥 ∈ 𝐷 | 𝑃(𝑥)
3. There is no CISC IT student who hasn’t been a student of Sir Neil.

𝐷: CISC IT Student / 𝐷 ′ : CISC Student

𝑁(𝑥): 𝑥 is a student of Sir Neil, 𝑃(𝑥): 𝑥 is an IT Student.

TRANSLATION (Either one):

~(∃𝑥 ∈ 𝐷 | ~𝑁(𝑥)) ⇒ ∀𝑥 ∈ 𝐷, 𝑁(𝑥)


OR

~(∃𝑥 ∈ 𝐷` | 𝑃(𝑥) ∧ ~𝑁(𝑥)) ⇒ ~ (∃𝑥 ∈ 𝐷` | ~𝑃(𝑥) ∨ 𝑁(𝑥)) ⇒ ∀𝑥 ∈ 𝐷`, 𝑃(𝑥) → 𝑁(𝑥)

4. Each driver who is a Grab driver must have a car and a professional license.

𝐷: Grab Driver, 𝐷`: Driver

𝑃(𝑥): 𝑥 has a car and a professional license, 𝐺(𝑥): 𝑥 is a Grab Driver

TRANSLATION (Either one):

∀𝑥 ∈ 𝐷, 𝑃(𝑥) OR ∀𝑥 ∈ 𝐷 ′ , 𝐺(𝑥) → 𝑃(𝑥)

Part II. Write in both Symbolic and English Form the Converse, Inverse, and Contrapositive of the Conditional
Statement.

If you studied for the ITCC42 exam, then you will pass it.

𝑝: You studied for the ITCC42 Exam.

𝑞: You passed the ITCC42 Exam.

Converse (𝑞 → 𝑝): If you passed the ITCC42 Exam, then you studied it.

Inverse (~𝑝 → ~𝑞): If you did not study for the ITCC42 Exam, then you will not pass it.

Contrapositive (~𝑞 → ~𝑝): If you did not pass the ITCC42 Exam, then you did not study it.

Part III. Logical Equivalences and Truth Table

1. Determine whether the two statements are logically equivalent using logical equivalences (no truth table):

𝑝 → 𝑞 ∨ 𝑟 ≡ 𝑝 ∧ ~𝑟 → 𝑞
Solution:

𝑝 → 𝑞 ∨ 𝑟 ≡ ~(𝑝 ∧ ~𝑟) ∨ 𝑞 Transform

𝑝 → 𝑞 ∨ 𝑟 ≡ (~𝑝 ∨ 𝑟) ∨ 𝑞 De Morgan’s

𝑝 → 𝑞 ∨ 𝑟 ≡ (~𝑝 ∨ 𝑞) ∨ 𝑟 Associativity

𝑝→𝑞∨𝑟 ≡𝑝→𝑞∨𝑟 Transform


2. Construct the truth table of the following: (𝑝 → 𝑟) ↔ (𝑞 → 𝑟)

𝑝 𝑞 𝑟 𝑝→𝑟 𝑞→𝑟 (𝑝 → 𝑟) ↔ (𝑞 → 𝑟)
T T T T T T
T T F F F T
T F T T T T
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

Part IV. Predicate Logic & Quantifiers.

1. Given the quantified statement, identify its truth value. If it is false, provide a counterexample:

1
∀𝑥 ∈ ℝ, 𝑥 ≥
𝑥

Solution:

1
Let 𝑥 = . Then:
2

1
1 1

2 2

1 2
⇒ ≥1∗
2 1
1
2
≥ 2, which is not true.

1 1
∴ ∀𝑥 ∈ ℝ, 𝑥 ≥ is not true by using 𝑥 = as the counterexample. Note that when a number or
𝑥 2

variable is divided by a fraction, it is equivalent to taking the reciprocal of that fraction and multiplying it to
the number or variable.

2. TRUTH VALUES
• There is a short third year student. FALSE
• Every short player in the team is a second-year student. TRUE
• Every tall player in the team is either a third year or a first-year student. FALSE
• No player in the team is a short first-year student. TRUE
• All players in the team undertake Bachelor of Science degrees. FALSE

Part V. Arguments & Proof of Validity.

1. 𝑝 → 𝑞 2. 𝑝 → 𝑞 ∨ 𝑟
𝑞→𝑝 ~𝑞 ∧ ~𝑟
∴𝑝∨𝑞 ∴ ~𝑝
• It is valid since it is a case of Modus
• Invalid since it does not follow nor
Tollens.
conform to any valid argument template.
3. Knights and Knaves Puzzle.
a. If the scenario is that both A and B are knights, then the statement At least one of us is a Knight is true
since it doesn’t matter if A or B says it.
b. If the scenario is A being a Knight, and B being Knave, then it is logically consistent if and only if the
person that said the statement is A.
c. If the scenario is A being a Knave, and B being a Knight, then it is logically consistent if and only if the
person that said the statement is B.
d. If the scenario is both A and B being Knaves, then the statement is false, but is still logically consistent
since both are lying.

Part VI. Relations & Functions.

1. Let 𝐴 = { 2, 3, 4 } and 𝐵 = { 6, 8, 10 }. 𝑅 is a relation from 𝐴 to 𝐵:


𝑥
For every (𝑥, 𝑦) ∈ 𝐴 × 𝐵, (𝑥, 𝑦) ∈ 𝑅 ↔ 𝑦 ∈ ℤ.
𝑥
Goal: Check if every pair in 𝐴 × 𝐵, when substituted into 𝑦, 𝑦 divides 𝑥 fully.

2 1 2 1 2 1
= ∉ ℤ, = ∉ ℤ, = ∉ℤ
6 3 8 4 10 5
3 1 3 3
= ∉ ℤ, ∉ ℤ, ∉ℤ
6 2 8 10
4 2 4 1 4 2
= ∉ ℤ, = ∉ ℤ, = ∉ℤ
6 3 8 2 10 5
Since no pair from 𝐴 × 𝐵 satisfies the relation 𝑅’s requirement, therefore, 𝑅 = ∅. Or therefore, 𝑅 is not a relation
from 𝐴 to 𝐵 since no such pair exists.

Part VII. Direct Proofs & Counterexamples.

1. Assume that 𝑟 and 𝑠 are integers. Using direct proof, prove that 6𝑟 + 4𝑠 2 + 3 is odd.

Proposition: Prove that 6𝑟 + 4𝑠 2 + 3 is odd.

Definition: 𝑛 is an odd integer ↔ 𝑛 = 2𝑘 + 1 for some integer 𝑘.

Proof:

To show that 6𝑟 + 4𝑠 2 + 3 is an even integer, then we must find an integer 𝑘 such that we can represent
6𝑟 + 4𝑠 2 + 3 as 2𝑘 + 1. When 𝑘 = 3𝑟 + 2𝑠 + 1:

6𝑟 + 4𝑠 2 + 3 = 2(3𝑟 + 2𝑠 2 + 1) + 1

6𝑟 + 4𝑠 2 + 3 = 6𝑟 + 4𝑠 2 + 2 + 1

6𝑟 + 4𝑠 2 + 3 = 6𝑟 + 4𝑠 2 + 3

6𝑟 + 4𝑠 2 + 3 can be represented as 2𝑘 + 1 when 𝑘 = 3𝑟 + 2𝑠 + 1. 𝑘 is an integer since both 𝑟 and 𝑠 are


stated as integers and multiplying and/or adding two integers always results to an integer. Then, 𝑘 is multiplied by
2, and added by 1, fitting the definition of an odd integer.

Therefore, 6𝑟 + 4𝑠 2 + 3 is an odd integer.


2. Using the Method of Exhaustion: Every positive integer less than 26 can be expressed as a sum of three or
fewer perfect squares.

1 = 12

2 = 12 + 12 14 = 32 + 22 + 12
3 = 12 + 12 + 1 2 15 = 32 + 22 + 12 + 12
4 = 22 16 = 42
5 = 22 + 12 17 = 42 + 12
6 = 22 + 12 + 1 2 18 = 42 + 12 + 12
7 = 22 + 12 + 12 + 12 19 = 42 + 12 + 12 + 12
8 = 22 + 22 20 = 42 + 22
9 = 32 21 = 42 + 22 + 12
10 = 32 + 12 22 = 42 + 22 + 12 + 12
11 = 32 + 12 + 12 23 = 42 + 22 + 12 + 12 + 12
12 = 22 + 22 + 22 + 22 24 = 42 + 22 + 22
13 = 32 + 22 25 = 52
By using the Method of Exhaustion, we can see these positive integers 7, 12, 15, 19, 22, and 23 cannot be
expressed as a sum of three or less perfect squares.

Therefore, the statement is FALSE.

Part VIII. Logical Errors & Fallacies.

1. There is no fallacy or logical error in the argument:

If a student does not study, then they will not pass the exam.

John passed the exam.

Therefore, John studied.

We can define the terms:

𝑆(𝑥): 𝑥 studies for the exam.

𝑃(𝑥): 𝑥 passes the exam.

𝐷: Student

∀𝑥 ∈ 𝐷, ~𝑆(𝑥) → ~𝑃(𝑥)
𝑃(John)
∴ 𝑆(John)
The quantified argument can be understood as above. Furthermore, the argument is a case of Modus Tollens.
Therefore, it is valid.

2. Correction (Modus Tollens Variation):

If a company offers high salaries, then its employees are happy.


The employees of this company are not happy. Therefore, the company does not offer high salaries.

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