How to compute the critical path of a directional acyclic graph?
问题 What is the best (regarding performance) way to compute the critical path of a directional acyclic graph when the nodes of the graph have weight? For example, if I have the following structure: Node A (weight 3) / \ Node B (weight 4) Node D (weight 7) / \ Node E (weight 2) Node F (weight 3) The critical path should be A->B->F (total weight: 10) 回答1: I have no clue about "critical paths", but I assume you mean this. Finding the longest path in an acyclic graph with weights is only possible by