Programming Question

Question 1 (25 pts):Draw a graph G containing the following vertices and edges.
V(G) = {0, 1, 2, 3, 4, 5, 6}
E(G) = { (0, 1), (0, 2), (0, 3), (2, 1), (2, 4), (5, 1), (5, 3)}
Question 2 (25 pts):
Figure 1 Graphs for Question 1.
In Figure 1,
(a) Determine if the graph is simple.
(b) Determine if there is a cycle in this graph.
(c) Determine if the graph is strongly connected.
(d) Determine if the vertices 2 and 11 are connected. If these vertices are connected, find a path
from vertex 2 to vertex 11.
(e) Find a path, if any, from vertex 1 to vertex 3 that has 4 edges.
Question 3 (25 pts):
Figure 2 A graph for Question 2.
In Figure 2,
(a) Find the adjacency matrix of the graph.
(b) Draw the adjacency list of the graph.
(c) List the nodes of the graph in a depth first traversal.
(d) List the nodes of the graph in a breadth first traversal.
Question 4:
By using the class graphType provided (graphType.h), write a C++ code to create a graph containing the
following edges and display the nodes of a graph in depth first traversal and breadth first traversal.
V(G) = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
E(G) = {(0, 1), (0, 5), (1, 2), (1, 3), (1, 5), (2, 4), (4, 3), (5, 6), (6, 8), (7, 3), (7, 8), (8, 10), (9, 4), (9, 7), (9, 10)}
The input file should consist of the number of vertices in the graph in the first line and the vertices that
are adjacent to the vertex in the following lines as described in the textbook.
Example input file contents:
Submit the source code, and copy and paste the screenshot of the output here.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Are you stuck with your online class?
Get help from our team of writers!

Order your essay today and save 20% with the discount code RAPID