Introduction to Algorithms

CSE 421 · Spring 2025 · University of Washington

Design efficient algorithms, prove them correct, and understand the limits of computation.

Mon, Wed, Fri · 3:30–4:20 pm · Gates 20
Instructor: Chinmay Nirkhe

Illustration of a mechanical Turing machine

Course schedule and topics†

March

  1. Lecture 1

    Thinking like a computer scientist

    Topics and reading
    • Preamble: course logistics, information, etc.
    • The stable matching algorithm
    • Pset 1 released due Apr 9th

    Literature

    • K&T: 1

April

  1. Lecture 2

    The stable matching algorithm

    Topics and reading
    • Continuation of stable matching algorithm
    • The RAM model for computation

    Literature

    • K&T: 1.2-2.4
  2. Section 1

    Overview and stable matchings

  3. Lecture 3

    Graph traversal

    Topics and reading
    • Overview of the course
    • Introduction to greedy algorithms

    Literature

    • K&T: 3-3.2, 4.1
  4. Lecture 4

    Graph traversal

    Topics and reading
    • Breadth- and depth-first search
    • Pset 2 released due Apr 16th

    Literature

    • K&T: 3.3-3.6, DPV: 4.2-4.3
  5. Lecture 5

    Topological sort and greedy algorithms

    Topics and reading
    • Topological sort
    • Principles of greedy algorithms
    • Exchange principle, greedy algorithm proof techniques
    • Minimum lateness problem

    Literature

    • K&T: 4-4.2, DPV: 5-5.1
  6. Section 2

    Graph Traversal and Algorithm Proofs

  7. Lecture 6

    Greedy approximation and graph algorithms

    Topics and reading
    • Max cut problem and greedy approximation algorithm
    • Shortest path problem, Dijkstra's

    Literature

    • K&T: 12.4,4.4-4.7, DPV: 4.4-4.7
  8. Lecture 7

    Minimum spanning trees

    Topics and reading
    • Minimum spanning trees
    • Prim's and Kruskal's algorithms
    • k-clustering of datapoints
    • Pset 3 released due Apr 23rd

    Literature

    • K&T: 12.4,4.4-4.7, DPV: 4.4-4.7
  9. Lecture 8

    Divide and conquer algorithms

    Topics and reading
    • Binary search and mergesort
    • 2D Euclidean shortest distance
    • The master theorem

    Literature

    • K&T: 5-5.4, DPV: 2.2-2.4
  10. Section 3

    Greedy algorithms

  11. Lecture 9

    Multiplication

    Topics and reading
    • Matrix, integer, and polynomial multiplication
    • Strassen's algorithm
    • Karatsuba's algorithm
    • Fast Fourier Transform
    • Convolution, Image processing

    Literature

    • K&T: 5.5-5.6, DPV: 2.5-2.6
  12. Lecture 10

    Randomized divide and conquer

    Topics and reading
    • Median, Selection, and Quicksort
    • Derandomization
    • Pset 4 released due Apr 30th
    • Pset 4 ¾ released due May 7nd

    Literature

    • K&T: 13.5, DPV: 2.4
  13. Lecture 11

    Dynamic programming I

    Topics and reading
    • Principles of dynamic programming
    • Tribonacci numbers
    • Edit distance

    Literature

    • K&T: 6,6.2,6.6, DPV 6.3
  14. Section 4

    Divide and Conquer

  15. Lecture 12

    Dynamic programming II: The Knapsack problem

    Topics and reading
    • Brute force algorithm
    • Dynamic programming algorithm
    • Approximation algorithm

    Literature

    • K&T: 6.4, 11.8, DPV 6.4
  16. Lecture 13

    Dynamic programming III

    Topics and reading
    • Space complexity
    • RNA secondary sequences
    • Top-down vs bottom-up

    Literature

    • K&T: 6.1-6.3, 6.5, 6.8, DPV 6.6
  17. Lecture 14

    Dynamic programming IV

    Topics and reading
    • Bellman-Ford algorithm
    • Applications

    Literature

    • K&T: 6.8-9, DPV 6.6

May

  1. Section 5
  2. Question & Answer

    Question & Answer

    Topics and reading
    • With Professor Nirkhe. Location: CSE2 G01. Time: 5:30pm-7:30pm.
    • No planned topic. Bring any questions you have or topics you want clarified.
    • Recording quality may be wanting as it will be on whiteboard.
  3. Lecture 15

    Negative cycles and network flow

    Topics and reading
    • Detecting negative cycles with Bellman-Ford
    • Definition of max flow and min cut
    • Value of a flow, equivalent definitions
    • Greedy flow algorithm: Ford-Fulkerson

    Literature

    • K&T: 7-7.2
  4. Midterm

    Midterm

    Exam details
    • Location: Lecture Hall CSE2 G20
    • Time: 1 Hour. Starts exactly at 3:30 and ends exactly at 4:30.
    • Disability Requests that are approved will be in CSE2 345 starting at 3:30 as well.
    • Contact head TAs to arrange your specific requirements. Otherwise we assume you are taking standard exam despite your disability requests.
    • You may bring 1 8.5x11 page of notes (both sides); see the midterm coversheet for details.
  5. Lecture 16

    Max flow/min cut

    Topics and reading
    • Max flow/min cut duality
    • Augmenting paths algorithm
    • Ford-Fulkerson algorithm
    • Application to bipartite matching

    Literature

    • K&T: 7.2-7.5
  6. Section 6

    Dynamic programming and midterm postmortum

  7. Lecture 17

    Network flow in polynomial time

    Topics and reading
    • Finding better augmenting paths
    • The Edmonds-Karp algorithm
    • Hall's theorem
    • Edge disjoint paths

    Literature

    • K&T: 7.5-7.7,7.12
  8. Lecture 18

    Flow algorithm applications

    Topics and reading
    • Network connectivity
    • Capacity demands
    • Baseball winner problem

    Literature

    • K&T: 7.5-7.7,7.12
  9. Lecture 19

    Linear programming I

    Topics and reading
    • Linear algebra/geometry review
    • Optimization problems
    • Definition ofa linear program
    • Max flow as a linear flow

    Literature

    • DPV 7-7.3
  10. Section 7

    Network Flow/Linear Programming

  11. Lecture 20

    Linear programming II

    Topics and reading
    • Linear programming example
    • Max flow as a linear program
    • Linear programming duality

    Literature

    • DPV 7.4-7.5
  12. Lecture 21

    Linear programming III

    Topics and reading
    • Linear programming duality
    • Max flow/min cut

    Literature

    • DPV 7.6
  13. Lecture 22

    Linear programming IV

    Topics and reading
    • Simplex method
    • Interior point and ellipsoid methods
    • Boolean functions as LPs

    Literature

    • DPV 7
  14. Section 8

    Linear Programming/Final Prep

  15. Lecture 23

    P vs NP and problems that are just too hard

    Topics and reading
    • Definitions of P, NP, EXP
    • Definition of a reduction
    • Examples of problems in NP

    Literature

    • K&T 8.1-8.4, DPV 8.1-8.3
  16. Lecture 24

    Non-deterministic polynomial time II

    Topics and reading
    • NP-completeness and the first NP-complete problem

    Literature

    • K&T 8.1-8.4, DPV 8.1-8.3
  17. Section 9
  18. Lecture 25

    Non-deterministic polynomial time III

    Topics and reading
    • 3-SAT is NP-complete
    • Vertex Cover is NP-complete

    Literature

    • K&T 8.1-8.4, DPV 8.1-8.3

June

  1. Lecture 26

    Non-deterministic polynomial time IV

    Topics and reading
    • 3-Color is NP-complete
    • Traveling Salesman and Hamiltonian Cycle are NP-complete
    • Optimization vs Decision

    Literature

    • K&T 8, DPV 8
  2. Lecture 27

    Non-deterministic polynomial time V

    Topics and reading
    • The complexity landscape
    • Approximation algorithms for NP-completeness

    Literature

    • K&T 11,12
  3. Section 10
  4. Lecture 28

    Question & Answer

    Topics and reading
    • No planned topic. Bring any questions you have or topics you want clarified.
    • Recording quality may be wanting as it will be on whiteboard.
  5. Final

    Final

    Exam details
    • Location: Lecture Hall CSE2 G20
    • Time: 2 Hour. Starts exactly at 2:30 and ends exactly at 4:30.
    • Disability Requests that are approved will be in CSE2 Rm 371 starting at 2:30 as well.
    • Contact head TAs to arrange your specific requirements. Otherwise we assume you are taking standard exam despite your disability requests.
    • You may bring 1 8.5x11 page of notes (both sides); see the final coversheet for details.

†. Course schedule and contents subject to change and will be announced throughout the term.↩