Sieve of Pritchard - Biblioteka.sk

Upozornenie: Prezeranie týchto stránok je určené len pre návštevníkov nad 18 rokov!
Zásady ochrany osobných údajov.
Používaním tohto webu súhlasíte s uchovávaním cookies, ktoré slúžia na poskytovanie služieb, nastavenie reklám a analýzu návštevnosti. OK, súhlasím


Panta Rhei Doprava Zadarmo
...
...


A | B | C | D | E | F | G | H | CH | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

Sieve of Pritchard
 ...
Sieve of Pritchard: algorithm steps for primes up to 150

In mathematics, the sieve of Pritchard is an algorithm for finding all prime numbers up to a specified bound. Like the ancient sieve of Eratosthenes, it has a simple conceptual basis in number theory.[1] It is especially suited to quick hand computation for small bounds.

Whereas the sieve of Eratosthenes marks off each non-prime for each of its prime factors, the sieve of Pritchard avoids considering almost all non-prime numbers by building progressively larger wheels, which represent the pattern of numbers not divisible by any of the primes processed thus far. It thereby achieves a better asymptotic complexity, and was the first sieve with a running time sublinear in the specified bound. Its asymptotic running-time has not been improved on, and it deletes fewer composites than any other known sieve. It was created in 1979 by Paul Pritchard.[2]

Since Pritchard has created a number of other sieve algorithms for finding prime numbers,[3][4][5] the sieve of Pritchard is sometimes singled out by being called the wheel sieve (by Pritchard himself[1]) or the dynamic wheel sieve.[6]

Overview

A prime number is a natural number that has no natural number divisors other than the number and itself.

To find all the prime numbers less than or equal to a given integer , a sieve algorithm examines a set of candidates in the range , and eliminates those that are not prime, leaving the primes at the end. The sieve of Eratosthenes examines all of the range, first removing all multiples of the first prime , then of the next prime , and so on. The sieve of Pritchard instead examines a subset of the range consisting of numbers that occur on successive wheels, which represent the pattern of numbers left after each successive prime is processed by the sieve of Eratosthenes.

For the 'th wheel represents this pattern. It is the set of numbers between and the product of the first prime numbers that are not divisible by any of these prime numbers (and is said to have an associated length ). This is because adding to a number doesn't change whether or not it is divisible by one of the first prime numbers, since the remainder on division by any one of these primes is unchanged.

So with length represents the pattern of odd numbers; with length represents the pattern of numbers not divisible by or ; etc. Wheels are so-called because can be usefully visualized as a circle of circumference with its members marked at their corresponding distances from an origin. Then rolling the wheel along the number line marks points corresponding to successive numbers not divisible by one of the first prime numbers. The animation shows being rolled up to 30.

Rolling the 2nd wheel up to 30.

It's useful to define for to be the result of rolling up to . Then the animation generates . Note that up to , this consists only of and the primes between and .

The sieve of Pritchard is derived from the observation[1] that this holds generally: for all , the values in are and the primes between and . It even holds for , where the wheel has length and contains just (representing all the natural numbers). So the sieve of Pritchard starts with the trivial wheel and builds successive wheels until the square of the wheel's first member after is at least . Wheels grow very quickly, but only their values up to are needed and generated.

It remains to find a method for generating the next wheel. Note in the animation that can be obtained by rolling up to and then removing times each member of . This also holds generally: for all ,








Text je dostupný za podmienok Creative Commons Attribution/Share-Alike License 3.0 Unported; prípadne za ďalších podmienok.
Podrobnejšie informácie nájdete na stránke Podmienky použitia.

Your browser doesn’t support the object tag.

www.astronomia.sk | www.biologia.sk | www.botanika.sk | www.dejiny.sk | www.economy.sk | www.elektrotechnika.sk | www.estetika.sk | www.farmakologia.sk | www.filozofia.sk | Fyzika | www.futurologia.sk | www.genetika.sk | www.chemia.sk | www.lingvistika.sk | www.politologia.sk | www.psychologia.sk | www.sexuologia.sk | www.sociologia.sk | www.veda.sk I www.zoologia.sk