Science Fair Projects Ideas - Trial division

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.

Trial division

Trial division is the simplest and easiest to understand of the integer factorization algorithms.

Given a composite integer n (throughout this article, n means "the integer to be factored"), trial division consists of trial-dividing n by every prime number less than or equal to \sqrt{n}. If a number is found which divides evenly into n, a factor of n has been found.

Trial division is guaranteed to find a factor of n, since it checks all possible prime factors of n. Thus, if the algorithm fails, it is proof that n is prime.

Trial division can be optimized in a few ways. For example, if the last digit of n is not 0 or 5, the algorithm can skip testing 5 as a factor. The same can be applied to 2 by checking the last digit, and 3 by checking the digit sum.

In the worst case, trial division is a very inefficient algorithm. If it starts from 2 and works up to the square root of n, the algorithm requires

\pi(\sqrt{n})

trial divisions, where pi(x) is the number of primes less than x. This does not take into account the overhead of primality testing. If a variant is used without primality testing, but simply dividing by every odd number less than the square root of n, prime or not, it takes {\sqrt{n}\over 2} trial divisions. This means that for n with large prime factors of similar size (like those used in public key cryptography), trial division is computationally infeasible.

However, for n with at least one small factor, trial division can be a quick way to find that small factor. It is worthwhile to note that for random n, there is a 50% chance that 2 is a factor of n, and a 33% chance that 3 is a factor, and so on. It can be shown that 88% of all positive integers have a factor under 100, and that 91% have a factor under 1000.

For most significant factoring concerns, however, other algorithms are more efficient and therefore feasible.

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