Directed Graph Problem

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Reply

Join Date: May 2005
Posts: 1
Reputation: li_xia_er is an unknown quantity at this point 
Solved Threads: 0
li_xia_er li_xia_er is offline Offline
Newbie Poster

Directed Graph Problem

 
0
  #1
May 22nd, 2005
What I want to achive is when given a directed graph, find out if there is one node that can reach every other node and if there is one node that can be reached by every other. Time complexity should be O(n+m).

I'm into finding all strongly connected parts in the graph and then check the connectivity among those. Can that be an appropriate solution or do I have to rethink it all? Maybe you guys have a better solution.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Directed Graph Problem

 
0
  #2
May 23rd, 2005
Sounds like a spanning tree problem. I think you invert the direction and go from there, or something like that.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC