#### You've reached the end of your free preview.

Want to read all 5 pages?

**Unformatted text preview: **MATH232 Project 5 Solutions
MATH232 Project 5 Solutions
Directions: Below we present a solution to each part of the project. Solutions/proofs are
clearly marked.
Problem 1 Let r, s ∈ Z+ . Prove that Kr,s is a tree if and only if Kr,s is isomorphic to
K1,n for some n. (12 pts)
Hint: In the forward direction, use contradiction. In the reverse direction you just need to
check the definition of a tree.
Proof: We need to prove two directions. First we need to prove that for any n ∈ Z+ ,
K1,n is a tree. In other words, we need to show that K1,n is connected and has no cycles.
The smallest possible cycle has 3 vertices, and any vertex in a cycle must have at least degree
2. But in K1,n only one vertex can possible have degree greater than 1, so it can’t have a
cycle. Certainly it is connected, so K1,n is a tree.
Now we need to prove the forward direction: if Kr,s is a tree then Kr,s ∼
= K1,n for some n.
We prove will prove that if Kr,s is a tree, then (at least) one of r, s must be 1. We proceed
by contrapositive - we assume neither of r, s is 1, and show Kr,s is not a tree. Then, r, s ≥ 2.
Let V, W be the bipartition of the vertex set of Kr,s (so the vertex set of Kr,s is V ∪ W ).
Since r, s ≥ 2, there are distinct vertices v1 , v2 ∈ V and w1 , w2 ∈ W , and there are edges
between the v’s and w’s. So,
v1 → w1 → v2 → w2 → v1
is a cycle in Kr,s . Thus Kr,s has cycles, meaning it is not a tree. So, if Kr,s is a tree, then
one of r, s = 1, so either Kr,s ∼
= K1,s or Kr,s ∼
= Kr,1 . Problem 2 Let F = (V, E) be a forest with k connected components. If |V | = n, prove
that |E| = n − k. (12 pts)
Hint: There is a nice proof by induction on k.
Solution: We present two proofs. The first is by induction, the second is not.
Proof 1: The base case, when k = 1, then F is connected, so it is a tree, and we have
already shown |E| = n − 1. Now let k > 1, and suppose this holds for a graph with less than
k components, and we will show it holds for a graph with k components. Let F = (V, E)
have k components, each of which is a tree. Let n = |V |, q = |E|. Pick two vertices, v, w
in different components of F . Let F 0 be the graph obtained by adding the edge {v, w} to
F . Then F 0 has one more edge than F , and one less component. Certainly this new edge
does not form a cycle, since that would require a path between the two components of F .
So, F 0 is a forest with n vertices, q + 1 edges, and k − 1 components. So, by the Inductive
Hypothesis,
q + 1 = n − (k − 1) = n − k + 1
and so subtracting 1 from both sides gives q = n − k, as we wanted. The general result
follows by induction.
1 MATH232 Project 5 Solutions Proof 2: Let F = (V, E) be a forest with k components, each of which is a tree. Let
n = |V |, q = |E|. Let T1 , . . . , Tk be the k components of F , each a tree. For each tree, write
k
k
P
P
Ti = (Vi , Ei ), and let ni = |Vi | and qi = |Ei |. Then n =
ni and q =
qi . Since each Ti is
i=1 a tree, we know that qi = ni − 1. So,
q= = k
X i=1 qi i=1
k
X (ni − 1) i=1 = k
X !
ni i=1 − k
X !
1 = i=1 k
X !
ni −k i=1 =n−k Hence q = n − k, as desired. Problem 3 For the purposes of this problem, we will need to prove a Lemma about certain
sums integers. Recall that an integer n is even if there is an integer k such that n = 2k, and
n is odd if there is an integer k such that n = 2k + 1. Also recall the fact (usually proved in
231) that the sum of an odd number and even number is odd.
(a) Let r ∈ N, and suppose that a1 , . . . , a2r+1 are odd integers. Prove that the sum
a1 + · · · + a2r+1 is also odd. (6 pts)
Hint: There are several ways to prove this. One nice way is by induction, although
there is also an elementary direct proof.
Solution: We present both proofs we alluded to above. The first by induction, the
second direct.
Proof 1: The base case, when r = 0, there is only one odd number, a1 , and so
the “sum” is just one odd number, which is certainly odd. Suppose this holds for some
r ∈ N, we aim to show it holds for r + 1. I.e., we let a1 , . . . , a2r+1 , a2r+2 , a2r+3 be odd
numbers. The inductive assumption is that a1 + · · · + a2r+1 is odd. We may write
a1 + · · · + a2r+3 = (a1 + · · · + a2r+1 ) + (a2r+2 + a2r+3 )
and since a2r+2 , a2r+3 are odd, a2r+2 + a2r+3 is even. So, the above is the sum of an
odd number and an even number, which is necessarily odd. The result then follows by
induction.
2 MATH232 Project 5 Solutions Proof 2: We prove this directly. Let a1 , . . . , a2r+1 be odd numbers. So for each i,
there is an integer bi such that ai = 2bi + 1. Then,
!
!
!
2r+1
2r+1
2r+1
2r+1
2r+1
X
X
X
X
X
ai =
(2bi + 1) =
2bi +
1 =2
bi + (2r + 1)
i=1 i=1 i=1 i=1 i=1 2r+1
P
and certainly 2
bi is an even number, and (2r + 1) is odd, so this sum is necesi=1 sarily odd. (b) Let T = (V, E) be a tree, and suppose that |E| is even. Prove that T has at least one
vertex of even degree. (6 pts)
Hint: How many vertices are there?
Proof: Let n = |V |. Then n = |E| + 1, and since |E| is even, n is odd. So there is
a k ∈ N such that n = 2k + 1. Let V = {v1 , . . . , v2k+1 }, and suppose for the sake of
contradiction that deg(vi ) is odd for all i. Recall that
2k+1
X deg(vi ) = 2|E| i=1 and certainly 2|E| is even. However, since all the vertices have odd degree, the lefthand side of that equation is the sum of an odd amount of odd numbers. Such a sum
must be odd, by the part (a). But a number can’t be both even and odd, so this is
a contradiction. Hence our additional assumption was wrong, and T has at least one
vertex of odd degree.
3 MATH232 Project 5 Solutions Problem 4 We will prove that all trees are bipartite. Let T = (V, E) be a tree with |V | ≥ 2.
Recall that for any graph, the distance between vertices v, w ∈ V , denoted d(v, w), is the
length of the shortest path from v to w. For trees this is particularly nice, since there is a
unique path between any two vertices. Fix a vertex x ∈ V , and define the sets
Ve = {v ∈ V | d(v, x) is even} and Vo = {v ∈ V | d(v, x) is odd} (a) Prove that {Ve , Vo } is a partition of V . (6 pts)
Proof: We need to show that Ve , V0 6= ∅, V = Ve ∪ Vo , and Ve ∩ Vo = ∅.
First, notice that d(x, x) = 0, so x ∈ Ve , meaning it is nonempty. Furthermore, since
|V | ≥ 2, and T is connected, x cannot be isolated. So there is some vertex, y adjacent
to x. Then d(x, y) = 1 so y ∈ Vo , and it is also nonempty. So Ve , Vo 6= ∅.
We now show that their union is all of V . For any v ∈ V , since T is a tree, there is a
unique path x to v. Its length is the distance d(x, v). If it is even, then v ∈ Ve ; if it is
odd, then v ∈ Vo . In either case, v ∈ Ve ∪ Vo , so V = Ve ∪ Vo .
We now show their intersection is empty. Now suppose for the sake of contradiction
that there is some v ∈ Ve ∩ Vo . Since v ∈ Ve , d(x, v) is even; and since v ∈ Vo , d(x, v)
is odd - this is of course a contradiction as an integer can’t be both even and odd. So
our assumption was wrong and Ve ∩ Vo = ∅. Thus {Ve , Vo } is a partition of V .
(b) Prove that if v, w ∈ Ve then {v, w} is not an edge of T . (4 pts)
Proof: Let v, w ∈ Ve . Suppose for the sake of contradiction that {v, w} is an edge of T .
Since v ∈ Ve , the distance d(x, v) is even. So there is a path from x to v of even length.
This path either does or does not pass through w. We will reach a contradiction in
each of these cases.
If the path does not pass through w, then we can add the {v, w} edge and get a path
from x to w of odd length. But since T is a tree, this is the unique path x to w, so in
particular the distance d(x, w) is odd. But w ∈ Ve , so d(x, w) is even. This is of course
a contradiction.
Suppose the path does pass through w. If it doesn’t use the {v, w} edge, then it
contains a different path v to w, and adding the {v, w} edge makes a cycle. But T is
a tree so this is a contradiction. Therefore, this path does use the {v, w} edge. But
that means it contains a path x to w that is one edge shorter - and therefore of odd
length. This is then the unique path x to w, so d(x, w) is odd, again a contradiction
since w ∈ Ve .
In both cases we’ve reached a contradiction, so our additional assumption was wrong
and {v, w} is not an edge of T .
4 MATH232 Project 5 Solutions (c) Prove that if v, w ∈ Vo , then {v, w} is not an edge of T . (4 pts)
Proof: Basically the same proof as above will work. Let v, w ∈ Vo . Suppose for
the sake of contradiction that {v, w} is an edge of T . Since v ∈ Vo , the distance d(x, v)
is odd. So there is a path from x to v of odd length. This path either does or does not
pass through w. We will reach a contradiction in each of these cases.
If the path does not pass through w, then we can add the {v, w} edge and get a path
from x to w of even length. But since T is a tree, this is the unique path x to w, so in
particular the distance d(x, w) is even. But w ∈ Vo , so d(x, w) is odd. This is of course
a contradiction.
Suppose the path does pass through w. If it doesn’t use the {v, w} edge, then it
contains a different path v to w, and adding the {v, w} edge makes a cycle. But T is
a tree so this is a contradiction. Therefore, this path does use the {v, w} edge. But
that means it contains a path x to w that is one edge shorter - and therefore of even
length. This is then the unique path x to w, so d(x, w) is even, again a contradiction
since w ∈ Vo .
In both cases we’ve reached a contradiction, so our additional assumption was wrong
and {v, w} is not an edge of T .
Of course, this is exactly the definition of bipartite. So in checking these, you will have
proven that T is bipartite! In fact, a modified (and slightly longer) version of this proof
shows that a graph is bipartite if and only if it has no odd cycles. 5 ...

View
Full Document

- Summer '19
- Math, Graph Theory, Elementary arithmetic, Even and odd functions, Parity, VE, Evenness of zero