- Feb. 13, 2017
BBM 202 - ALGORITHMS
INTRODUCTION
- DEPT. OF COMPUTER ENGINEERING
Acknowledgement: The course slides are adapted from the slides prepared by R. Sedgewick and K. Wayne of Princeton University.
I NTRODUCTION Feb. 13, 2017 Acknowledgement: The course slides are - - PowerPoint PPT Presentation
BBM 202 - ALGORITHMS D EPT . OF C OMPUTER E NGINEERING I NTRODUCTION Feb. 13, 2017 Acknowledgement: The course slides are adapted from the slides prepared by R. Sedgewick and K. Wayne of Princeton University. I NTRODUCTION
Acknowledgement: The course slides are adapted from the slides prepared by R. Sedgewick and K. Wayne of Princeton University.
Thursday, 11:00-11:50 @D2-D3-D4
3
4
5
complex problems in the most efficient way.
knowledge of key concepts that underly important algorithms in use on computers today.
programming assignments supplied in the complementary BBM 204 Software Practicum.
assignments (done individually) (80%).
6
by undergraduates in a course like this!
7
300 BCE 1920s 1930s 1940s 1950s 1960s 1970s 1980s 1990s 2000s
8
9
“ For me, great algorithms are the poetry of computation. Just like verse, they can be terse, allusive, dense, and even mysterious. But once unlocked, they cast a brilliant new light on some aspect of computing. ” — Francis Sullivan
2 COMPUTING IN S CIE NCE& E NGINE E R ING Computational algorithms are probably as old as civilization. Sumerian cuneiform, one of the most ancient written records, consists partly of algorithm descriptions for reckoning in baseTHEJ
OY OFALGORITHMS
Francis S ullivan, As sT
HE THEME OF THIS FIRST-OF-THE-CENTURY ISSUE OF COMPUTING IN SCIENCE & ENGINEERING IS ALGORITHMS. IN FACT, WE WERE BOLD ENOUGH—AND PERHAPS FOOLISH ENOUGH—TO CALL THE 10 EXAMPLES WE’VE SE- LECTED “THE TOP 10 ALGORITHMS OF THE CENTURY.” F R O M T H E E D I T O R S“ It has often been said that a person does not really understand something until he teaches it to someone else. Actually a person does not really understand something until he can teach it to a computer, i.e. express it as an algorithm The attempt to formalise things as algorithms lead to a much deeper understanding than if we simply try to comprehend things in the traditional way. algorithm must be seen to be believed. ” — Donald Knuth
10
“ I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships. ” — Linus Torvalds (creator of Linux) “ Algorithms + Data Structures = Programs. ” — Niklaus Wirth
11
20th century science (formula based)
E = mc2 F = ma
F = Gm1m2 r2
− !2 2m ∇2 + V(r) ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ Ψ(r) = E Ψ(r)
“ Algorithms: a common language for nature, human, and computer. ” — Avi Wigderson
21st century science (algorithm based)
for (double t = 0.0; true; t = t + dt) for (int i = 0; i < N; i++) { bodies[i].resetForce(); for (int j = 0; j < N; j++) if (i != j) bodies[i].addForce(bodies[j]); }
12
13
Why study anything else?
notes, programming assignments and important deadlines.
14
15
16
17
18
19
F O U R T H E D I T I O N
R O B E R T S E D G E W I C K K E V I N W A Y N E1st edition (1982) 3rd edition (1997) 2nd edition (1988) http://www.algs4.princeton.edu
20
21