Re: modified-- strongly connected components(SCC)?
- From: David Pearce <david.pearce@xxxxxxxxxxxxx>
- Date: Mon, 22 Aug 2005 13:50:57 +1200
Hi Amit,
Amit Gupta wrote:
then maybe I can get a algorithm O(V'+E), V' = (V - Count-of-all-objects-of-type-M).
I do not think this will be possible. Tarjan's algorithm must essentially visit all nodes in a component before that component is even detected. The way I see it is that you have two options for determining whether an SCC has more than 1 object of type M:
1) When an SCC has been fully identified all of its members are on the stack and Tarjan's algorithm proceeds to remove them one by one. At this point you can simply count the number of M objects and either report the component as a match or not.
2) You can maintain a separate count array which counts the number of M's seen in the current component. Unfortunately, this can only be updated in the back-propagation phase of the algorithm so I don't think it gives you anything over option 1 above.
In both cases, all vertices must be visited.
In fact, one thing which I'm unclear about: suppose a cycle which has a nested cycle inside it. This is one SCC. Now, suppose the outer cycle has more than 1 M object, but the inner does not. Then, should the algorithm report the inner cycle as a matching SCC or not?
Cheers,
Dave
-Amit
.
- References:
- modified-- strongly connected components(SCC)?
- From: Amit Gupta
- Re: modified-- strongly connected components(SCC)?
- From: Patricia Shanahan
- Re: modified-- strongly connected components(SCC)?
- From: Amit Gupta
- Re: modified-- strongly connected components(SCC)?
- From: Luis Quesada
- Re: modified-- strongly connected components(SCC)?
- From: Amit Gupta
- modified-- strongly connected components(SCC)?
- Prev by Date: Re: modified-- strongly connected components(SCC)?
- Next by Date: Re: Solving linear system of equalities AND disequalities
- Previous by thread: Re: modified-- strongly connected components(SCC)?
- Next by thread: www.beyond-science.net
- Index(es):
Relevant Pages
|