0% found this document useful (0 votes)
11 views9 pages

Tutorial Exam Solution

The document contains a series of mathematical exercises and solutions related to modular arithmetic, logical reasoning, mathematical induction, and set theory. It includes problems such as finding integers satisfying modular equations, proving theorems using induction, and analyzing relations on sets. The document serves as additional exercises for a final examination, with various proofs and logical deductions provided for each question.

Uploaded by

timeofdeath321
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)
11 views9 pages

Tutorial Exam Solution

The document contains a series of mathematical exercises and solutions related to modular arithmetic, logical reasoning, mathematical induction, and set theory. It includes problems such as finding integers satisfying modular equations, proving theorems using induction, and analyzing relations on sets. The document serves as additional exercises for a final examination, with various proofs and logical deductions provided for each question.

Uploaded by

timeofdeath321
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/ 9

MH1812 – Additional Exercises for Final Examination

Note: the final exam may or may not be related with the questions here.

NTU, AY15/16 S2 April 2016

Q1: Find a positive integer x in the range [1, 6] for each of the following:
I. 2x ≡ 1 mod 7
Solution:
21 mod 7 = 2
22 mod 7 = 4
23 mod 7 = 1
hence x = 3.
II. 3x ≡ 1 mod 7
Solution:
31 mod 7 = 3
32 mod 7 = 2
33 mod 7 = 6
34 mod 7 = 4
35 mod 7 = 5
36 mod 7 = 1
hence x = 6.
III. 4x ≡ 1 mod 7
Solution:
41 mod 7 = 4
42 mod 7 = 2
43 mod 7 = 1
hence x = 3.
IV. 5x ≡ 1 mod 7
Solution:
51 mod 7 = 5
52 mod 7 = 4
53 mod 7 = 6
54 mod 7 = 2
55 mod 7 = 3
56 mod 7 = 1
hence x = 6.

1
V. 6x ≡ 1 mod 7
Solution:
61 mod 7 = 6
62 mod 7 = 1
hence x = 2.

Q2: (optional) Is it generally true that xp−1 mod p = 1, for p a prime number and x a
positive integer with gcd(x, p) = 1 ?
Solution:This is related to Fermat’s little theorem, which states

xp ≡ x mod p

This can be proved by mathematical induction on x.

Basis Step: x = 1, xp − x = 1p − 1 = 0 and p | 0 is true.


Inductive Step: assume p | (xp − x), then

(x + 1)p − (x + 1) = Ppi=0 pixi · 1p−i − (x + 1)


P 
p p
= i=0 i P xi − (x + 1) 
= p0 x0 + p−1 p
xi + pp xp − (x + 1)

Pp−1 i=1 p
 i
= 1 + i=1 xi + xp − (x + 1)
Pp−1 p i i p
= i=1 i x + (x − x)

Note every term pi is multiple of p for all i = 1, 2, . . . , p − 1, and xp − x is assumed




to be multiple of p, hence (x + 1)p − (x + 1) is also multiple of p. By mathematical


induction, xp − x is multiple of p for all x.

Note xp − x = x · (xp−1 − 1) is multiple of p, when gcd(x, p) = 1, p | xp−1 − 1, i.e.,


xp−1 ≡ 1 mod p.

Q3: Use (Q1.), compute 51024 mod 7.


Solution: Note from Q1, 56 ≡ 1 mod 7, hence 51024 ≡ 51024 mod 6
≡ 54 ≡ 2 mod 7.

Q4: Let the set S = {1, 2, . . . , 6}, is S closed under operator ∆=“multiplication modulo 7”,
i.e., x∆y = x · y mod 7?
Solution: TURE. Because for any x, y ∈ S, 7 6 |x, 7 6 |y, and 7 is a prime, so 7 6 |x · y,
i.e., xy 6≡ 0 mod 7, then (x · y mod 7) ∈ S, hence “closed”.

Q5: Determine the truth value of the statement ∃x∀y(x ≤ y 2 ) if the domain for the variables
consists of

2
I. the positive real numbers.
Solution: FALSE. The negation

∀x∃y(x > y 2 )
p
is TRUE. ∀x ∈ R+ , one can choose y = x/2 ∈ R+ , such that x > y 2 = x/2.

II. the integers.


Solution:TRUE. Choose x = 0, x ≤ y 2 for all y ∈ Z.
III. the nonzero real numbers.
Solution: TRUE. Choose x = −1, x ≤ y 2 for all y ∈ R − {0}.

Q6: Show that the premises “It is not sunny this afternoon and it is colder than yesterday,”
“We will go swimming only if it is sunny,” “If we do not go swimming, then we will
take a canoe trip,” and “If we take a canoe trip, then we will be home by sunset” lead
to the conclusion“We will be home by sunset.”
Solution: Let us denote the premises by

S = It is Sunny this afternoon


C = It is colder than yesterday
W = We will go swimming
T = We will take a canoe trip
H = We will be home by sunset

The sentences can be written formally in logic as below:

¬S ∧ C
¬S → ¬W
¬W → T
T →H
∴ H

This statement is TRUE because

3
¬S ∧ C
∴ ¬S (conjunctive simplification)

¬S
¬S → ¬W
∴ ¬W (Modus ponens)

¬W
¬W → T
∴ T (Modus ponens)

T
T →H
∴ H (Modus ponens)

Q7: Determine, using truth table, whether the following statement is valid
p → q ∨ ¬r
q → p∧r
∴p → r

Solution: We will solve this by showing the truth table:

row p q r q ∨ ¬r p ∧ r p → q ∨ ¬r q → p ∧ r p→r
1 T T T T T T T T
2 T T F T F T F F
3 T F T F T F T T
4 T F F T F T T F
5 F T T T F T F T
6 F T F T F T F T
7 F F T F F T T T
8 F F F T F T T T

The statement is false due to the fact that row 4 is a counter example.
Q8: Prove by mathematical induction that
1 1 1 n
+ + ··· + =
1·2 2·3 n · (n + 1) n+1
for all integers n ≥ 1.
1 1 1
Solution: Denote f (n) = 1·2
+ 2·3
+ ··· + n·(n+1)
.

4
1
Basis Step: n = 1, LHS = 1·2
= 21 , and RHS = 1
1+1
= 1
2
=LHS.
Inductive Step: assume n = k, the conclusion holds, i.e.,
1 1 1 k
f (k) = + + ··· + =
1·2 2·3 k · (k + 1) k+1
When n = k + 1,
1 1 1 1
f (k + 1) = 1·2 + 2·3 + · · · + k·(k+1) + (k+1)·(k+2)
1
= f (k) + (k+1)·(k+2)
k 1
= k+1 + (k+1)·(k+2)
1
= (k+1)·(k+2) · (k(k + 2) + 1)
1
= (k+1)·(k+2) · (k + 1)2
k+1
= k+2
= RHS
Overall, by mathematical induction, the conclusion is true for all integer n ≥ 1.

Q9: Prove by mathematical induction that


2n < (n + 1)!
for all integer n ≥ 2.
Solution:
Basis Step: n = 2, LHS = 22 = 4, and RHS = (2 + 1)! = 3 · 2 · 1 = 6 > 4, TRUE.
Inductive Step: assume n = k, the conclusion holds, i.e.,
2k < (k + 1)!
When n = k + 1,
2k+1 = 2 · 2k < 2 · (k + 1)! < (k + 2) · (k + 1)! = (k + 2)!
Note 2 < k + 2 when k > 2. Overall, by mathematical induction, 2n < (n + 1)! for
all integer n ≥ 2.

Q10: Prove by mathematical induction that


1 1 1 √
√ + √ + ··· + √ > n
1 2 n
for all integers n ≥ 2.
Solution: Let f (n) = √1 + √1 + ··· + √1 .
1 2 n

5

Basis Step: n = 2, f (2) = √1 + √1 , and RHS = 2 < f (2), TRUE.
1 2
Inductive Step: assume n = k, the conclusion holds, i.e.,

f (k) > k

When n = k + 1,

f (k + 1) = √1 + √12 + · · · + √1k + √1
1 k+1
1
= f (k) + + √k+1
√ 1
> k + √k+1
√ 1 √
> k + √k+1+
√ √ k √
= √ k + ( k + 1 − k)
= k+1

Overall, f (n) > n for all integer n ≥ 2. (Take note the trick used by the red
step)

Q11: Let relation R defined on set A = {a, b, c, d} and R = {(a, b), (b, a), (b, c), (c, d)}, find
R−1 , R2 (note: R2 = R ◦ R), R3 and the transitive closure Rt . Is Rt an equivalent
relation or a partial order ?
Solution:

• R−1 = {(b, a), (a, b), (c, b), (d, c)}


• – (a, b), (b, a) ∈ R, hence (a, a) ∈ R2
– (a, b), (b, c) ∈ R, hence (a, c) ∈ R2
– (b, a), (a, b) ∈ R, hence (b, b) ∈ R2
– (b, c), (c, d) ∈ R, hence (b, d) ∈ R2
Hence, R2 = {(a, a), (a, c), (b, b), (b, d)}.
• – (a, b), (b, a), (a, b) ∈ R, hence (a, b) ∈ R3
– (a, b), (b, c), (c, d) ∈ R, hence (a, d) ∈ R3
– (b, a), (a, b), (b, a) ∈ R, hence (b, a) ∈ R3
– (b, a), (a, b), (b, c) ∈ R, hence (b, c) ∈ R3
Hence R3 = {(a, b), (a, d), (b, a), (b, c)}
• – (a, b), (b, a) ∈ R, hence (a, a) ∈ Rt
– (a, b) ∈ R, hence (a, b) ∈ Rt
– (a, b), (b, c) ∈ R, hence (a, c) ∈ Rt
– (a, b), (b, c), (c, d) ∈ R, hence (a, d) ∈ Rt
– (b, a) ∈ R, hence (b, a) ∈ Rt

6
– (b, a), (a, b) ∈ R, hence (b, b) ∈ Rt
– (b, c) ∈ R, hence (b, c) ∈ Rt
– (b, c), (c, d) ∈ R, hence (b, d) ∈ Rt
– (c, d) ∈ R, hence (c, d) ∈ Rt
Hence Rt = {(a, a), (a, b), (a, c), (a, d), (b, a), (b, b), (b, c), (b, d), (c, d)}
• Rt is neither an equivalent relation, nor a partial order, since (c, c), (d, d) 6∈ Rt and
Rt is not reflexive.

Q12: Prove using both set identities and membership table that

(A − B) ∩ (C − B) = (A ∩ C) − B

Solution: Method 1: prove by set identities:

LHS = (A ∩ B) ∩ (C ∩ B) definition of set difference


= (A ∩ C) ∩ (B ∩ B) commutative law
= (A ∩ C) ∩ B Idempotent laws
= (A ∩ C) − B definition of set difference
= RHS

Method 2: prove by membership table

A B C A−B C −B (A − B) ∩ (C − B) A∩C (A ∩ C) − B
1 1 1 0 0 0 1 0
1 1 0 0 0 0 0 0
1 0 1 1 1 1 1 1
1 0 0 1 0 0 0 0
0 1 1 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 1 0 0 0
0 0 0 0 0 0 0 0

The membership values of the two columns (A − B) ∩ (C − B) and (A ∩ C) − B, are


identical, hence they are equal.

Q13: Show that in a group of five people (where any two people are either friends or enemies),
there are not necessarily three mutual friends or three mutual enemies.
Solution: Let (x, y) denote x and y are friends, if (x, y) does not exist, then there are
enemies. Denote the five people as A, B, C, D, E, if we denote the 5 people as nodes, and
friendship as edges, then they form a graph, and three mutual friends imply a complete

7
sub-graph of 3 nodes, and three mutual enemies imply three nodes without any edge in
between.
If the friendships are between (A, B), (B, C), (C, D), (D, E), (E, A), then none of the
two cases happens.

Q14: Let f, g : R → R, and f (x) = x − 3 and g(x) = x3 + 10, find f −1 ◦ g −1 and (g ◦ f )−1 ,
what do you find ?
√ √
Solution: Let y = x3 + 10, hence x = 3 y − 10, g −1 (x) = 3 x − 10
Let y = x − 3, hence x = y + 3, f −1 (x) = x √+ 3 √
Hence, f −1 ◦ g −1 (x) = f −1 (g −1 (x)) = f −1 ( 3 x − 10) = 3 x − 10 + 3
g◦f
√ (x) = g(f (x)) = g(x−3)
√ = (x−3)3 +10. Let y = (x−3) √
3
+10, then y−10 = (x−3)3 ,
−1 3
3
y − 10 = x − 3, x = y − 10 + 3, hence (g ◦ f ) (x) = x − 10 + 3
3

It is interesting to note that f −1 ◦ g −1 = (g ◦ f )−1 .

Q15: Find the Euler path, Euler circuit, Hamilton path, and Hamilton circuit of the following
graphs (with a and b as starting and ending points for paths), if any.

Solution:

• G1 : the degrees are deg(a) = 3, deg(b) = 3, the rest are even.


– Euler Path: exists only when starting/ending points are a and b, i.e., a → e →
d → c → e → b → c → a → b.
– Euler Circuit: does not exists due to the odd degrees of a and b
– Hamilton Path: yes, example a → e → b → c → d
– Hamilton Circuit: Yes, example a → b → c → d → e → a
• G2 : the degrees are deg(a) = 1 and deg(b) = 3
– Euler Path: exists only when starting/ending points are a and b, i.e., a → b →
d→c→b
– Euler Circuit: does not exists due to the odd degrees of a and b
– Hamilton Path: yes, example a → b → c → d
– Hamilton Circuit: does not exists because deg(a) is 1.

8
• G3 : the degrees are deg(a) = deg(d) = deg(f ) = 1, deg(b) = deg(c) = deg(e) = 3,
deg(g) = 2
– Euler Path: does not exist, more than 2 nodes are of odd degrees
– Euler Circuit: does not exist, due to odd degrees
– Hamilton Path: does not exist, more than 2 nodes of degree 1
– Hamilton Circuit: does not exist, due to existence of degree 1.

You might also like