Question

directed graph for use in Exercises 22.3-2 and 22.52 Figure 22.6 A directed graph for use in Exercises 22.3-2 and 22.5-2.Show how depth-first search works on the graph of Figure 22.6. Assume that the for loop of lines 5–7 of the DFS procedure considers the vertices in reverse alphabetical order, and assume that each adjacency list is ordered alphabetically. Show the discovery and finishing times for each vertex, and show the classification of each edge.

DIJKSTRA(G,w,s)

1INITIALIZE-SINGLE-SOURCE(G,s)

2 S ??

3 Q ? V[G]

4 while Q =?

5 do u ? EXTRACT-MIN(Q)

6 S ? S?{u}

7 for each vertex v ?Adj[u]

8 do RELAX(u,v,w)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

solution: The discovery and finishing times for an each vertex are shown below as 1,16 17,20 2,7 8,15 18,19 3,6 9,12 13,1 Vy

Add a comment
Know the answer?
Add Answer to:
Show how depth-first search works on the graph of Figure 22.6. Assume that the for loop of lines 5–7 of the DFS proced...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT