Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Subgraph

Name: Anonymous 2010-11-15 3:34

Is there an algorithm to find a connected subgraph in graph ?

Name: Anonymous 2010-11-15 3:35

Yes.

Name: Anonymous 2010-11-15 3:40

Ok.
Could you share it with me ?

Name: Anonymous 2010-11-15 3:44

I could, but it doesn't mean that I would.

Name: Anonymous 2010-11-15 3:48

>>4
Yeah, sure. It's pretty funny.

Name: Anonymous 2010-11-15 4:26

Have you read your TAOCP today?

Name: Anonymous 2010-11-15 5:44

道 Child Pornography?

Name: Anonymous 2010-11-15 8:03

>>3
Choose a random vertex. Run either a breadth-first or a depth-first search from that vertex. When search terminates, your 'visited' set contains a connected component of the graph.

If you want to split the graph into all connected components, keep the 'not visited set' as well, after step 1 terminates pick any vertex from it, repeat.

If you want to manage connected components in a dynamic graph, look at http://en.wikipedia.org/wiki/Disjoint-set_data_structure

Name: Anonymous 2010-11-15 8:44

>>8
DON'T HELP HIM!!

Name: Anonymous 2010-11-15 9:40

>>9
HA HA

Don't change these.
Name: Email:
Entire Thread Thread List