prime numbers and primality tests

23
Prime Numbers And Primality Tests - Testing Primality - Euclid’s Proof - Integer Factorization

Upload: pritijha

Post on 02-Oct-2015

245 views

Category:

Documents


3 download

DESCRIPTION

this ppt describe about prime numbers and primality tests, aks naive methods etc.

TRANSCRIPT

Prime Numbers And Primality Tests

Prime Numbers And Primality TestsTesting PrimalityEuclids ProofInteger Factorization

What is Prime Number ?Prime Number:- The number which is divisible by 1 or itself only.

Example :- 2,3,5,7,11,13.

Primality Test:-A Primality Test is an algorithm to determining whether an input number is prime or not .Trial Division:- It is a simplest primality test .Given an input numbern, check whether any integermfrom 2 to n 1 evenlydividesn(the division leaves noremainder). Ifnis divisible by anymthenniscomposite, otherwise it isprime.Naive method:-bool isPrime(unsigned long n) { if (n 1; } else if (n % 2 == 0 || n % 3 == 0) { return false; }******else { for (unsigned short i = 5; i * i info=left13 break14 return(fact)

ANOTHER APPROACH:-TRIALL DIVISION METHOD:-Divide n with all primes up to n starting from 2 and collect all divisors. A very simple algorithm. Takes time exp( log n) = L(1, ).Notation: Denote exp(c(log n)(loglog n)1-) as L(, c).

APPLICATION OF I.F :-CRYPTOGRAPHY - ATM-COMPUTER SCIENCE -AND ELECTRONIC

REFRENCES:-Richard Crandall and Carl Pomerance (2001). Prime Numbers: A Computational PerspectiveDonald Knuth. The Art of Computer Programming, Volume 2: Seminumerical Algorithms , Third :Factoring into Primes.www.cse.iitk.ac.in/users/manindra/algebra/primality_v6.pdfKleinjung, et al (2010-02-18). "Factorization of a 768-bit RSA modulus". International Association for Cryptologic Research. Retrieved 2010-08-09. Euclid's Elements, Book IX, Prop. 20 (Euclid's proof, on David Joyce's website at Clark University)Weisstein, Eric W., "Euclid's Theorem", MathWorld.

Thank You !