150 likes | 167 Views
CSE 326 Course Review. David Kaplan Dept of Computer Science & Engineering Autumn 2001. Why (did we) study data structures?. Clever ways to organize information in order to enable efficient computation. Databases. AI. Theory. Graphics. Networking. Games. Systems. Applications.
E N D
CSE 326Course Review David Kaplan Dept of Computer Science & Engineering Autumn 2001
Why (did we) study data structures? Clever ways to organize information in order to enable efficient computation Databases AI Theory Graphics Networking Games Systems Applications Data Structures CSE 326 Autumn 2001 2
Why (did we) take CSE 326? • Guaranteed non-obsolescence • May be most important CS course you ever take • Gain concepts, plans and mechanisms for creating better software CSE 326 Autumn 2001 3
Course Goals • Learn some of the fundamental data structures in computer science • Learn to solve problems abstractly • Data structures are the building blocks • Learn to analyze and improve algorithms • Prove correctness • Gauge and improve time complexity • Learn UNIX • Required in upcoming courses CSE 326 Autumn 2001 4
Concepts, Plans, Mechanisms Concepts • A list that lets me store and retrieve things • A tree that lets me store and retrieve things by hierarchy • A table that lets me store and retrieve things by name • A graph (network) that represents distances between cities, relationships between people, tasks within a project, etc. • and so on … CSE 326 Autumn 2001 5
Concepts, Plans, Mechanisms Plans • Pseudocode • Block Diagrams • Flowcharts Mechanisms • Working code Intuition is the bridge concepts plans mechanisms CSE 326 Autumn 2001 6
Organizing Information “Linear” “Hierarchical” “Graphical” CSE 326 Autumn 2001 7
Using Organized Information Examples • Dictionary ADT • Store, retrieve, update, delete to-from large bodies of information • Priority queue ADT • Handle “priority” on-the-fly • Disjoint Sets ADT • Handle dynamic equivalence on-the-fly • Graph {ADT, data structure, ???} • Answer hard questions (sometimes efficiently!) • Shortest paths, spanning trees, … CSE 326 Autumn 2001 8
Asymptotic Complexity How the running time of an algorithm scales with the size of its input Ways to measure complexity • Worst case • Average case • Amortized over a series of (presumably representative) runs • Best case (occasionally useful) CSE 326 Autumn 2001 9
Apocalyptic Laptop Seth Lloyd, a physicist at the Massachusetts Institute of Technology, has calculated how to make PCs almost unimaginably faster--if you don't mind working on a black hole.Lloyd has used the laws of thermodynamics, information, relativity, and quantum mechanics to figure out the ultimate physical limits on the speed of a computer… Lloyd's ultimate laptop would convert all of its 1-kilogram mass into energy via Einstein's famous equation E = mc2, thus turning itself into a billion-degree blob of plasma. "This would present a packaging problem," Lloyd admits … The computer would be capable of performing 1051 operations per second. - Charles Seife, Science Magazine, Vol 289, No 5484, Sep 1 2000, pp. 1447-1448 CSE 326 Autumn 2001 10
Big Bang ApocaLap, 1 year ApocaLap, 1 sec 1000 MIPS since Big Bang 1000 MIPS, 1 day CSE 326 Autumn 2001 11
Lists Stacks Queues Search trees, in many flavors (BST, AVL, splay) Heaps, in many flavors (binary, d, leftist, skew) Hashing Graphs, spanning trees Graph algorithms (Dijkstra’s, Kruskal’s, Prim’s) Asymptotic complexity Recursion analysis Sorting, in many flavors Randomization (treaps, skip lists) Stuff we did CSE 326 Autumn 2001 12
Stuff we didn’t get to : - ( • Algorithm Design • Greedy • Divide and conquer • Backtracking • Dynamic programming • Amortized Analysis (formal mechanisms) • NP-Completeness • At least enough to qualitatively distinguish P and NP problems CSE 326 Autumn 2001 13
Are we convinced yet? Mastery of this material separates you from … CSE 326 Autumn 2001 14
Coming Attractions • Wed Dec 12: wrap-up and closing ceremony • Wed Dec 12 3:30-4:30pm: Case Study • Better Living through Graphs and Trees • Sun Dec 16: Final Exam Review Session • Time/place TBD To do study for … Final Exam Mon, Dec 17 2:30pm, MGH 389 CSE 326 Autumn 2001 15