cs214 algorithms and d ata structures
TRANSCRIPT
![Page 1: CS214 ALGORITHMS AND D ATA STRUCTURES](https://reader030.vdocuments.net/reader030/viewer/2022021320/577cc6d61a28aba7119f4270/html5/thumbnails/1.jpg)
8/12/2019 CS214 ALGORITHMS AND D ATA STRUCTURES
http://slidepdf.com/reader/full/cs214-algorithms-and-d-ata-structures 1/11
CS 214
ALGORITHMS
AND
DATA STRUCTURES
BRINK VAN DER MERWE
Slides taken from http://www.princeton.edu/~cos226
![Page 2: CS214 ALGORITHMS AND D ATA STRUCTURES](https://reader030.vdocuments.net/reader030/viewer/2022021320/577cc6d61a28aba7119f4270/html5/thumbnails/2.jpg)
8/12/2019 CS214 ALGORITHMS AND D ATA STRUCTURES
http://slidepdf.com/reader/full/cs214-algorithms-and-d-ata-structures 2/11
2
What is CS 214?
• Algorithm: method for solving a problem.
• Data structure: method to store information.
CS 214 course overview
![Page 3: CS214 ALGORITHMS AND D ATA STRUCTURES](https://reader030.vdocuments.net/reader030/viewer/2022021320/577cc6d61a28aba7119f4270/html5/thumbnails/3.jpg)
8/12/2019 CS214 ALGORITHMS AND D ATA STRUCTURES
http://slidepdf.com/reader/full/cs214-algorithms-and-d-ata-structures 3/11
3
Their impact is broad and far-reaching.
Internet. Web search, packet routing, distributed file sharing, ...
Biology. Human genome project, protein folding, ...
Computers. Circuit layout, file system, compilers, ...
Computer graphics. Movies, video games, virtual reality, ...
Security. Cell phones, e-commerce, voting machines, ...
Multimedia. MP3, JPG, DivX, HDTV, face recognition, ...
Social networks. Recommendations, news feeds, advertisements, ...
Physics. N-body simulation, ...
!
Why study algorithms?
![Page 4: CS214 ALGORITHMS AND D ATA STRUCTURES](https://reader030.vdocuments.net/reader030/viewer/2022021320/577cc6d61a28aba7119f4270/html5/thumbnails/4.jpg)
8/12/2019 CS214 ALGORITHMS AND D ATA STRUCTURES
http://slidepdf.com/reader/full/cs214-algorithms-and-d-ata-structures 4/11
Old roots, new opportunities.
• Study of algorithms dates at least to Euclid.
• Formalized by Church and Turing in 1930s.
• Some important algorithms were discovered
by undergraduates in a course like this!
4
300 BCE
1920s
1930s
1940s
1950s
1960s
1970s
1980s
1990s
2000s
Why study algorithms?
![Page 5: CS214 ALGORITHMS AND D ATA STRUCTURES](https://reader030.vdocuments.net/reader030/viewer/2022021320/577cc6d61a28aba7119f4270/html5/thumbnails/5.jpg)
8/12/2019 CS214 ALGORITHMS AND D ATA STRUCTURES
http://slidepdf.com/reader/full/cs214-algorithms-and-d-ata-structures 5/11
5
To solve problems that could not otherwise be addressed.
Ex. Network connectivity. [stay tuned]
Why study algorithms?
![Page 6: CS214 ALGORITHMS AND D ATA STRUCTURES](https://reader030.vdocuments.net/reader030/viewer/2022021320/577cc6d61a28aba7119f4270/html5/thumbnails/6.jpg)
8/12/2019 CS214 ALGORITHMS AND D ATA STRUCTURES
http://slidepdf.com/reader/full/cs214-algorithms-and-d-ata-structures 6/11
6
For intellectual stimulation.
Why study algorithms?
![Page 7: CS214 ALGORITHMS AND D ATA STRUCTURES](https://reader030.vdocuments.net/reader030/viewer/2022021320/577cc6d61a28aba7119f4270/html5/thumbnails/7.jpg)
8/12/2019 CS214 ALGORITHMS AND D ATA STRUCTURES
http://slidepdf.com/reader/full/cs214-algorithms-and-d-ata-structures 7/117
To become a proficient programmer.
Why study algorithms?
![Page 8: CS214 ALGORITHMS AND D ATA STRUCTURES](https://reader030.vdocuments.net/reader030/viewer/2022021320/577cc6d61a28aba7119f4270/html5/thumbnails/8.jpg)
8/12/2019 CS214 ALGORITHMS AND D ATA STRUCTURES
http://slidepdf.com/reader/full/cs214-algorithms-and-d-ata-structures 8/11
They may unlock the secrets of life and of the universe.
Computational models are replacing mathematical models in scientific inquiry.
8
20th century science
(formula based)
E = mc2
F = ma
F =
Gm1m
2
r2
"h
2
2m#2
+ V (r)$
% &
'
( ) *(r) = E *(r)
Why study algorithms?
21st century science
(algorithm based)
![Page 9: CS214 ALGORITHMS AND D ATA STRUCTURES](https://reader030.vdocuments.net/reader030/viewer/2022021320/577cc6d61a28aba7119f4270/html5/thumbnails/9.jpg)
8/12/2019 CS214 ALGORITHMS AND D ATA STRUCTURES
http://slidepdf.com/reader/full/cs214-algorithms-and-d-ata-structures 9/11
• Their impact is broad and far-reaching.
• To solve problems that could not otherwise be addressed.
• For intellectual stimulation.
• To become a proficient programmer.
• They may unlock the secrets of life and of the universe.
• For fun and profit.
9
Why study algorithms?
![Page 10: CS214 ALGORITHMS AND D ATA STRUCTURES](https://reader030.vdocuments.net/reader030/viewer/2022021320/577cc6d61a28aba7119f4270/html5/thumbnails/10.jpg)
8/12/2019 CS214 ALGORITHMS AND D ATA STRUCTURES
http://slidepdf.com/reader/full/cs214-algorithms-and-d-ata-structures 10/11
Algorithms 4th edition by R. Sedgewick and K. Wayne, Addison-Wesley
Professional, 2011, ISBN 0-321-57351-X.
Available in hardcover and Kindle.
10
Resources (textbook)
![Page 11: CS214 ALGORITHMS AND D ATA STRUCTURES](https://reader030.vdocuments.net/reader030/viewer/2022021320/577cc6d61a28aba7119f4270/html5/thumbnails/11.jpg)
8/12/2019 CS214 ALGORITHMS AND D ATA STRUCTURES
http://slidepdf.com/reader/full/cs214-algorithms-and-d-ata-structures 11/11
http://www.cs.sun.ac.za/rw214
Booksites.
• Brief summary of content.
• Download code from book.
11
Resources (web)
http://www.princeton.edu/~cos226
http://www.algs4.princeton.edu