Set 10 2020 Solutions v2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

MA0301

ELEMENTARY DISCRETE MATHEMATICS


NTNU, SPRING 2020

Solutions Set 10

Exercise 1. For any n ≥ 0, let


n
X
S(n) = 2−i .
i=0

We want to show that S(n) is always less than 2, but becomes as close as we wish to 2 if n is
sufficiently large.
(1) What are S(0), S(1), S(2), and S(3)?
(2) Conjecture a general formula for S(n) of the form S(n) = 2 − . . ..
(3) Prove by induction that the formula is correct for all n ≥ 0.
(4) Now let  be a small positive real number. How big does n have to be for S(n) to be between
2 −  and 2?

Solution. a) By definition of S(n), we have that

S(0) = 2−0 = 1,
3
S(1) = 2−0 + 2−1 = ,
2
3 1 7
S(2) = 2−0 + 2−1 + 2−2 =
+ = ,
2 4 4
−0 −1 −2 −3 7 1 15
S(3) = 2 + 2 + 2 + 2 = + = .
4 8 8
b) Observe that

S(0) = 1 = 2 − 1,
3 1
S(1) = =2− ,
2 2
7 1
S(2) = =2− ,
4 4
15 1
S(3) = =2− .
8 8

We conjecture that S(n) = 2 − 2−n .


c) We will prove our conjecture by mathematical induction. For the base case, we have that
S(0) = 1 = 2 − 2−0 , which is true. For the induction hypothesis, we assume that S(m) = 2 − 2−m

Date: 31 March, 2020.


1
2 MA0301 ELEMENTARY DISCRETE MATHEMATICS NTNU, SPRING 2020

for some m ≥ 0. We shall prove that the formula holds for m + 1. Note that
m+1
X
S(m + 1) = 2−i
i=0
m
X
= 2−i + 2−(m+1)
i=0

= S(m) + 2−(m+1)
= 2 − 2−m + 2−(m+1) by induction hypothesis
 
1 1
= 2− −
2m 2m+1
= 2 − 2−(m+1) .
Hence, we have proven that the formula holds for m + 1. By mathematical induction, we conclude
that S(n) = 2 − 2−n , for all n ≥ 0.
d) Let  > 0. Note that for all n ≥ 0, S(n) = 2 − 2−n < 2. Now, we want to find n such that
2 −  ≤ S(n) = 2 − 2−n . This is equivalent to find n such that
2−n ≤  ⇔ −1 ≤ 2n ⇔ n ≥ log2 (−1 ) = − log2 ().
Then if n ≥ − log2 (), we have then that 2 −  ≤ S(n). 

Exercise 2. Lewis–Zax (page 67): exercise 6.2. For each of the following functions, decide whether
it is injective, surjective, and/or bijective. If the function is a bijection, what is its inverse? If it is
injective but not surjective, what is its inverse on the image of its domain?
(1) f : Z → Z, where f (n) = 2n.
(2) f : R → {x ∈ R : 0 ≤ x < 1}, where f (x) = x − bxc.
(3) f : N × N → N, where f (n, m) is the larger of m and n.
(4) f : Z → R, where f (n) = n3 .
(5) f : R → R, where f (x) = x3 .
(6) f : N → Z, where f (n) = −n n+1
2 if n is even and f (n) = 2 if n is odd.

Solution. (1) Injective and not surjerctive. Let us show that f is injective. Consider x, y ∈ Z such
that f (x) = f (y), this is 2x = 2y. The latter obviously implies that x = y and then f is injective.
f is not surjective since there is no integer n such that f (n) = 2n = 1 since this would imply that
n = 12 and it is not an integer. It is not a bijection either since it is not surjective. It is easy to see
that the image of f is given by the set of even integers 2Z = {2m : m ∈ Z}. The inverse function
on the image is given by g : 2Z → Z, where g(m) = m 2 . Indeed, (f ◦ g)(m) = 2(m/2) = m for any
2n
m ∈ 2Z, and (g ◦ f )(n) = 2 = n for any n ∈ Z.
(2) Not injective and surjective. Consider 1, 2 ∈ R. Since b1c = 1 and b2c we have f (1) = 1−1 = 0
and f (2) = 2 − 2 = 0. Then f (1) = f (2) and 1 6= 2 and so f is not injective. We will show that
f is surjective. Take x ∈ {x ∈ R : 0 ≤ x < 1}. Consider the real number 1 + x. Since 0 ≤ x < 1,
then 1 ≤ 1 + x < 2 and so b1 + xc = 1. Hence f (1 + x) = 1 + x − b1 + xc = 1 + x − 1 = x. We
conclude that f is surjective. f is not bijective since it is not injective.
(3) Not injective and surjective. Consider the pairs (1, 3) and (2, 3). Clearly f (1, 3) = 3 = f (2, 3)
and then f is not injective. To show that f is surjective, let n ∈ N. Since n ≥ 1, we have that
f (n, 1) = n and then f is surjective. f is not bijective since it is not injective.
MA0301 ELEMENTARY DISCRETE MATHEMATICS NTNU, SPRING 2020 3

(4) Injective and not surjective. To show that f is injective, take n, m ∈ Z such that f (n) = f (m),
i.e. n3 = m3 . The latter implies that n = m and then f is injective. f is not surjective since there is
no integer n ∈ Z such that f (n) = 21 ; this would imply that n3 = 12 ⇔ n = 23 6∈ Z. f is not bijective
since it is not surjective. The image of f is the subset of real numbers given by C = { n3 : n ∈ Z}.
The inverse on the image is given by g : C → Z where g(y) = 3y. Indeed, (f ◦ g)(m) = 3m 3 = m for
any m ∈ C, and (g ◦ f )(n) = 3(n/3) = n for any n ∈ Z.
(5) Injective and surjective, and hence bijective. By Exercise of previous set, it is enough to give
the inverse function of f in order to prove that f is bijective (and hence injective and surjective).
Define g : R → R given by g(x) = 3x. Note that, for any x ∈ R, (f ◦ g)(x) = 3x 3 = x, and
(g ◦ f )(x) = 3(x/3) = x. Hence g is the inverse function of f and then f is bijective.
(6) Injective and surjective, and hence bijective. In a similar way that the previous item, we will
give the inverse function of f . Define g : Z → N, where g(n) = −2n if n ≤ 0 and g(n) = 2n − 1 if
n ≥ 1. Observe that

(g ◦ f )(n) = g(−n/2) = −2n(−n/2) = n, if n ∈ N is even,


(g ◦ f )(n) = g(−n/2) = 2((n + 1)/2) − 1 = n + 1 − 1 = n, if n ∈ N is odd,
(f ◦ g)(n) = f (−2n) = −(−2n)/2 = n, if n ∈ Z is non–positive,
(f ◦ g)(n) = f (2n − 1) = ((2n − 1) + 1)/2 = n, if n ∈ Z is positive.

We conclude that g is the inverse function of f and hence f is bijective. 

Exercise 3. Lewis–Zax (page 108): exercises 10.1., 10.3. (Here the exclusive OR is defined to be
p ⊕ q := (p ∨ q) ∧ (¬p ∨ ¬q)
(1) Five of the following statements are negations of the other five. Pair each statement with its
negation.
(a) p ⊕ q
(b) ¬p ∧ q
(c) p ⇒ (q ⇒ p)
(d) p ⇒ q
(e) p ∧ ¬q
(f) q ∧ (p ∧ ¬p)
(g) p ∨ ¬q
(h) p ⇔ q
(i) ¬p ∨ (q ∧ ¬p)
(j) (p ⇒ q) ⇒ p
(2) For each of the following formulas, decide whether it is a tautology, satisfiable, or unsatisfi-
able. Justify your answers.
(a) (p ∨ q) ∨ (q ⇒ p)
(b) (p ⇒ q) ⇒ p
(c) p ⇒ (q ⇒ p)
(d) (¬p ∧ q) ∧ (q ⇒ p)
(e) (p ⇒ q) ⇒ (¬p ⇒ ¬q)
(f) (¬p ⇒ ¬q) ⇔ (q ⇒ p).

Solution. (1) We have the following pairings:


4 MA0301 ELEMENTARY DISCRETE MATHEMATICS NTNU, SPRING 2020

(1) (a) and (h). By DeMorgan’s Law and Distributive Law, we have that
¬(p ⇔ q) = ¬((p ⇒ q) ∧ (q ⇒ p)) = ¬(p ⇒ q) ∨ ¬(q ⇒ p) = (p ∧ ¬q) ∨ (q ∧ ¬p)
= [(p ∧ ¬q) ∨ q] ∧ [(p ∧ ¬q) ∨ ¬p] = (p ∨ q) ∧ (¬q ∨ q) ∧ (p ∨ ¬p) ∧ (¬q ∨ ¬p) = (p ∨ q) ∧ (¬p ∨ ¬q) = p ⊕ q.
(2) (b) and (g). By DeMorgan’s Law, ¬(¬p ∧ q) = ¬(¬p) ∨ ¬q = p ∨ ¬q.
(3) (c) and (f). Observe that
¬(p ⇒ (q ⇒ p)) = ¬(¬p ∨ (q ⇒ p)) = ¬(¬p ∨ (¬q ∨ p)) = p ∧ (q ∧ ¬p) = q ∧ (p ∧ ¬p),
where we used DeMorgan’s Law, Associativity Law and Commutativity Law.
(4) (d) and (e). By DeMorgan’s Law, ¬(p ⇒ q) = ¬(¬p ∨ q) = p ∧ ¬q.
(5) (i) and (j). Observe that
¬((p ⇒ q) ⇒ p) = (p ⇒ q) ∧ ¬p = (¬p ∨ q) ∧ ¬p = (¬p ∧ ¬p) ∨ (q ∧ ¬p) = ¬p ∨ (q ∧ ¬p).
(2)
(1) Tautology. Since q ⇒ p = ¬q ∨ p, then (p ∨ q) ∨ (q ⇒ p) = (p ∨ q) ∨ (p ∨ ¬q) = p ∨ (q ∨ ¬q).
Since q ∨ ¬q is a tautology, then p ∨ (q ∨ ¬q) is a tautology.
(2) Satisfiable. If p and q are true, then p ⇒ t is true and (p ⇒ q) ⇒ p is true. If p is false,
then p ⇒ q is true and (p ⇒ q) ⇒ p is false regardless the truth value of q.
(3) Tautology. Note that p ⇒ (q ⇒ p) = ¬p ∨ (¬q ∨ p) = ¬q ∨ (p ∨ ¬p), and p ∨ ¬p is a tautology.
(4) Unsatisfiable. Observe that (¬p ∧ q) ∧ (q ⇒ p) = (¬p ∧ q) ∧ (¬q ∨ p). Note that ¬(¬p ∧ q) =
p ∨ ¬q, and then (¬p ∧ q) ∧ (¬q ∨ p) = (¬p ∧ q) ∧ ¬(¬p ∧ q) is unsatisfiable.
(5) Satisfiable. If p is true and q is false, then p ⇒ q is false and (p ⇒ q) ⇒ (¬p ⇒ ¬q) is
true. On the other hand, if p is false and q is true, then p ⇒ q is true, ¬p ⇒ ¬q is false and
(p ⇒ q) ⇒ (¬p ⇒ ¬q) is false.
(6) Tautology. We have that ¬p ⇒ ¬q is the contrapositive of q ⇒ p.


Exercise 4. Consider the set X := {a1 , a2 , a3 , a4 }. Draw the Hasse diagram corresponding to the
partial order
R := {(a1 , a1 ), (a2 , a2 ), (a3 , a3 ), (a4 , a4 ), (a1 , a2 ), (a2 , a3 ), (a1 , a3 ), (a3 , a4 ), (a1 , a4 ), (a2 , a4 )}
defined on X.

Solution. According to R, we have that a1 ≤ a2 ≤ a3 ≤ a4 . Hence a2 covers a1 , a3 covers a2 and


a4 covers a3 . Hence the Hasse diagram corresponding to R is the following:

a4

a3

a2

a1

Exercise 5. For non-negative integers n, k, we define the numbers:


MA0301 ELEMENTARY DISCRETE MATHEMATICS NTNU, SPRING 2020 5

(1) N (0, 0) = 1,
(2) N (n, k) = 0,  if
k > n >0, or n > 0, k = 0,
1 n n
(3) N (n, k) = , n ≥ k ≥ 1.
n k k−1
Show that N (n, n + 1 − k) = N (n, k), for n > 0 and k ∈ {0, 1, 2, . . . , n}. These are the Narayana
numbers.

Solution. Consider n > 0. If k = 0 then N (n, k) = 0 and N (n, n + 1 − k) = N (n, n + 1) = 0, by item


(2) of the definition of Narayana numbers. Now assume that 0 < k ≤ n. Then 1 ≤ n + 1 − k ≤ n
and
  
1 n n
N (n, n + 1 − k) =
n n+1−k n+1−k−1
  
1 n n
=
n n+1−k n−k
1 n! n!
=
n (n − k + 1)!(n − (n − k + 1))! (n − k)!(n − (n − k))!
1 n! n!
=
n (n − (k − 1))!(k − 1)! (n − k)!k!
  
1 n n
=
n k−1 k
= N (n, k).

Hence N (n, k) = N (n, n + 1 − k) as we wanted to show. 

Exercise 6. Let p1 , p2 , . . . , p12 be twelve given points in the plane. Suppose that no three of the
points are on the same line. How many triangles, having vertices among the points p1 , p2 , . . . , p12
and one of which is p1 are there? Provide a detailed computations.

Solution. Since no three of the points are on the same line, we can form a triangle by picking any
subset of size three of p1 , . . . , p12 . However, we are interested in counting the triangles that we can
form which include p1 as one of their vertices. This means that we have to count the number of
ways that we can choose a subset of size two of p2 , . . . , p12 . This is counted by the combinations of
11 on 2 and this number is given by
 
11 11! 11! 11 · 10
= = = = 55.
2 2!(11 − 2)! 2!9! 2


Exercise 7. Is there an undirected graph with 102 vertices, such that exactly 49 vertices have degree
5, and the remaining 53 vertices have degree 6?
X
Solution. Recall that if G = (V, E) is a graph, then 2|E| = deg(v). If there is a graph with the
v∈V
characteristics described in the exercise, we would have that

2|E| = 49 · 5 + 53 · 6 = 563,

and this is a contradiction since 563 is not an even number. We conclude that there is no graph as
it is described in the exercise. 
6 MA0301 ELEMENTARY DISCRETE MATHEMATICS NTNU, SPRING 2020

Exercise 8. If a connected planar graph has 12 vertices, each of degree 3, how many regions and
edges does the graph have?

Solution. Observe that


X X
2|E| = deg(v) = 3 = 3|V | = 3 · 12 = 36.
v∈V v∈V

Hence |E| = 36/2 = 18. Now recall the Euler’s formula |V |−|E|+|R| = 2. Then |R| = 2−|V |+|E| =
2 − 12 + 18 = 8. Hence the graph has 18 edges and 8 regions. 

Exercise 9. Let G = (V, E) be an undirected connected loop-free graph. Suppose that G is planar
and determines r = 53 regions. If for some planar embedding of G, each region has at least five
edges in its boundary, show that |V | > 81.

Solution. Recall the Euler’s formula v − e + r = 2. By assumption, we have that r = 53 and so


v − e = 2 − 53 = −51. Now, since an edge is adjacent to two regions, and each region hast at least
five edges in its boundary, we have a bound for the number of edges given by
2e ≥ 5r = 265.
Using this in the above equation, we have that
v = −51 + e ⇔ 2v = −102 + 2e ≥ −102 + 265 = 163 ⇒ v ≥ 163/2 > 81.
We conclude that |V | = v > 81. 

Exercise 10. If G = (V, E) is connected graph with |E| = 17 and deg(v) > 2 for all v ∈ V , what
is the maximum value of |V |?

Solution. Recalling the formula for the sum of the degrees, we have that
X X
2|E| = deg(v) ≥ 3 = 3|V |.
v∈V v∈V

Since |E| = 17, we have that |V | ≥ 2 · 17/3 = 34/3 < 12. Since |V | is an integer, we have that
|V | ≥ 11. Hence, the maximum value of |V | is 11 and it can be reached by considering a graph with
10 vertices of degree 3 and one vertex of degree 4. 

You might also like