Docsity

Graph Theory Practice Problems and Solutions, Slides of Molecular Structure

Toggle sidebar
bg1
Math 310
Exam 3 - Practice Problem Solutions
1. Suppose the following graph represents the result of a round robin volleyball tournament. Give the won lost record for
each team who participated. Who won the tournament?
A
B
D
C
Γ
Recall that the in-degree of a vertex in a directed graph representing a round robin tournament gives the number of
losses for that team.
Similarly, the out-degree of a vertex in a directed graph representing a round robin tournament gives the number of
wins for that team.
Using this, Team Ahas a record of (2 −1), Team Bhas a record of (0 −3), Team Chas a record of (3 −0), and Team
Dhas a record of (1 −2).
Therefore, Team Cwon the tournament.
2. State what type of graph model you would use for each of the following. Make it clear what the vertices in your model
represent, what the edges represent, whether the edges are directed or undirected, and whether not not loops and
multiedges are allowed.
(a) A graph model for the streets in Moorhead, Minnesota.
We will take vertices to be intersections and edges to be roads (or lanes of roads) between intersections.
Since Moorhead has some one-way streets, we need a directed graph. Loops do not make sense in this context.
We could choose to use multiedges of we wish to account for the streets that have more than one lane heading in
a particular direction.
(b) A graph that models the molecular structure of a certain protein molecule.
We will take vertices to be atoms and edges to be chemical bonds between atoms.
Chemical bonds are generally thought of as being between a pair of atoms rather than from one atom to another,
so one would normally use an undirected graph.
We generally do not think of bonds from an atom to itself, so there would be no loops.
Since there “multiple bonds” in some molecules, we would make use of multi-edges.
(c) A graph modeling all the phone calls made on a certain carrier during the last hour.
If we take our vertices to be phone numbers, and edges to be calls originating from one number and connecting
with another number, then we clearly need directed edges. We could deal with conference calls by drawing an
edge from the person originating the conference call to each of the other individual lines involved in the call.
Loops do not make sense in this context, since a person cannot call himself (at least not at the same number). We
would allow multi-edges, since a peron could call the same person more than once during a single hour.
(d) A graph modeling a computer network.
Here, loops do not make sense. Whether one uses multiedges and/or multi-edges depends on how precisely you
think about how connections are made between computers (server/slave relationships and/or multiple ports could
be taken into account).
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Graph Theory Practice Problems and Solutions and more Slides Molecular Structure in PDF only on Docsity!

Math 310

Exam 3 - Practice Problem Solutions

  1. Suppose the following graph represents the result of a round robin volleyball tournament. Give the won lost record for

each team who participated. Who won the tournament?

A

B

D

C

Recall that the in-degree of a vertex in a directed graph representing a round robin tournament gives the number of

losses for that team.

Similarly, the out-degree of a vertex in a directed graph representing a round robin tournament gives the number of

wins for that team.

Using this, Team A has a record of (2 − 1), Team B has a record of (0 − 3), Team C has a record of (3 − 0), and Team

D has a record of (1 − 2).

Therefore, Team C won the tournament.

  1. State what type of graph model you would use for each of the following. Make it clear what the vertices in your model

represent, what the edges represent, whether the edges are directed or undirected, and whether not not loops and

multiedges are allowed.

(a) A graph model for the streets in Moorhead, Minnesota.

We will take vertices to be intersections and edges to be roads (or lanes of roads) between intersections.

Since Moorhead has some one-way streets, we need a directed graph. Loops do not make sense in this context.

We could choose to use multiedges of we wish to account for the streets that have more than one lane heading in

a particular direction.

(b) A graph that models the molecular structure of a certain protein molecule.

We will take vertices to be atoms and edges to be chemical bonds between atoms.

Chemical bonds are generally thought of as being between a pair of atoms rather than from one atom to another,

so one would normally use an undirected graph.

We generally do not think of bonds from an atom to itself, so there would be no loops.

Since there “multiple bonds” in some molecules, we would make use of multi-edges.

(c) A graph modeling all the phone calls made on a certain carrier during the last hour.

If we take our vertices to be phone numbers, and edges to be calls originating from one number and connecting

with another number, then we clearly need directed edges. We could deal with conference calls by drawing an

edge from the person originating the conference call to each of the other individual lines involved in the call.

Loops do not make sense in this context, since a person cannot call himself (at least not at the same number). We

would allow multi-edges, since a peron could call the same person more than once during a single hour.

(d) A graph modeling a computer network.

Here, loops do not make sense. Whether one uses multiedges and/or multi-edges depends on how precisely you

think about how connections are made between computers (server/slave relationships and/or multiple ports could

be taken into account).

  1. Given the following undirected graph:

b

c

d

e

f

g

h

i

j

a

(a) Find |E|

|E| = 12

(b) Find |V |

|V | = 10

(c) Find deg(c), deg(f ), and deg(g)

deg(c) = 5, deg(f ) = 4, and deg(g) = 3

(d) List all isolated vertices of Γ

j is an isolated vertex.

(e) List all pendant vertices of Γ

a is a pendant vertex.

(f) Is Γ connected? Justify your answer. How many connected components does Γ have?

Γ is not connexted, since it has an isolated vertex. Γ has two connecte components since every pair of vertices not

involving j is connected.

(g) List all bridge edges in Γ.

Γ has two bridge edges: {a, c} and {e, g}

(h) List all cut vertices in Γ.

c, e, and g are cut vertices.

(i) Find the set of vertices adjacent to vertex c.

{a, b, d, e, f }.

(j) Find the degree sequence for Γ.

(k) Verify that the Handshaking Theorem holds for Γ.

According to the Handshaking Theorem,

v∈V

deg(v) = 2|E|.

Here,

v∈V

deg(v) = 5 + 4 + 3 + 3 + 2 + 2 + 2 + 2 + 1 + 0 = 24 = 2(12) = 2|E|. Therefore, the Handshaking Theo-

rem is verified for this graph.

(l) Form the adjacency matrix for Γ with the vertices ordered alphabetically.                 0 0 1 0 0 0 0 0 0 0

0 0 1 1 0 0 0 0 0 0

1 1 0 1 1 1 0 0 0 0

0 1 1 0 0 0 0 0 0 0

0 0 1 0 0 1 1 0 0 0

0 0 1 0 1 1 0 0 0 0

0 0 0 0 1 0 0 1 1 0

0 0 0 0 0 0 1 0 1 0

0 0 0 0 0 0 1 1 0 0

0 0 0 0 0 0 0 0 0 0

(m) Form an incidence matrix for Γ with the vertices ordered alphabetically and the edges in an order of your choosing.                 1 0 0 0 0 0 0 0 0 0 0 0

0 1 1 0 0 0 0 0 0 0 0 0

1 1 0 1 1 1 0 0 1 0 0 0

0 0 1 1 0 0 0 0 0 0 0 0

0 0 0 0 1 0 1 0 0 0 0 0

0 0 0 0 0 1 1 1 0 0 0 0

0 0 0 0 0 0 0 0 1 1 1 0

0 0 0 0 0 0 0 0 0 1 0 1

0 0 0 0 0 0 0 0 0 0 1 1

0 0 0 0 0 0 0 0 0 0 0 0

  1. (a) Draw each of the following graphs:

i. K 4 ii. C 8 iii. W 5

K 4 C 8

W 5

iv. K 6 v. Q 3 vi. C 7

K 6 Q 3

C 7

vii. K 1 , 4 viii. K 3 , 2 ix. K 4 , 3

K 1,

K 3,

K 4,

(b) Which of the graphs above are bipartite? Justify your answer.

ii, v, vii, viii, and ix are bipartite. A 2-coloring has been included in the graphs shown above.

All the others contain at least one od cycle, so that cannot be bipartite.

  1. Draw all subgraphs of the following graph.

a

b

d

c

a

b

Γ

d

c

a

b

d

c

a

b

d

c

a

b

d

c

a

b

d

c

a

b

d

c

a

b

d

c

a

b

d

c

a

b

d

c

a

b

d

c

a

b

d

c

a

b

d

c

a

b

d

c

a

b

d

c

Subgraphs: a

b

d

c

a

b

d

c

a

b

d

c

  1. 5 boys (Abe, Ben, Chuck, Donald, Elmer) and 6 girls (Francine, Gretchen, Heather, Irene, Jennifer, and Katie) are

trying to find dates to the junior prom. Francine is willing to go with Ben, Chuck, Donald, or Elmer. Gretchen is

willing to go with Abe or Donald. Heather is willing to go with Ben or Chuck. Irene is willing to go with Chuck or

Donald. Jennifer is willing to go with Ben, Chuck, or Donald. Katie is willing to go with Donald or Ben.

(a) Draw a graph modeling this situation.

A (^) B C D (^) E

F (^) G H I (^) J K

(b) Find a matching for which every boy has a date to the prom.

A B (^) C D^ E

F (^) G H I J K

This matching corresponds to Abe going with Gretchen, Ben going with Heather, Chuck going with Jennifer,

Donald going with Katie, and Elmer going with Francine.

  1. Draw a simple graph with each of the following degree sequences or state why one is not possible.

(a) 3, 3, 2, 2

(b) 4, 3, 2, 1

Not possible. Since there are only 4 vertices total in this vertex sequence, there are only three other edges that

any vertex can be adjacent to, since we are insisting on a simple graph. Therefore, we cannot have a vertex with

degree 4. In fact, any vertex in a simple graph with n vertices has degree at most n − 1.

(c) 4, 3, 2, 2, 1

(d) 6, 2, 2, 2, 2, 1, 1

(e) 6, 2, 2, 1, 1

Not possible. As above, since there are only 5 vertices in this degree sequence, there cannot have a vertex with

degree 6. In fact, any vertex in a simple graph with n vertices has degree at most n − 1.

  1. For each pair of graphs, prove that the graphs are isomorphic, or prove that they cannot be isomorphic.

(a)

5

1

2 3

4

d

a (^) c

b

e

2

These graphs are isomorphic. To see this, consider the following bijection between the vertex sets:

Vertex in Γ 1 Vertex in Γ 2

1 a

2 d

3 e

4 c

5 b

It is easy to verify that this bijection preserves adjacency, since it preserves 5-cycle present in both graphs.

(b)

1

2 3

4

a

b

d

c

2

These graphs are isomorphic. To see this, consider the following bijection between the vertex sets:

Vertex in Γ 1 Vertex in Γ 2

1 a

2 c

3 d

4 b

In fact, since every pair of distinct vertices are adjacent in these graphs, any bijection between the vertices is an

isomorphism [so there are n! = 4! = 24 diferent bijetions between these graphs].

(c)

1

1

2

3

4

5

6

2

a b

c

d

e

f

These graphs are not isomorphic. To see this, notice that Γ 2 has degree 4, while no vertex in Γ 1 has degree 4.

(d)

1

1

2

3

4

5

6

(^7 ) 9

a

2

b

c

d (^) e

f

g

h

i

These graphs are isomorphic. To see this, consider the following bijection between the vertex sets:

Vertex in Γ 1 Vertex in Γ 2

1 i

2 f

3 g

4 h

5 e

6 a

7 d

8 c

9 b

  1. Draw a graph that satisfies the hypotheses of Dirac’s Theorem. Explain how you know that each hypothesis is satisfied.

Notice that this graph has 6 vertices (so more than 3). To satisfy Dirac’s Theorem, each vertex needs to have degree at

least

6 2 = 3, and we can see that each vertex has degree 3. [Note: If we think of beginning with just these six vertices

and adding edges, you should be able to first convince yourself that you cannot make all vertices have degree 3 without

the graph being connected. Next, convince yourself that there must be a Hamilton Circuit.]

  1. Draw a graph that satisfies the hypotheses of Ore’s Theorem. Explain how you know that each hypothesis is satisfied.

(your example may not be a complete graph.)

Notice that the same graph also satifies Ore’s Theorem. The graph has 6 vertices (so more than 3). To satisfy Dirac’s

Theorem, each nonadjacent pair of vertices needs to have degrees that add up to at least n = 6, and we can see that

since each vertex has degree 3, the sum of the degrees of any pair of nonadjacent vertices is 6.

  1. For each of the following weighted graphs, use Dijkstra’s Algorithm to find a shortest path from a to z.

(a)

a

b

c

d e^ f

z

1

3

2 5

8

3

4

1

2

a

b

c

d e^ f

z

1

3

2 5

8

3

4

1

2

1(a)

2(a)

9(a,b) 7(a,c)

10(a,c,d)

14(a,c,d,e)

11(a,c,d,e)

13(a,c,d,e,f)

The figure above shows the result of carrying out Dijkstra’s Algorithm on the given weighted graph.

From this, we see that the shortest path has weight: 13 and follows the vertex sequence 〈a, c, d, e, f, z〉.

(b)

a

b

c

d e

2

2

5 2

1

4

4

5

z

f

g

h

6 2

3

5

2

1

a

b

c

d e

2

2

5 2

1

4

4

5

z

f

g

h

6 2

3

5

2

1

2(a)

5(a) 4(a,b)

3(a,b) 7(a,b,d)

11(a,b,d,e)

13(a,b,d,e)

12(a,b,d,e)

16(a,b,d,e,f)

15(a,b,d,e,f,g)

The figure above shows the result of carrying out Dijkstra’s Algorithm on the given weighted graph.

From this, we see that the shortest path has weight: 15 and follows the vertex sequence 〈a, b, d, e, f, g, z〉.

Notice that 〈a, b, d, e, h, z〉 is also a shortest path, but it is not the path found by the algorithm.

  1. Use a brute force algorithm to find an optimal solution for the traveling salesman problem for the given graph starting

at “home” vertex a:

(a)

10

6

3

2

4

5

a

b

c d

Possible Paths Total Weight

a, b, c, d, a 6 + 3 + 2 + 4 = 15

a, b, d, c, a 6 + 5 + 2 + 10 = 23

a, c, b, d, a 10 + 3 + 5 + 4 = 22

a, c, d, b, a 10 + 2 + 5 + 6 = 23

a, d, b, c, a 4 + 5 + 3 + 10 = 22

a, d, c, b, a 4 + 2 + 3 + 6 = 15

Note that the last three paths are just the first three paths traveled in reverse, so we could have stopped after

checking the first three paths.

The minimal circuits starting at a are a, b, c, d, a and a, d, c, b, a which both have total weight 15.

is adjacent to vertices that are blue, gold, and green, forcing us to introduce a fourth color, purple, to complete the

coloring.

This coloring and the discussion above shows that χ(Γ 3 ) = 4.

The graph Γ 4 is 4-colorable. To prove this, we will constuct a 4-coloring of Γ 4 and show from the construction of this

coloring that no coloring with fewer colors in possible.

As shown in the diagram above, we begin by coloring the vertices 1, 2 , 3 , 4 which form a copy of K 4 using blue, green,

gold, and purple respectively. The existence of this subgraph shows that we cannot get by with fewer than 4 colors.

We then continue by coloring vertex 5 gold, vertex 6 purple, and vertex 7 blue, as shown in the diagram above.

This coloring and the discussion above shows that χ(Γ 4 ) = 4.

  1. Find the edge chromatic number for the graphs in the previous problem.

1

2

4

The graph Γ 1 satisfies χE (Γ 1 ) = 3. To see this, notice that since Γ 1 has a vertex of degree 3, χE (Γ 1 ) ≥ 3. The coloring

exhibited in the diagram above shows that χE (Γ 1 ) ≤ 3, so we conclude that χE (Γ 1 ) = 3.

The graph Γ 2 satisfies χE (Γ 2 ) = 4. To see this, notice that since Γ 2 has a vertex of degree 4, χE (Γ 2 ) ≥ 4. The coloring

exhibited in the diagram above shows that χE (Γ 2 ) ≤ 4, so we conclude that χE (Γ 2 ) = 4.

The graph Γ 3 also satisfies χE (Γ 3 ) = 4. To see this, notice that since Γ 3 has a vertex of degree 4, χE (Γ 2 ) ≥ 4. The

coloring exhibited in the diagram above is a little tricky to find, but it shows that χE (Γ 3 ) ≤ 4, so we conclude that

χE (Γ 3 ) = 4.

The graph Γ 4 satisfies χE (Γ 4 ) = 6. To see this, notice that since Γ 4 has a vertex of degree 6, χE (Γ 4 ) ≥ 6. The coloring

exhibited in the diagram above shows that χE (Γ 4 ) ≤ 6, so we conclude that χE (Γ 4 ) = 6.

  1. Let Γ = W 8. Find the vertex chromatic number and the edge chromatic number of Γ. Provide a proof for your answer.

W 8

W 8

Notice that since W 8 has a 3-cycle, it cannot be bipartite. This figure above demonstrates a 3-coloring of W 8. Hence

χ(W 8 ) = 3.

Also, since the spoke vertex of W 8 has degree 8, the edge chromatic number of W 8 is at least 8. The figure above

demonstrates an 8-coloring of W 8. Thus χE (W 8 ) = 8.