Re: [algogeeks] prime factorization algo

2011-09-20 Thread siddharth srivastava
initialise a bit vector till the square root of the number and cancel out the factors of numbers with whom divisibility has been checked (starting from 2) you can use bitvector to implement it. set false for the discarded values. if none remains true (given that you initialise the bit vector with

[algogeeks] prime factorization algo

2011-09-19 Thread Manish Verma
does anybody know the fastest algo for prime factorization of a number??? -- 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

Re: [algogeeks] prime factorization algo

2011-09-19 Thread Rahul
how much big number are You tHINKING Rahul On Mon, Sep 19, 2011 at 2:40 PM, Manish Verma jalsa.n.sa...@gmail.com wrote: does anybody know the fastest algo for prime factorization of a number??? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks

Re: [algogeeks] Prime numbers

2011-08-17 Thread Nitin Nizhawan
Hi Dod, Could you pls expalin what this algorithm is doing and from where you got it. Thanks Nitin On Wed, Aug 17, 2011 at 2:56 AM, Don dondod...@gmail.com wrote: I wrote a program to print prime numbers, but it is not very fast. Can someone help me figure out why? #include stdio.h /*

[algogeeks] Prime numbers

2011-08-16 Thread Don
I wrote a program to print prime numbers, but it is not very fast. Can someone help me figure out why? #include stdio.h /* This program implements a blindingly fast algorithm to find prime numbers, using an elegant recursive method. */ int _(int n, int m, int d, int t=0) { int r; if

Re: [algogeeks] Prime numbers

2011-08-16 Thread sandeep pandey
try to implement sieve. it,s a well known algorithm to find out d prime frequently. -- 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

Re: [algogeeks] Prime numbers

2011-08-16 Thread Sanjay Rajpal
Agree with Sandeep :) Try this link http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes. Hope it helps :) Sanjay Kumar B.Tech Final Year Department of Computer Engineering National Institute of Technology Kurukshetra Kurukshetra - 136119 Haryana, India On Tue, Aug 16, 2011 at 2:28 PM, sandeep

Re: [algogeeks] Prime numbers

2011-08-16 Thread Dipankar Patro
Sieve's is the fastest in generating prime numbers. +1 to Sandeep and Sanjay On 17 August 2011 08:21, Sanjay Rajpal sanjay.raj...@live.in wrote: Agree with Sandeep :) Try this link http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes. Hope it helps :) Sanjay Kumar B.Tech Final Year

Re: [algogeeks] Prime numbers

2011-08-16 Thread Nitin Nizhawan
Can someone pls explain what dod's algorithm is doing? Dod, from where did you get this recursive algo? On Wed, Aug 17, 2011 at 8:45 AM, Dipankar Patro dip10c...@gmail.com wrote: Sieve's is the fastest in generating prime numbers. +1 to Sandeep and Sanjay On 17 August 2011 08:21, Sanjay

[algogeeks] Prime Numbers

2011-07-23 Thread frank
what is the efficient algorith to find the prime numbers or to check a number prime or not ? Helpful if the pseudo code provided. thank you -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Prime Numbers

2011-07-23 Thread arun kumar
hope this link will help you http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=primalityTesting On Sat, Jul 23, 2011 at 10:39 PM, frank abb...@gmail.com wrote: what is the efficient algorith to find the prime numbers or to check a number prime or not ? Helpful if the pseudo code provided.

[algogeeks] prime number using Sieve of Eratosthenes

2011-03-21 Thread rohit
genrate prime number using Sieve of Eratosthenes method explanation is here http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes pls help me out -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] prime number using Sieve of Eratosthenes

2011-03-21 Thread Anurag atri
what did you not understand in this ? On Mon, Mar 21, 2011 at 4:59 PM, rohit scofiel...@rediffmail.com wrote: genrate prime number using Sieve of Eratosthenes method explanation is here http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes pls help me out -- You received this message because

[algogeeks] Prime Numbers

2011-01-25 Thread siddharth srivastava
Hi Its an easy one but still I am looking for the most efficient approach. Find first 1 million prime numbers. -- Siddharth Srivastava When you have learned to snatch the error code from the trap frame, it will be time for you to leave. -- You received this message because you are

[algogeeks] prime or not

2007-03-29 Thread Terry
why are strings 1, 1001,1001001 ,1001001001, 1001001001001, k*001* where k is the previous string all non primes. i saw an article from dijkstra but couldn't understand other than when sum of string is 3. can someone explain to me why link:

[algogeeks] Fwd: [algogeeks] prime or not

2007-03-29 Thread Karthik Singaram L
Oooh...I almost forgot to add this.. notice the relation between the proof for part (ii) and the discrete logarithm problem. The proof is no mere coincidence. This is the reason behind using primes in encryption schemes that rely on the hardness of the discrete logarithm problem. This will ensure