Lecture 20
Learning objectives
After this class, you should be able to:
- Given a DAG, topologically sort it.
- Prove the correctness of the algorithm we discussed for topological sorting and give its time complexity.
- Given a directed graph, find its strongly connected components.
- Prove the correctness of the algorithm we discussed for finding strongly connected components and give its time complexity.
- 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 23, pages 624-625.
Exercises and review questions
- Questions on current lecture's material
- Exercise 22.4-3.
- Exercise 22.5-2.
- 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.)