Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Data Structure Expert

Part I:

1. Answer questions for the following graph, if a new vertex is visited and there is more than one possibility to select, following the alphabet order.

972_img1.png

a. Depth-first traversal starting at vertex A.

b. Depth-first traversal starting at vertex F.

c. Breadth-first traversal starting at vertex A.

d. Breadth-first traversal starting at vertex F.

e. Shortest path from vertex A to vertex E using breadth-first search.

f. Shortest path from vertex G to vertex C using breadth-first search.

g. Shortest path from vertex F to vertex A using breadth-first search.

2. Answer questions for the following graph. For the same edge length, you could order the edges using the alphabet order. (For example, for length 2, the order is AB, AE, CD, CE)

2331_img2.png

a. Construct the minimal spanning tree using Kruskal's Algorithm

b. Construct the minimal spanning tree using Prim's Algorithm, using A as the root.

c. Construct the shortest path using Dijkstra's Algorithm, using A as the source node. Using a table to describe the status of each step

Part II: programming exercise

Modify the bfs.java program (Listing A) to find the minimum spanning tree using a breadth-first search, rather than the depth-first search shown in mst.java (Listing B). In main(), create a graph with 9 vertices and 12 edges, and find its minimum spanning tree.

Attachment:- java program.txt

Data Structure, Computer Science

  • Category:- Data Structure
  • Reference No.:- M91378291
  • Price:- $45

Guranteed 36 Hours Delivery, In Price:- $45

Have any Question?


Related Questions in Data Structure

Data Communication Delivering Information anywhere

Topic: Data Communication Delivering Information anywhere. Write a 9-12 pages paper in which you: Present an overview of the origin and history of the concept. Describe the current use of and attitude toward the concept. ...

Problem regarding the management program

Problem: Looks like its just adding a save and load feature to the same file you sent me for python 3.5 Until now, you have had to leave your team management program running on your computer indefinitely since you did no ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As