I- Given the following graph G1 in Figure 1: See image.

a)Give the adjacency matrix representation of the graph.

b)Give the adjacency list representation of the graph.

c)Give the depth-first traversal of the graph, starting from vertex A. ( in case you have the choice between multiple vertices to visit, always select the vertex that has smaller lexicographic order first, i.e. alphabetical order)

d)Give the breadth-first traversal of the graph, starting from vertex A. ( in case you have the choice between multiple vertices to visit, always select the vertex that has smaller lexicographic order first, i.e. alphabetical order)

e)Draw two spanning trees that can be found in the graph.

f)Find the shortest path between node A and all other nodes in the graph, using Dijkstra's algorithm.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.