All possible path in a graph
问题 Given a graph G(V, E) , a source vertex s and destination vertex d , the problem is to find all possible paths from s to d where G may contain loops and cycles. I want to get all simple paths, no cycle is allowed. What would be the complexity of this problem? 回答1: This problem is NP-hard, since its output may have an exponential size w.r.t its input. Finding the longest path between two points is already NP-hard (reduction to hamiltonian path problem), so finding all of them is as well. You