Lectures and Recitations
From 6.006 Introduction to Algorithms
(Difference between revisions)
m |
m (→Recitation 14, Generic Shortest-Path Algorithm: Concepts, Properties; Bellman-Ford: Examples, Negative-Cost Cycles) |
||
Line 89: | Line 89: | ||
==== [http://courses.csail.mit.edu/6.006/spring08/notes/lecture16.pdf Lecture 16], Shortest Paths II: Bellman Ford ==== | ==== [http://courses.csail.mit.edu/6.006/spring08/notes/lecture16.pdf Lecture 16], Shortest Paths II: Bellman Ford ==== | ||
==== [[Recitation 14]], Generic Shortest-Path Algorithm: Concepts, Properties; Bellman-Ford: Examples, Negative-Cost Cycles ==== | ==== [[Recitation 14]], Generic Shortest-Path Algorithm: Concepts, Properties; Bellman-Ford: Examples, Negative-Cost Cycles ==== | ||
+ | No slides, you had to be there to get the material :) | ||
+ | |||
==== [http://courses.csail.mit.edu/6.006/spring08/notes/lecture17.pdf Lecture 17], Shortest Paths III: Dijkstra ==== | ==== [http://courses.csail.mit.edu/6.006/spring08/notes/lecture17.pdf Lecture 17], Shortest Paths III: Dijkstra ==== | ||
* Reading: CLRS, 24.2, 24.3 | * Reading: CLRS, 24.2, 24.3 |
Revision as of 20:12, 16 April 2008
Introduction and Document Distance
Lecture 1, Introduction and Document Distance
- Document Distance (docdist{1,2,3,4}.py)
- Readings: CLRS, Chapters 1, 2, 3.
Recitation 1, Document Distance in Python (docdist{1,2,3,4}.py)
- Victor's Slides [PDF] | [Zipped Keynote]
Lecture 2, More Document Distance, Mergesort
- Document Distance (docdist{5,6}.py)
- Readings: CLRS, Sections 11.1 and 11.2.
Recitation 2, Python Cost Model, Review for Asymptotic Notation & Mergesort
- Victor's Slides [PDF] | [Zipped Keynote] | [Zipped Data (Numbers)]
- Python Cost Model
Binary Search Trees
Lecture 3, Airplane scheduling; Binary Search Trees
- Binary Search Trees (including code)
- Readings: CLRS, Chapter 10 and Sections 12.1-12.3
Recitation 3, Binary Search Trees
- Victor's Slides [PDF] | [Zipped Keynote]
- Code for Binary Search Trees augmented with subtree size [Python]
Lecture 4, Balanced Binary Search Trees
- See Binary Search Trees for AVL code
- Readings: CLRS, Sections 13.1 and 13.2 for a different approach (red-black trees)
- AVL tree animation applet
Recitation 4, AVL Trees (Balanced Binary Search Trees)
- Hueihan's Slides [PDF ]
- Victor's Slides [PDF] | [Zipped Keynote]
- Code for AVL Trees: [Python] (uses the BST code from Recitation 3)
Hashing
Lecture 5, Hashing I: Chaining, Hash Functions
- Document Distance (docdist-dict.py)
Recitation 5, Hashing in Python, Mutability
- Hueihan's Slides [PDF ]
- Victor's Slides [PDF] | [Zipped Keynote]
- The dangers of mutable dictionary keys: [Python Demo]
Lecture 6, Hashing II: Table Doubling, Karp-Rabin
- Reading: CLRS, Chapter 17 and Section 32.2
Recitation 6, Karp-Rabin review, Rolling Hashes principles and code
- Victor's Slides [PDF] | [Zipped Keynote]
- Super-awesome Rolling Hash code: [Python]
Lecture 7, Hashing III: Open Addressing
- Reading: CLRS, Section 11.4 (and 11.3.3 and 11.5 if interested)
Recitation 7, Open Addressing: theory review, Python code; More Rolling Hashes (for Rabin Karp)
- Victor's Slides [PDF] | [Zipped Keynote]
- Open Addressing code: [Python]
Sorting
Lecture 8, Sorting I: Heaps
- Reading: CLRS, Sections 2.1-2.3 and 6.1-6.2
Recitation 8, Overview of Sorting Methods; Heaps as Data Structures: Principles, Sorting, Priority Queues
- Hueihan's Slides [PDF]
- Victor's Slides [PDF] | [Zipped Keynote]
Lecture 9, Sorting II: Heaps
- Reading: CLRS, Sections 6.1-6.4
Lecture 10, Sorting III: Lower Bounds, Linear Time Sorting
- Reading: CLRS, Sections 8.1-8.4
Recitation 9, Quiz Review: Interesting Problems
- Slides [PDF] | [Zipped Keynote]
Lecture 11, Sorting IV: Stable Sorting, Radix Sort
Recitation 10, Counting,Radix and Bucket Sorting, Gas simulation
- Hueihan's Slides [PDF]
Searching
Lecture 12, Searching I: Graph Search, Representations, and Applications
- Simple Python code for graphs
- Reading: CLRS, Sections 22.1-22.3 and B.4
Lecture 13, Searching II: Breadth-First Search and Depth-First Search
- Reading: CLRS, Sections 22.2-22.3
Lecture 14, Searching III: Topological Sort and NP-completeness
- Reading: CLRS, Sections 22.4 and 34.1-34.3 (at a high level)
Recitation 12, BFS and DFS
- Python code for breadth-first-search
- Python code for depth-first-search
- Victor's Slides [PDF] | [Zipped Keynote]
Shortest Paths
Lecture 15, Shortest Paths I: Intro
- Reading: CLRS, Chapter 24 (Intro)
Recitation 13, Assistance for PS
- Victor's Slides [PDF] | [Zipped Keynote]
Lecture 16, Shortest Paths II: Bellman Ford
Recitation 14, Generic Shortest-Path Algorithm: Concepts, Properties; Bellman-Ford: Examples, Negative-Cost Cycles
No slides, you had to be there to get the material :)
Lecture 17, Shortest Paths III: Dijkstra
- Reading: CLRS, 24.2, 24.3
Recitation 15, Hands-on Dijkstra: Pseudocode, Preconditions, Examples, Why It Works; Priority Queues: Review, Extended Python Implementation
- Victor's Slides [PDF] | [Zipped Keynote]
Lecture 18, Shortest Paths IV: Dijkstra speedups
- Reading: Wagner Paper up to section 3.2