[algogeeks] CFP: The 2010 International Conference on Software Engineering Research and Practice (SERP'10), USA, July 2010

2010-01-26 Thread A. M. G. Solo
It would be greatly appreciated if this announcement could be shared with individuals whose research interests include software engineering research and practice. Thanks. --- CALL FOR PAPERS SERP'10 The 2010 International

[algogeeks] gcd sum function

2010-01-26 Thread abhijith reddy
Hello Let gcdsum[n] = gcd(1,1)+gcd(1,2)+gcd(1,3)+ ... +gcd(n,n) Also gcdsum[n] can be evaluated using : gcdsum[n] = n*sum(eulerphi(d)/d) for all d | n Now to compute all gcdsum values upto n we first need to precompute all eulerphi and then use a sieve like algorithm to make a table of all

Re: [algogeeks] gcd sum function

2010-01-26 Thread Anil Kishore
I guess you are referring to this problem http://icpcres.ecs.baylor.edu/onlinejudge/external/114/11424.html , which is also GCDEX in spoj. gcdsum function is multiplicative, so you can calculate it from 2 to N one-by-one. Also, for a prime p, gcdsum[ p^k ] = (k+1).p^k - (k).p^(k-1) { I just used

[algogeeks] Add 2 long integers with digits represented by linked lists

2010-01-26 Thread Algoose Chase
conditions: NO extra memory (@ stack or Heap) at all. No recursion. Any body has got any hint about how to get this done ? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To

Re: [algogeeks] Add 2 long integers with digits represented by linked lists

2010-01-26 Thread Anurag Bhatia
Let us take an example - Num 1 = 123456 Num 2= 1234 Link-1-Link-2-Link-3-Link-4-Link5-Link6 Link-1-Link-2-Link-3-Link-4 Add nodes into linkedlist 1 till either one of the list is not null. Make sure you process the carry in each iteration. --AB On Tue, Jan 26, 2010 at 9:47 PM, Algoose Chase