General Lecture Information
- Lecture location is STLC 111.
- Lectures will be recorded and accessible in Canvas.
Video cameras located in the back of the room will capture the instructor presentations in this course. For your convenience, you can access these recordings by logging into the course Canvas site. These recordings might be reused in other Stanford courses, viewed by other Stanford students, faculty, or staff, or used for other education and research purposes. Note that while the cameras are positioned with the intention of recording only the instructor, occasionally a part of your image or voice might be incidentally captured. If you have questions, please contact a member of the teaching team.
Lectures
Lecture 1: Why are you here?
Lecture resources
- Lecture notes: [PDF]
- Slides: [PDF]
- Python notebook: [Colab] [Zip]
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part I 1.1, 1.2, 1.3, 3.1
Recording
- Video: [Canvas]
Lecture 2: Asymptotics, Worst-Case Analysis, and MergeSort
Pre-lecture resources
Lecture resources
- Lecture notes: [PDF]
- Slides: [PDF]
- Proof that InsertionSort is Correct: [PDF]
- Python notebook: [Colab] [Zip]
- Concept check questions on asymptotics: [Interactive SVG] [Solved PDF]
- Concept check questions on sorting: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part I 1.4, 1.5, 1.6, 2; CLRS 2.3, 3
Recording
- Video: [Canvas]
Lecture 3: Solving Recurrences and the Master Theorem
Pre-lecture resources
- Pre-lecture exercise: [PDF]
Lecture resources
- Lecture notes: [PDF]
- Slides: [PDF] [PowerPoint]
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part I 4; CLRS 4.3, 4.4, 4.5
Recording
- Video: [Canvas]
Lecture 4: Median and Selection
Pre-lecture resources
- Pre-lecture exercise: [PDF]
Lecture resources
- Lecture notes: [PDF]
- Slides: [PDF] [PowerPoint]
- Python notebook: [Colab] [Zip]
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part I 6; CLRS 9
Recording
- Video: [Canvas]
Lecture 5: Randomized Algorithms and QuickSort
Pre-lecture resources
- Pre-lecture exercise: [PDF]
Lecture resources
- Lecture notes: [PDF]
- Slides:
- Python notebook: [Colab] [Zip]
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part I 5; CLRS 5.1, 5.2, 5.3, 7
Recording
- Video:
Lecture 6: BucketSort and Lower Bounds for Sorting
Pre-lecture resources
- Pre-lecture exercise: [PDF]
Lecture resources
- Lecture notes: [PDF]
- Slides:
- Python notebook: [Colab] [Zip]
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part I 5.6; CLRS 8.1, 8.2; [Avrim Blum’s notes on sorting lower bounds]
Recording
- Video:
Lecture 7: Binary Search Trees and Red-Black Trees
Pre-lecture resources
- Pre-lecture exercise: [PDF] [PDF with Solutions]
Lecture resources
- Lecture notes: [PDF]
- Slides:
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part II 11; CLRS 12.1, 12.2, 12.3, 13
Recording
- Video:
Lecture 8: Hashing
Pre-lecture resources
- Pre-lecture exercise: [PDF]
Lecture resources
- Lecture notes: [PDF]
- Slides:
- Python notebook: [Colab] [Zip]
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part II 12; CLRS 11
Recording
- Video:
Lecture 9: Graphs and BFS and DFS
Pre-lecture resources
- Pre-lecture exercise: [PDF]
Lecture resources
- Lecture notes: [PDF]
- Slides:
- Python notebook: [Colab] [Zip]
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part II 7, 8.1, 8.2, 8.3, 8.4, 8.5; CLRS 22.1, 22.2, 22.3, 22.4
Recording
- Video:
Lecture 10: Strongly Connected Components
Pre-lecture resources
- Pre-lecture exercise: [PDF]
Lecture resources
- Lecture notes: [PDF]
- Slides:
- Python notebook: [Colab] [Zip]
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part II 8.6; CLRS 22.5
Recording
- Video:
Lecture 11: Dijkstra and Bellman-Ford
Pre-lecture resources
- Pre-lecture exercise: [PDF]
Lecture resources
- Lecture notes: [PDF]
- Slides:
- Python notebook: [Colab] [Zip]
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part II 9, Part III 18.1, 18.2; CLRS 24.1, 24.3
Recording
- Video:
Lecture 12: Dynamic Programming: Bellman-Ford and Floyd-Warshall
Pre-lecture resources
- Pre-lecture exercise: [PDF]
Lecture resources
- Lecture notes: [PDF]
- Slides:
- Python notebook: [Colab] [Zip]
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part III 18; CLRS 25.2, 15.1
Recording
- Video:
Lecture 13: More Dynamic Programming: LCS, Knapsack, Independent Set
Pre-lecture resources
- Pre-lecture exercise: None this time!
Lecture resources
- Lecture notes: [PDF]
- Slides:
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part III 16; CLRS 15.4
Recording
- Video:
Lecture 14: Greedy Algorithms
Pre-lecture resources
- Pre-lecture exercise: [PDF]
Lecture resources
- Lecture notes: [PDF]
- Slides:
- Python notebook: [Colab] [Zip]
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part III 13, 14; CLRS 16.1, 16.2, 16.3
Recording
- Video:
Lecture 15: Minimum Spanning Trees
Pre-lecture resources
- Pre-lecture exercise: [PDF]
Lecture resources (coming)
- Lecture notes: [PDF]
- Slides:
- Python notebook: [Colab] [Zip]
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: AI Part III 15; CLRS 23
Recording
- Video:
Lecture 16: Max-Flow and the Ford-Fulkerson Algorithm
Pre-lecture resources
- Pre-lecture exercise: [PDF]
Lecture resources
- Lecture notes: [PDF]
- Slides:
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: CLRS 26.1, 26.2, 26.3; Alexander Schrijver’s paper: On the history of the transportation and maximum flow problem
Recording
- Video:
Lecture 17: Stable Matchings and Gale-Shapley
Pre-lecture resources
- Pre-lecture exercise: None this time!
Lecture resources
- Lecture notes: [PDF]
- Slides:
- Concept check questions: [Interactive SVG] [Solved PDF]
- Additional reading: Lecture notes by Tim Roughgarden.