Using Strongly Connected Component Algo to check if a vertex is reachable

antz

I would like to see if a given vertex, say V0, can be reachable by all other vertices in a graph G.
I know I can just traverse through each vertex in the graph and do BFS/DFS to see if V0 is reachable.
However, this seems to be very inefficient.

I was wondering if i do SCC algo on the graph and if v0 is part of all scc, then I can safely conclude that v0 is reachable by all vertices? This would be great because the cost of SCC is only O(V+E) with Tarjan's and checking to see if v0 is part of scc would also cost linear time.

I would think this makes sense because SCC means vertices are reachable. Any confirmation to this logic?

or any efficient approach to this?

Evgeny Kluev

V0 may not belong to SCC, but still be reachable by all other vertices. For example, vertex d on diagram is reachable by all other vertices, but the only non-trivial SCC contains vertices a, b, c and does not contain vertex d.

enter image description here

To check if V0 is reachable by all other vertices, you can reverse direction of every edge (in linear time), then use BFS/DFS, starting from V0, to check if every other vertex is reachable from V0 (also in linear time).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Finding best path trought strongly connected component

Finding Number of Edges on Strongly Connected Component

How to create a graph of largest strongly connected component

Difference between a directed cycle and a strongly connected component

Check if a URL is reachable using Golang

Check if remote port is reachable using Centos

Check whether a peripheral is reachable using UUID

Computing Strongly connected components using c programming language

How to find subgraphs of strongly connected components using networkx

Strongly Connected Components

finalize() called on strongly reachable objects in Java 8

How can we check whether connected network connection is reachable or not in iOS Swift?

Check if pixel is inside a connected component in opencv python

Getting the vertex and the details of the vertex connected to it

Check if Website is reachable

Rendering react component using typescript without passing in strongly typed props

Finding reachable vertices for every vertex in a directed graph

Retrieving the documents connected this vertex

Find faces connected to vertex

Strongly Connected Components - Adding edges

DFS strongly connected components dilemma

Strongly Connected Components : Kosaraju algorithm

Strongly connected components algorithm clarification

Nordvpn local network addresses not reachable when connected

Python check if a list of nodes are all in the same connected component in O(n)

Delphi CEF Check if site is not reachable

How to check the node/vertex/Edge is present in the Graph using Gremlin

Plot only the strongly connected components of a Osmnx network

Largest strongly connected components of a directed graph