Chat with us, powered by LiveChat What to turn in: Save your answers in a .pdf file and name your file as yourname_HW8.pdf. Upload it under Homework 8 submission link. Q1.Assume that a graph is represented in matrix no | Writedemy

What to turn in: Save your answers in a .pdf file and name your file as yourname_HW8.pdf. Upload it under Homework 8 submission link. Q1.Assume that a graph is represented in matrix no

What to turn in: Save your answers in a .pdf file and name your file as yourname_HW8.pdf. Upload it under Homework 8 submission link. Q1.Assume that a graph is represented in matrix no

What to turn in: Save your answers in a .pdf file and name your file as yourname_HW8.pdf. Upload it under Homework 8 submission link. Q1.Assume that a graph is represented in matrix notation as follows:

Document Preview:

CPS 500 Data Structures and Algorithms HW8 What to turn in: Save your answers in a .pdf file and name your file as yourname_HW8.pdf. Upload it under Homework 8 submission link. Q1. Assume that a graph is represented in matrix notation as follows: A B C D E F A 8 14 8 8 7 9 B 14 8 9 8 8 2 C 8 9 8 6 8 8 D 8 8 6 8 15 11 E 7 8 8 15 8 10 F 9 2 8 11 10 8 a) Represent this graph as an adjacency list. b) Give a DFS traversal of the graph starting at node A. c) Give a BFS traversal of the graph starting at node A. d) Find a minimum spanning tree on this graph. 1e) Apply Dijkstra’s algorithm on this graph to find the shortest path from node A to all other nodes. Draw the graph by clearly indicating the current shortest distances from A to all other nodes at each iteration of the algorithm. Iteration 1 Iteration 2 Iteration 3 Iteration 4 Iteration 5 Iteration 6 2Q2. Assume that you have the following node structure for a graph node: struct Node { char name; // the name of the node int distance; // distance to the starting node struct Node* previous; // previous node on the shortest path } Suppose you have executed Dijsktra’s algorithm on a connected graph and computed the shortest path from a starting node to all other nodes. This algorithm updates the distance and previous fields of all nodes (the previous field of the starting node is set to NULL). The name field was already updated at the beginning of the program. Now you are asked to implement the function below to print the path from the starting node to a given target node “V”. The output must contain the names of the starting node, target node, and all other nodes on the path. You can use any data structure that we learned in this class. You can use cout to print the name of a node. (You can write the function recursively or…

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order