Book Solutions Discrete Mathematics and Its Applications Kenneth H Rosen
Book Solutions Discrete Mathematics and Its Applications Kenneth H Rosen
Book Solutions Discrete Mathematics and Its Applications Kenneth H Rosen
1 Propositional Logic
p q P1 P2 P3 P4 P5 P6
T T T T T F F F
1. T F T F F T F F
F T T F T F T F
F F F T T T F T
P1 ≡ (p ∧ q) ∨ (p ∧ ¬q) ∨ (¬p ∧ q)
P2 ≡ (p ∧ q) ∨ (¬p ∧ ¬q)
P3 ≡ (p ∧ q) ∨ (¬p ∧ q) ∨ (¬p ∧ ¬q)
P4 ≡ (p ∧ ¬q) ∨ (¬p ∧ ¬q)
P5 ≡ ¬p ∧ q
P6 ≡ ¬p ∧ ¬q
(b) Analyzing each compound proposition and then using equivalence laws we have
P1 ≡ p ∨ q ≡ ¬(¬p ∧ ¬q)
P2 ≡ p ↔ q ≡ (p → q) ∧ (q → p) ≡ (¬p ∨ q) ∧ (¬q ∨ p) ≡ ¬(p ∧ ¬q) ∧ ¬(q ∧ ¬p)
P3 ≡ p → q ≡ ¬p ∨ q ≡ ¬(p ∧ ¬q)
P4 ≡ ¬q
P5 ≡ ¬p ∧ q
P6 ≡ ¬p ∧ ¬q.
(c) Using the form of each compound proposition and then equivalence laws,
P1 ≡ p ∨ q ≡ ¬¬p ∨ q ≡ ¬p → q
P2 ≡ p ↔ q ≡ (p → q) ∧ (q → p) ≡ ¬¬(p → q) ∧ (q → p)
≡ ¬(¬(p → q) ∨ ¬(q → p)) ≡ ¬((p → q) → ¬(q → p))
P3 ≡ p → q
P4 ≡ ¬q
P5 ≡ ¬p ∧ q ≡ ¬(p ∨ ¬q) ≡ ¬(q → p)
P6 ≡ ¬(¬p → q).
1
p q p⊕q
T T F
2. (a) T F T
F T T
F F F
p q r p⊕q (p ⊕ q) ⊕ r q⊕r p ⊕ (q ⊕ r)
T T T F T F T
T T F F F T F
T F T T F T F
(b) The truth table T F F T T F T
F T T T F F F
F T F T T T T
F F T F T T T
F F F F F F F
Since the fifth and the seventh columns are the same, we conclude that the cor-
responding propositions, (p ⊕ q) ⊕ r and p ⊕ (q ⊕ r), are equivalent.
p q p⊕q p↔q ¬(p ↔ q)
T T F T F
(c) T F T F T
F T T F T
F F F T F
Since the third and the fifth columns are the same, we conclude that p ⊕ q ≡
¬(p ↔ q).
3. Using equivalence laws,
¬(a → b) → c ≡ ¬(¬(a → b)) ∨ c
≡ (a → b) ∨ c
≡ (¬a ∨ b) ∨ c.
(x ∨ y) ∧ (¬x ∨ z) ∧ (y → z)X
¬z
x ∨ yX
¬x ∨ zX
y → zX
x y
¬x z ¬x z
× × ×
¬y z
× ×
Since all the paths are inactive, we conclude that the negation proposition considered is
a contradiction. This implies that the initial given compound proposition is a tautology.
x → (y ∨ z)X
¬((x → y) ∧ (x → z))X
¬x y ∨ zX
x x x x
¬y ¬z ¬y ¬z
× × y z y z
× ×
Since there are complete active paths, we conclude that the negation proposition is
not a contradiction and therefore, the initial proposition is not a tautology. The active
paths provide the two counterexamples, i.e. truth values of x, y and z for which the
x y z
proposition (x → (y ∨ z)) → ((x → y) ∧ (x → z)) is false: T T F .
T F T
Conclusion: ¬(J ∧ ¬P ) → C
Using truth tables or truth trees the above argument can be shown to be invalid. The
P M J E C
following is a counterexample. If , then each hypothesis is true
F T F T F
whereas the conclusion is false.
6. The argument can be written as
Hypothesis 1: B → (D → S)
Hypothesis 2: ¬D → P
Hypothesis 3: (D ∨ S) → B
Hypothesis 4: P → (¬D ∧ ¬S)
Conclusion: B ∧ D
4
Using truth tables or truth trees the above argument can be shown to be invalid.
B D P S
The following is a counterexample. If , then each hypothesis is true
F F T F
whereas the conclusion is false.
7. For each compound proposition, we construct its truth table and also find its DNF by
algebraic manipulations. For the truth trees method - see other file.
A B A→B B → A (A → B) → (B → A)
T T F T T
(i) T F F T T
F T T F F
F F T T T
Hence, a DNF for (A → B) → (B → A) is (A ∧ B) ∨ (A ∧ ¬B) ∨ (¬A ∧ ¬B).
Algebraically,
(A → B) → (B → A) ≡ ¬(A → B) ∨ (B → A)
≡ ¬(¬A ∨ B) ∨ (¬B ∨ A)
≡ (A ∧ ¬B) ∨ ¬B ∨ A.
¬(A → B)X B → AX
A ¬B A
¬B
Therefore, a DNF of the compound proposition (A → B) → (B → A) is (A ∧
¬B) ∨ ¬B ∨ A.
P Q R P →Q R∨Q P → (R ∨ Q) (P → Q) ↔ (P → (R ∨ Q))
T T T T T T T
T T F T T T T
T F T F T T F
(ii) T F F F F F T
F T T T T T T
F T F T T T T
F F T T T T T
F F F T F T T
Then, a DNF for (P → Q) ↔ (P → R ∨ Q) is (P ∧ Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (P ∧
¬Q ∧ ¬R) ∨ (¬P ∧ Q ∧ R) ∨ (¬P ∧ Q ∧ ¬R) ∨ (¬P ∧ ¬Q ∧ R) ∨ (¬P ∧ ¬Q ∧ ¬R).
5
Algebraically,
(P → Q) ↔ (P → R ∨ Q)
≡ ((P → Q) ∧ (P → R ∨ Q)) ∨ (¬(P → Q) ∧ ¬(P → R ∨ Q))
≡ ((¬P ∨ Q) ∧ (¬P ∨ (R ∨ Q))) ∨ (¬(¬P ∨ Q) ∧ ¬(¬P ∨ (R ∨ Q)))
≡ ((¬P ∨ Q) ∧ (¬P ∨ R ∨ Q)) ∨ ((P ∧ ¬Q) ∧ (P ∧ ¬R ∧ ¬Q))
≡ ((¬P ∨ Q) ∧ ((¬P ∨ Q) ∨ R)) ∨ ((P ∧ ¬Q) ∧ ((P ∧ ¬Q) ∧ ¬R))
≡ ((¬P ∨ Q) ∧ ((¬P ∨ Q) ∨ R)) ∨ ((P ∧ ¬Q) ∧ ((P ∧ ¬Q) ∧ ¬R))
≡ (¬P ∨ Q) ∨ ((P ∧ ¬Q) ∧ ¬R)
≡ ¬P ∨ Q ∨ (P ∧ ¬Q ∧ ¬R).
P → QX ¬(P → Q)X
P → R ∨ QX ¬(P → R ∨ Q)X
P
¬P Q ¬Q
¬P R ∨ QX ¬P R ∨ QX P
¬(R ∨ Q)X
R Q R Q
¬R
¬Q
It follows that a DNF of the compound proposition (P → Q) ↔ (P → R ∨ Q) is
¬P ∨ (¬P ∧ R) ∨ (¬P ∧ Q) ∨ (Q ∧ R) ∨ Q ∨ (P ∧ ¬R ∧ ¬Q).
(iii) Let P denote the proposition ¬A → (B → (A → (B ∧ C))).
A B C B∧C A → (B ∧ C) B → (A → (B ∧ C)) P
T T T T T T T
T T F F F F T
T F T F F T T
T F F F F T T
F T T T T T T
F T F F T T T
F F T F T T T
F F F F T T T
Since P is a tautology, a DNF of it is T.
6
Algebraically,
¬A → (B → (A → (B ∧ C))) ≡ ¬¬A ∨ (B → (A → (B ∧ C)))
≡ A ∨ (¬B ∨ (A → (B ∧ C)))
≡ A ∨ (¬B ∨ (¬A ∨ (B ∧ C)))
≡ A ∨ ¬B ∨ ¬A ∨ (B ∧ C)
≡ T.
A B → (A → (B ∧ C))X
¬B A → (B ∧ C)X
¬A B ∧ CX
B
C
It follows that a DNF of ¬A → (B → (A → (B∧C))) is A∨¬B∨¬A∨(B∧C) ≡ T.
8. From the truth table, the compound proposition F is T only in the following cases.
x y z F
T T T T
T F F T
F F T T
Hence, a DNF for F is (x ∧ y ∧ z) ∨ (x ∧ ¬y ∧ ¬z) ∨ (¬x ∧ ¬y ∧ z).
6. Let h be the proposition “A eats his hat.” Then A says a → h. For a and A’s statement
to have the same truth value, we must have a and h both true, that is, A eats his hat.
7. A says a → T. For a and A’s statement to have the same truth value, a must be true.
8. A says a → F. For a and A’s statement can not have the same truth value; A can not
be an Islander.
11. A says b and B says a → c. This is possible only when A, B, C are all knights.
12. Let b be the proposition “I love Betty,” and j be the proposition “I love Jane.” It is
given that b ∨ j and b → j are both true propositions. From a truth table we see that
j must be true, while b can be either.
13. The speaker makes the statement (b → j) → b. Assuming this is true, b must be true,
while j can be either.
14. Let l be the proposition “I love Linda,” and k be the proposition “I love Kathy.” The
speaker (say A) says l as well as l → k. For a and his two statements to all be logically
equivalent, the propositions a, l, k must all be true. That is, the speaker is a knight.
15. Let g be the proposition “There is gold on the island.” Then A says a ↔ g. This is
equivalent to a if and only if g is true and a is either. Hence there is gold on the island.
16. Now A says ¬(a ↔ g). This is equivalent to a if and only if g is false and a is either.
Hence there is no gold on the island.
17. Let m be the proposition “This is the island of Maya.” Then A said b ∧ m and B said
¬a ∧ m. Since a must be logically equivalent to A’s statement, and at the same time,
b logically equivalent to B’s statement, we find that a, b, m must all be false. Thus it
is not Maya.
18. Now A and B both say ¬a ∧ ¬b ∧ m. As above, we find that a, b, m must all be false.
Thus it is not Maya.
8
19. Now A and B both say ¬(a ∧ b) ∧ m. As above, we find that a, b, m must all be false.
Thus it is not Maya.
3 Proofs
1. The statement is equivalent with the following conditional: ”If r is a rational number
and x is an irrational number, then r + x is an irrational number.”
Let
p : ”r is a rational number and x is an irrational number”
q : ”r + x is an irrational number”.
We need to prove p → q. To construct a proof by contradiction we assume that the
negation, ¬(p → q) is true. Note that
Hence, we assume p is true and ¬q is true. Since p is true, r and r + x are rational
numbers. However, the difference between two rational numbers is always rational.
Hence, (r + x) − r is a rational number (or x is a rational number). This statement
gives a contradiction because p is true (x is irrational).
Therefore, ¬(p → q) is false and hence p → q is true.
√
2. Define the propositional variable p : ” 3 3 is irrational”. To show p is true we construct
a proof by contradiction.
Assume ¬p is true. Then, there exist integers m and n (that have only 1 as a common
√ m
divisor), with n ̸= 0 such that 3 = . This implies that m3 = 3n3 from where it
3
n
follows that 3 is a divisor of m3 . Hence, 3 is a divisor of m: there exists an integer k
such that m = 3k.
We have 27k 3 = 3n3 , or 9k 3 = n3 . Then, 3 is a divisor of n3 and so 3 is a divisor of n.
It follows that 3 is a divisor of m and n which gives a contradiction with the fact that
m and n have only 1 as a common divisor.
Therefore, p is true.
3. Note that
Hence, we need to consider two cases x < y and x ≥ y. Define the propositional
variables
9
p1 : ”x < y”
p2 : ”x ≥ y”
q : max(x, y) + min(x, y) = x + y.
We need to prove that q is true in each of the two cases (note that the two cases cover
all possible situations). Hence, we prove: p1 → q and p2 → q.
Case (i). Assume p1 is true. Then, max(x, y) = y and min(x, y) = x. This implies
that q is true.
Case (ii). Assume p2 is true. Then, max(x, y) = x and min(x, y) = y. This implies
that q is true.
4. We construct a proof by cases.
Define the propositional variables
p1 : ”aa is rational”
p2 : ”aa is irrational”.
Case (i). Assume p1 is true, i.e. aa is rational. Then the statement: ”at least one of
the numbers aa and (aa )a is rational” is true.
√ √2 √ √ 2
Case (ii). Assume that p2 is true, i.e. aa is irrational. Note that ( 2 ) 2 = 2 = 2
is rational. Hence, the statement: ”at least one of the numbers aa and (aa )a is rational”
is true.
5. We construct a proof by contradiction. Assume that the statement is not true, i.e.
each number a1 , a2 , ..., an is smaller than the average. Denote this average by
a1 + . . . an
m= . Hence, we assume that a1 < m and a2 < m, . . . , and an < m.
n
a1 + . . . an
It follows that a1 + . . . an < m + . . . + m = n · m. This implies that < m,
n
which means m < m. This is a contradiction.
Therefore, at least one number must be grater or equal than the average.
6. Let m and n (with m < n) be two distinct rational numbers. To construct a proof by
contradiction, we consider the negation of the given proposition and assume it is true.
This means we assume that between m and n there is a finite number (p) of distinct
rational numbers q1 , . . . , qp .
m + q1 m + q1
Consider the number . Clearly, this is a rational number and m < < q1 .
2 2
Hence, we found another distinct rational that is between m and n (and the procedure
can be repeated). This contradicts the fact that we assumed there were only p distinct
rationals between m and n.
7. Define the propositional variables
p : ”0 < a < 1”
q : ”a > a2 ”.
We need to prove that p → q. Remember that the implication is equivalent to ¬q → ¬p.
To construct an indirect proof, we assume that ¬q is true and prove that ¬p is true.
10
If ¬q is true then a ≤ a2 . This implies that a2 − a ≥ 0, or a(a − 1) ≥ 0. The solution
of the inequality is (−∞, 0] ∪ [1, ∞). Hence, ¬p is true.
We consider two cases corresponding to the sign of the sum x + y. Note that these
cases cover all possible situations. Define the propositional variables
p1 : ”x + y ≥ 0”
p2 : ”x + y < 0”
q : ”|x + y| ≤ |x| + |y|”.
To prove that q is true, we use a proof by cases and show that p1 → q and p2 → q.
Case (i). Assume p1 is true, x + y ≥ 0. Then |x + y| = x + y which together with the
right hand side of (1) implies that q is true.
Case (ii). Assume p2 is true, x + y < 0. Then |x + y| = −(x + y) which together with
the left hand side of (1) implies that q is true.
For the rest of the proof we consider 4 cases, corresponding to the parity of m and n.
Define the propositional variables
p1 : ”m and n are both even”
p2 : ”m is even and n is odd”
p3 : ”m is odd and n is even”
p4 : ”m and n are both odd”.
Note that the 4 cases cover all possible situations. To prove that ¬p leads to a contra-
diction, we prove that each case gives a contradiction.
Case (i). Assume p1 is true. This implies that 2 is a divisor of m and also 2 is a divisor
of n. This is a contradiction with the fact that m and n have no other common divisor
but 1.
Case (ii). Assume p2 is true. Since n is odd, 5n3 is odd. Since m is even, it follows
that m3 and 3mn2 are even and therefore, their sum is even. Hence, the left hand side
of (2) is odd. This is a contradiction since 0 is even.
Case (iii). Assume p3 is true. Since m is odd, m3 is odd. Since n is even, it follows
that 3mn2 , 5n3 are even and therefore their sum is even. These imply that the left
hand side of (2) is odd. This is a contradiction since 0 is even.
Case (iv). Assume p4 is true. Then, each term of the sum appearing at the left hand
side of (2) is odd. It follows that the sum is odd which contradicts the fact that 0 is
even.
Therefore, ¬p is false (and p is true).
12
4 Sets
1. (a) A ∩ B = {1, 3, 4}
(b) A ∪ B = {1, 2, 3, 4, 5, 6, 9}
(c) A − B = {2, 5}
(d) B − A = {6, 9}
(e) A ⊕ B = (A − B) ∪ (B − A) = {2, 5, 6, 9}
(f) (A ⊕ B) ∩ A = {2, 5}
(g) (A ⊕ B) ∪ B = {1, 2, 3, 4, 5, 6, 9}
2. (a) ∅ ⊆ A is true
(b) ∅ ∈ A is true
(c) {∅} ∈ A is true
(d) {∅} ⊆ A is true
(e) {∅, {∅}} ∈ A is true
(f) {{∅, {∅}}} ∈ A is false
(g) {{∅}} ∈ A is false
(h) {{∅}} ⊆ A is true
(i) {{∅}, {∅, {∅}}} ⊆ A is true
(j) {∅, {∅}, {{{∅}}}} ⊆ A is false
(k) {∅, {{∅}}} ∈ P(A) is false
(l) {{{{∅}}}} ⊆ P(A) is false
(A − B) ∩ B = (A ∩ B) ∩ B
= (A ∪ B) ∩ B
= (A ∩ B) ∪ (B ∩ B)
= (A ∩ B) ∪ ∅
= (A ∩ B)
= (A − B).
(b)
(A − B) ∩ C = (A ∩ B) ∩ C
= (A ∪ B) ∩ C
= (A ∩ C) ∪ (B ∩ C)
(c)
(A − C) − (B − C) = (A ∩ C) ∩ (B ∩ C)
= (A ∩ C) ∩ (B ∪ C)
= (A ∩ B ∩ C) ∪ (A ∩ C ∩ C)
= ((A − B) ∩ C) ∩ ∅
= (A − B) − C
(d)
A ∩ (B − A) = A ∩ (B ∩ A)
= A∩B∩A
= ∅
(e)
(B − A) ∪ (C − A) = (B ∩ A) ∪ (C ∩ A)
= (B ∪ C) ∩ A
= (B ∪ C) − A
6. To prove that the two sets are equal, we first prove that A×(B∩C) ⊆ (A×B)∩(A×C).
Let (x, y) ∈ A × (B ∩ C). Then x ∈ A and y ∈ B ∩ C. Since y ∈ B ∩ C, it follows
that y ∈ B and y ∈ C. Therefore, (x, y) ∈ A × B and (x, y) ∈ A × C. These imply
(x, y) ∈ (A × B) ∩ (A × C).
A similar argument can be used to prove (A × B) ∩ (A × C) ⊆ A × (B ∩ C).
14
7. (a) [−3, 6] ∩ (−2, 7] = (−2, 6]
(b) (−5, 7] ∩ Z = {−4, −3, −2, −1, 0, 1, 2, 3, 4, 5, 6, 7}
8. We construct proof by contradiction. Assume that there exist sets A ⊆ N and B ⊆ N
such that A × B = {(0, 0), (1, 1)}. It follows that (0, 0) ∈ A × B and (1, 1) ∈ A × B.
Hence, {0, 1} ⊆ A and {0, 1} ⊆ B.
Take x = 0 and y = 1. We know that x ∈ A and y ∈ B. However, (x, y) = (0, 1) ∈
/
A × B which is a contradiction.
9. The left hand side of the set identity is (A − B) − C = (A ∩ B) ∩ C = A ∩ (B ∩ C).
The right hand side is A − (B − C) = A ∩ (B − C) = A ∩ (B − C) = A ∩ (B ∩ C) =
A ∩ (B ∪ C).
In general, the identity is not true. The following is a counterexample. Let U =
{1, 2, 3, 4}, A = {4}, B = {1, 2, 3, 4} and C = {3, 4}.
Then, A − B = ∅ and so (A − B) − C = ∅. However, B − C = {1, 2} and so
A − (B − C) = {4}.
10. We have |A ∪ B| = |A| + |B| − |A ∩ B| = 6 + 8 − 3 = 11. Hence, |P(A ∪ B)| = 211 .
11. (a) The statement is false since A∩B = ∅ implies that they have no common elements.
E.g. Take A = {1} and B = {2}. Here, A ∩ B = ∅, however, A ̸= B.
(b) The statement is false since A−B = ∅ implies that A∩B = ∅. E.g. Take A = {1}
and B = {1, 2}. Here, A − B = ∅, however, A ̸= B.
(c) The statement is true.
To prove this let x ∈ A. We need to prove that x ∈ B.
We construct a proof by contradiction. Assume that x ∈ A but x ∈ / B. Then
x ∈ A and x ∈ B and hence x ∈ A − B. This is a contradiction with the fact that
A − B = ∅.
Hence, A ⊆ B.
(d) The statement is true. If A ∪ B = ∅, then each set A and B is empty. Hence,
A = B = ∅.
(e) The statement is true. Note that since A⊕B = (A−B)∪(B −A), then A⊕B = ∅
implies (see part (d)) that
i. A − B = ∅. This gives A ⊆ B (see part (c)).
ii. B − A = ∅. This gives B ⊆ A (see part (c)).
Hence, A = B.
(f) The statement is true. Since A × B = ∅, then A = B = ∅.
(g) The statement is false. If A − B = ∅, then (see part (c)) A ⊆ B and therefore
B ⊆ A. The following is a counterexample.
Let U = {1, 2, 3}, A = {1, 2} and B = {2}. Then, A = {3} and therefore,
A − B = A ∩ B = ∅. However, A ̸= B.
15
(h) The statement is false. Note that A − B = A implies A ∩ B = A and hence,
A ⊆ B. The following is a counterexample.
Let A = {1}, B = ∅ and U = {1, 2}. Then A − B = A ∩ B = A ∩ U = A.
However, A is not a subset of B.
(i) The statement is false. A ∪ B = A implies that B ⊂ A. Let A = {1, 2}, B = {1}
and U = {1, 2, 3}. Note that A ∪ B = {1, 2} = A but B ̸= ∅.
(j) The statement is true. Let x ∈ A. We prove that x ∈ B.
Assume, by contradiction that x ∈ A but x ∈ / B. Then x ∈ B and since B ⊆ A
then x ∈ A. This is a contradiction with the fact that x ∈ A.
Hence, A ⊆ B.
12. Note that −x2 + x + 2 = −(x2 − x − 2) = −(x − 2)(x + 1). The solutions of the equation
−x2 + x + 2 = 0 are x = −1 and x = 2. The quadratic function −x2 + x + 2 has a
positive sign between its roots. Therefore, S = [−1, 2]. Then, S ∩ Z = {−1, 0, 1, 2}
and so |S ∩ Z| = 4.
13. (a) A100 = {−100, . . . , −1, 0, 1, 2, 3, . . .} and A96 = {−96, . . . , −1, 0, 1, 2, 3, . . .}
and so A100 − A96 = {−100, −99, −98, −97}.
(b) ∪∞n=1 An = Z. To see this, note that since each set An ⊆ Z, then ∪n=1 An ⊆ Z.
∞
x ∈ A1 ).
We need to prove that A1 ⊆ ∩∞ n=1 An . Let x ∈ A1 . Then, x ∈ An , for each n ≥ 2
(in addition, note that A1 ⊆ A2 ⊆ . . . An ⊆ . . ..). Hence, x ∈ ∩∞
n=1 An .
5 Functions
1. (a) f (n) = n + 5 is not onto. To see this, take m = 1 ∈ N. There is no n ∈ N
such that f (n) = 1. However, the function is one-to-one. If f (n1 ) = f (n2 ), i.e.
n1 + 5 = n2 + 5 then n1 = n2 .
[n]
(b) g(n) = is not one-to-one. Take n1 = 0 and n2 = 1. Then g(n1 ) = [0] = 0 and
[2 ]
1
g(n2 ) = = 0. But g is onto. Let m ∈ N. Then there exists n ∈ N such that
2
g(n) = m. (You may take n = 2m, for example).
16
(c) Let f : N −→ N be given by
{
n + 1, if n is even
f (n) =
n − 1, if n is odd
(a) Let x1 ∈ A and x2 ∈ A such that g(x1 ) = g(x2 ). Then f (g(x1 )) = f (g(x2 )), or
(f ◦ g)(x1 ) = (f ◦ g)(x2 ). Since f ◦ g is one-to-one, it follows that x1 = x2 . Hence,
g is one-to-one.
(b) The statement is not true, in general. The following provides a counterexample.
Let A = {a}, B = {b1 , b2 } and C = {c}. We define the functions as follows.
Let g(a) = b1 , f (b1 ) = f (b2 ) = c. Then (f ◦ g)(a) = c and f are clearly onto.
However, g is not onto since there is no element in the domain that is mapped
into b2 (or b2 ∈
/ Image(g)).
(a) The equality of the two sets can be proved using the definition.
Let y ∈ f (S ∪ T ). Then there exists x ∈ S ∪ T such that f (x) = y. It follows that
x ∈ S or x ∈ T , and f (x) = y. This gives y ∈ f (S) or y ∈ f (T ) which proves
f (S ∪ T ) ⊆ f (S) ∪ f (T ).
The proof of f (S) ∪ f (T ) ⊆ f (S ∪ T ) can be done similarly.
(b) Let y ∈ f (S ∩ T ). Then, there exists x ∈ S ∩ T such that f (x) = y. This implies
that x ∈ S and x ∈ T , and f (x) = y. Hence, y ∈ f (S) ∩ f (T ).
17
We show that f is onto. Let q ∈ Q. From the definition of a rational number, there
m
exist integers m and n, with n ̸= 0 such that q = . This proves that for any q ∈ Q,
n
m
there exist (m, n) ∈ Z × (Z − {0}) such that f (m, n) = .
n
5. For each of the following assignments, determine whether it is a function or not. If it
is a function, is it one-to-one? Is it onto?
7. (a) Let x1 ∈ (0, +∞) and x2 ∈ (0, +∞) be such that f (x1 ) = f (x2 ). Then, 2x21 + 3 =
2x22 +3. This implies x21 = x22 and since they are positive numbers, we can conclude
that x1 = x2 . Hence, f is one-to-one.
(b) For any x ∈ (0, +∞), we have x2 > 0 and so 2x2 + 3 > 3. Hence, Image(f ) =
(3, ∞). Since Image(f ) ̸= (0, ∞), we conclude that f is not onto.
8. The
√ function f ◦ g : R −→ R is given by (f ◦ g)(x) = f (g(x)) = f (x3 − 2) =
3
(x3 − 2) + 2 = x, for any x ∈ R.
√
The
√ function g ◦ f : R −→ R is given by (g ◦ f )(x) = g(f (x)) = g( 3 x + 2) =
( 3 x + 2)3 − 2 = x, for any x ∈ R.
Since f ◦ g = 1R and g ◦ f = 1R we conclude that f −1 = g. This implies that f is a
bijection and henceg is also a bijection.
11. (a) The conclusion follows once we prove that g ◦ f and (g ◦ f )−1 are invertible. We
show this by actually identifying their inverses.
Since (g ◦ f ) ◦ (f −1 ◦ g −1 ) = g ◦ f ◦ f −1 ◦ g −1 = g ◦ 1B ◦ g −1 = g ◦ g −1 = 1C ,
and similarly, (f −1 ◦ g −1 ) ◦ (g ◦ f ) = 1A , it follows that (g ◦ f )−1 = (f −1 ◦ g −1 )
and hence, g ◦ f and f −1 ◦ g −1 are invertible (f −1 and g −1 exist since f and g are
assumed to be bijective).
√
(b) Let f : [0, ∞) −→ R, f (x) = x and g : R −→ [0, ∞), g(x) = x2 .
The functions f and g are not bijective since f is not onto (for y = −1 ∈ R
the equation f (x) = −1 has no solution in [0, ∞)) and g is not one-to-one
(g(−1) = g(1) = 1).
√ √
However, (g ◦ f )(x) = g(f (x)) = g( x) = ( x)2 = x is bijective. (Note that in
this case, (f ◦ g)(x) = |x|, for x ∈ R.)
6 Relations
1. R1 is reflexive since (x, x) ∈ R1 , for any x ∈ A
R1 is symmetric since (x, y) ∈ R1 implies (y, x) ∈ R1 , for any x ∈ A and y ∈ A (or
equivalently, there is no pair (x, y) ∈ A × A such that (x, y) ∈ R1 and (y, x) ∈
/ R1 )
(details are omitted)
R1 is transitive since (x, y) ∈ R1 and (y, z) ∈ R1 implies (x, z) ∈ R1 (details are
omitted)
R1 is not antisymmetric since (1, 2) ∈ R1 and (2, 2) ∈ R1 but 1 ̸= 2
R2 is reflexive since (x, x) ∈ R2 , for any x ∈ A
19
R2 is symmetric since (x, y) ∈ R2 implies (y, x) ∈ R2 , for any x ∈ A and y ∈ A
(details are omitted)
R2 is transitive since (x, y) ∈ R2 and (y, z) ∈ R2 implies (x, z) ∈ R2
R2 is antisymmetric since (x, y) ∈ R2 and (y, x) ∈ R2 implies x = y
R3 is not reflexive since (1, 1) ∈
/ R3 , and 1 ∈ A
R3 is not symmetric since (1, 4) ∈ R3 but (4, 1) ∈ R3
R3 is not transitive since (1, 3) ∈ R3 and (3, 1) ∈ R3 but (1, 1) ∈
/ R3
R3 is not antisymmetric since (1, 3) ∈ R3 and (3, 1) ∈ R3 but 1 ̸= 3
20
(e) The statement is false. The number of binary relation from A to B that contain
the subset {(a, y); y ∈ B} is equal to the number of binary relations that can be
defined from the set {b, c} to B, which is 22·5 ̸= 4096.
5. R1 is not a function since (1, a) ∈ R1 and (1, b) ∈ R1 (the element 1 would be mapped
into two different values).
R1 is a function. It is not one-to-one since (0, c) ∈ R2 and (1, c) ∈ R2 (two different
inputs have the same output). It is not onto since there is no x ∈ A such that
(x, b) ∈ R2 (or (x, e) ∈ R2 )
R3 is a function. It is not one-to-one since e.g. (0, c) ∈ R3 and (1, c) ∈ R3 . It is not
onto since there is no x ∈ A such that (x, b) ∈ R3 (or (x, e) ∈ R3 )
R4 is a function. It is not one-to-one since (1, a) ∈ R4 and (3, a) ∈ R4 . It is not onto
since there is no x ∈ A such that (x, e) ∈ R4 .
R5 is not a function since it does not contain an element of the form (1, y) (the element
1 is not mapped into an element on B).
R6 is a function. It is one-to-one and onto (and therefore bijective).
7. (a) R1 is reflexive (A ⊆ A, for any A ∈ P(U )), not symmetric (A ⊆ B does not
imply B ⊆ A), transitive (A ⊆ B and B ⊆ C implies A ⊆ C) and antisymmetric
(A ⊆ B and B ⊆ A implies A = B)
(b) R2 is not reflexive (A ∩ A = A ̸= ∅ not true for any A ∈ P(U )), symmetric
(A ∩ B = ∅ implies B ∩ A = ∅), not transitive (e.g. if A = {1, 2}, B = {4} and
21
C = {2, 3}, then A ∩ B = ∅, B ∩ C = ∅ but A ∩ C = {2}) and not antisymmetric
(e.g. A ={1}, B = {2} and A ∩ B = B ∩ A = ∅)
(c) First show that A − B = ∅ if and only if A ⊆ B.
To prove the equivalence, we first assume A − B = ∅ is true and show that A ⊆ B
holds (see also Exercise 11, part (c) in Section 4).
Let x ∈ A. Then, since A − B = A ∩ B = ∅, it follows that x ∈ / B and hence
x ∈ B. This proves A ⊆ B.
Now we assume that A ⊆ B holds and show A − B = ∅.
Case 1. If A = ∅, then A − B = ∅ is true.
Case 2. Assume A ̸= ∅. Let x ∈ A. Then, since A ⊆ B, we have x ∈ B and so
x∈/ B. This implies A − B = A ∩ B = ∅.
Therefore, A R3 B ⇔ A ⊆ B.
Therefore, R3 is equivalent to R1 and so it has the same properties.
(d) Using Exercise 11, part (e) in Section 4, we conclude that A ⊕ B = ∅ if and only
if A = B.
Therefore, R4 becomes A R4 B ⇔ A = B.
R4 is reflexive (A = A for any A ∈ P(U )), symmetric, transitive (A = B and
B = C implies A = C) and antisymmetric (if A = B and B = A, then A = B)
8. (a) We first show that R is symmetric.
Let (a, b) ∈ R. Since R is reflexive, (b, b) ∈ R. Now, since R is cyclic, we apply
the definition (with c = b) and obtain that (b, a) ∈ R which proves that R is
symmetric.
We now prove that R is transitive.
Let (a, b) ∈ R and (b, c) ∈ R. Since R is cyclic we obtain (c, a) ∈ R which
together with the fact that R is symmetric (proved before) proves that (a, c) ∈ R.
(b) Let (a, b) ∈ R and (b, c) ∈ R. Then, since R is transitive, (a, c) ∈ R. This
together with the fact that R is symmetric implies that (c, a) ∈ R which proves
that R is cyclic.
9. (a) Let R = {(2, 2), (2, 3), (3, 2), (3, 3)}. R is symmetric and transitive but not
reflexive since (1, 1) ∈
/ R.
(b) The proof in not correct since the following assumption is used at the beginning
of the argument: for any a ∈ A, there exists b ∈ A such that (a, b) ∈ R. This
statement is not true in general (see example given at the previous part: for
a = 1 ∈ A there is no element b ∈ A such that (1, b) ∈ R).
7 Equivalence Relations
x
1. (a) The relation R is reflexive (for any x ∈ A, xRx, since = 30 ), symmetric (for
x
x y
any x, y ∈ A, xRy implies yRx, since = 3k implies = 3−k for some k ∈ Z)
y x
22
x
and transitive (for any x, y, z ∈ A, xRy and yRz imply xRz, since = 3k and
y
y l x k+l
= 3 imply = 3 for some k ∈ Z and l ∈ Z).
z z
{ } { } { } { }
1 1 1 1 9 2
(b) The partition is {1}, , , 3 , , , , {2}, , {5}.
3 27 4 36 4 9
2. (a) The relation R is reflexive (for any f ∈ A, f Rf , since f (x)−f (x) = 0), symmetric
(for any f, g ∈ A, f Rg implies gRf , since f (x)−g(x) = c implies g(x)−f (x) = −c
for some constant c ∈ Z) and transitive (for any f, g, h ∈ A, f Rg and gRh imply
f Rh, since f (x) − g(x) = c and g(x) − h(x) = d imply f (x) − h(x) = c + d for
some c ∈ Z and d ∈ Z).
(b) [f (x)]R = {g : Z → R, g is a function such that f (x)−g(x) = c, for some constant c ∈
Z} = {g : Z → R, g is a function such that g(x) = 2x + c, for some constant c ∈
Z}. Hence, f1 ,f5 ∈ [f (x)]R
3. (a) The fact that R is an equivalence relation on W follows from properties of real
numbers. Note that two pairs are included in R if and only if their components
have same sign, respectively, i.e. (x, y)R(a, b) if and only if (x and a have same
sign and y and b have same sign)
(b) There are four equivalence classes on W (corresponding to the four quadrants in
the plane):
[(1, 1)]R , [(1, −1)]R , [(−1, 1)]R , [(−1, −1)]R .
23
1
- symmetric (if b = a · c then a = b, for some c > 0)
c
- transitive (if b = a · c and d = b · e, for some c > 0 and e > 0, then d = a · (ce),
with ce > 0)
(b) The partition consists of [1]R = (0, ∞), [−1]R = (−∞, 0) and [0]R = {0}.
7. (a) Note that κ(a) ∈ N∗ , for any a ∈ N∗ . R is an equivalence relation since it is:
- reflexive (κ(a) = κ(a))
- symmetric (if κ(a) = κ(b) then κ(b) = κ(a))
- transitive (if κ(a) = κ(b) and κ(b) = κ(c), then κ(a) = κ(c))
(b) [2]R = {n ∈ N∗ , κ(2) = κ(n)}. Since κ(2) = 2, [2]R = {n ∈ N∗ , n is even}.
8. (a) omitted
(b) The partition is the following sequence of sets.
{011, 111} , {010, 110} , {001, 101} , {000, 100}
9. (a) omitted
(b) [(0, 2)]R = {(x, y) ∈ R2 , x2 + y 2 = 4}. The sets consists of the points located on
the circle of radius 2 and origin (0, 0).
Other elements in the equivalence class of (0, 2) are e.g. (2, 0), (−2, 0), (0, −2).
(a) omitted
(b) [1]R = (0, ∞).
5. Note that there are 9 digits that can be placed on the first position of the number
(corresponding to the cardinality of {1, . . . 9}), 9 digits that can be placed on the
second position, after the first position was occupied (that is 10 − 1), etc. The number
of integers with the given property is 9 · 9 · 8 · 7 · 6 = 27216.
(a) The number of integers between 7 and 2125 (inclusive) that are divisible by 3
or 11 is |A ∪ B|. To compute it we need |A| = ⌊ 2125 3
⌋ − ⌊ 36 ⌋ = 708 − 2 = 706,
|B| = ⌊ 2125
11
6
⌋ − ⌊ 11 ⌋ = 193 − 0 = 193, and |A ∩ B| = ⌊ 2125
33
6
⌋ − ⌊ 33 ⌋ = 64 − 0 = 64.
Using the Principle of Inclusion-Exclusion, |A ∪ B| = |A| + |B| − |A ∩ B| =
706 + 193 − 64 = 835.
(b) Let U = {n ∈ N : 7 ≤ n ≤ 2125} be our universal set. This question is asking for
the number of integers between 7 and 2125 (inclusive) that are not divisible by 11
(since 11 is a prime, an integer n is co-prime with 11 — that is, has no common
divisors with 11 except 1 — precisely when n is not divisible by 11). This number
is |U − B| = |U | − |B| = (2125 − 6) − 193 = 1926.
(c) We need to compute |A − B|. We write A = (A − B) ∪ (A ∩ B), and since
(A − B) ∩ (A ∩ B) = ∅, using the Sum Rule we obtain |A| = |A − B| + |A ∩ B|.
From here, we conclude that |A − B| = |A| − |A ∩ B| = 706 − 64 = 642.
7. Let A-be the set of length 13 binary strings that begin with 0110 and B-be the set of
length 13 binary strings that end with 1000. We need |A ∪ B|. Using the principle of
inclusion-exclusion, |A ∪ B| = |A| + |B| + |A ∩ B|.
We have |A| = 29 , |B| = 29 and |A ∩ B| = 25 and so |A ∪ B| = 29 + 29 − 25 = 992.
9. For every 0 ≤ i ≤ n we define Ai = {the set of binary strings of length i}. Note that
the binary string of length 0 is the empty string so A0 = {empty string} and |A0 | = 1.
Since the sets Ai are mutually disjoint, the number of binary strings of length at most
26
n is
n
∑
2 3 n
|A0 ∪ . . . An | = |A0 | + |A1 | + . . . + |An | = 1 + 2 + 2 + 2 . . . + 2 = 2i
i=0
n+1
2 −1
= = 2n+1 − 1.
2−1
10. In this question it is assumed that the plates can have either 4, 5 or 6 characters.
Let
A be the set consisting of all 4 characters license plates that are formed using 2 letters
followed by 2 digits
B be the set consisting of all 5 characters license plates that are formed using 2 letters
followed by 3 digits
C be the set consisting of all 5 characters license plates that are formed using 3 letters
followed by 2 digits
D be the set consisting of all 6 characters license plates that are formed using 3 letters
followed by 3 digits.
We need to find A ∪ B ∪ C ∪ D. Using the product rule, |A| = 262 · 102 = 67600,
|B| = 262 · 103 = 676000, |C| = 263 · 102 = 1757600 and |D| = 263 · 103 = 17576000.
Since the sets are mutually disjoint, it follows that A∪B∪C ∪D = |A|+|B|+|C|+|D| =
20077200.
12. (a) Since the bride should stand next to the groom (i.e. either to the left or to the
right), the number of ways the group of 6 people can be arranged equals to twice
the number of ways in which we can arrange a group of 5 people. Hence, there
are 2 · 5! = 240 ways in which a group with the given property can be arranged.
(b) There are 6! ways in which a group of 6 can be arranged and so, using part (a),
there are 6! − 2 · 5! = 480 ways to arrange the group so that the bride does not
stand next to the groom.
(c) The arranging procedure can be divided into the following steps.
27
T1 : arrange the 4 people in the group that are neither the bride neither the groom
nor the bride
T2 : arrange the groom in one of the 5 gaps between the guests and the bride to
the left of groom
There are 4! ways to perform T1 .
According to the position of the groom, there are different ways in which the
bride can be placed. Using the summation rule, the number of ways T2 can be
performed is 1 + 2 + 3 + 4 + 5. The first term corresponds to the situation when
the groom is placed on the fifth position and the bride is placed on the sixth, the
second term corresponds to the situation when the groom is placed on the fourth
position, and hence the bride can be placed either on the fifth or on the sixth
position, etc.
Using the product rule, there are 15 · 24 = 360 ways to arrange people in a picture
such that the bride is situated to left of the groom.
3. There are 7 · 12 = 84 possible pairs (day of the week, month). Hence by PP, we need
at least 85 people to guarantee that at least two among them were born on the same
day of the week and in the same month.
4. Assuming that every package contains 20 distinct cards, we need at least 28 packages,
since 27 · 20 < 551 ≤ 28 · 20.
5. There are 14 possible remainders (0, 1, 2, . . . , 13) when dividing by 14. Hence any set
of 15 integers will contain two that give the same remainder when divided by 14. The
difference of these numbers will be then divisible by 14.
9 + 36 + 84 = 130. The sum of the elements that such a set can have is in the set
{0, 1, 2, . . . , 24}. Since 130 > 24 · 5, any there exist 6 subsets of cardinality at most 3
that have the same sum of elements.
9. Draw a grid that divides the rectangle into squares of side length 10cm. There will be
200 such squares. Any three points within (or on the perimeter) of one of these squares
define a triangle of area at most half the area of the square, that is, at most 50cm2 .
Since there are 500 points and 200 squares, by PP, some square indeed contains at
least 3 points (otherwise there would be at most 400 points).
10. Consider the integers 1, 11, 111, ..., up to the integer with 7778 repeated ones, and
their remainders when divided by 7777. Since there are only 7777 possible remainders
when divided by 7777, two of these 7778 integers (say x with a ones and y with b ones,
for x < y) have the same remainder. Hence their difference y − x is divisible by 7777.
But y − x has b − a ones followed by a zeros. Let z be the number with b − a repeated
ones. Then y − x = z · 10a . So 7777 divides z · 10a , but since 7777and 10a have no
common divisors, 7777 must in fact divide z. Hence z is the integer with repeated ones
that is divisible by 7777.
11. The possible numbers of mistakes are 0, 1, 2, . . . , 12 (boxes). Placing the 30 objects
(students) into 12 boxes, by PP, we’ll end up with at least one box with at least 3
objects.
x +x y +y z +z
12. For each pair i, j ∈ {1, 2, . . . , 9}, i < j, let Mij = ( i 2 j , i 2 j , i 2 j ) denote the
midpoint of the line segment joining points Pi = (xi , yi , zi ) and Pj = (xj , yj , zj ). Mij
will have integer coordinates if and only if xi and xj , yi and j , and zi and zj have equal
parity. There are 8 possible triples (q1 , q2 , q3 ) where each qi is either “odd” or “even”;
these are our boxes. Placing the 9 points into these 8 boxes we’ll end up with a box
with at least two points, say Pi and Pj . Then their midpoint Mij will have integer
coordinates as explained above.
2. 40
( )
17
100
( )
3. The coefficient of xk is 0 if k is odd, and 50− k2
if k is even.
4. Essentially, we have 2 symbols,(9)five 011s (which jointly contain ten 1s) and four more
1s. These can be arranged in 5 ways.
(200) 99 101
5. (a) −
(24)1012 2 3
(b) ( 2) 2
(c) 84 24 and 0, respectively.
29
6. (a) (94 ) ( ) ( ) ( ) ( )
()
7. (a) 2(44)
(b) ( 44
14
(c) 63 44
)( )
9
(12)(13)
8. (a) 3 2 (since S contains 12 even and 13 odd elements)
(b) 9i=1 10i 9i
∑ ( )( )
9. (a) (13
( )
4)
(b) 12
∑4 ( )( 8 )
(c) 3i=0 5i 5−i
(d) 10
( )
4
(38) ∑2 (10)( 28 )
10. (a) 6 − i=0 i 6−i
(b) ( 83 )(30
( )( )
3 )
(c) (10 20
4 )( 2)( )
(d) 28 5 15
(28)(4)(14)
2 2 2
− 2 1 1
12. omitted
13. 52
( )(47)(42)(37)(32)(27)
5 5 5 5 5 5
11 Mathematical Induction
1. For all n ∈ Z+ , define the proposition P (n) as
n(n + 1)(2n + 1)
12 + 22 + . . . + n2 = . (∗)
6
1(1+1)(2·1+1)
BI: to prove P (1). The LHS of (*) is 1 and the RHS is 6
= 1 Hence P (1)
holds.
IS: We must show P (k) → P (k + 1) for all k ∈ Z+ . Take any k ∈ Z+ and assume P (k)
holds; that is, 12 + 22 + . . . + k 2 = k(k+1)(2k+1)
6
. Now consider P (k + 1). The LHS is
(using IH)
k(k + 1)(2k + 1)
12 + 22 + . . . + k 2 + (k + 1)2 = + (k + 1)2
6
1
= (k + 1)(2k 2 + k + 6k + 6)
6
1
= (k + 1)(k + 2)(2(k + 1) + 1),
6
30
which is the RHS of P (k + 1). Thus P (k) → P (k + 1) holds.
By Mathematical induction, since P (1) holds and P (k) → P (k+1) holds for all k ∈ Z+ ,
we conclude that P (n) holds for all n ∈ Z+ .
2. omitted
for all m ∈ Z+ .
BI: to prove P (1). Now (2 · 1 − 1)2 − 1 = 0, which is divisible by 8. Hence P (1) holds.
IS: We must show P (k) → P (k + 1) for all k ∈ Z+ . Take any k ∈ Z+ and assume P (k)
holds; that is, (2k − 1)2 − 1 is divisible by 8. Consider P (k + 1).
for all m ∈ Z+ .
BI: to prove P (1). Now 41+1 + 52·1−1 = 42 + 51 = 21, which is divisible by 21. Hence
P (1) holds.
IS: We must show P (k) → P (k + 1) for all k ∈ Z+ . Take any k ∈ Z+ and assume P (k)
holds; that is, 4k+1 + 52k−1 is divisible by 21. Consider P (k + 1).
Since 4k+1 + 52k−1 is divisible by 21 by IH, and 21 · 52k−1 is clearly divisible by 21,
4(k+1)+1 + 52(k+1)−1 is divisible by 21. Thus P (k) → P (k + 1) holds.
By Mathematical induction, since P (1) holds and P (k) → P (k+1) holds for all k ∈ Z+ ,
we conclude that P (n) holds for all n ∈ Z+ .
P (n) : 2n > n3
31
for all n ∈ Z, n ≥ 10.
BI: to prove P (10). Now 210 = 1024 > 1000 = 103 . Hence P (10) holds.
IS: We must show P (k) → P (k + 1) for all k ∈ Z, k ≥ 10. Take any k ∈ Z, k ≥ 10 and
assume P (k) holds; that is, 2k > k 3 . Consider P (k + 1).
k3
( 3
k3 k3
)
k+1 k 3 3 3 3 3 k
2 = 2·2 >2·k =k +k =k +3· =k + + +
3 3 3 3
( 3 2
) ( 2 )
k k k k k
> k3 + + + > k 3 + 9 + 9 + 1 = (k + 1)3
3 3 3 3 3
7. We shall prove
P (n) : n2 ≥ 2n + 3
for all n ∈ Z, n ≥ 3.
32
BI: to prove P (3). Now 32 = 9 ≥ 2 · 3 + 3. Hence P (3) holds.
IS: We must show P (k) → P (k + 1) for all k ∈ Z, k ≥ 3. Take any k ∈ Z, k ≥ 3 and
assume P (k) holds; that is, k 2 ≥ 2k + 3. Consider P (k + 1). Using the IH we obtain
(k + 1)2 = k 2 + 2k + 1
≥ (2k + 3) + (2k + 1) = 4k + 4 = 2(k + 1) + 3 + (2k − 1) > 2(k + 1) + 3
8. We shall prove
P (n) : 7n − 2n is divisible by 5
for all n ∈ N.
BI: to prove P (0). Now 70 − 20 = 0, which is divisible by 5. Hence P (0) holds.
IS: We must show P (k) → P (k + 1) for all k ∈ N. Take any k ∈ N and assume P (k)
holds; that is, 7k − 2k is divisible by 5. Consider P (k + 1). Using the IH we obtain
13. omitted
14. omitted
34
12 Graphs
1. (a) Does not exist, as every graph has an even number of vertices of odd degree.
(b) Does not exist. Such a graph would have a vertex of degree 5, but there are only
4 other vertices it can be adjacent to.
(c) Exists: this is a star on 5 vertices.
(d) Does not exist: if u and v are 2 vertices of degree 3, then each must be adjacent
to the remaining two vertices. Hence there can not be a vertex of degree 1.
(e) Exists.
(f) Does not exist: if u and v are 2 vertices of degree 6, then each must be adjacent to
the remaining five vertices. Hence there can not be a vertex of degree 1.
(g) Exists: C3 .
(h) Does not exist: the maximum degree a simple graph with 6 vertices can have is 5.
2. (i) n2 = n(n−1)
( )
2
. The complete graph Kn achieves this upper bound.
(ii) 12 (2 + 2 + 3 + 3 + 4) = 7.
(iii) |E| = 21 v∈V deg(v) ≥ 12 v∈V 3 = 32 n.
∑ ∑
3. Let G be a simple graph with n ≥ 2 vertices. The possible degrees for a vertex in G
are 0, 1, 2, . . . , n − 1. However, if there is a vertex of degree n − 1, there can not be a
vertex of degree 0. Hence there are at most n − 1 possible degrees. By the Pigeonhole
Principle, at least two of the n vertices must hence have the same degree.
6. (1) Let G = (V, E) be a graph with n vertices that is regular of odd degree k. We have
|E| = 12 v∈V deg(v) = 12 v∈V k = 21 nk. Since k is odd, and |E| is an integer, n must
∑ ∑
be even.
(2) Since n must be even from (1), n = 2m for an integer m. Then |E| = mk as seen
above, and E is a multiple of k.
35
7. omitted
8. omitted
4 5 5
1 4 9 1
6 6
9
8
3 8 7
7
2 3 2
10. The first and third graph are isomorphic (with the indicated isomorphism), and they
are bipartite graphs. The second graph is not bipartite (it contains C3 as a subgraph)
and hence not isomorphic to the other two.
1
1 3 5
6
2
5 3
4 2 4 6
11. The first and third graph are isomorphic, and they are bipartite graphs. The second
graph is not bipartite (it contains C5 as a subgraph) and hence not isomorphic to the
other two.
1 2 1 7
5
6 6 5
8 2
8
7
4 3 4 3
12. Bipartite. Not bipartite (it contains C5 as a subgraph). Bipartite. Not bipartite (it
contains C3 as a subgraph).
14. Consider the graph G whose vertices are the five quarters and he edges are the fourteen
bridges.
(a) Here we are looking for an Euler tour in G. Since G has vertices of odd degree
(A and B), it has no Euler tour.
(b) Yes, an open Euler tour exists since G has exactly two vertices of odd degree, A
and B. An open Euler tour must have these two vertices and endpoints. One
possible open Euler tour: b2 b1 b5 b6 b7 b8 b12 b4 b3 b14 b13 b10 b9 b11 .
15. omitted
16. omitted
17. (a) Let n and e be the number of vertices and edges, respectively, in a full 5-ary tree T
with 101 leaves. Then n = 5i + 1 = i + 101, where i is the number of internal vertices.
Solving for i we obtain i = 25. Now e = n − 1 = (i + 101) − 1 = 125.
(b) Since in a full m-ary tree of height h the number of leaves is at most mh , we have
51 ≤ m3 . That gives m ≥ 4. On the other hand, n = ℓ + i = mi + 1 (where n is
the number of vertices, ℓ the number of leaves, an di the number of internal vertices).
From here we obtain ℓ − 1 = (m − 1)i. In our case, 50 = (m − 1)i or 2 · 52 = (m − 1)i.
Since m − 1 is an integer, m − 1 ∈ {1, 2, 5, 10, 25, 50}. Since m ≥ 4 from above, we
have m ∈ {6, 11, 26, 51}. It can be verified that m = 51 and m = 26 can not give a
tree of height 3, while trees with m = 6 and m = 11 can be easily constructed.
37