[algogeeks] Re: programming problem

2008-05-21 Thread Deepak Manohar
The very fact that the complexity is O(nlogn) doesn't hold good since the comparison operation takes O(length of string). Can you give us more details on the algorithm? On Wed, May 21, 2008 at 11:32 AM, Chonku <[EMAIL PROTECTED]> wrote: > You could do this too... > > 1. Sort the words based on l

[algogeeks] Re: programming problem

2008-05-20 Thread Deepak Manohar
You can solve this problem by the following technique: Proc 1: Take any word W in the file Find all strings S(k) which are formed by concatenating k words in the file and is a prefix of W. [A word can repeat multiple times in different places] As you can see, number of words in S(k) will certainly

[algogeeks] Re: Plannar graph

2008-04-04 Thread Deepak Manohar
Every graph would contain even number of odd degree vertices. On Fri, Apr 4, 2008 at 5:32 PM, Douglas Diniz <[EMAIL PROTECTED]> wrote: > If I remember a planar graph must have a even number of vertex with odd > degree. > > On Fri, Apr 4, 2008 at 8:44 AM, kunzmilan <[EMAIL PROTECTED]> wrote: > > >

[algogeeks] Re: How to calculate the sum of three integers using only one '+' operation?

2007-10-23 Thread Deepak Manohar
how abt ( ( (a & b) | (a & c) | (b & c) )<<1) + (a ^ b ^ c) On 10/24/07, Zeratul <[EMAIL PROTECTED]> wrote: > > > Only operation | ^ & >> << ! ~ are allowed to use in the expression. > other operations like minus- multiply* cannot be used as well as > branch expression like IF FOR WHILE > > Plus o

[algogeeks] Re: isomorphism

2006-10-25 Thread Deepak Manohar
  return 1;    }    else  return 0;    }} On 10/25/06, None <[EMAIL PROTECTED]> wrote: Hello, how can I compare two trees that only have ints forisomorphism...can someone show me a simple algorithm to do this... -- Deepak Manohar TTrilogy09342889008 --~--~-

[algogeeks] Re: Graph Theory

2006-04-20 Thread Deepak Manohar
Introduction to Graph Theory by Douglas B. West is a good book which covers lots more chapters like maximal Matching(A more mathematical approach)On 4/20/06, BiGYaN <[EMAIL PROTECTED]> wrote: Graph Theoryby, N. DeoIt is a nice book covering almost the entire subject from ground up.And yes, you don