-Re: easiest way to get loops in PIG?
Mehmet Tepedelenlioglu 2012-06-21, 05:12
If I understand you correctly, and you want to find out what the components of a graph are, the trans closure probably is not the way to go as this is quadratic on the number of vertices, hence not scalable. There are other ways that require basically the same number of iterations (order of log(the number of vertices)), and has space requirements that are linear in vertex cardinality.
On Jun 20, 2012, at 7:11 PM, Yang wrote:
> but currently I need to write a code to find the transitive closures of
> many edges in a graph.
> so I need to iterate a code snippet several times, so finally I can find a
> connected component of size 2^N