COSC222 Tutorial 6 Graph Theory

COSC222 Tutorial 6 Graph Theory
(1) Let a directed graph G is given by the set of nodes {1, 2, 3, 4} and set of arcs {(1, 2),
(1, 3), (1, 4), (2, 3), (3, 1), (3, 4)}. Draw this graph. Make the adjacency matrix A and
adjacency list structure for this graph.
(2) Compute R = I + A + A2 + A3. Convert R to R* by converting non-zero elements to 1.
If the (i, j) element of R* is 1, we can go from I to j, and not otherwise. In this sense R*
is called the reflexive-transitive closure of the graph. If we take A + A2 + A3 we can
define the transitive closure.
(3) List up all paths from 1 to 4 of length up to 6. What are simple paths among them?
(4) Let f, n, and e be the number of faces, nodes, and edges respectively in a planar graph.
Euler’s theorem is stated as f + n – e = 2. A face is a connected region separated by edges.
Note that the outside region is counted for one.
/ | \
f = 3, n = 4, e = 5
/ | \
| \
| /
\ | /
\ | /
Proof by induction on f. Basis with a triangle. f=2, n=3, e=3, done. Suppose theorem is
true for f. If we increase f, there are two ways. One is put a new node in one face and
connect it with two nodes. In this case we increase n by one and e by two, done. The
other is to connect two nodes in one face. In this case we increase e by one, done.
If we forbid multiple arcs between two nodes, every face is surrounded by at least
three arcs. As every arc borders two faces, we have 3f ≤ 2e. Combined with Euler’s
theorem, we have e ≤ 3n – 6. Prove this.
Now draw the complete graph K5 with n=5. We have e=10. If K5 were planar, the
above inequality becomes 10 ≤ 3n – 6 = 9, which is impossible. Thus K5 is non-planar.
Following this prove K3,3, the complete bipartite graph of size (3, 3), is non-planar.
(5) Try to draw a Hamilton path on the following floor plan. That is you visit each room
only once.
There are 24 rooms on the floor. You need
to start from the room with circle, the
reception. The block above it is a stair.
You can go up, down, left or right.