+ All Categories
Home > Documents > Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of...

Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of...

Date post: 31-Mar-2015
Category:
Upload: clarissa-claudia-ketch
View: 214 times
Download: 0 times
Share this document with a friend
Popular Tags:
16
Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: http://staff.science.uva.nl/~peter/teaching/ct03.html
Transcript
Page 1: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

KNOW YOUR NUMBERS !The Impact of Complexity

Peter van Emde Boas

ILLC-FNWI-UvA

2003

See: http://staff.science.uva.nl/~peter/teaching/ct03.html

Page 2: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

Moore’s Law in action

© Scientifi American 274, 199601, p45

Computation speeddoubles every 1.5 years

Corresponding rate ofincrease ofMemory capacity

Page 3: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

1982 1985

Page 4: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

1986 1988

Page 5: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

1990 1992

Page 6: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

1994 1996

Page 7: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

1998 2000

Page 8: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

2003

Page 9: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

Is it really so nice ?

sum := 0for i = 1 to N do

sum := sum + a[i] ;print ( sum )

Back in 1977 this would work in less than a second for N = 10 000Can we deal with N = 400 000 000 today within a second ?

sum := 0for i = 1 to N do

j:= index[i] ; sum := sum + a[j] ;print ( sum )

And what about this one ?

Page 10: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

Information must be moved!

Source: Ph.d. Thesis Stefan ManegoldUnderstanding, Modeling, and Improving

Main-Memory Database PerformanceUvA Dec 16, 2002

Page 11: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

Information must be moved!

Source: Ph.d. Thesis Peter A. BonczMonet; A next-Generation

DBMS Kernel for Query-IntensiveApplications

UvA Mei 31, 2002

Page 12: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

Know your numbers !# Instructions Time

1 000 0.00001 sec1 000 000 0.01 sec Invisible10 000 000 0.1 sec Perceptive100 000 000 1 sec1 000 000 000 10 sec10 000 000 000 100 sec Coffee100 000 000 000 16.7 min Chat1 000 000 000 000 2 hr 47 min WHAARGH!10 000 000 000 000 27 hr the Limit!!100 000 000 000 000 11.25 days Hopeless1 000 000 000 000 000 4 months10 000 000 000 000 000 3.33 years Unrealistic100 000 000 000 000 000 33 years1 000 000 000 000 000 000 3.3 century

Processing times on a 100 MIPS system

1 day = 86400 sec 1 000 000 sec ≈ 11 days1 year ≈ 31 536 000 sec 1 000 000 000 sec ≈ 35 years

Page 13: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

WHAT IS COMPLEXITY ?

Relation between size of the input instance and the time required for solving this instance.

Traversing a list Linear O(n)Sorting O(n.logn)Multiplication Quadratic O(n2)Matrix multiplication Cubic O(n3)Truth table checking Exponential O(2n)Naive TSP O(n!)

What can be done in principle can become undoable in practice

Order of growth is more relevant than the implicit constants

Page 14: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

The Order of growth

10 20 50 100 200 1000

n .00001 .00002 .00005 .0001 .0002 .001

n.logn .00003 .00008 .00027 .0006 .0016 .01

n2 .0001 .0004 .0025 .01 .04 1

n3 .001 .008 .125 1 8 16 min

2n .001 1 31 y ?? !!?*

Time on a 1 MIPS system in seconds (unless stated otherwise)

Page 15: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

Impact of the faster machine

n 1000 times as large

n.logn 500 - 1000 times as large

n2 31 times as large

n3 10 times as large

2n add 10 to input size

That’s why Edmonds stated his thesis:Effective ==> Polynomial Time Complexity

Page 16: Introduction Complexity Theory 2002/03. Peter van Emde Boas KNOW YOUR NUMBERS ! The Impact of Complexity Peter van Emde Boas ILLC-FNWI-UvA 2003 See: peter/teaching/ct03.html.

Introduction Complexity Theory 2002/03. Peter van Emde Boas

A Fallacy ??

If computation speed doubles every 2 yearswe can perform (2N - 1) M operations in 2Nyears, where M is the number of operationsperformed in the first 2 years.

So why worry about exponential timealgorithms ??

What is wrong with this argument ?


Recommended