0% found this document useful (0 votes)
639 views15 pages

5.E Graph Theory (Exercises)

The document contains sample questions and answers about graph theory concepts like planar graphs, Euler's formula, and non-planar graphs. It defines key terms, provides examples of planar and non-planar graphs, and proves important theorems like Euler's formula and that any planar graph satisfies e ≤ 3v - 6. It also addresses properties of connected vs disconnected planar graphs and explores classic polyhedra through graph representations.
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)
639 views15 pages

5.E Graph Theory (Exercises)

The document contains sample questions and answers about graph theory concepts like planar graphs, Euler's formula, and non-planar graphs. It defines key terms, provides examples of planar and non-planar graphs, and proves important theorems like Euler's formula and that any planar graph satisfies e ≤ 3v - 6. It also addresses properties of connected vs disconnected planar graphs and explores classic polyhedra through graph representations.
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/ 15

5.

E: Graph Theory (Exercises)


5.2: Definitions
1
If 10 people each shake hands with each other, how many handshakes took place? What does this question have to do with
graph theory?

Answer
This is asking for the number of edges in K . Each vertex (person) has degree (shook hands with) 9 (people). So the sum
10

of the degrees is 90. However, the degrees count each edge (handshake) twice, so there are 45 edges in the graph. That is
how many handshakes took place.

2
Among a group of 5 people, is it possible for everyone to be friends with exactly 2 of the people in the group? What about 3 of
the people in the group?

Answer
It is possible for everyone to be friends with exactly 2 people. You could arrange the 5 people in a circle and say that
everyone is friends with the two people on either side of them (so you get the graph C ). However, it is not possible for
5

everyone to be friends with 3 people. That would lead to a graph with an odd number of odd degree vertices which is
impossible since the sum of the degrees must be even.

3
Is it possible for two different (non-isomorphic) graphs to have the same number of vertices and the same number of edges?
What if the degrees of the vertices in the two graphs are the same (so both graphs have vertices with degrees 1, 2, 2, 3, and 4,
for example)? Draw two such graphs or explain why not.

Answer
Yes. For example, both graphs below contain 6 vertices, 7 edges, and have degrees (2,2,2,2,3,3).

4
Are the two graphs below equal? Are they isomorphic? If they are isomorphic, give the isomorphism. If not, explain.
Graph 1: V = {a, b, c, d, e}, E = {{a, b}, {a, c}, {a, e}, {b, d}, {b, e}, {c, d}}.

Graph 2:

Answer
The graphs are not equal. For example, graph 1 has an edge {a, b} but graph 2 does not have that edge. They are
isomorphic. One possible isomorphism is f : G → G defined by f (a) = d, f (b) = c, f (c) = e, f (d) = b, f (e) = a.
1 2

5.E.1 9/6/2021 https://math.libretexts.org/@go/page/15344


5
Consider the following two graphs:
G1

V1 = {a, b, c, d, e, f , g}

E1 = {{a, b}, {a, d}, {b, c}, {b, d}, {b, e}, {b, f }, {c, g}, {d, e},

{e, f }, {f , g}}.

G2

V2 = { v1 , v2 , v3 , v4 , v5 , v6 , v7 },

E2 = {{ v1 , v4 }, { v1 , v5 }, { v1 , v7 }, { v2 , v3 }, { v2 , v6 },

{ v3 , v5 }, { v3 , v7 }, { v4 , v5 }, { v5 , v6 }, { v5 , v7 }}

a. Let f : G → G be a function that takes the vertices of Graph 1 to vertices of Graph 2. The function is given by the
1 2

following table:

x a b c d e f g

f (x) v4 v5 v1 v6 v2 v3 v7

Does f define an isomorphism between Graph 1 and Graph 2? Explain.


b. Define a new function g (with g ≠ f ) that defines an isomorphism between Graph 1 and Graph 2.
c. Is the graph pictured below isomorphic to Graph 1 and Graph 2? Explain.

6
Which of the graphs below are bipartite? Justify your answers.

Answer
Three of the graphs are bipartite. The one which is not is C (second from the right). To see that the three graphs are
7

bipartite, we can just give the bipartition into two sets A and B, as labeled below:

The graph C is not bipartite because it is an odd cycle. You would want to put every other vertex into the set A, but if you
7

travel clockwise in this fashion, the last vertex will also be put into the set A, leaving two A vertices adjacent (which
makes it not a bipartition).

5.E.2 9/6/2021 https://math.libretexts.org/@go/page/15344


7
For which n ≥ 3 is the graph C bipartite?
n

8
For each of the following, try to give two different unlabeled graphs with the given properties, or explain why doing so is
impossible.
a. Two different trees with the same number of vertices and the same number of edges. A tree is a connected graph with no
cycles.
b. Two different graphs with 8 vertices all of degree 2.
c. Two different graphs with 5 vertices all of degree 4.
d. Two different graphs with 5 vertices all of degree 3.

Answer
1.
1. For example:

2. This is not possible if we require the graphs to be connected. If not, we could take C as one graph and two copies of
8

C as the other.
4

3. Not possible. If you have a graph with 5 vertices all of degree 4, then every vertex must be adjacent to every other
vertex. This is the graph K . 5

4. This is not possible. In fact, there is not even one graph with this property (such a graph would have 5 ⋅ 3/2 = 7.5
edges).

5.3: Planar Graphs


1
Is it possible for a planar graph to have 6 vertices, 10 edges and 5 faces? Explain.

2
The graph G has 6 vertices with degrees 2, 2, 3, 4, 4, 5.How many edges does G have? Could G be planar? If so, how many
faces would it have. If not, explain.

3
I'm thinking of a polyhedron containing 12 faces. Seven are triangles and four are quadralaterals. The polyhedron has 11
vertices including those around the mystery face. How many sides does the last face have?

Answer
Say the last polyhedron has n edges, and also n vertices. The total number of edges the polyhedron has then is
(7 ⋅ 3 + 4 ⋅ 4 + n)/2 = (37 + n)/2. In particular, we know the last face must have an odd number of edges. We also have
that v = 11. By Euler's formula, we have 11 − (37 + n)/2 + 12 = 2, and solving for n we get n = 5, so the last face is a
pentagon.

4
Consider some classic polyhedrons.
a. An octahedron is a regular polyhedron made up of 8 equilateral triangles (it sort of looks like two pyramids with their
bases glued together). Draw a planar graph representation of an octahedron. How many vertices, edges and faces does an
octahedron (and your graph) have?
b. The traditional design of a soccer ball is in fact a (spherical projection of a) truncated icosahedron. This consists of 12
regular pentagons and 20 regular hexagons. No two pentagons are adjacent (so the edges of each pentagon are shared only
by hexagons). How many vertices, edges, and faces does a truncated icosahedron have? Explain how you arrived at your
answers. Bonus: draw the planar graph representation of the truncated icosahedron.

5.E.3 9/6/2021 https://math.libretexts.org/@go/page/15344


c. Your “friend” claims that he has constructed a convex polyhedron out of 2 triangles, 2 squares, 6 pentagons and 5 octagons.
Prove that your friend is lying. Hint: each vertex of a convex polyhedron must border at least three faces.

5
Prove Euler's formula using induction on the number of edges in the graph.

Answer
Proof
Let P (n) be the statement, “every planar graph containing n edges satisfies v − n + f = 2. ” We will show P (n) is true
for all n ≥ 0. Base case: there is only one graph with zero edges, namely a single isolated vertex. In this case v = 1, f = 1
and e = 0, so Euler's formula holds. Inductive case: Suppose P (k) is true for some arbitrary k ≥ 0. Now consider an
arbitrary graph containing k + 1 edges (and v vertices and f faces). No matter what this graph looks like, we can remove a
single edge to get a graph with k edges which we can apply the inductive hypothesis to. There are two possibilities. First,
the edge we remove might be incident to a degree 1 vertex. In this case, also remove that vertex. The smaller graph will
now satisfy v − 1 − k + f = 2 by the induction hypothesis (removing the edge and vertex did not reduce the number of
faces). Adding the edge and vertex back gives v − (k + 1) + f = 2, as required. The second case is that the edge we
remove is incident to vertices of degree greater than one. In this case, removing the edge will keep the number of vertices
the same but reduce the number of faces by one. So by the inductive hypothesis we will have v − k + f − 1 = 2. Adding
the edge back will give v − (k + 1) + f = 2 as needed. Therefore, by the principle of mathematical induction, Euler's
formula holds for all planar graphs.

6
Prove Euler's formula using induction on the number of vertices in the graph.

7
Euler's formula (v − e + f = 2 ) holds for all connected planar graphs. What if a graph is not connected? Suppose a planar
graph has two components. What is the value of v − e + f now? What if it has k components?

8
Prove that the Petersen graph (below) is not planar.

Answer:
What is the length of the shortest cycle? (This quantity is usually called the girth of the graph.)

9
Prove that any planar graph with v vertices and e edges satisfies e ≤ 3v − 6.

Answer
Proof
We know in any planar graph the number of faces f satisfies 3f ≤ 2e since each face is bounded by at least three edges,
but each edge borders two faces. Combine this with Euler's formula:

v−e+f = 2

2e
v−e+ ≥2
3

5.E.4 9/6/2021 https://math.libretexts.org/@go/page/15344


3v − e ≥ 6

3v − 6 ≥ e.

10
Prove that any planar graph must have a vertex of degree 5 or less.

5.4: Coloring
1
What is the smallest number of colors you need to properly color the vertices of K 4,5 ? That is, find the chromatic number of
the graph.

Answer
2, since the graph is bipartite. One color for the top set of vertices, another color for the bottom set of vertices.

2
Draw a graph with chromatic number 6 (i.e., which requires 6 colors to properly color the vertices). Could your graph be
planar? Explain.

Answer
For example, K . If the chromatic number is 6, then the graph is not planar; the 4-color theorem states that all planar
6

graphs can be colored with 4 or fewer colors.

3
Find the chromatic number of each of the following graphs.

4
A group of 10 friends decides to head up to a cabin in the woods (where nothing could possibly go wrong). Unfortunately, a
number of these friends have dated each other in the past, and things are still a little awkward. To get the cabin, they need to
divide up into some number of cars, and no two people who dated should be in the same car.
a. What is the smallest number of cars you need if all the relationships were strictly heterosexual? Represent an example of
such a situation with a graph. What kind of graph do you get?
b. Because a number of these friends dated there are also conflicts between friends of the same gender, listed below. Now
what is the smallest number of conflict-free cars they could take to the cabin?

Friend A B C D E F G H I J

Conflicts
BEJ ADG HJ BF AI DJ B CI EHJ ACFI
with

c. What do these questions have to do with coloring?

5
What is the smallest number of colors that can be used to color the vertices of a cube so that no two adjacent vertices are
colored identically?

Answer

5.E.5 9/6/2021 https://math.libretexts.org/@go/page/15344


The cube can be represented as a planar graph and colored with two colors as follows:

Since it would be impossible to color the vertices with a single color, we see that the cube has chromatic number 2 (it is
bipartite).

6
Prove the chromatic number of any tree is two. Recall, a tree is a connected graph with no cycles.

a. Describe a procedure to color the tree below.


b. The chromatic number of C is two when n is even. What goes wrong when n is odd?
n

c. Prove that your procedure from part (a) always works for any tree.
d. Now, prove using induction that every tree has chromatic number 2.

7
Prove the 6-color theorem: every planar graph has chromatic number 6 or less. Do not assume the 4-color theorem (whose
proof is MUCH harder), but you may assume the fact that every planar graph contains a vertex of degree at most 5.

8
Not all graphs are perfect. Give an example of a graph with chromatic number 4 that does not contain a copy of K . That is,
4

there should be no 4 vertices all pairwise adjacent.

Answer
The wheel graph below has this property. The outside of the wheel forms an odd cycle, so requires 3 colors, the center of
the wheel must be different than all the outside vertices.

9
Prove by induction on vertices that any graph G which contains at least one vertex of degree less than Δ(G) (the maximal
degree of all vertices in G) has chromatic number at most Δ(G).

10
You have a set of magnetic alphabet letters (one of each of the 26 letters in the alphabet) that you need to put into boxes. For
obvious reasons, you don't want to put two consecutive letters in the same box. What is the fewest number of boxes you need
(assuming the boxes are able to hold as many letters as they need to)?

Answer
If we drew a graph with each letter representing a vertex, and each edge connecting two letters that were consecutive in the
alphabet, we would have a graph containing two vertices of degree 1 (A and Z) and the remaining 24 vertices all of degree
2 (for example, D would be adjacent to both C and E ). By Brooks' theorem, this graph has chromatic number at most 2, as

5.E.6 9/6/2021 https://math.libretexts.org/@go/page/15344


that is the maximal degree in the graph and the graph is not a complete graph or odd cycle. Thus only two boxes are
needed.

11
Prove that if you color every edge of K either red or blue, you are guaranteed a monochromatic triangle (that is, an all red or
6

an all blue triangle).

5.5: Euler Paths and Circuits


1
You and your friends want to tour the southwest by car. You will visit the nine states below, with the following rather odd rule:
you must cross each border between neighboring states exactly once (so, for example, you must cross the Colorado-Utah
border exactly once). Can you do it? If so, does it matter where you start your road trip? What fact about graph theory solves
this problem?

2
Which of the following graphs contain an Euler path? Which contain an Euler circuit?
a. K 4

b. K 5.

c. K 5,7

d. K 2,7

e. C 7

f. P 7

3
Edward A. Mouse has just finished his brand new house. The floor plan is shown below:

a. Edward wants to give a tour of his new pad to a lady-mouse-friend. Is it possible for them to walk through every doorway
exactly once? If so, in which rooms must they begin and end the tour? Explain.
b. Is it possible to tour the house visiting each room exactly once (not necessarily using every doorway)? Explain.
c. After a few mouse-years, Edward decides to remodel. He would like to add some new doors between the rooms he has. Of
course, he cannot add any doors to the exterior of the house. Is it possible for each room to have an odd number of doors?
Explain.

4
For which n does the graph K contain an Euler circuit? Explain.
n

Answer

5.E.7 9/6/2021 https://math.libretexts.org/@go/page/15344


When n is odd, K contains an Euler circuit. This is because every vertex has degree
n n − 1, so an odd n results in all
degrees being even.

5
For which m and n does the graph K m,n contain an Euler path? An Euler circuit? Explain.

Answer
If both m and n are even, then K m,nhas an Euler circuit. When both are odd, there is no Euler path or circuit. If one is 2
and the other is odd, then there is an Euler path but not an Euler circuit.

6
For which n does K contain a Hamilton path? A Hamilton cycle? Explain.
n

Answer
All values of n. In particular, K contains C as a subgroup, which is a cycle that includes every vertex.
n n

7
For which m and n does the graph K m,n contain a Hamilton path? A Hamilton cycle? Explain.

Answer
As long as |m − n| ≤ 1, the graph K m,n will have a Hamilton path. To have a Hamilton cycle, we must have m = n.

8
A bridge builder has come to Königsberg and would like to add bridges so that it is possible to travel over every bridge exactly
once. How many bridges must be built?

Answer
If we build one bridge, we can have an Euler path. Two bridges must be built for an Euler circuit.

9
Below is a graph representing friendships between a group of students (each vertex is a student and each edge is a friendship).
Is it possible for the students to sit around a round table in such a way that every student sits between two friends? What does
this question have to do with paths?

Answer
We are looking for a Hamiltonian cycle, and this graph does have one:

5.E.8 9/6/2021 https://math.libretexts.org/@go/page/15344


10
a. Suppose a graph has a Hamilton path. What is the maximum number of vertices of degree one the graph can have? Explain
why your answer is correct.
b. Find a graph which does not have a Hamilton path even though no vertex has degree one. Explain why your example
works.

11
Consider the following graph:

a. Find a Hamilton path. Can your path be extended to a Hamilton cycle?


b. Is the graph bipartite? If so, how many vertices are in each “part”?
c. Use your answer to part (b) to prove that the graph has no Hamilton cycle.
d. Suppose you have a bipartite graph G in which one part has at least two more vertices than the other. Prove that G does not
have a Hamilton path.

5.6: Matching in Bipartite Graphs


1
Find a matching of the bipartite graphs below or explain why no matching exists.

Answer
The first and third graphs have a matching, shown in bold (there are other matchings as well). The middle graph does not
have a matching. If you look at the three circled vertices, you see that they only have two neighbors, which violates the
matching condition |N (S)| ≥ |S| (the three circled vertices form the set S ).

2
A bipartite graph that doesn't have a matching might still have a partial matching. By this we mean a set of edges for which no
vertex belongs to more than one edge (but possibly belongs to none). Every bipartite graph (with at least one edge) has a
partial matching, so we can look for the largest partial matching in a graph.
Your “friend” claims that she has found the largest partial matching for the graph below (her matching is in bold). She explains
that no other edge can be added, because all the edges not used in her partial matching are connected to matched vertices. Is

5.E.9 9/6/2021 https://math.libretexts.org/@go/page/15344


she correct?

3
One way you might check to see whether a partial matching is maximal is to construct an alternating path. This is a sequence
of adjacent edges, which alternate between edges in the matching and edges not in the matching (no edge can be used more
than once). If an alternating path starts and stops with an edge not in the matching, then it is called an augmenting path.

a. Find the largest possible alternating path for the partial matching of your friend's graph. Is it an augmenting path? How
would this help you find a larger matching?

b. Find the largest possible alternating path for the partial matching below. Are there any augmenting paths? Is the partial
matching the largest one that exists in the graph?

4
The two richest families in Westeros have decided to enter into an alliance by marriage. The first family has 10 sons, the
second has 10 girls. The ages of the kids in the two families match up. To avoid impropriety, the families insist that each child
must marry someone either their own age, or someone one position younger or older. In fact, the graph representing agreeable
marriages looks like this:

The question: how many different acceptable marriage arrangements which marry off all 20 children are possible?
a. How many marriage arrangements are possible if we insist that there are exactly 6 boys marry girls not their own age?
b. Could you generalize the previous answer to arrive at the total number of marriage arrangements?
c. How do you know you are correct? Try counting in a different way. Look at smaller family sizes and get a sequence.
d. Can you give a recurrence relation that fits the problem?

5
We say that a set of vertices A ⊆ V is a vertex cover if every edge of the graph is incident to a vertex in the cover (so a vertex
cover covers the edges). Since V itself is a vertex cover, every graph has a vertex cover. The interesting question is about
finding a minimal vertex cover, one that uses the fewest possible number of vertices.
a. Suppose you had a matching of a graph. How can you use that to get a minimal vertex cover? Will your method always
work?
b. Suppose you had a minimal vertex cover for a graph. How can you use that to get a partial matching? Will your method
always work?

5.E.10 9/6/2021 https://math.libretexts.org/@go/page/15344


c. What is the relationship between the size of the minimal vertex cover and the size of the maximal partial matching in a
graph?

6
For many applications of matchings, it makes sense to use bipartite graphs. You might wonder, however, whether there is a
way to find matchings in graphs in general.
a. For which n does the complete graph K have a matching?
n

b. Prove that if a graph has a matching, then |V | is even.


c. Is the converse true? That is, do all graphs with |V | even have a matching?
d. What if we also require the matching condition? Prove or disprove: If a graph with an even number of vertices satisfies
|N (S)| ≥ |S| for all S ⊆ V , then the graph has a matching.

5.7: Weighted Graphs and Dijkstra's Algorithm


1
Find a big-O estimate for the number of operations (additions and comparisons) used by Dijkstra's algorithm.

2
An oil well is located on the left side of the graph below; each other vertex is a storage facility. The edges represent pipes
between the well and storage facilities or between two storage facilities. The weights on the edges represent the time it takes
for oil to travel from one vertex to another. Using Dijkstra's algorithm find a shortest path and the total time it takes oil to get
from the well to the facility on the right side. Use a table.

3
Solve the same problem as in #2, but draw several copies of the graph rather than the table when performing Dijkstra's
algorithm.

4
A graph G is given
by
. Furthermore,
G = ({ v1 , v2 , v3 , v4 , v5 , v6 }, {{ v1 , v2 }, { v1 , v3 }, { v2 , v4 }, { v2 , v5 }, { v3 , v4 }, { v4 , v5 }, { v4 , v6 }, { v5 , v6 }})

the weight on an edge is w(v , v ) = |i − j| . Draw the graph, determine a shortest path from v to v , and also give the total
i j 1 6

weight of this path. Use Dijkstra's algorithm (you may make a table or draw multiple copies of the graph).

5.8: Trees
1
Which of the following graphs are trees?
a. G = (V , E) with V = {a, b, c, d, e} and E = {{a, b}, {a, e}, {b, c}, {c, d}, {d, e}}
b. G = (V , E) with V = {a, b, c, d, e} and E = {{a, b}, {b, c}, {c, d}, {d, e}}
c. G = (V , E) with V = {a, b, c, d, e} and E = {{a, b}, {a, c}, {a, d}, {a, e}}
d. G = (V , E) with V = {a, b, c, d, e} and E = {{a, b}, {a, c}, {d, e}}

5.E.11 9/6/2021 https://math.libretexts.org/@go/page/15344


2
For each degree sequence below, decide whether it must always, must never, or could possibly be a degree sequence for a tree.
Remember, a degree sequence lists out the degrees (number of edges incident to the vertex) of all the vertices in a graph in
non-increasing order.
a. (4,1,1,1,1)
b. (3,3,2,1,1)
c. (2,2,2,1,1)
d. (4,4,3,3,3,2,2,1,1,1,1,1,1,1)

3
For each degree sequence below, decide whether it must always, must never, or could possibly be a degree sequence for a tree.
Justify your answers.
a. (3,3,2,2,2)
b. (3,2,2,1,1,1)
c. (3,3,3,1,1,1)
d. (4,4,1,1,1,1,1,1)

4
Suppose you have a graph with v vertices and e edges that satisfies v = e + 1. Must the graph be a tree? Prove your answer.

5
Prove that any graph (not necessarily a tree) with v vertices and e edges that satisfies v > e+1 will NOT be connected.
[Hint: try a proof by contradiction and consider a spanning tree of the graph.]

6
If a graph G with v vertices and e edges is connected and has v < e+1 must it contain a cycle? Prove your answer. [Hint:
use the contrapositive.]

7
We define a forest to be a graph with no cycles.
a. Explain why this is a good name. That is, explain why a forest is a union of trees.
b. Suppose F is a forest consisting of m trees and v vertices. How many edges does F have? Explain.
c. Prove that any graph G with v vertices and e edges that satisfies v < e + 1 must contain a cycle (i.e., not be a forest).

8
Give a proof of the following statement: A graph is a forest if and only if there is at most one path between any pair of
vertices. Use proof by contrapositive (and not a proof by contradiction) for both directions.

9
Give a careful proof by induction on the number of vertices, that every tree is bipartite.

10

a. Suppose we designate vertex e as the root. List the children, parents and siblings of each vertex. Does any vertex other than
e have grandchildren?

5.E.12 9/6/2021 https://math.libretexts.org/@go/page/15344


b. Suppose e is not chosen as the root. Does our choice of root vertex change the number of children e has? The number of
grandchildren? How many are there of each?
c. In fact, pick any vertex in the tree and suppose it is not the root. Explain why the number of children of that vertex does not
depend on which other vertex is the root.
d. Does the previous part work for other trees? Give an example of a different tree for which it holds. Then either prove that it
always holds or give an example of a tree for which it doesn't.

11
Let T be a rooted tree that contains vertices u, v , and w (among possibly others). Prove that if w is a descendant of both u and
v , then u is a descendant of v or v is a descendant of u.

12
Unless it is already a tree, a given graph G will have multiple spanning trees. How similar or different must these be?
a. Must all spanning trees of a given graph be isomorphic to each other? Explain why or give a counterexample.
b. Must all spanning trees of a given graph have the same number of edges? Explain why or give a counterexample.
c. Must all spanning trees of a graph have the same number of leaves (vertices of degree 1)? Explain why or give a
counterexample.

13
Find all spanning trees of the graph below. How many different spanning trees are there? How many different spanning trees
are there up to isomorphism(that is, if you grouped all the spanning trees by which are isomorphic, how many groups would
you have)?

14
Give an example of a graph that has exactly 7 different spanning trees. Note, it acceptable for some or all of these spanning
trees to be isomorphic. [Hint: there is an example with 7 edges.)

15
Prove that every connected graph which is not itself a tree must have at last three different (although possibly isomorphic)
spanning trees.

16
Consider edges that must be in every spanning tree of a graph. Must every graph have such an edge? Give an example of a
graph that has exactly one such edge.

17
An m-ary tree is a rooted tree in which every internal vertex has at most m children. A full m-ary tree is a rooted tree in
which every internal vertex has exactly m children. A full m-ary tree with n vertices has how many internal vertices and how
many leaves?

5.9.1: Tree traversal

1
Create a rooted ordered tree for the expression (4 + 2)3
/((4 − 1) + (2 ∗ 3)) + 4 .

5.E.13 9/6/2021 https://math.libretexts.org/@go/page/15344


2
Determine the preorder and postorder traversals of this tree.

3
Evaluate the following postfix expression: 6 2 3 − +2 3 1 ∗ +− .
Evaluate the following prefix expression: ↑ − ∗ 33 ∗ 123 .

4
Find a big-O estimate of the time complexity of the preorder, inorder, and postorder traversals.

5.9.2: Spanning tree algorithms


Use the graph below for all 5.9.2 exercises.

1
Use the depth-first search algorithm to find a spanning tree for the graph above. Let v1 be the vertex labeled "Tiptree" and
choose adjacent vertices alphabetically. You can ignore the edge weights.

2
Use the breadth-first search algorithm to find a spanning tree for the graph above, with Tiptree being v1 . Add vertices to L

alphabetically.

3
Find a minimum spanning tree using Prim's algorithm. Make sure to keep track of the order in which edges are added to the
tree. Then find a minimum spanning tree using Kruskal's algorithm, again keeping track of the order in which edges are added.

4
Find a shortest path spanning tree from Maldon. Make sure to show steps of Dijkstra's algorithm in detail.

5.9.3: Transportation Networks and Flows


1
A telephone call can be routed from South Bend to Orlando on various routes. The line from South Bend to Indianapolis can
carry 40 calls at the same time. Other lines and their capacities are as follows: South Bend to St. Louis (30 calls), South Bend
to Memphis (20 calls), Indianapolis to Memphis (15 calls), Indianapolis to Lexington (25 calls), St. Louis to Little Rock (20
calls), Little Rock to Memphis (15 calls), Little Rock to Orlando (10 calls), Memphis to Orlando (25 calls), Lexington to
Orlando (15 calls). Draw a transportation network displaying this information.

2
Fill in the missing values on the edges so that the result is a flow on the transportation network.

5.E.14 9/6/2021 https://math.libretexts.org/@go/page/15344


3
Use the max flow algorithm to find a maximal flow and minimum cut on the transportation network below. Determine the
value of the flow. Find a minimal cut and give its capacity.

4
Use the max flow algorithm to find a larger flow than the one currently displayed on the transportation network below.

5
Use the max flow algorithm to find a larger flow than the one currently displayed on the transportation network below.

5.E.15 9/6/2021 https://math.libretexts.org/@go/page/15344

You might also like