Science Fair Projects Ideas - Solovay-Strassen primality test

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

Solovay-Strassen primality test

The Solovay-Strassen primality test is a probabilistic test to determine if a number is composite or probably prime.

Concepts

Euler proved that for a prime number p,

\left(\frac{a}{p}\right) \equiv a^{\left(\frac{p-1}{2}\right)}\pmod p

where

\left(\frac{a}{p}\right)

is the Legendre symbol.

Thus, if we have a value p and want to determine if it is prime, we can check many random values of a and make sure the above equality holds. If it does not hold for some a, we know that p must not be prime.

Much like with the Fermat primality test, however, there are liars. A value, a is known as an Euler liar if the equality holds and p is composite. An Euler witness is a value of a such that the equality does not hold when p is composite -- that is to say that a is a witness for the compositeness of p.

Unlike the Fermat primality test, for every composite p at least half of all

a \in(\mathbb{Z}/n\mathbb{Z})^*

are Euler witnesses. Therefore, there are no such values that are guaranteed to be liars all the time, like Carmichael numbers are for Fermat's test.

Algorithm and running time

The algorithm can be written as follows:

Inputs: n: a value to test for primality; k: a parameter that determines the number of times to test for primality
Output: composite if n is composite, otherwise probably prime
repeat k times:
x ← (a/n)
if x = 0 or a(n − 1)/2 mod nx then return composite
return probably prime

Using fast algorithms for modular exponentiation, the running time of this algorithm is O(k × log3p), where k is the number of times we test a random a, and p is the value we want to test for primality. The probability of the algorithm failing is 2-k. For purposes of cryptography if we pick a sufficiently large value of k, such as 100, the chance of the algorithm failing is so small that we can use the prime in cryptographic applications without worrying.

10-26-2009 08:16:03
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice