1 vote

What's the exact complexity of a DFS if we revisit nodes?

Suppose the graph has an adjacency matrix $M$. It's well known that the number of paths of length $k$ from $i$ to $j$ is $(M^k)_{ij}$. Since we care about paths of any length, we are interested in $M^...
Command Master's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible