Algorithm(s) to enumerate all vertices and edges that can participate in any path from s to t

147 Views Asked by At

In undirected unweighted graph, how to enumerate all vertices and edges in polynomial time that can be part of any simple path from s to t?

I hear it is possible, but have been unable to find an algorithm or description. Most likely just don't know the right term to search with.

1

There are 1 best solutions below

0
On BEST ANSWER

Consider the block tree of the graph. There is exactly one path $P$ in the tree between the block containing $s$ and the block containing $t$. An edge is a part of a path from $s$ to $t$ if and only if it is in a block on $P$. So you could use Hopcroft & Tarjan's linear-time algorithm for finding biconnected components which is summarized on the same wikipedia page.