[algogeeks] Re: Best Algorithm to find a Prime Number

2006-04-29 Thread Nat (Padmanabhan Natarajan)
Hi,Mayur, even though primality testing has been proven to be polynomial in time, the randomized ones are what are being used due to efficiency considerations.Arul, you may be better off searching for Rabin-Miller test. Wikipedia also has an interesting article with further links. Cheers,NatOn 4/29

[algogeeks] Separating pointts by axis parallel lines:

2006-04-29 Thread smith J
Separating ponits by axis parallel lines:Input:Set of n ponts in the two dimentional plane,point i given by coordinates X and Y.No two points have the same X or Y.Output:Set of Vertical or horizontal each given by direction and one coordinate(where it intersects the axis) such that any two points o

[algogeeks] Re: Best Algorithm to find a Prime Number

2006-04-29 Thread Mayur
Hi, If you are looking for primality testing, google for the paper "Prime is in P". The original paper's by three IIT-Kanpur people. The papers that followed up give the best algorithms for checking primality. If you are looking for prime number generation, look out for "sieve methods" - especiia

[algogeeks] Re: Best Algorithm to find a Prime Number

2006-04-29 Thread B. P. TBC
This algorithm (in Pascal) returns True, if x is a prime number, and returns False, if x isn't prime. function Prime(x: word): boolean; var i: word; v: boolean; Begin v := False; if x=1 then v := True; for i:=2 to round(sqrt(x)) do Begin if x mod i = 0 then v := True

[algogeeks] Re: Best Algorithm to find a Prime Number

2006-04-29 Thread Mohammad Moghimi
Hi, give more specification of the problem.I think --return aPrimeNumberSuchAs2;--is good solution for your problem!!!On 4/29/06, Arulanandan P <[EMAIL PROTECTED]> wrote: Hi ,     can anybody tell me best algorithm for finding a Prime Numberbyearulanandan --

[algogeeks] Best Algorithm to find a Prime Number

2006-04-29 Thread Arulanandan P
Hi ,     can anybody tell me best algorithm for finding a Prime Numberbyearulanandan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegr