[algogeeks] Re: [Athena 2011]

2011-01-12 Thread Pratik Bhadkoliya
magic(6) = 169091609518327614304 On Jan 12, 10:23 pm, ashish agarwal wrote: > didn't get your question dude > > On Wed, Jan 12, 2011 at 10:39 PM, Pratik Bhadkoliya > wrote: > > > > > > > > > (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) is an o

[algogeeks] [Athena 2011]

2011-01-12 Thread Pratik Bhadkoliya
(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) is an ordered list of positive integers Let magic(value) denote the number of such ordered lists that exist such that gcd(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z)=1 AND max(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z)=value F

Re: [algogeeks] student introduction problems

2010-11-07 Thread Pratik Bhadkoliya
A Linear-time Majority Vote Algorithm Problem: How to decide, in one pass which element of a sequence is in the majority, provided there is such an element. As we sweep through the sequence, we maintain a pair consisting of a current candidate and a counter. Initially, the current candidate is un