[algogeeks] Re: does n exist?

2006-12-13 Thread ljb
this may help you to tackle the problem. http://mathworld.wolfram.com/CollatzProblem.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks] Re: K minimum sums in two sorted arrays ?

2006-11-29 Thread ljb
I think O(klogk) is possible. array1=A={a1,a2,...,},B=arrary2={b1,b2,..} think about the 2-d grid generated by A,B ( all points (ai,bj)). using a swap line x+y=c, swap these point until we have scaned k point. maintain a heap to tell which point will be the next point we will scan. Moreover, if

[algogeeks] Re: k-independent-set

2006-11-28 Thread ljb
your problem is a typical NPcomplete problem and no polynomial algorithm is possible. the link you provide just calculates maximal independent set, not maximum independent set. It turns out this two can be totally different. Ken1 wrote: I've been trying to do this for a while and now I give up,