07.01.2013 Views

Dietzfelbinger M. Primality testing in polynomial time ... - tiera.ru

Dietzfelbinger M. Primality testing in polynomial time ... - tiera.ru

Dietzfelbinger M. Primality testing in polynomial time ... - tiera.ru

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.2 Polynomial and Super<strong>polynomial</strong> Time Bounds 5<br />

resentation of n, which differs from log n by at most 1. S<strong>in</strong>ce (log n)/(log10 n)<br />

is the constant (ln 10)/(ln 2) ≈ 3.322 ≈ 10<br />

3 ,wehave�n�10 ≈ 3<br />

10 log n. For<br />

example, a number with 80 b<strong>in</strong>ary digits has about 24 decimal digits.) Similarly,<br />

as an elementary operation we view the addition or the multiplication<br />

of two bits. A rough estimate on the basis of the naive methods shows that<br />

certa<strong>in</strong>ly c · ℓ bit operations are sufficient to add, subtract, or compare two<br />

ℓ-bit numbers; for multiplication and division we are on the safe side if we<br />

assume an upper bound of c · ℓ2 bit operations, for some constant c. Assume<br />

now an algorithm A is given that performs TA(n) elementary operations on<br />

<strong>in</strong>put n. We consider possible bounds on TA(n) expressed as fi(log n), for<br />

some functions fi : N → R; see Table 1.1. The table lists the bounds we<br />

get for numbers with about 60, 150, and 450 decimal digits, and it gives the<br />

b<strong>in</strong>ary length of numbers we can treat with<strong>in</strong> 1012 and 1020 computational<br />

steps.<br />

i fi(x) fi(200) fi(500) fi(1500) si(10 12 ) si(10 20 )<br />

1 c · x 200c 500c 1,500c 10 12 /c 10 20 2 c · x<br />

/c<br />

2<br />

40,000c 250,000c 2.2c · 10 6<br />

10 6 / √ c 10 10 / √ 3 c · x<br />

c<br />

3<br />

8c · 10 6<br />

1.25c · 10 8<br />

3.4c · 10 9<br />

10 4 / 3√ c 4.6 · 10 6 / 3√ 4 c · x<br />

c<br />

4<br />

1.6c · 10 9<br />

6.2c · 10 10<br />

5.1c · 10 12<br />

1,000/ 4√ c 100,000/ 4√ 5 c · x<br />

c<br />

6<br />

6.4c · 10 13<br />

1.6c · 10 16<br />

1.1c · 10 19<br />

100/ 6√ c 2150/ 6√ 6 c · x<br />

c<br />

9<br />

5.1c · 10 20<br />

2.0c · 10 24<br />

3.8c · 10 28<br />

22/ 9√ c 165/ 9√ c<br />

7 x 2lnlnx<br />

4.7 · 10 7<br />

7.3 · 10 9<br />

4.3 · 10 12<br />

8 c · 2<br />

1,170 22,000<br />

√ x<br />

18,000c 5.4c · 10 6<br />

4.55c · 10 11<br />

1,600 4,400<br />

9 c · 2 x/2<br />

1.3c · 10 30<br />

1.6c · 10 60<br />

2.6c · 10 120<br />

80 132<br />

Table 1.1. Growth functions for operation bounds. fi(200), fi(500), fi(1500) denote<br />

the bounds obta<strong>in</strong>ed for 200-, 500-, and 1500-bit numbers; si(10 12 )andsi(10 20 )<br />

are the maximal numbers of b<strong>in</strong>ary digits admissible so that an operation bound<br />

of 10 12 resp. 10 20 is guaranteed<br />

We may <strong>in</strong>terpret the figures <strong>in</strong> this table <strong>in</strong> a variety of ways. Let us<br />

(very optimistically) assume that we <strong>ru</strong>n our algorithm on a computer or<br />

a computer network that carries out 1,000 bit operations <strong>in</strong> a nanosecond.<br />

Then 10 12 steps take about 1 second (feasible), and 10 20 steps take a little<br />

more than 3 years (usually unfeasible). Consider<strong>in</strong>g the rows for f1 and f2<br />

we note that algorithms that take only a l<strong>in</strong>ear or quadratic number of operations<br />

can be <strong>ru</strong>n for extremely large numbers with<strong>in</strong> a reasonable <strong>time</strong>. If<br />

the bounds are cubic (as for Algorithm 1.2.1, f3), numbers with thousands<br />

of digits pose no particular problem; for <strong>polynomial</strong>s of degree 4 (f4), we<br />

beg<strong>in</strong> to see a limit: numbers with 30,000 decimal digits are def<strong>in</strong>itely out<br />

of reach. Polynomial operation bounds with larger exponents (f5 or f6) lead

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!