FACTOID # 78: 22% of New Zealanders have used cannabis.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > 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 . 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



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 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.


  Results from FactBites:
 
Local Courts in Your County (279 words)
Criminal, civil and family cases are heard in the trial courts.
Most civil cases that are heard in the Superior Court involve disputes in which a plaintiff claims that he or she has been hurt by the actions of the defendant and seeks monetary compensation.
Civil cases in which the amounts in controversy exceeds $15,000 are heard in the Civil Division of Superior Court.
Trial division - Wikipedia, the free encyclopedia (311 words)
Trial division is the simplest and easiest to understand of the integer factorization algorithms.
Trial division is guaranteed to find a factor of n, since it checks all possible prime factors of n.
In the worst case, trial division is a very inefficient algorithm.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.