The approach of adding one edge connecting a connected point to an
unconnected point will produce every possible set of n-1 edges which
connect all the points, but it will include duplicates, because it can
generate all of those edges in any order. There are (n-1)! possible
orders that the same set of edges can be generated, so to get the
number of unique sets of edges, you have to divide by (n-1)!.

Don

On Feb 8, 11:43 am, sravanreddy001 <sravanreddy...@gmail.com> wrote:
> @Don:
>
> I had the similar approach, but I didn't think of "dividing by (n-1)!"
> Why is this needed? -- I think this is to avoid the cases in which, just
> the order of picking the nodes is different and lines drawn are same.
>
> How is this (n-1)! -- i might be missing the the very basic thing.. plz
> correct.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@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