Question 1 (25 pts): Figure 1 Graphs for Question 1. a. In Figure 1(a), determine if the graph is simple. Also determine if there is a cycle in this

Question 1 (25 pts):

Figure 1 Graphs for Question 1.

a. In Figure 1(a), determine if the graph is simple. Also determine if there is a cycle in this graph.

b. In Figure 1(a), determine if the vertices 3 and 9 are connected. If these vertices are connected, find a path from vertex 3 to vertex 9.

c. In Figure 1(b), determine if the vertices 1 and 4 are connected. If these vertices are connected, find a path from vertex 1 to vertex 10.

d. In Figure 1(b), find a path, if any, from vertex 1 to vertex 7 that has 4 edges.

Question 2 (25 pts):

Figure 2 A graph for Question 2.

a. Find the adjacency matrix of the graph in Figure 2.

b. Draw the adjacency list of the graph in Figure 2.

c. List the nodes of the graph, in Figure 2, in a depth first traversal.

d. List the nodes of the graph, in Figure 2, in a breadth first traversal.

Question 3 (25 pts):

Figure 3 A graph for Question 3

a. List the nodes of the graph, in Figure 3, in a breadth first traversal.

b. List the nodes of the graph, in Figure3, in a depth first traversal.

Question 4:

Write a program that outputs the nodes of a graph in a breadth first traversal.

Submit the source code, and copy and paste the screenshot of the output here.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Assignment Type: Essay (any type) Service: Writing Pages/Words: 5 pages / 1375 words (Double spacing) Education Level: College Language: English (US)  Your

Assignment Type: Essay (any type) Service: Writing Pages/Words: 5 pages / 1375 words (Double spacing) Education Level: College Language: English (US)  Your Deadline: Aug 26, 08:00 PM  Assignment Topic: How to Avoid Being a Victim of Cybercrime Subject: Internet Technology (IT) Sources: 10 sources required Citation Style: APA 7th edition

Suppose that a certain basketball superstar has a 73.1% free throw percentage (that is, they make 73.1% of the free throws they attempt). Assume free

Suppose that a certain basketball superstar has a 73.1% free throw percentage (that is, they make 73.1% of the free throws they attempt). Assume free throw shots are independent from each other.If the basketball player is about to shoot 8 free throws, what is the probability that they miss at least 1 free throw shot? Give your answer rounded to four

Select one of the topics below: Autonomic computing Grid computing Nanotechnology N-tier client/server architectures On-demand computing Service-oriented

Select one of the topics below: Autonomic computing Grid computing Nanotechnology N-tier client/server architectures On-demand computing Service-oriented architecture (SOA) Storage area networks (SANs) Virtualization Write a research paper on the real-world application of the chosen technology. Your paper should include the type of organization(s) that benefits most from this technology.