Is it actually necessary to fill the matrix? I don't see much sense in
filling all the entries with (n-1). As long as you know the set of vertices
which belong to a particular connected component you can always say that
every pair of them is connected. (otherwise, I don't think you can get
around filling n^2 entries of a matrix in less than O(n^2).

On Tue, Nov 24, 2009 at 1:02 PM, Rohit Saraf <rohit.kumar.sa...@gmail.com>wrote:

> You are actually restating the problem.
> Fine , you got all connected components dfs in a list.
> But then you have to fill to matrix in O(n^2) ... what about that
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

--

You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.


Reply via email to