[prev] 31 [next]

Exercise 6: Connectedness Checks

Assume that components(g) has generated componentOf[nV]
  1. Implement sameComponent(g,v,w) to check if v and w are in same subgraph
  2. Implement nComponents(g) to count the number of subgraphs

[Diagram:Pics/graphs/components-ex.png]