[algogeeks] Re: Testing if 3 points form a triangle

2007-06-17 Thread kunzmilan
On Jun 4, 10:56 pm, Feng [EMAIL PROTECTED] wrote: Hi Kunzmilan, thanks for your idea of using distance matrices. But one of my friends came up with a seemly counter-example: Take 3 collinear points in 2D: (0,0), (1,0), (2,0). The distance matrix is: 0 1 4 1 0 1 4 1 0, whose eigenvalues

[algogeeks] diameter of a graph

2007-06-17 Thread mirchi
can some one give me a dynamic programming algorithm to find the diameter of a graph ...(directed acyclic graph) thanx in advance.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to

[algogeeks] Re: diameter of a graph

2007-06-17 Thread Rajiv Mathews
On 6/17/07, mirchi [EMAIL PROTECTED] wrote: can some one give me a dynamic programming algorithm to find the diameter of a graph ...(directed acyclic graph) thanx in advance.. Perform a depth-first search with the following state information for each node - distance to farthest pendant