Longest Path in a Graph
Jump to navigation
Jump to search
External
- https://en.wikipedia.org/wiki/Longest_path_problem
- https://www.geeksforgeeks.org/find-longest-path-directed-acyclic-graph/
Internal
Overview
The longest path problem is an NP-Hard problem for general graphs. However, the longest path can be computed on O(n) time for directed acyclic graphs.
Longest Path in a Directed Acyclic Graph
Topologically sort the directed acyclic graph:
Then TODO.