COP 4531: Lecture 22
Learning objectives
After this class, you should be able to:
- Given a DAG, topologically sort it.
- Given a directed graph, find its strongly connected components.
- Prove the correctness of the algorithms we discussed, for topological sorting and finding strongly connected components, and give their time complexities.
- Given related graph problems, give algorithms to solve them, prove their correctness, and derive their time complexities.
- Given incorrect algorithms for similar problems, give counterexamples to disprove them.
Reading assignment
- CLR: Sections 22.4 - 22.5.
- CLR: Chapter 2, pages 561-562.
Exercises and review questions
- Questions on current lecture's material
- Remove the edge
(fg, h)
in figure 22.9 c, and topologically sort the resulting graph.- Exercise 22.5-2.
- Exercise 22.5-3.
- Questions on next lecture's material
- (Post your solution on the discussion board) Give a graph with 5 vertices, and a spanning tree for it. (You need not assign weights to the edges.)