How to determine whether a graph is connected or not?

  • Context:
  • Thread starter Thread starter yakin
  • Start date Start date
  • Tags Tags
    Graph
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 1K views
yakin
Messages
42
Reaction score
0
How to determine whether a graph is connected or not?
 
Physics news on Phys.org
If you mean an algorithm, you can just use a standard search (BFS, DFS) starting from any point in the graph, keeping track of visited nodes. Once your search ends, check if there are any nodes that were not visited - if so, the graph is not connected, otherwise it is connected (can you prove this rigorously?).