http://www.jsoftware.com/jwiki/Essays/Minimal_Spanning_Tree
You can set all the weights to 1. If the spanning tree contains all the nodes then the graph is a connected tree. ----- Original Message ----- From: John Baker <[email protected]> Date: Tuesday, April 14, 2009 7:45 Subject: [Jprogramming] quick test for rooted tree from parent/child connection table. To: [email protected] > I'm sure someone has worked through this. I am looking for > a quick > efficient J test that a parent child table digraph > representation is > a connected rooted tree. The node lists I am processing > are in the many > thousands so converting to an adjaceny matrix representation and using > something like transitive closure is out. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
