0% found this document useful (0 votes)
5 views74 pages

MAT - 125 Revision Questions

The document is a set of revision questions and answers for MAT 125: Discrete Mathematics II, authored by Dr. Runji Flora. It covers topics such as propositional and predicate logic, Boolean algebra, methods of proof, and includes various exercises and solutions related to these concepts. The document serves as a study guide for students to prepare for examinations in discrete mathematics.
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)
5 views74 pages

MAT - 125 Revision Questions

The document is a set of revision questions and answers for MAT 125: Discrete Mathematics II, authored by Dr. Runji Flora. It covers topics such as propositional and predicate logic, Boolean algebra, methods of proof, and includes various exercises and solutions related to these concepts. The document serves as a study guide for students to prepare for examinations in discrete mathematics.
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/ 74

MAT 125: DISCRETE MATHEMATICS II

REVISION QUESTIONS AND ANSWERS

By Dr. Runji Flora, Karatina University


May 5, 2025

Course Content

• Propositional Logic:

Propositions: definitions, examples, compound statements.

Basic logical connectives: negation, conjunction, disjunction. Truth tables for each
ra
lo
connective.
iF

Statement forms and their truth tables. Tautologies and contradictions


nj
Ru

Logical equivalences, Conditional and biconditional. Algebra of propositions, Infer-


.
Dr

ence rules, formal arguments, Soundness and completeness. Mathematical state-

ments: general and particular. Converse and contrapositive of a mathematical

statement. Applications especially in computer science, the Soundness Theorem,

The Completeness Theorem, The Compactness Theorem, Gödel’s First Incom-

pleteness Theorem, and Gödel’s Second Incompleteness Theorem

• Predicate Logic: Predicates. Quantification. Formalizing English statements.

Inference rules for quantifiers. Semantics of predicate calculus. Applications

• Boolean algebra: Boolean algebra as models. Circuits. Some theorems on logic.

Applications

• Methods of Proof: Including direct proof, contrapositive proof, proof by counter

example, proof by contradiction, Mathematical induction, proof by cases etc.


1. Define the following terms:

a) Logic [1 mark]

Solution:

Logic is commonly known as the science of reasoning. ✓

b) A contingent [1 mark]

Solution: A contingent is a propositional form that is neither true nor false. ✓

2. If Juan has a smartphone, then she will able to attend the meeting online. When is

this statement false? [1 mark]

Solution: The statement will be false if Juan has a smartphone but is not able to

attend the online meeting. ✓

3. Let p: Stephen is a computer teacher ra


lo
q: Rahab is a student.
iF
nj

Write each of the following statement in symbolic form:


Ru

i) Stephen is a computer teacher and Rahab is a student. [1 mark]


.
Dr

Solution: p ∧ q ✓

ii) Stephen is a computer teacher and Rahab is not a student. [1 mark]

Solution: p∧ ∼ q ✓

iii) Stephen is not a computer teacher but Rahab is a student. [1 mark]

Solution: ∼ p ∧ q ✓

iv) Neither Stephen is a computer teacher nor Rahab is a student. [1 mark]

Solution: ∼ p∧ ∼ q ✓

v) Either Stephen is a computer teacher or Rahab is a student. [1 mark]

Solution: p ∨ q ✓

4. Write the following English sentences in symbolic form:

MAT 125 Rev. Qns By Dr. Runji Flora Page 2 of 74


a) Lisa cannot play both soccer and tennis this year. [1 mark]

Solution: Let

s : ”Lena can play soccer this year”

t : ”Lena can play tennis this year”

Answer: ∼ (s ∧ t) ≡ ∼ s ∨ ∼ t ✓

b) He is poor but honest. [1 mark]

Solution: Let

p : He is poor

q : He is honest

Then we have : p ∧ q ✓

c) Neither it is hot nor cold today. [1 mark]

Solution: Let ar
lo
iF

p : It is hot today
nj

q : It is cold today
Ru

So the symbolic form is ∼ p ∧ ∼ q. ✓


.
Dr

d) I will dance only if you sing. [1 mark]

Solution: We have,

The given sentence is “I will dance only if you sing.”

This sentence is of the form: “p only if q”.

So, the symbolic form is p → q ✓

where-

p : I will dance

q : You sing

e) Presence of cycle in a single instance RAG is a necessary and sufficient condition

for deadlock. [1 mark]

Solution: We have-

MAT 125 Rev. Qns By Dr. Runji Flora Page 3 of 74


The given sentence is- “Presence of cycle in a single instance RAG is a necessary

and sufficient condition for deadlock.”

This sentence is of the form- “p is necessary and sufficient for q”.

So, the symbolic form is p ↔ q ✓

where-

p : Presence of cycle in a single instance RAG

q : Presence of deadlock

f) Presence of cycle in a multi instance RAG is a necessary but not sufficient condition

for deadlock. [1 mark]

Solution: We have-

The given sentence is- “Presence of cycle in a multi instance RAG is a necessary

but not sufficient condition for deadlock.”


a
r
lo
This sentence is of the form- “p is necessary but not sufficient for q”.
iF

So, the symbolic form is (q → p) ∧ ∼ (p → q) ✓


nj
Ru

where-
.
Dr

p : Presence of cycle in a multi instance RAG

q : Presence of deadlock

5. Given the statement: ”You can have tea or coffee,” describe the interpretation

of the statement under:

(a) Inclusive “or”. [2 marks]

Solution: Inclusive ”or” is false when both p and q are false and is true

otherwise. ✓

Thus the given statement can be interpreted: ; You may have tea, coffee, or

both. ✓

(b) Exclusive “or”. [2 marks]

Solution: Exclusive ”or” is true when exactly one of p and q is true and is

false otherwise. ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 4 of 74


Thus the given statement can be interpreted: You may have tea or coffee, but

not both. ✓

6. Negate the following:

a) p ∨ ∼ q [1 mark]

Solution: ∼ (p ∨ ∼ q) ≡ ∼ p ∧ ∼ (∼ q) ≡ ∼ p ∧ q ✓

b) ∼ p → q [3 marks]

Solution: p → q ≡ ∼ p ∨ q ✓

∼ p → q ≡ ∼ (∼ p) ∨ q ≡ p ∨ q ✓

∴∼ [ ∼ p → q ] ≡∼ [ p ∨ q ] ≡ ∼ p ∧ ∼ q ✓

c) p ↔ q [1 mark]

Solution: p ↔ q ≡ p ⊕ q ✓

d) p → (q ∧ r)
ra [1 mark]
lo
iF

Solution: ∼ [ p → (q ∧ r) ] ≡ ∼ [ ∼ p ∨ (q ∧ r) ] ≡ p ∧ ∼ (q ∧ r) ✓
nj
Ru

7. What Boolean search would you use to look for Web pages about hiking in Nyeri,
.

but not in Nyeri West ? [2 marks]


Dr

Solution: (”hiking” AND ”Nyeri”) AND NOT ”Nyeri West” ✓✓

8. In the conditional statement p → q, what term is given to the variables p and q

respectively? [2 marks]

Solution:

• p is called the premise, hypothesis, or the antecedent. ✓

• q is called the conclusion or consequent. ✓

9. Write the statement:”To be a citizen of this country, it is sufficient that you were

born in Kenya” in the form ”if p, then q ” in English. [2 marks]

Solution: p is sufficient for q means ”if p, then q”. ✓

Hence the statement is:

”If you are a citizen of this country, then you were born in Kenya” ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 5 of 74


10. Given the implication: If this book is interesting, then I am staying at home, write

its converse, inverse and Contrapositive. [3 marks]

Solution:

Converse: If I am staying at home, then this book is interesting. ✓

Inverse: If this book is not interesting, then I am not staying at home. ✓

Contrapositive: If I am not staying at home, then this book is not interesting. ✓

11. Formalize in symbols the statement ”For every positive integer x, there exists a

positive integer y such that y is greater than x.” [2 marks]

Solution:

∀x ∈ Z+ ∃y ∈ Z+ (y > x). ✓✓

12. Translate the following formalized statement into English:


a
r
lo
∃y(Parent(y, John) ∧ ¬Happy(y)).” [2 marks]
iF
nj

Solution:
Ru

There exists a person y who is a parent of John and is not happy. ✓✓


.
Dr

13. Simplify the Boolean expression F (X, Y, Z) = X ′ Y + Y Z ′ + Y Z + X ′ Y Z ′ . [5marks]

Solution:

F (X, Y, Z) = X ′ Y + Y Z ′ + Y Z + X ′ Y Z ′ (Given expression)

= X ′ Y + Y (Z ′ + Z) + X ′ Y Z ′ (Distributive property) ✓

= X ′Y + Y + X ′Y Z ′ (Complement property: Z ′ + Z = 1) ✓

= Y + X ′ Y + XY ′ Z ′ (Commutative property)

= Y + X ′ Y (1 + Z ′ ) (Distributive property) ✓

= Y + X ′Y (Complement property: 1 + Z ′ = 1) ✓

= Y (1 + X ′ ) (Distributive property)

=Y (Complement property: 1 + X ′ = 1) ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 6 of 74


14. A logical equivalence has derived from the algebra laws for propositions. Supply a

reason for each step.

(p ∧ ¬q) ∨ (p ∧ q) ≡ p ∧ (¬q ∨ q) . . . . . . by (a)

≡ p ∧ (q ∨ ¬q) . . . . . . by (b)

≡p∧t . . . . . . . . . . . . by (c)

≡p . . . . . . . . . . . . by (d)

[4 marks]

Solution:

(p ∧ ¬q) ∨ (p ∧ q) ≡ p ∧ (¬q ∨ q) a
. . . . . . by Distributive Laws
r ✓
lo
iF

≡ p ∧ (q ∨ ¬q) . . . . . . by Commutative Laws ✓


nj

≡p∧t . . . . . . . . . . . . by Negation laws or tautology law ✓


Ru

≡p . . . . . . . . . . . . by Identity Laws ✓
.
Dr

15. Without constructing the truth table show that p → (q → p) ≡ t , where t denotes a

tautology. [3 marks]

Solution:

p → (q → p) ≡ ∼ p ∨ (∼ q ∨ p)

≡∼p ∨ p ∼q

≡ t∨ ∼q

≡ t

16. Using a truth table , prove the following relation: (P ∧ Q) ∨ (P ∧ ∼ Q) ≡ P [4

marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 7 of 74


Solution:

Constructing the truth table:

P Q ∼ Q (P ∧ Q) (P ∧ ∼ Q) (P ∧ Q) ∨ (P ∧ ∼ Q)

T T F T F T

T F T F T T

F T F F F F

F F T F F F

✓ ✓ ✓

Now, let’s compare the truth values of (P ∧ Q) ∨ (P ∧ ∼ Q) and P for each row. As

we can see, the two expressions are equal for all possible combinations of truth values

for P and Q. ✓
ra
Therefore, we have proved that (P ∧ Q) ∨ (P ∧ ∼ Q) ≡ P using the truth table.
lo
iF

17. Suppose that Smartphone A has 256 MB RAM and 32 GB ROM, and the resolution
nj
Ru

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
Dr

ROM, and the resolution of its camera is 5 MP. Determine the truth value of each of

these propositions:

i) Smartphone C has more ROM or a higher resolution camera than Smartphone

B. [3 marks]

Solution: A disjuction statements is false only when both statements are false.

Specifications of the Smartphones:

Smartphone RAM ROM Camera Resolution

A 256 MB 32 GB 8 MP

B 288 MB 64 GB 4 MP

C 128 MB 32 GB 5 MP
• ROM Comparison: Smartphone C has 32 GB, while Smartphone B has

64 GB. ∴ C does not have more ROM than B. False statement. ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 8 of 74


• Camera Resolution Comparison: Smartphone C has a 5 MP camera,

while Smartphone B has a 4 MP camera. Therefore, C has a higher resolution

camera than B. True statement. ✓

• Since one condition (higher resolution camera) is true, the proposition is

True. ✓

ii) If Smartphone B has more RAM and more ROM than Smartphone C, then it

also has a higher resolution camera. [4 marks]

Solution: A conditional is false if the premises is true and the conclusion is

false.

• RAM Comparison: Smartphone B has 288 MB, while Smartphone C has

128 MB. Therefore, B has more RAM than C.. True statement. ✓

• ROM Comparison: Smartphone B has 64 GB, while Smartphone C has


ra
32 GB. Therefore, B has more ROM than C.. True statement. ✓
lo
iF

• Camera Resolution Comparison: Smartphone B has a 4 MP camera,


nj
Ru

while Smartphone C has a 5 MP camera. Therefore, B does not have a

higher resolution camera than C. . False statement. ✓


.
Dr

• The proposition is False because although B has more RAM and ROM, it

does not have a higher resolution camera. ✓

iii) Smartphone A has more RAM than Smartphone B if and only if Smartphone B

has more ROM than Smartphone A. [3 marks]

Solution: A biconditional is true iff both statements have same truth values.

• RAM Comparison: Smartphone A has 256 MB, while Smartphone B has

288 MB. ∴ A does not have more RAM than B. False statement. ✓

• ROM Comparison: Smartphone A has 32 GB of ROM, and Smartphone

B has 64 GB of ROM. ∴ B has more ROM than A. True statement. ✓

• The statement ”if and only if” requires both directions to be true. Since one

direction is false and the other is true, the proposition is false. ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 9 of 74


18. Define the following terms: a tautology a contradiction and a contingency. [3

marks]

Solution:

A tautology is a logical statement that is always true, regardless of the truth values

of its individual components. ✓

A contradiction is a logical statement that is always false, regardless of the truth

values of its individual components. ✓

A contingent statement is a logical statement that is neither always true (tautology)

nor always false (contradiction). It is true for some combinations of truth values of

its variables and false for others. ✓

19. Let P (x) be the statement “the word x contains the letter a.” What are the truth

values of?
a
r
lo
iF

i) P(true). [1 mark]
nj

Solution:
Ru

ii) P(false). [1 mark]


.
Dr

Solution:

20. Let t denote a tautology, F the truth value FALSE , and p a proposition. Evaluate:

i) p ∨ F [1 mark]

Solution:

ii) ∼ t [1 mark]

Solution:

21. Find the bitwise OR, bitwise AND, and bitwise XOR of the following pairs of bit

strings. 11110000, 10101010 [3 marks]

Solution:

22. Let p and q be the following propositions p: it is below freezing q: it is snowing Write

the following propositions using p and q and logical connectives.

MAT 125 Rev. Qns By Dr. Runji Flora Page 10 of 74


i) It is below freezing but not snowing. [1 mark]

Solution:

ii) It is neither below freezing nor snowing. [1 mark]

Solution:

23. Construct a truth table for the compound proposition

¬(p ∧ q) ∨ (¬r). [3 marks]

Solution:

24. Find the bounded and free variables in the following statement: [2 marks]

∃y(x + y = 4)

Solution:

a
25. What is the scope of the existential quantifier in (b) above.
r [2 marks]
lo
iF

Solution:
nj
Ru

26. The function F (x, y, z) = xy + z from 3−tuples of Boolean variables to the set {0, 1}

is a Boolean function of deg 3.


.
Dr

Display this function in an input output table. [3 marks]

Solution:

27. Find the output of the following combinatorial circuit: [2 marks]

Solution:

Solution:

28. Construct a truth table for the exclusive or of p and q denoted by p ⊕ q. [2 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 11 of 74


29. Simplify the Boolean expression: abc′ + ac′ . [2 marks]

Solution:

abc′ + ac′ = ac(b′ + 1) = ac ✓✓

30. Find the complement of the Boolean expression A′ B + CD′ , [2 marks]

Solution: Apply De Morgan’s laws:

(A′ B + CD′ )′ = (A′ B)′ · (CD′ )′ = (A + B ′ ) · (C ′ + D) ✓✓

31. Consider the statements:

p: You work hard.

q: You will succeed in your life.

Translate each of the following symbolic expressions into meaningful sentences:

(i) p ⇒ q
ra [1 mark]
lo
iF

Solution:
nj
Ru

If you work hard then you will succeed in your life.


.

(ii) q ⇒ p
Dr

[1 mark]

Solution:

If you will succeed in your life it means that you work hard.

(iii)) (∼ p) ⇒ (∼ q) [1 mark]

Solution:

If you don’t work hard then you will not succeed in your life.

(d) (∼ q) ⇒ (∼ p) [1 mark]

Solution:

If you don’t succeed in your life it means that you didn’t work hard.

32. How many rows appear in the truth table of this compound propositions?

(p ∧ r ∧ s) ∨ (q ∧ t) ∨ (r∧ ∼ t) [2 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 12 of 74


To determine the number of rows in the truth table for the compound proposition

(p ∧ r ∧ s) ∨ (q ∧ t) ∨ (r∧ ∼ t), we need to consider all possible combinations of truth

values for the variables p, q, r, s, and t.

If there are n variables, each with two possible truth values (True or False), then the

number of rows in the truth table is 2n . ✓

In this case, we have five variables (p, q, r, s, t), so the number of rows is 25 = 32.✓

Therefore, the truth table for the given compound proposition will have 32 rows.

33. Determine the number of rows in the truth table for the compound proposition (a ∧

b ∧ c) ∨ (∼ d ∧ e) ∨ (f ∧ ∼ g). [2 marks]

Solution:

To find the number of rows in the truth table for the compound proposition (a ∧ b ∧
a
c) ∨ (∼ d ∧ e) ∨ (f ∧ ∼ g), we need to consider all possible combinations of truth values
r
lo
iF

for the variables a, b, c, d, e, f , and g.


nj

If there are n variables, each with two possible truth values (True or False), then the
Ru

number of rows in the truth table is 2n . ✓


.
Dr

In this case, we have seven variables (a, b, c, d, e, f , g), so the number of rows is

27 = 128. ✓

Therefore, the truth table for the given compound proposition will have 128 rows.

34. Write the converse, inverse and contra-positive of the following statement:

“ If you work hard, then you will pass” [3 marks]

Solution:

Let the given statement ”If you work hard, then you will pass” be represented by the

conditional statement P → Q, where:

- P is the statement ”You work hard.”

- Q is the statement ”You will pass.”

- Conditional: ”If you work hard, then you will pass.” ( P → Q )

MAT 125 Rev. Qns By Dr. Runji Flora Page 13 of 74


- Inverse: ”If you do not work hard, then you will not pass.” ( ∼ P →∼ Q ) ✓

- Converse: ”If you will pass, then you have worked hard.” ( Q → P ) ✓

- Contrapositive: ”If you will not pass, then you have not worked hard.” ( ∼ Q →∼ P

) ✓

35. Write the converse, inverse and contra-positive of the following statement:

“ If I run fast, then I will win the race” [3 marks]

Solution:

Let the given statement ”If I run fast, then I will win the race” be represented by the

conditional statement P → Q, where:

- P is the statement ”I run fast.”

- Q is the statement ”I will win the race.”


ra
lo
- Conditional: ”If I run fast, then I will win the race.” ( P → Q )
iF

- Inverse: ”If I do not run fast, then I will not win the race.” ( ∼ P →∼ Q )
nj
Ru

- Converse: ”If I will win the race, then I ran fast.” ( Q → P )


.
Dr

- Contrapositive: ”If I will not win the race, then I did not run fast.” ( ∼ Q →∼ P )

36. Write the converse, inverse and contra-positive of the following statement:

“ If it rains, then you will not play.” [3 marks]

Solution:

Conditional: ”If it rains, then you will not play.” ( P → Q )

- Converse: ”If you will not play, then it rains.” ( Q → P ) ✓

- Inverse: ”If it does not rain, then you will play.” ( ∼ P →∼ Q ) ✓

- Contrapositive: ”If you play, then it does not rain.” ( ∼ Q →∼ P ) ✓

37. Write the inverse, converse and contra-positive of the following statement “ if 6 + 1 ≥

8, then goats can dance” [3 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 14 of 74


Let the given statement ”if 6 + 1 ≥ 8, then goats can dance” be represented by the

conditional statement P → Q, where:

- P is the statement ”6 + 1 ≥ 8.”

- Q is the statement ”Goats can dance.”

- Conditional: ”If 6 + 1 ≥ 8, then goats can dance.” ( P → Q )

- Inverse: ”If 6 + 1 < 8, then goats cannot dance.” ( ∼ P →∼ Q ) ✓

- Converse: ”If goats can dance, then 6 + 1 ≥ 8.” ( Q → P ) ✓

- Contrapositive: ”If goats cannot dance, then 6 + 1 < 8.” ( ∼ Q →∼ P ) ✓

38. Use basic inference rules to establish the validity of the argument:

p →∼ q, q ∨ r, p ∨ u, ∼ r ∴ u. [3 marks]

Solution:
a
r
lo
From q ∨ r and ∼ r, we can use Disjunctive Syllogism to infer q ✓
iF
nj

From p →∼ q and q, we can use Modus Tollens to infer ∼ p ✓


Ru

From p ∨ u and ∼ p, we can use Disjunctive Syllogism to infer u ✓


.
Dr

Therefore, the conclusion u follows logically from the given premises.

39. Using rules of inference, show that the premises ∼ p ∧ q, r → p, ∼ r → s and s → t

infer the conclusion t. [4 marks]

Solution:

To show that the conclusion t can be inferred from the given premises using rules of

inference, we can use a sequence of logical steps. Here’s a proof:

1. **Premise 1: ∼ p ∧ q** (Given)

2. **Premise 2: r → p** (Given)

3. **Premise 3: ∼ r → s** (Given)

4. **Premise 4: s → t** (Given)

Now, let’s use rules of inference to derive the conclusion t:

MAT 125 Rev. Qns By Dr. Runji Flora Page 15 of 74


5. **Assumption: ∼ p** (Specialization rule on premises 1) ✓

6. **Conjunction Elimination: ∼ p** (From 1, using conjunction elimination)

7. **Modus Tollens: ∼ r** (From 2 and 6) ✓

8. **Modus Ponens: s** (From 3 and 7) ✓

9. **Modus Ponens: t** (From 4 and 8) ✓

40. In the back of an old cupboard, you discover a note signed by a pirate famous for

his bizarre sense of humor and love of logical puzzles. In the note, he wrote that he

had hidden treasure somewhere on the property. He listed five true statements and

challenged the reader to use them to determine the location of the treasure. Given

the following five logical statements from the pirate, use inference rules to figure out

where the treasure is hidden.

a
• If this house is next to a lake, then the treasure is not in the kitchen.
r
lo
iF

• If the tree in the front yard is an elm, then the treasure is in the kitchen.
nj
Ru

• This house is next to a lake.


.

• The tree in the front yard is an elm or the treasure is buried under the flagpole.
Dr

• If the tree in the backyard is an oak, then the treasure is in the garage.

Let:

• p: This house is next to a lake.

• q: The treasure is in the kitchen.

• r: The tree in the front yard is an elm.

• s: The treasure is buried under the flagpole.

• t: The tree in the backyard is an oak.

• u: The treasure is in the garage.

[6 marks]

Solution: Symbolizing the statements ✓✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 16 of 74


• .p → ¬q: Premises 1

• r → q: Premises 2

• p: Premises 3

• r ∨ s: Premises 4

• t → u: Premises 5

• Using Premises 1 and 3, we have p → ¬q, p ∴ ¬q by Modus Ponens. ✓

• Using Premises 2 and the fact that ¬q, we have r → q, ¬q ∴ ¬r by Modus

Tollens. ✓

• Using Premises 4 and ¬r, we have r ∨ s, ¬r ∴ s by Disjunctive Syllogism. ✓

• Using Premises 5 and s (since the treasure is buried under the flagpole), we

can conclude that t → u does not affect the conclusion, because the treasure is
ra
lo
already determined to be buried under the flagpole, not in the garage. Thus, we
iF

do not need to infer anything from Premise 5.


nj
Ru

• The treasure is buried under the flagpole. ✓


.
Dr

41. Rewrite the following quantified conditional statement informally i.e without using

quantifiers or variables.

”Squareness is a sufficient condition for rectangularity.” [1 mark]

Solution:

”If something is square, then it is also rectangular.” ✓

42. Rewrite the following without quantifiers or variables.

∀x ∈ Z, if x > 2, then x2 > 4 [1 mark]

Solution:

”For any number greater than 2, its square is greater than 4.” ✓

43. Identify this logic gate by name and complete the table. [2 mark].

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 17 of 74


44. Write formal negations for the following statements:

i) ∀ primes p, p is odd. [1 mark]

Solution:
ar
lo
i) ∃ a triangle T such that the sum of the angles of T equals 200◦ .
iF

[1 mark]
nj

Solution:
Ru

45. If Socrates is human, then Socrates is mortal.


.
Dr

Socrates is human.

∴ Socrates is mortal.

i) Write the argument form of the above argument and determine whether it is

valid. [2 marks]

Solution:

ii) Determine whether we can conclude that the conclusion is true if the premises

are true? [1 mark]

Solution:

46. Show that the negation of a conditional statement p implies q is logically equivalent

to p and not q. [2 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 18 of 74


47. By developing a series of logical equivalences, show that

¬(¬p ∧ q) ∧ (p ∨ q) ≡ p. [4 marks]

Solution:

Simplify the left-hand side step by step using logical equivalences:

Apply De Morgan’s Law:

¬(¬p ∧ q) ∧ (p ∨ q) ≡ (¬(¬p) ∨ ¬q) ∧ (p ∨ q) ✓


ra
lo
Simplify: (p ∨ ¬q) ∧ (p ∨ q) ✓
iF
nj

Apply Distribution:
Ru

(p ∨ ¬q) ∧ (p ∨ q) ≡ p ∨ (¬q ∧ q) ✓
.
Dr

Since ¬q ∧ q is always false, this simplifies to: p ∨ False ≡ p ✓

Therefore, by a series of logical equivalences, we have shown that ¬(¬p∧q)∧(p∨q) ≡ p.

48. Convert the following logic gate circuit into a Boolean expression, writing Boolean

sub-expressions next to each gate output in the diagram. [3 marks]

Solution:

49. State the rule of inference used in each of these arguments:

i) If it is rainy, then the pool will be closed. It is rainy. Therefore, the pool is

closed. [1 mark]

Solution:

ii) Stacy is a mathematics major and computer science major. Therefore, Stacy is

a Mathematics major. [1 mark]

MAT 125 Rev. Qns By Dr. Runji Flora Page 19 of 74


Solution:

iii) If I work all night on then homework, then I can answer all the exercise. If I

answer all the exercises, I will understand the material. Therefore, if I work all

night on this homework, then I will understand the material. [1 mark]

Solution:

50. Using a truth table, show that ¬p → (q → r) is logically equivalent to

p → (q ∨ r). [3 marks]

Solution:

51. Use boolean identities to show that x + 1 = 1, where x is a boolean

variable. [3 marks]

Solution:
ra
lo
52. Are the following system specifications consistent?
iF
nj

• The router can send packets to the edge system only if it supports the new
Ru

address space.
.
Dr

• For the router to support the new address space it is necessary that the latest

software release be installed.

• The router can send packets to the edge system if the latest software release is

installed

• The router does not support the new address space.

Let

• p:The router can send packets to the edge system

• q:The router supports the new address space

• r: The latest software release is installed,

[9 marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 20 of 74


Solution: To determine whether these specifications are consistent, we first express

them using logical expressions then get an assignment of truth values that makes all

three specifications true.

• The router can send packets to the edge system only if it supports the new

address space. p → q. ✓

• For the router to support the new address space it is necessary that the latest

software release be installed.q → r. ✓

• The router can send packets to the edge system if the latest software release is

installed. r → p. ✓

• The router does not support the new address space.∼ q ✓

p q r ¬q p→q q→r r→p Consistent?


T T T F T T T No
T T F F T F
r a
T No
lo
T F T T F T F No
iF

T F F T F T T No
nj

F T T F T T T No
Ru

F T F F T F T No
F F T T T T F No
.
Dr

F F F T T T T Yes
✓ ✓ ✓ ✓

Specifications are consistent when all are False. ✓

53. Are these system specifications consistent? ”The file system is not locked only if new

messages will be queued (∼ p → q). If the file system is not locked, then the system

is functioning normally, and conversely (∼ p ↔ r). For new messages are not queued,

it is necessary that they will be sent to the message buffer (∼ q → s). Whenever the

file system is not locked, new messages will be sent to the message buffer (∼ p → s).

New messages will not be sent to the message buffer (∼ s). [4 marks]

Solution:

54. Is x + 4 = 2 a proposition? Explain your answer. [2 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 21 of 74


55. Prove by contraposition that if 5n + 2 is odd then n is odd. [3 marks]

Solution:

56. Express the negation of the statement ∀x∃y(xy = 1) so that no negation precedes a

quantifier. [2 marks]

Solution:

∼ [∀x∃y(xy = 1)] ≡ ∃x∀y ∼ (xy = 1) ≡ ∃x∀y(xy ̸= 1). ✓✓

57. Construct a truth table for: p ⊕ ∼ q. [2 marks]

Solution:
p q ∼q p⊕∼q

T T F T

T F T F ✓✓

F T F F
r a
lo
iF

F F T T
nj
Ru

58. Evaluate the expression: (11011 ∨ 01010) ∧ (10001 ∨ 11011). [2 marks]


.

Solution:
Dr

(11011 ∨ 01010) ∧ (10001 ∨ 11011) = (11011) ∧ (11011) = (11011) ✓✓

59. Use rules of inference to show that if the premises

∀x(P (x) → Q(x)), ∀x(Q(x) → R(x)), and ∼ R(a), where a is in the domain, are true,

then the conclusion ∼ P (a) is true. [3 marks]

Solution:

∀x(P (x) → Q(x))

∀x(Q(x) → R(x))

∴ ∀x(P (x) → R(x)) by universal law of syllogism ✓✓

∀x(P (x) → R(x))

∼ R(a)

∼ P (a) by universal modus tollens ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 22 of 74


60. Find free variable(s) in the following formulas:

i) ∀x. (p(x) → ∃y. ∼ q (f (x), y, f (y))) [1 mark]

Solution: No free variable ✓

ii) ∀x (∃y.r (x, f (y)) → r(x, y)) [1 mark]

Solution: y free ✓

iii) ∀z. (p(z) → ∃y. (∃x.q(x, y, z) ∨ q(z, y, x))) [1 mark]

Solution: x free ✓

61. Consider the following logical expression:

∃x(P (x) ∧ Q(y, x)) ∨ ∀y R(z, y)

a
Determine the free variable(s) and bound variable(s) in the given expression.
r
lo
iF

Solution:
nj

Free Variables: z (These variables are not quantified and can take any value.) ✓
Ru

Bound Variables: x, y (This variable is quantified either existentially or universally.)✓


.
Dr

62. Evaluate the free and bound variables in the expression:

∀x ∃y (P (x, y) ∧ ¬Q(z, y))

Solution:

Free Variables: z (This variable is not quantified and can take any value.) ✓

Bound Variables: x, y (These variables are quantified universally or existentially.) ✓

63. Given the logical expression:

∃x ∀y (P (x, y) ∨ ¬Q(z)) ∧ R(w, x)

Identify the free and bound variables. [2 marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 23 of 74


Solution:

Free Variables: z, w (These variables are not quantified and can take any value.) ✓

Bound Variables: x, y (These variables are quantified either existentially or universally.)✓

64. Examine the expression:

∀x (P (x) ∧ ∃y (Q(y) ∨ R(z, x)))

Find the free and bound variables. [2 marks]

Solution:

Free Variables: z (This variable is not quantified and can take any value.) ✓

Bound Variables: x, y (These variables are quantified universally or existentially.) ✓


ra
65. Simplify the Boolean expression Y = AB C̄ D̄ + ĀB C̄ D̄ + B C̄D and draw the logic
lo
iF

circuit fort the simplified expression. [5 marks]


nj
Ru

Solution:
.
Dr

Y =AB C̄ D̄ + ĀB C̄ D̄ + B C̄D

= B C̄ D̄(A + Ā) + B C̄ D̄ ✓

= B C̄ D̄(1) + B C̄ D̄..............A + Ā = 1 ✓

= B C̄ D̄ + B C̄ D̄

= B C̄(D̄ + D) ✓

= B C̄(1)

= B C̄ ✓

66. Write the conclusion that can be inferred using universal modus tollens given:

All professors are absent-minded.

MAT 125 Rev. Qns By Dr. Runji Flora Page 24 of 74


Tom Hutchins is not absent-minded.

∴ ...................... [1 mark]

Solution: Tom Hutchins is not a professor. ✓

67. Find the Boolean expressions that correspond to the circuit shown below. [3 marks]
x

Out
y

Solution:
x x+y ¬(x + y) ✓
ar
lo
iF

¬(x + y) + ¬y · (y + z) ✓
nj

¬y
y
Ru

¬y · (y + z) ✓
.
Dr

y+z
z

68. Find the Boolean expressions that correspond to the circuit shown below. [2 marks]
A•

B• •

C•

Solution:
A• A.B A.B +(B̄+C)

B• •

B̄+C
C•

MAT 125 Rev. Qns By Dr. Runji Flora Page 25 of 74


69. Design a Boolean circuit that functions as a recognizer for a specific combination of

three input signals a, b and c. The recognizer circuit should output 1 for exactly one

specific combination of input signals and output 0 for all other combinations. Provide

the following:

i) The Boolean expression for the circuit. [1 mark]

Solution: . There are eight such Boolean expressions. For the combination

a = 1, b = 0, c = 1, the Boolean expression is: a ∧ ¬ b ∧ c.

ii) The truth table (input-output table). [2 marks]

Solution:

:
a b c (a ∧ ¬b ∧ c)

0 0 0 0

0 0 1
r
0
a
lo
iF

0 1 0 0
nj
Ru

0 1 1 0

1 0 0 0
.
Dr

1 0 1 1

1 1 0 0

1 1 1 0

iii) The circuit diagram [2 marks]

Solution:
a
c
a ∧ ¬b ∧ c

70. Tarski’s World is a computer program developed by information scientists Jon Barwise

and John Etchemendy to help teach the principles of logic. Consider a Tarski world

with the following objects:

MAT 125 Rev. Qns By Dr. Runji Flora Page 26 of 74


• A small blue triangle • A small yellow square

• A large blue triangle • A medium green circle

• A large red square

Based on the given objects, rewrite the informal version of the following given state-

ments and then determine the truth or falsity of each :)

i) ∀x(Triangle(x) → Blue(x)) [2 marks]

Solution:

Informal Statement: All triangles are blue. ✓

Truth Value: True. Explanation: Both triangles (small blue triangle and large

blue triangle) are blue, so the statement is true. ✓

ii) ∃y(Square(y) ∧ Red(y)) [2 marks]


a
r
lo
Solution:
iF
nj

Informal Statement: There exists a red square. ✓


Ru

Truth Value: True.Explanation: There is a red square (large red square), so the
.
Dr

statement is true. ✓

iii) ∀z(Circle(z) → Green(z)) [2 marks]

Solution:

Informal Statement: All circles are green. ✓

Truth Value: True; Explanation: The only circle present (medium green circle)

is green, so the statement is true. ✓

iv) ∃w(Triangle(w) ∧ Large(w)) [2 marks]

Solution:

Informal Statement: There exists a large triangle. T ✓

Truth Value:True; Explanation: There is a large blue triangle, so the statement

is true. ✓

v) ∀v(Square(v) → Yellow(v)) [2 marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 27 of 74


Solution:

Informal Statement: All squares are yellow. ✓

Truth Value: False; Explanation: There is a yellow square (small yellow square),

but there is also a red square (large red square), so the statement is false. ✓

vi) ∀x∃y(Triangle(x) ∧ Square(y) → Blue(x)) [2 marks]

Solution:

Formal Statement: For every object x, there exists an object y such that if x

is a triangle and y is a square, then x is blue.

Informal Statement: If we have a triangle, we can always find a square, and

whenever this happens, the triangle is blue. ✓

Truth Value: True. All triangles in the Tarski world are blue, and the existence

of a square y satisfies the quantifier condition. ✓


ra
lo
iF

71. Rewrite the statement “No good cars are cheap” in the form
nj

“ ∀ x, if P (x) then ¬ Q(x). [2 marks]


Ru

Solution:
.
Dr

Let P (x) represent ”x is a good car.”

Let Q(x) represent ”x is cheap.”

Formal Version;For every car x, if x is a good car, then x is not cheap. ✓

Informal Version;For every car out there, if it’s a good one, then it definitely isn’t

cheap.”. ✓

72. Disprove the converse of the statement: For all integers a and b , if a + b is odd, then

a is odd or b is odd. [3 marks]

Solution: Converse: For all integers a and b ,if a is odd or b is odd then a + b is

odd. ✓

Proof by counter example: ✓

Statement not true since 1 + 3 = 4 where 1 is odd, 3 is odd but the sum is even. ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 28 of 74


73. Test the validity of the following argument using a truth table;

If you find this exam difficult, you are either a joker or you are going through some

life challenges.

You are not going through life challenges.

Therefore you do not find this exam difficult. [6 marks]

Solution: Let:

• P : You find this exam difficult.

• Q: You are a joker.

• R: You are going through life challenges.

Argument in logical form:

ar
lo
Premise 1: P → (Q ∨ R)
iF

Premise 2: ¬R
nj
Ru

Conclusion: ¬P ✓
.
Dr

Propositions Premise 1 Premise 2 Conclusion:

P Q R Q ∨ R P → (Q ∨ R) ¬R ¬P

T T T T T F F

T T F T T T F

T F T T T F F

T F F F F T F

F T T T T F T

F T F T T T T

F F T T T F T

F F F F T T T

✓ ✓ ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 29 of 74


Critical rows are the ones where all premises are true. From the truth table: These

are Row 2,6 and 9. ✓

The argument is invalid because there is a critical row (Row 2) where the premises

are true, but the conclusion does not hold true. ✓

74. Determine whether (∼ q ∧ (p → q)) →∼ p is a tautology. [3 marks]

Solution:
p q ∼q p→q ∼q∧p→q ∼p [∼q ∧ (p → q)]→ ∼ p

T T F T F F T

T F T F F F T ✓✓

F T F T F T T

F F T T T T T
The last column has all T ′ s, hence a tautology. ✓
r a
lo
75. Is the following argument valid?
iF
nj

If you do every problem in this book, then you will learn discrete mathematics.
Ru

You learned discrete mathematics.


.
Dr

Therefore, you did every problem in this book. [3 marks]

Solution:

Let p be the proposition ”You did every problem in this book”. Let q be the propo-

sition ”You learned discrete mathematics”. Then this argument is of the form: if

p → q and q, then p. ✓

This is an example of an incorrect argument using the fallacy of affirming the con-

clusion(converse error). ✓

Hence invalid. ✓

76. Show that ∼ (p ∨ (∼ p ∧ q)) and ∼ p∧ ∼ q are logically equivalent by developing a

series of logical equivalences. [3 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 30 of 74


∼ (p ∨ (∼ p ∧ q)) ≡∼ p∧ ∼ (∼ p ∧ q).....................by De M organ law

≡∼ p ∧ [∼ (∼ p)∨ ∼ q] ...............by De M organ law ✓

≡∼ p ∧ (p∨ ∼ q)........................by double negation law

≡ (∼ p ∧ p) ∨ (∼ p∧ ∼ q) ...........by the distributive law ✓

≡ c ∨ (∼ p∧ ∼ q) ...................... (∼ p ∧ p) = c

≡ (∼ p∧ ∼ q) ..............................by the identity law ✓

77. Determine whether the following compound statement is a tautology or contradiction

(p → (q → r)) → ((p ∧ q) → r) [5 marks]

Solution:
p q r q→r p → (q → r) p∧q
ra
(p ∧ q) → r (p → (q → r)) → ((p ∧ q) → r)
lo
iF

T T T T T T T T
nj

T T F F F T F T
Ru

T F T T T F T T
.
Dr

T F F T T F T T

F T T T T F T T

F T F F T F T T

F F T T T F T T

F F F T T F T T
A tautology

78. Determine whether ψ = (∼ p ∨ q) ∧ (q →∼ r∧ ∼ p) ∧ (p ∨ r) is satisfiable. [6 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 31 of 74


p q r ∼p ∼r ∼p∨q ∼ r∧ ∼ p q →∼ r∧ ∼ p p∨r ψ

T T T F F T F F T F

T T F F T T F F T F

T F T F F F F T T F

T F F F T F F T T F

F T T T F T F F T F

F T F T T T T T F F

F F T T F T F T T T

F F F T T T T T F F

✓ ✓ ✓ ✓ ✓

There exists an interpretation, row 7, satisfying ψ thus ψ is satisfiable. ✓

79. Determine whether ϕ = (∼ p → r) ∧ (r ∨ q) ∧ (∼ r → p) is satisfiable. [6 marks]


ra
lo
iF

Solution:
nj

p q r ∼p ∼p→r r∨q ∼r ∼r→p ϕ


Ru

T T T F T T F T T
.
Dr

T T F F T T T T T

T F T F T T F T T

T F F F T F T T F

F T T T T T F T T

F T F T F T T F F

F F T T T T F T T

F F F T F F T F F

✓ ✓ ✓ ✓ ✓
There exists an interpretation, row 1,2,3,5 and 8 satisfying ϕ thus ϕ is satisfiable. ✓

80. Let A = {2, 3, 4, 5.6 }. Determine the truth value of each of the following statements:

i) ∃ x ∈ A : x + 2 < 7 [1 mark]

Solution: T since it is true for x = 2, 3 or 4 ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 32 of 74


ii) ∀ x, y ∈ A : x + y ≤ 10 [1 mark]

Solution: F . 5 + 6 is not ≤ 10. ✓

iii) ∀ x ∈ A, ∃ y ∈ A : x + y ≤ 10 [1 mark]

Solution: T since for any number in the set, there is a number you can add

and the sum will be less than 10 ✓

iv) ∃ x ∈ A, ∀ y ∈ A : x + y ≤ 10 [1 mark]

Solution: T since 2 added to any of the element in the set has sum ≤ 10 ✓

81. Let B = {−2, 0, 3, 5, 7}. Determine the truth set for the statement

∃y ∈ B : 2y − 1 > 3. [2 marks]

Solution:

The given statement can be read as ”There exists an element y in the set B such that

2y − 1 > 3.” Simplifying the inequality: ra


lo
iF

2y − 1 > 3: Adding 1 to both sides: 2y > 4 Dividing both sides by 2: y > 2. ✓


nj

So, any element y in the set B that is greater than 2 satisfies the given inequality.
Ru

Therefore, the truth set for the statement ∃y ∈ B : 2y − 1 > 3 is {3, 5, 7}. ✓
.
Dr

82. Socrates says:

If I am guilty, I must be punished;

I am guilty.

Thus I must be punished.

Is the argument logically correct? [3 marks]

Solution: The argument is logically correct: if p means I am guilty and q means I

must be punished, then: ✓

p→q

∴q ✓ is valid by the modus ponens inference rule ✓

83. Write the negation, converse , contrapositive and the inverse of the statement:

∀x (x < 1 ⇒ x2 < 1) [4 marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 33 of 74


Solution:

Negation: ∃x(x < 1 ∧ x2 ≥ 1). ✓

Converse: ∀x (x2 < 1 ⇒ x < 1). ✓

Contrapositive : ∀x (x2 ≥ 1 ⇒ x ≥ 1). ✓

Inverse : ∀x(x ≥ 1 ⇒ x2 ≥ 1). ✓

84. Let t denote a tautology, c a contradiction , and p a proposition.Evaluate:

i) p ∧ t [1 mark]

Solution: p ✓

ii) p ∧ c [1 mark]

Solution: c ✓

85. Let p mean ”Paola is happy”, q mean ”Paola paints a picture”, and r mean ”Renzo
r a
lo
is happy’.Formalize the following sentences:
iF
nj

i) If Paola is happy and paints a picture then Renzo isn’t happy [1 mark]
Ru

Solution: p ∧ q →∼ r ✓
.
Dr

ii) Paola is happy only if she paints a picture. [1 mark]

Solution: p → q ✓

86. Determine whether (p → r) ∧ (q → r) and (p ∧ q) → r are logically equivalent using

a truth table [4 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 34 of 74


p q r p→r q→r (p → r) ∧ (q → r) p∧q (p ∧ q) → r

T T T T T T T T

T T F F F F T F

T F T T T T F T

T F F F T F F T

F T T T T T F T

F T F T F F F T

F F T T T T F T

F F F T T T F T

✓ ✓ F ✓

Not logically equivalent ✓

87. Find a sum of products (SOP) and a product of sums (POS) for the truth table
r a
lo
below.[6 marks]
iF
nj
Ru

Output

A B C Z
.
Dr

1 1 1 1

1 1 0 1

1 0 1 0

1 0 0 0

0 1 1 0

0 1 0 1

0 0 1 0

0 0 0 1

Solution:

Sum of Products: To find a sum of products from a truth table:

• Identify the rows having output 1.

MAT 125 Rev. Qns By Dr. Runji Flora Page 35 of 74


• For each such row, write the variable if the variable input is 1 or write the

complement of the variable if the variable input is 0, then multiply the variables

forming a term.

• add all such terms.

Product of Sums To find a product of sums from a truth table:

• identify the rows having output 0.

• For each such row, write the variable if the variable input is 0 or write the

complement of the variable if the variable input is 1, then add the variables

forming a sum

• Multiply all such sums.

Sum of Products (SOP):


ar
lo
i) Identify rows where the output Z = 1:
iF
nj

Rows: (A, B, C) = (1, 1, 1), (1, 1, 0), (0, 1, 0), (0, 0, 0). ✓
Ru

ii) Write a product term for each row:


.
Dr

(1, 1, 1) : A · B · C,

(1, 1, 0) : A · B · C,

(0, 1, 0) : A · B · C,

(0, 0, 0) : A · B · C. ✓

iii) Combine the terms with +:

Z = A · B · C + A · B · C + A · B · C + A · B · C. ✓

Product of Sums (POS):

i) Identify rows where the output Z = 0:

Rows: (A, B, C) = (1, 0, 1), (1, 0, 0), (0, 1, 1), (0, 0, 1). ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 36 of 74


ii) Write a sum term for each row:

(1, 0, 1) : (A + B + C),

(1, 0, 0) : (A + B + C),

(0, 1, 1) : (A + B + C),

(0, 0, 1) : (A + B + C) ✓.

iii) Combine the terms with ·:

Z = (A + B + C) · (A + B + C) · (A + B + C) · (A + B + C). ✓

88. Consider the following truth table.

Output
r a
lo
iF

A B C Y
nj

1 1 1 0
Ru

1 1 0 0
.
Dr

1 0 1 1

1 0 0 0

0 1 1 0

0 1 0 0

0 0 1 1

0 0 0 0

i) Determine and simplify the logic expression for the output Y above. [3 marks]

Solution:

There are two rows with output 1’s and their corresponding binary values are

001 and 101 which correspond to product terms ĀB̄C and AB̄C respectively.✓

The resulting expression for the output is

Y = ĀB̄C + AB̄C = (Ā + A)B̄C = 1.B̄C = B̄C. ✓✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 37 of 74


ii) Sketch the logic circuit for the simplified expression. [2 marks]

Solution:

89. Find the truth set for each propositional function p(x) defined on the set N of positive

integers.

i) p(x) : x + 2 > 7 [1 mark]

Solution:

Truth set is:{6, 7, 8, ...} ✓

ii) p(x) : x + 5 < 3 [1 mark]

Solution:

Truth set is:the empty set ✓

iii) p(x) : x + 5 > 1 [1 mark]


ra
lo
Solution:
iF

Truth set is: N ✓


nj
Ru

90. You are about to leave for campus in the morning and discover that you don’t have
.
Dr

your glasses. You know the following statements are true:

a. If I was reading the newspaper in the kitchen, then my glasses are on the kitchen

table.

b. If my glasses are on the kitchen table, then I saw them at breakfast.

c. I did not see my glasses at breakfast.

d. I was reading the newspaper in the living room or I was reading the newspaper in

the kitchen.

e. If I was reading the newspaper in the living room then my glasses are on the coffee

table.

Where are the glasses? [5 marks]

Solution: Let

RK = I was reading the newspaper in the kitchen.

GK = My glasses are on the kitchen table.

MAT 125 Rev. Qns By Dr. Runji Flora Page 38 of 74


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.

RK → GK.............................. by (a)

GK → SB.............................. by (d)

∴ RK → SB................... by transitivity .............(1) ✓

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

∼ SB........................................ by (c)

∴∼ RK............................. by modus tollens ......(2) ✓

RL ∨ RK...................................... by (d)

∼ RK....................................... by the conclusion of (2)

∴ RL.................................. by elimination ..................(3) ✓

RL → GC.............................. by (e) ra
lo
RL............................................. by the conclusion of (3)
iF

∴ GC.............................. by modus ponens ✓


nj
Ru

Thus the glasses are on the coffee table. ✓


.
Dr

91. Find the duals of these Boolean expressions:

i) xyz + x̄ȳz̄. [1 mark]

Solution:

(x + y + z) (x̄ + ȳ + z̄) ✓

ii) xz̄ + x.0 + x̄.1 [1 mark]

Solution:

(x + z̄) (x + 1) (x̄ + 0) ✓

92. De-Morganize the Boolean expression: A(B + C)D [2 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 39 of 74


A(B + C)D =A + B + C + D ✓

=A+B+C +D ✓

93. State and prove that the law of syllogism is a valid argument. [6 marks]

Solution:

Law: p → q, q → r, ∴ p → r. ✓

p q r p→q q→r p→r Critical rows

T T T T T T ∗

T T F T F F

T F T F T T ar
lo
T F F F T F ✓ ✓ ✓ ✓
iF
nj

F T T T T T ∗
Ru

F T F T F T
.
Dr

F F T T T T ∗

F F F T T T ∗

All the critical rows are true hence the argument is valid. ✓

94. Use De Morgan’s laws to write the negation of 4 ≥ x > −1. [3 marks]

Solution:

95. Determine whether the following compound proposition is a tautology and whether

is satisfiable or unsatisfiable (p ∨ q) ∧ ¬p ∧ ¬q. [4 marks]

Solution:

96. Construct an identity from the absorption law x(x + y) = x by taking

its dual [1 mark]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 40 of 74


97. Prove that the negation of the biconditional “p if and only if q” is logically equivalent

to the exclusive or disjunctive form of p and q. [2 marks]

Solution:

98. Rewrite the following statement in if-then form. ”Either you get to work on time or

you are fired” [2 marks]

Solution:

99. For the given truth table, form a Boolean function and simplify it. [6 marks]

ra
lo
iF
nj
. Ru
Dr

Solution:

100. Determine whether the following two combinatorial circuits equivalent. [3 marks].

MAT 125 Rev. Qns By Dr. Runji Flora Page 41 of 74


Solution:

101. Use a truth table to determine whether the following statement is a tautology.

[(p ⇒ q) ∧ p] ⇒ q [4 marks]
ar
lo
Solution:
iF
nj
Ru

p q p ⇒ q [(p ⇒ q) ∧ p] [(p ⇒ q) ∧ p] ⇒ q

T T T T T
.
Dr

T F F F T

F T T F T

F F T F T

✓ ✓ ✓

The final column evaluates to true for all possible combinations of truth values of p

and q. Therefore, the given statement is a tautology. ✓

102. Show that the given statement is a tautology:

[(p ⇒ q) ∧ (q ⇒ r)] ⇒ (p ⇒ r) [4 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 42 of 74


p q r (p ⇒ q) (q ⇒ r) [(p ⇒ q) ∧ (q ⇒ r)] (p ⇒ r) [(p ⇒ q) ∧ (q ⇒ r)] ⇒ (p ⇒ r)

T T T T T T T T

T T F T F F F T

T F T F T F T T

T F F F T F F T

F T T T T T T T

F T F T F F T T

F F T T T T T T

F F F T T T T T

✓ ✓ ✓

a
The final column evaluates to true for all possible combinations of truth values of p
r
lo
iF

and q. Therefore, the given statement is a tautology. ✓


nj

103. Construct a truth table and use it to determine whether ( p → q ) ↔ (∼ q → ∼ p)


Ru

ia a tautology. [4 marks]
.
Dr

Solution: It is a tautology . ✓

✓ ✓ ✓

p q ∼p ∼q p→q ∼ q →∼ p (p → q) ↔ (∼ q →∼ p)

T T F F T T T

T F F T F F T

F T T F T T T

F F T T T T T

104. Determine whether the statements ( p ∨ q ) → r and ( p → r ) ∨ ( q → r ) logically

equivalent?. [5 marks]

Solution: They are not logically equivalent . ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 43 of 74


✓ ✓ ✓ ✓

p q r p∨q (p ∨ q) → r p→r q→r (p → r) ∨ (q → r)

T T T T T T T T

T T F T F F F F

T F T T T T T T

T F F T F F T T

F T T T T T T T

F T F T F T F T

F F T F T T T T

F F F F T T T T

105. Verify that P ∧ (∼ P + Q′ ) ≡ (P → Q)′ using truth table. [5 marks]

Solution:
ar
lo
P Q ∼P Q′ ∼ P + Q′ ✓ P ∧ (∼ P + Q′ )✓ P → Q✓ (P → Q)′ ✓
iF

1 1 0 0 0 0 1 0
nj
Ru

1 0 0 1 1 1 0 1
.
Dr

0 1 1 0 1 0 1 0

0 0 1 1 1 0 1 0

From the truth table, we can observe that the values in the columns P ∧ (∼ P + Q′ )

and (P → Q)′ are the same for all possible combinations of truth values of P and Q.

Therefore, the given expression P ∧ (∼ P + Q′ ) ≡ (P → Q)′ holds true. ✓

106. Negate the following quantified statements:

a) Every polynomial function is continuous. [1 mark]

Solution: There exists a polynomial that is not continuous everywhere. ✓

b) Some real numbers are rational. [1 mark]

Solution: Every real number is irrational ✓

c) Every student has at least one course where the lecturer is a professor. [1 mark]

MAT 125 Rev. Qns By Dr. Runji Flora Page 44 of 74


Solution: There is a student such that in every course the lecturer is not a

professor ✓

107. What kind of error does the following invalid argument exhibit? Explain.

a) All cheaters sit in the back row. George sits in the back row. ∴ George is a

cheater. [2 marks]

Solution: The argument is of the form:

∀ x, P (x) → Q(x),

Q(a) for some particular a

∴ P (a) ✓

This exhibits universal converse error ✓

b) All honest people pay their taxes.Darth is not honest. ∴ Darth does not pay his

taxes.[2 marks]
ra
lo
Solution: The argument is of the form:
iF

∀ x, P (x) → Q(x),
nj
Ru

∼ P (a) for some particular a

∴ ∼ Q(a)
.


Dr

This exhibits universal inverse error ✓

108. Determine whether each the following arguments are valid. Do not use tables.

a) If John drinks beer, he is at least 18 years old. John does not drink beer. Therefore,

John is not yet 18 years old. [3 marks]

Solution: The argument is of the form:

p → q,

∼p

∴∼q ✓

This argument exhibits inverse error, hence invalid ✓✓

b) If girls are blonde, then they are popular with boys. Ugly girls are unpopular with

boys.

Intellectual girls are ugly. Therefore, blonde girls are not intellectual. [4 marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 45 of 74


Solution: The argument is of the form:

b → p............(1),

u → ∼ p..........(2) ✓

t → u..............(3)

∴ b→t

Contrapositive of (2) gives us p → ∼ u..........(4) ✓

Apply transitivity rule on (1) and (4) to get b → ∼ u............(5), ✓

Contrapositive of (3) gives us ∼ u → ∼ t..........(6)

Apply transitivity rule on (5) and (6) to get b → ∼ t............(5), as required. ✓

109. Derive the truth table for the Sum Of Product expressions

x̄ȳz̄ + x̄ȳz + x̄yz̄ + x̄yz + xyz [3 marks]

Solution:
x y z F Minterms
ra
lo
iF

1 1 1 1 xyz
nj

1 1 0 0
Ru

1 0 1 0
.
Dr

1 0 0 0 ✓✓✓

0 1 1 1 x̄yz

0 1 0 1 x̄yz̄

0 0 1 1 x̄ȳz

0 0 0 1 x̄ȳz̄

110. Simplify the boolean expression P̄ Q̄R̄ + P̄ Q̄R + P̄ QR̄ + P̄ QR + P QR. [3 marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 46 of 74


Solution:

P̄ Q̄R̄ + P̄ Q̄R + P̄ QR̄ + P̄ QR + P QR = P̄ Q̄(R̄ + R) + P̄ Q(R̄ + R) + P QR ✓

= P̄ Q̄(1) + P̄ Q(1) + P QR = P̄ Q̄ + P̄ Q + P QR ✓

= P̄ (Q̄ + Q) + P QR

= P̄ (1) + P QR ✓

= P̄ + P QR

111. Draw the digital circuit corresponding to the Boolean expression āb + bc̄. [3 marks]

112. Rewrite each of the following statements in the form: ” ∀.... if .... then ....”:

a) All COBOL programs have at least 20 lines. [1 mark]

Solution: ∀ COBOL programs, if the program exists, then it has at least 20


ra
lo
lines. ✓
iF
nj

b) The sum of any two even integers is even. [1 mark]


Ru

Solution: ∀ even integers a and b, if a and b are even integers, then the sum of
.
Dr

a and b is even. ✓

113. Determine whether the following arguments are valid.

a) If I run I will get there quicker.I got there quicker.

Therefore I must have ran. [3 marks]

Solution:

b) If I am wealthy, then I am happy. I am happy.

Therefore, I am wealthy. [3 marks]

Solution:

c) If John drinks beer, he is at least 18 years old. John does not drink beer. Therefore,

John is not yet 18 years old. [3 marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 47 of 74


Solution: The argument is of the form:

p → q,

∼p

∴∼q ✓

This argument exhibits inverse error, hence invalid ✓✓

d) If girls are blonde, then they are popular with boys. Ugly girls are unpopular with

boys. Intellectual girls are ugly.

Therefore, blonde girls are not intellectual. [4 marks]

Solution: The argument is of the form:

b → p............(1),

u → ∼ p..........(2) ✓

t → u..............(3)

∴ b→t ra
lo
Contrapositive of (2) gives us p → ∼ u..........(4) ✓
iF
nj

Apply transitivity rule on (1) and (4) to get b → ∼ u............(5), ✓


Ru

Contrapositive of (3) gives us ∼ u → ∼ t..........(6)


.
Dr

Apply transitivity rule on (5) and (6) to get b → ∼ t............(5), as required. ✓

114. Derive the truth table for the Sum Of Product expressions

x̄ȳz̄ + x̄ȳz + x̄yz̄ + x̄yz + xyz [3 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 48 of 74


x y z F Minterms

1 1 1 1 xyz

1 1 0 0

1 0 1 0

1 0 0 0 ✓✓✓

0 1 1 1 x̄yz

0 1 0 1 x̄yz̄

0 0 1 1 x̄ȳz

0 0 0 1 x̄ȳz̄

115. Simplify the boolean expression P̄ Q̄R̄ + P̄ Q̄R + P̄ QR̄ + P̄ QR + P QR. [3 marks]

Solution:

ra
P̄ Q̄R̄ + P̄ Q̄R + P̄ QR̄ + P̄ QR + P QR = P̄ Q̄(R̄ + R) + P̄ Q(R̄ + R) + P QR ✓
lo
iF

= P̄ Q̄(1) + P̄ Q(1) + P QR = P̄ Q̄ + P̄ Q + P QR ✓
nj
Ru

= P̄ (Q̄ + Q) + P QR
.

= P̄ (1) + P QR ✓
Dr

= P̄ + P QR

116. Draw the digital circuit corresponding to the Boolean expression āb + bc̄. [3 marks]

Solution: ✓

117. An island that has two kinds of inhabitants, knights, who always tell the truth, and

their opposites, knaves, who always lie. You encounter two people A and B. What

are A and B if A says “The two of us are both knights” and B says “A is a knave.”

[4 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 49 of 74


A says “The two of us are both knights” B says “A is a knave.”

A B A B A B

Knights Knights Knights Knights Knaves Knights

Knights Knaves Knights Knights Knights Knaves

Knaves Knights Knaves Knights Knaves Knights

Knaves Knaves Knaves Knights Knights Knaves


Table or other method ✓✓

A is a Knave while B is a Knight ✓✓

118. Use a truth table to determine whether the argument below is valid.

p, p → q, ∼ q ∨ r ∴ r [5 marks]

Solution: .
p q r ∼q p p→q ∼q∨r r ra
lo
T T T F T T T T
iF

T T F F T T F F
nj
Ru

T F T T T F T T
.
Dr

T F F T T F T F

F T T F F T T T

F T F F F T F F

F F T T F T T T

F F F T F T T F

✓ ✓ ✓
Row 1 is a critical row, it has a true conclusion and hence the argument is valid. ✓✓

119. Are these system specifications consistent?

“Whenever the system software is being upgraded, users cannot access the file system.

If users can access the file system,then they can save new files.

If users cannot save new files, then the system software is not being upgraded.” [5

marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 50 of 74


Let the following statements be represented symbolically as shown:

u: “The software system is being upgraded.”

a: “Users can access the file system.”

s: “Users can save new files.”

Write each system specification symbolically.

“Whenever the system software is being upgraded, users cannot access the file sys-

tem.” u → ∼ a ✓

“If users can access the file system, then they can save new files.” a → s ✓

“If users cannot save new files, then the system software is not being upgraded.”

∼ s → ∼ u or u → s ✓
u a s ∼ u ∼ a ∼ s u→∼a a→ s ∼s→∼u

T T T F F F F T T
r a
lo
T T F F F T F F F
iF

T F T F T F T T T
nj
Ru

T F F F T T T T F
.
Dr

F T T T F F T T T

F T F T F T T F T

F F T T T F T T T

F F F T T T T T T
The system is consistent , for example making u false, a false, and s true makes it

consistent. ✓ ✓

120. List any four valid rules of inference for quantified statements [4 marks]

Solution:

i) Universal Generalization

ii) Universal Instantiation

iii) Existential Generalization

iv) Existential instantiation

MAT 125 Rev. Qns By Dr. Runji Flora Page 51 of 74


v) Universal Modus Ponens

vi) Universal Modus Tollens

vii) Universal Transitivity

121. Consider the statement

“If John is eligible to vote, then he is at least 18 years old.” Re-write this statement

using the term(Hint; your statement should not be a conditional)

i) Necessary condition. [1 mark]

Solution: ”John is at least 18 years old” is a necessary condition for ”John to

be eligible to vote.”

ii) Sufficient condition. [1 mark]

Solution: ”John is eligible to vote” is a sufficient condition to guarantee ”John

is at least 18 years old.” a


r ✓
lo
iF

122. Write each of these statements in the form ” if p, then q ” in English.


nj
Ru

i) ”For it to be a square, it is necessary that it has four sides” [1 mark]


.
Dr

Solution: If it is a square, then it is four sided. ✓

ii) A sufficient condition for the warranty to be good is that you bought the com-

puter less than a year ago. [1

mark]

Solution: If you bought the computer less than a year ago then the warranty

is good. ✓

iii) Willy gets caught whenever he cheats. [1 mark]

Solution: If Willy cheats then he is caught. ✓

123. Determine the truth value for each simple statement. Then using the truth values

obtained, determine the truth value of the compound statement:

”Wednesday follows Tuesday or 1 is a prime number, if and only if p ∨ ∼ p is a

contradiction”. [5 marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 52 of 74


Solution:

Wednesday follows Tuesday: T ✓

1 is a prime number: F ✓

Wednesday follows Tuesday or 1 is a prime number: T ✓

p ∨ ∼ p is a contradiction. F ✓

Wednesday follows Tuesday or 1 is a prime number, if and only if p ∨ ∼ p is a

contradiction. : F ✓

124. Write down the converse and the Contrapositive of the implication:

If n is an odd integer, then n2 + n − 2 is an even integer. [2 marks]

Solution:

Converse: If n2 + n − 2 is an even integer, then n is an odd integer ✓


ra
lo
Contrapositive: If n2 + n − 2 is an odd integer, then n is an even integer ✓
iF
nj

125. Given:
. Ru

• Predicate I(x) : x is wise


Dr

• Predicate E(x, y) : x knows y

• Domain P = {a, b, c}

• The truth set of E(x, y) is {(a, a), (b, b), (c, c), (a, c), (a, b)}

Answer the following questions;

i) Is the statement (∀x ∈ P )(∃y ∈ P ) : I(y) → E(x, x) true? Explain [1 mark]

Solution: True ✓

E(x, x) is true for all choices of x. ✓

ii) Is the statement (∃y ∈ P ) : (∀x ∈ P ) ∼ E(x, y)∨ ∼ I(x) true?

Explain. [1 mark]

Solution: False ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 53 of 74


I(a) is true so ∼ I(a) is false and ∼ E(a, y) is false for all choices of y since

E(a, y) is true for all y ∈ P

126. Determine whether the expression (x → z)∨ ∼ [(x → y) ∧ (y → z)] is a Tautology,

Contradiction or a Contingency with help of a truth table. [4 marks]

Solution:

x y z (x → z) (x → y) (y → z) ∼ [(x → y) ∧ (y → z)] (x → z)∨ ∼ [(x → y) ∧ (y → z)]

T T T T T T F T

T T F F T F T T

T F T T F T T T

T F F F F T T T

F T T T T T
r aF T
lo
iF

F T F T T F T T
nj

F F T T T T F T
Ru

F F F T T T F T
.
Dr

✓ ✓ ✓

The expression evaluates to True for all possible combinations of truth values of x,

y, and z.

Therefore, the given expression(x → z)∨ ∼ [(x → y) ∧ (y → z)] is a tautology.✓

127. Complete the truth table below and use it to establish the truth of each statement

that follows. [4 marks]

a b ∼a ∼b a→b ∼ a →∼ b b→a ∼ b →∼ a

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 54 of 74


a b ∼a ∼b a→b ∼ a →∼ b b→a ∼ b →∼ a
T T F F T T T T
T F F T F T F F
F T T F T F T T
F F T T T T T T

i) A conditional statement a → b is not logically equivalent to its converse. [1

mark]

Solution: False;

From the truth table, we see that the truth values of a → b and b → a are

different in some rows (for example, in the second row where a = T and b = F ).

Hence, a → b is not logically equivalent to its converse. ✓

ii) A conditional statement a → b is not logically equivalent to its inverse. [1

mark]

Solution: False;
ra
lo
iF

From the truth table, we observe that the truth values of a → b and ∼ a →∼ b
nj

differ in several rows (for example, in the third row where a = F and b = T ).
Ru

Therefore, a → b is not logically equivalent to its inverse. ✓


.
Dr

iii) A conditional statement a → b and its contrapositive are logically equivalent to

each other. [1 mark]

Solution: True;

From the truth table, we observe that the truth values of a → b and ∼ b →∼ a

are identical in all rows. Therefore, a → b and its contrapositive are logically

equivalent. ✓

iv) The converse and inverse of a conditional statement a → b are logically equivalent

to each other. [1 mark]

Solution: True;

From the truth table, we observe that the truth values of b → a and ∼ a →∼ b are

the same in all rows.Therefore, the converse and inverse of a → b are logically

equivalent to each other. ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 55 of 74


128. Determine whether the propositional form (p → q) ∧ (p ∧ ∼ q) is a tautology,

contradiction or a contingency. [4 marks]

Solution:
p q ∼q p→q p∧∼q (p → q) ∧ (p ∧ ∼ q)

T T F T F F

T F T F T F

F T F T F F

F F T T F F

✓ ✓ ✓
A Contradiction ✓

129. Using the sentence variables (p and q) and the logic symbols (∼, ∧, and ∨), rewrite

the following symbolically.


ra
lo
i) I am hungry but not thirsty. [1 mark]
iF
nj

Solution: p ∧ ∼ q ✓
Ru

ii) The weather is neither hot nor cold. [1 mark]


.
Dr

Solution: ∼ (p ∨ q) ≡ ∼ p ∧ ∼ q ✓

130. Find a Boolean expression for the logic circuit below :

[3 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 56 of 74


131. Using a truth table,determine whether the following argument is valid.

p→q

q→r

∴ (p ∨ q) → r [4 marks]

Solution:

ra
lo
iF
nj
. Ru
Dr

All critical rows have a true conclusion and thus the argument is valid ✓

132. Determine a simple logical expression for which each of the following is equivalent to:

i) ∼ (p → q) [1 mark]

Solution: ∼ (p → q) ≡ p ∧ ∼ q ✓

ii) ∼ (p ⇐⇒ q) [1 mark]

Solution: ∼ (p ⇐⇒ q) ≡ p ⊕ q ✓

iii) p ∧ ∼ p [1 mark]

Solution: p ∧ ∼ p ≡ c where c is a contradiction ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 57 of 74


iv) [(p → q) ∧ p ] → q [1 mark]

Solution: [(p → q) ∧ p ] → q ≡ t where t is a tautology. ✓

133. Use rules of inference to show that if the premises

∀x(P (x) → Q(x)), ∀x(Q(x) → R(x)), and ∼ R(a), where a is in the domain, are true,

then the conclusion ∼ P (a) is true. [3 marks]

Solution:

∀x(P (x) → Q(x))

∀x(Q(x) → R(x))

∴ ∀x(P (x) → R(x)) by universal law of syllogism ✓ ✓

∀x(P (x) → R(x))

∼ R(a)

∼ P (a) by universal modus tollens ✓


ar
lo
134. Prove the transitivity law : p → q, q → r, ∴ p → r. . [6 marks]
iF
nj

Solution:
Ru

p q r p→q q→r p→r Critical rows


.
Dr

T T T T T T ∗

T T F T F F

T F T F T T

T F F F T F ✓ ✓ ✓ ✓

F T T T T T ∗

F T F T F T

F F T T T T ∗

F F F T T T ∗
All the critical rows are true hence the argument is valid. ✓ ✓

135. Simplify the Boolean expression: A + AB [2 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 58 of 74


A + AB = A(1 + B)

= A.1

=A

✓✓

136. Let Ψ = {p ∨ q, p∨ ∼ q, ∼ p ∨ q, ∼ p∨ ∼ q ∨ ∼ r, ∼ p ∨ r}

Determine whether Ψ is satisfiable. [5 marks]

Solution:
p q r p∨q p∨ ∼ q ∼p∨q ∼ p∨ ∼ q∨ ∼ r ∼p∨r Ψ

T T T T T T F T F

T T F T T T T
r a F F
lo
iF

T F T T T F T T F
nj

✓ ✓ ✓
Ru

T F F T T F T F F

F T T T F T T T F
.
Dr

F T F T F T T T F

F F T F T T T T F

F F F F T T T F F
There is no assignment where Ψ evaluates to T . ✓

Hence Ψ is un-satisfiable ✓

137. i) Draw the logic circuit for the following expression: AB + A (B + C) [4 marks]

Solution:

MAT 125 Rev. Qns By Dr. Runji Flora Page 59 of 74


ii) Simplify the expression in i) above using the rules of Boolean algebra. [2 marks]

Solution:

AB + A(B + C) = AB + AB + AC = AB + AC = A(B + C) ✓✓

iii) Draw the simplified logic gate circuit derived in ii) above. [2 marks]

Solution:

138. You are about to leave for campus in the morning and discover that you don’t have

your glasses. You know the following statements are true:

ar
a. If I was reading the newspaper in the kitchen, then my glasses are on the kitchen
lo
iF

table.
nj

b. If my glasses are on the kitchen table, then I saw them at breakfast.


Ru

c. I did not see my glasses at breakfast.


.
Dr

d. I was reading the newspaper in the living room or I was reading the newspaper in

the kitchen.

e. If I was reading the newspaper in the living room then my glasses are on the coffee

table.

Where are the glasses? [5 marks]

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.

RK → GK.............................. by (a)

GK → SB.............................. by (d)

MAT 125 Rev. Qns By Dr. Runji Flora Page 60 of 74


∴ RK → SB................... by transitivity .............(1) ✓

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

∼ SB........................................ by (c)

∴∼ RK............................. by modus tollens ......(2) ✓

RL ∨ RK...................................... by (d)

∼ RK....................................... by the conclusion of (2)

∴ RL.................................. by elimination ..................(3) ✓

RL → GC.............................. by (e)

RL............................................. by the conclusion of (3)

∴ GC.............................. by modus ponens ✓

Thus the glasses are on the coffee table. ✓

139. Find the bitwise OR, bitwise AND, and bitwise XOR of the pair of bit strings:

(110101, 011010). ra [3 marks]


lo
iF

Solution:
nj

OR: 1111111 ✓
Ru

AND: 010000 ✓
.
Dr

XOR: 101111 ✓

140. Given the bitstrings: A = 110101, B = 101010, C = 011010;

compute; (A ∧ B) ∨ (C XOR A) [3 marks]

Solution:

Bitwise AND between A and B: A AND B = 110101 AND 101010 = 100000 ✓

Bitwise XOR between C and A: C XOR A = 011010 XOR 110101 = 101111 ✓

Bitwise OR of the results: (A AND B) OR (C XOR A) = 100000 OR 101111 =

101111 ✓

141. Find the bitwise OR, bitwise AND, and bitwise XOR of the pair of bit strings:

(1011110, 0100001). [3 marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 61 of 74


Solution:

OR: 1111111 ✓

AND: 0000000 ✓

XOR 1111111 ✓

142. Deduce the conclusion of the argument from the hypothesis explaining each step:

p→q

q→r

∼r

∴∼p

[2 marks]

Solution: ar
lo
iF
nj
.Ru
Dr

143. Determine the validity of the following argument using a truth table

If the apartment is damaged, then the deposit won’t be refunded.

The apartment isn’t damaged.

Therefore, the deposit will be refunded.

Let p represent ”The apartment is damaged.”

Let q represent ”The deposit will be refunded.” [4 marks]

Solution:

The argument is of the form:

MAT 125 Rev. Qns By Dr. Runji Flora Page 62 of 74


p q p →∼ q ∼ p q

T T F F T
p →∼ q
T F T F F
∼p
F T T T T
∴q ✓
F F T T F

Critical Rows: row 3 and row 4. ✓

Notice that in the fourth row, both premises are true while the conclusion is false;

this ”critical row” tells us that the argument is INVALID. ✓

144. Without using truth tables, determine the validity of the argument:

If I go to the movies, I will not do my homework.


ra
lo
I do my homework.
iF
nj

Therefore, I did not go to the movies. [2 marks]


Ru

Solution: The argument is of the form:


.
Dr

p→q

∼q

∴∼ p

This is valid by Modus Tollens. ✓

145. A college cafeteria line has four stations: salads, main courses, desserts, and bever-

ages.

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.

MAT 125 Rev. Qns By Dr. Runji Flora Page 63 of 74


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.

These choices are illustrated in the figure below:

ra
lo
iF
nj
. Ru
Dr

Write each of following statements informally and find its truth value.

i) ∃ an item I such that ∀ students x, x chose I . [2 marks]

Solution:

There is an item that was chosen by every student. ✓

This is true; every student chose pie. ✓

ii) ∃ a student x such that ∀ items I, x chose I . [2 marks]

Solution:

There is a student who chose every available item. ✓

This is false; no student chose all nine items. ✓

iii) ∃ a student x such that ∀ stations Z, ∃ an item I in Z such that

x chose I . [2 marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 64 of 74


Solution:

There is a student who chose at least one item from every station. ✓

This is true; both Uta and Tim chose at least one item from every station. ✓

iv) ∀ students x and ∀ stations Z, ∃ an item I in Z such that

x chose I. [2 marks]

Solution:

Every student chose at least one item from every station. ✓

This is false; Yuen did not choose a salad. ✓

146. In a bookstore, there are three genres of books: fiction, mystery, and science fiction.

The available books in each genre are as follows:

- Fiction: novels or short stories

- Mystery: detective novels or thrillers


r a
lo
iF

- Science Fiction: space adventures or dystopian novels


nj
Ru

Three readers, Alex, Brooke, and Chris, make the following choices:
.

- Alex: Novels, detective novels, space adventures


Dr

- Brooke: short stories, thrillers, dystopian novels

- Chris: Novels, detective novels, dystopian novels

Write each of the following statements informally and find its truth value:

i) ∃ a book A such that ∀ readers R, R chose A . [2 marks]

Solution:

Informally: There is a book that was chosen by every reader. ✓

This is False; No book was chosen by every reader. ✓

ii) ∃ a reader R such that ∀ books B, R chose B. [2 marks]

Solution:

Informally: There is a reader who chose every available book. ✓

This is false; no reader chose all books. ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 65 of 74


iii) ∃ a reader R such that ∀ genres G, ∃ a book B in G such that

R chose B . [2 marks]

Solution:

Informally: There is a reader who chose at least one book from every genre. ✓

This is true; All the readers chose at least one book from every genre. ✓

iv) ∃ a genre G such that ∀ readers R, R chose a book from G. [2 marks]

Solution:

Informally: There is a genre such that every reader chose a book from that genre..

This is false; there is no genre chosen by all three readers.. ✓

147. Consider the following truth table. Determine and simplify the logic expression for

the output Y . r a
lo
iF

Output
nj
Ru

A B C Y

1 1 1 0
.
Dr

1 1 0 0

1 0 1 1

1 0 0 0

0 1 1 0

0 1 0 0

0 0 1 1

0 0 0 0

[3 marks]

Solution: There are two rows with output 1’s and their corresponding binary values

are 001 and 101 which correspond to product terms ĀB̄C and AB̄C respectively. ✓

The resulting expression for the output is

Y = ĀB̄C + AB̄C = (Ā + A)B̄C = 1.B̄C = B̄C. ✓✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 66 of 74


148. Show that if m and n are both perfect squares, then mn is also a perfect square. [3

marks]

Proof: An integer a is a perfect square if there is an integer b such that a = b2 . ✓

Assume the hypothesis is true, i.e., m and n are both perfect squares. It follows that

there are integers s and t such that m = s2 and n = t2 . ✓

We show that mn is also a perfect square.

mn = s2 t2 = (ss)(tt) = (st)(st) = (st)2 ✓

Using commutativity and associativity of multiplication, it follows that mn is a perfect

square. The proof is now complete.

149. Prove that if n2 is odd, then n is odd, where n is an integer . [3 marks]


a
r
lo
Solution:
iF

Contrapositive proof: We show that if n is even, then n2 is even. ✓


nj
Ru

Assume n is even, this implies n = 2k, k ∈ Z ✓


.

This implies n2 = (2k)2 = 4k 2 = 2(2k 2 ) an even number.


Dr

150. Using the Contrapositive proof, show that if n2 is odd, then n is odd, where n is an

integer . [3 marks]

Solution: Contrapositive: If n is even, then n2 is even. ✓

Assume n is even, this implies n = 2k, k ∈ Z ✓

This implies n2 = (2k)2 = 4k 2 = 2(2k 2 ) an even number. ✓

√ √
151. Let x and y be positive numbers. If x ≤ y, then x ≤ y. Proof. [3 marks]

Proof:

Suppose x ≤ y. Subtracting y from both sides gives x − y ≤ 0. This can be written


√ 2 √
as x − y 2 ≤ 0. ✓
√ √ √ √
Factoring this gives ( x − y)( x + y) ≤ 0. ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 67 of 74


√ √ √ √
Dividing both sides by the positive number x+ y produces x − y ≤ 0. ✓
√ √ √
Adding y to both sides gives x ≤ y.

152. Prove that: There are no integers x and y such that x2 = 4y + 2. [3 marks]

Solution:

Proof by contradiction

Suppose there are integers x and y such that x2 = 4y + 2 = 2(2y + 1),so x2 is even

which in turn implies x is even. ✓

So x = 2k, k ∈ Z. Then x2 = 4k 2 .

⇒ 2k 2 = 2y + 1 . This equality is not possible since the LHS is even and RHS odd.

A contradiction. ✓

So there are no integers x and ysuch that x2 = 4y + 2. ✓

a
153. For all integers a, b, c, if a divides b and b divides c then a divides c.
r
lo
iF

Prove [3 marks]
nj
Ru

Solution:
.

Since a divides b, then there exists an integer m such that


Dr

b = am (i) ✓

Similarly, since b divides c, there exists an integer n such that

c = bn (ii) .

Now, substitute the expression of b from Equation (i) into the b in Equation (ii).

By doing so, the equation c = bm is transformed to c = (am)n. ✓

Next, apply the Associative Property of Multiplication on the equation c = (am)n to

get c = a(mn). Because m and n are integers, their product must also be an integer

by the Closure Property of Multiplication; that is,m × n ∈ Z. Let k = m × n . In

the equation c = a(mn), substitute mn by k to obtain c = ak.The equation c = ak

implies that a divides c . ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 68 of 74


154. Show that if an integer n is not divisible by 3, then n2 − 1 must be a multiple of 3.

[5 marks]

Solution:

Assume that n is not divisible by 3 . This means that n leaves a remainder of 1 or 2

when divided by 3. ✓

Case 1: n leaves a remainder of 1 when divided by 3.

In this case, n = 3k + 1 for some integer k. ✓

Then n2 − 1 = (3k + 1)2 − 1 = 9k 2 + 6k + 1 − 1 = 3(3k 2 + 2k) ✓

So, n2 − 1 is clearly divisible by 3.

Case 2: n leaves a remainder of 2 when divided by 3.

In this case, n = 3k + 2 for some integer k. ✓


ra
Then n2 − 1 = (3k + 2)2 − 1 = 9k 2 + 12k + 4 − 1 = 3(3k 2 + 4k + 1)
lo

iF

So, n2 − 1 is again divisible by 3.


nj
Ru

In both cases, we have shown that if n is not divisible by 3, then n2 − 1 is a multiple


.
Dr

of 3. Therefore, the original statement holds true.

155. Prove the statement: For all integers m and n, if m and n are odd integers, then

m + n is an even integer. [3 marks]

Solution:

156. If x is an even integer, then x2 − 6x + 5 is odd. Prove. [4 marks]

Solution:

Suppose x is an even integer.

Then x = 2a for some a ∈ Z by definition of an even integer. ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 69 of 74


so

x2 − 6x + 5 = (2a)2 − 6(21) + 5

= 4a2 − 12a + 5

= 4a2 − 12a + 4 + 1

= 2(2a2 − 6a + 2) + 1

✓✓

Therefore, we have x2 − 6x + 5 = 2b + 1, where b = 2a2 − 6a + 2 ∈ Z . ✓

Consequently, x2 − 6x + 5 is odd, by definition of an odd number.

157. Show that 1 + 3 + 5 + 7 + ... + (2n − 1) = n2 [4 marks]

Solution:
a
r
lo
Let P (n) : 1 + 3 + 5 + 7 + ... + (2n − 1) = n2
iF
nj

Then P (1) = 1 = 12 is true. ✓


Ru

Assume that P (k) : 1 + 3 + 5 + 7 + ... + (2k − 1) = k 2 is true for some k ∈ N


.
Dr

To prove that P (k + 1) is true we have

1 + 3 + 5 + 7 + ... + (2k − 1) + (2k + 1) = k 2 + (2k + 1) = k 2 + 2k + 1 = (k + 1)2 ✓✓

Thus P (k + 1 is true whenever P (k) is true.

Hence by the principle of mathematical induction , P (n) is true for all n ∈ N ✓

158. Prove the statement: For all integers m and n, if m and n are odd integers, then

m + n is an even integer. [3 marks]

Solution:

Assume m and n are odd integers .

This implies that m = 2a + 1, n = 2b + 1, a, b ∈ Z ✓

⇒ m + n = 2a + 1 + 2b + 1 = 2a + 2b + 2 = 2(a + b + 1) ✓

∴ m + n is even by definition of an even number ✓

MAT 125 Rev. Qns By Dr. Runji Flora Page 70 of 74


159. Prove by contraposition that if 5n + 2 is odd then n is odd. [3 marks]

Solution:

160. Prove using mathematical induction that for all n ≥ 1; [4 marks]

n(3n − 1)
1 + 4 + 7 + · · · + (3n − 2) =
2

Proof:

• For any integer n ≥ 1, let Pn be the statement that

n(3n − 1)
1 + 4 + 7 + · · · + (3n − 2) = ✓
2

• Base case: The statement P1 says that


r a
lo
1(3 − 1)
iF

1= which is true. ✓
2
nj
Ru

• Inductive step: Fix k ≥ 1, and suppose that Pk holds, that is,


.
Dr

k(3k − 1)
1 + 4 + 7 + · · · + (3k − 2) =
2

• It remains to show that Pk+1 holds, that is,

(k + 1)(3(k + 1) − 1) (k + 1)(3k + 2)
1+4+7+· · ·+(3k −2)+(3k +1) = = ✓✓
2 2

To do so, add 3k + 1 on both sides of Pk . The rest is algebra.

• Thus, by PMI, for all n ≥ 1, P (n) holds.

• Thus, by PMI, for all n ≥ 1, P (n) holds.

161. Use Mathematical induction to show that,

1 + 2 + 22 + · · · + 2n = 2n+1 − 1,

MAT 125 Rev. Qns By Dr. Runji Flora Page 71 of 74


for all non-negative integers n [4 marks]

Solution:

n(n + 1)(2n + 1)
162. Proof that for every n ∈ Z+ , 12 + 22 + ... + n2 = . [5 marks]
6
Solution: Proof by mathematical induction:

For every integer n ≥ 1, let P (n) be the statement


n(n + 1)(2n + 1)
P (n) : 12 + 22 + ... + n2 =
6
1(1 + 1)(2.1 + 1)
When n = 1, the statement P (1) : 1 = is true. ✓
6
Let k be an arbitrary but fixed integer such that k ≥ 1 and assume P (k) is true: that
k(k + 1)(2k + 1)
is P (k) : 12 + 22 + ... + n2 = . ✓
6
(k + 1)(k + 2)(2k + 3)
We show that P (k + 1) is true.i.e. 12 + 22 + ... + (k + 1)2 = .
6
Evaluating the LHS of this equation , we have,

ra
(12 + 22 + ... + (k + 1)2 =12 + 22 + ... + k 2 ) + (k + 1)2
lo

iF

k(k + 1) + (2k + 1)
= + (k + 1)2 ✓
nj

6
Ru

k(k + 1) + (2k + 1) 6(k + 1)2


= +
6 6
.
Dr

(k + 1)(2k + 1) + 6(k + 1)
=
6
2
(k + 1)(2k + 7k + 6)
= ✓
6
(k + 1)(k + 2)(2k + 3)
=
6

163. Prove the following statement :

Root 2 is an irrational number. [5 marks]



Solution: Assume that 2 is a rational number. ✓
√ p
So it can be expressed in the form 2= where p, q are co-prime integers and q ̸= 0
q
√ p
2=
q
On squaring both the sides we get,
 2
p
2=
q

MAT 125 Rev. Qns By Dr. Runji Flora Page 72 of 74


⇒ 2q 2 = p2 (i) ✓

⇒ p2 is even and consequently p is also even.

⇒ p = 2m, m ∈ Z

⇒ p2 = 4m2 (ii) ✓

From equations (i) and (ii), we get,

2q 2 = 4m2

⇒ q 2 = 2m2

⇒ q 2 is a multiple of 2

⇒ q is a multiple of 2 ✓

Hence, p, q have a common factor 2. This contradicts our assumption that they are

co-primes.
p
ra
lo
Therefore, is not a rational number ✓
iF

q

nj

∴ 2 is an irrational number.
Ru

164. [2 marks]
.
Dr

Solution: ✓✓

165. Find the dual of these Boolean expression: xz + 0.x + xy.1. [2 marks]

166. What values of the Boolean variables x and y satisfy xy = x + y ? [2 marks]

167. How many different Boolean functions are there of degree 7? [2 marks]

168. Find a Boolean product of the Boolean variables x, y, and z, or their complements,

that has the value 1 if and only if x = 0, y = 0, z = 1 . [2 marks]

169. Find the sum-of-products expansion for the function F (x, y, z) = (x + y)z.[4 marks]

170. Suppose a, b ∈ Z. Show that if a | b then a2 | b2 . [3 marks]

171. Prove that if a2 is an odd integer, then a is also an odd integer. [3 marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 73 of 74


n(n+1)(2n+1)
172. Let P (n) be the statement that 12 + 22 + · · · + n2 = 6
for n ∈ Z+ .

a) What is the statement P (1)? [1 mark]

b) Show that P (1) is true. [1 mark]

c) What is the inductive hypothesis? [1 mark]

d) Prove the inductive step. [3 marks]

173. Consider the statement; ∀x ∃y , x < y where x, y ∈ R)

a) Translate the statement informally. [2 marks]

b) Determine whether its a true or false statement. [2 marks]

c) Write its formal negation. [2 marks]

174. Let F (x, y) be the statement “x can fool y,” where the domain consists of all people
ra
lo
in the world. Use quantifiers to express each of these statements.
iF
nj

a) There is no one who can fool everybody. [2 marks]


Ru

b) Everyone can be fooled by somebody. [2 marks]


.
Dr

c) Everybody can fool somebody. [2 marks]

175. Determinethetruth value of the statement ∃x, ∀y, x ≤ y 2 if the domain for the

variables consists of:

a) the positive real numbers. [2 marks]

b) the integers. [2 marks]

c) the real numbers. [2 marks]

MAT 125 Rev. Qns By Dr. Runji Flora Page 74 of 74

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