Longest Path in a Graph

From NovaOrdis Knowledge Base
Revision as of 04:45, 9 November 2021 by Ovidiu (talk | contribs) (→‎Longest Path in a Directed Acyclic Graph)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

External

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:

Topological Sort of a Directed Acyclic Graph

Then TODO: https://www.geeksforgeeks.org/find-longest-path-directed-acyclic-graph.