[algogeeks] Re: Finding all loops in a directed graph

2006-10-22 Thread Arunachalam
You can avoid this easily, if you have a numbering of the nodes. A cycle is only counted if all the vertices have a greater numbering than the current vertex.   These are minor implementation details. But DFS is the algorithm for finding cycles.   regards Arunachalam.  On 10/23/06, malli <[EMAIL P

[algogeeks] Re: Finding all loops in a directed graph

2006-10-22 Thread malli
using DFS the loop would get detected more than once. If we use DFS a loop would be detected 'n' times if there are 'n' nodes in the loop. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To

[algogeeks] Re: Finding all loops in a directed graph

2006-10-22 Thread Jair Cazarin
You can use a DFS.Greetings.On 10/22/06, malli <[EMAIL PROTECTED]> wrote: Hello All.How can I detect all loops in a directed graph?I would like to detect the starting node of the loop as well as the closingedge of the loop.Thanks in Advance.Regards,Mallikarjun.-- Jair Cazarin Villanuevahttp://slipv

[algogeeks] Finding all loops in a directed graph

2006-10-22 Thread malli
Hello All. How can I detect all loops in a directed graph? I would like to detect the starting node of the loop as well as the closing edge of the loop. Thanks in Advance. Regards, Mallikarjun. --~--~-~--~~~---~--~~ You received this message because you are s

[algogeeks] Re: graph 3 interconnected

2006-10-22 Thread [EMAIL PROTECTED]
A*? plan system? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTE

[algogeeks] Re: How to calculate the time complexity of an algorithm?

2006-10-22 Thread [EMAIL PROTECTED]
could you talk it in detail? --~--~-~--~~~---~--~~ 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 [EM

[algogeeks] graph 3 interconnected

2006-10-22 Thread alpaul
hello all I have assignment of my I come up with the idea of 3 graphs which inter connected. following is: the robot is able to guide people around the cities, he will tell you how to go from one place to the other places according to some condition or constraint. 1- each place will assign

[algogeeks] How to calculate the time complexity of an algorithm?

2006-10-22 Thread Umesh
Please help if you can! --~--~-~--~~~---~--~~ 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 [EMAIL P

[algogeeks] Re: Can we get a general formula for Lexicographic Ordering?

2006-10-22 Thread Rajarshi Chowdhury
This code segment generates the matrix:for(i=0;i<26;i++)        array[i][0]=1;    for(n=0;n<26;n++)    {        for(j=0;j<26;j++)         {            for(i=j+1;i<26;i++)     {            temp+=array[i][n];            }                array[j][n+1]=temp;            temp=0;        }   

[algogeeks] Re: Finding median in theta(n^lg3) time

2006-10-22 Thread alpaul
You can use binary search to do it. --~--~-~--~~~---~--~~ 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

[algogeeks] Re: Can we get a general formula for Lexicographic Ordering?

2006-10-22 Thread preeti
ya, i got it. thanx.but one think which i dont understand that is that though we hv a direct fromula for calculating thru your algo but what i think is that while programming it might be difficult to maintain a matrix with no fixed size as characters are though 26 but length of string is n