snhu
MODULE SIX PROBLEM SET
This document is proprietary to Southern New Hampshire University. It and the problems within may not be posted on any non-SNHU website.
Jaime Rowland
snhu
Directions: Type your solutions into this document and be sure to show all steps for arriving at your solution. Just giving a final number may not receive full credit.
PROBLEM 1
For parts (a) and (b), indicate if each of the two graphs are equal. Justify your answer.
bc
abae
a
(a)
Figure 1: Left: An undirected graph has 5 vertices. The vertices are arranged in the form of an inverted pentagon. From the top left vertex, moving clockwise, the vertices are labeled: a, b, c, d, and e. Undirected edges, line segments, are between the following vertices: a and b; a and c: b and c; c and d; e and d; and e and c.
Figure 2: Right: The adjacency list representation of a graph. The list shows all the vertices, a through e, in a column from top to bottom. The adjacent vertices for each vertex in the column are placed in a row to the right of the corresponding vertex's cell in the column. An arrow points from each cell in the column to its corresponding row on the right. Data from the list, as follows: Vertex a is adjacent to vertices b and c. Vertex b is adjacent to vertices a and c. Vertex c is adjacent to vertices a, b, d, and e. Vertex d is adjacent to vertices c and e. Vertex e is adjacent to vertices c and d.
A.) The two graphs are the different representations for the same graph; the left side is graph representation and the right is adjacency list representa- tive. We can verify if the graph represented by either the left or the right is the same by changing graph representation to adjacency list representation or vice-versa. Representing the left in adjacency list Representative here: Adjacency list representation: a vertexv' is an adjacency list of the vertex
snhu
'u' if there is a direct edge between 'u' and 'v' (i.e. edge (u,v)) which is the same as the right. therefore these graphs are the same.