CS265

Welcome to CS265/CME309!

Randomized Algorithms and Probabilistic Analysis

Stanford University, Autumn 2026.

Course Overview

Instructor: Greg Valiant

CAs: Balaji Balachndran

Course Description: Randomness pervades the natural processes around us, from the formation of networks, to genetic recombination, to quantum physics. Randomness is also a powerful tool that can be leveraged to create algorithms and data structures which, in many cases, are more efficient and simpler than their deterministic counterparts. This course covers the key tools of probabilistic analysis, and application of these tools to understand the behaviors of random processes and algorithms. Emphasis is on theoretical foundations, though we will apply this theory broadly, discussing applications in machine learning and data analysis, networking, and systems. Topics include tail bounds, the probabilistic method, Markov chains, and martingales, with applications to analyzing random graphs, metric embeddings, random walks, and a host of powerful and elegant randomized algorithms.

Prerequisites: Prerequisites: CS 161 and STAT 117/118, or equivalents and instructor consent.

When/Where: Class is T/TH, 10:30am-11:50pm in CoDa B60.

Office hours.

NOTE: Office hours start in Week 2. There are no OH in Week 1, but please ask on Ed if you have a question.

  • Greg: Tuesday 2-3pm, CoDa W244.
  • Balaji: tbd

Deviations from this schedule will be announced on Canvas.

Course Structure

CS265/CME309 is a "flipped class." This means that you will watch short recorded mini-lectures and/or read lecture notes before class, and come to class ready to engage. In class, we will do active learning to practice and further develop the material from the mini-lectures. The agendas for each class (exercises and solutions) will be posted on this website (in the class-by-class resources below).

Since a large part of learning will happen during active in-class group work, we encourage you to attend class if possible.

Exception: Please do not come to class if you are sick.

Announcements

  • Course announcements will be posted on Canvas. If you don't check Canvas regularly, please make sure your notifications are set so that you get email announcements.

Useful Links

Assignments

This course will have (approximately) weekly homework (which will not be graded), and two in-person exams.

(More) Course Policies

Grading

Your grade is made up of:

  • 10% Class Participation: If you come to most classes and engage with the material and your fellow classmates, you will get all 10% of this!
  • 30% Midterm exam.
  • 60% Final exam.

There will be several options throughout the quarter for you to go above and beyond. (For example, bonus "might be fun to think about" problems, links to further reading, etc). These things do not factor directly into your grade, but they will factor into your learning! The course staff will be happy to give you feedback on any of these sorts of things, but we won't officially grade them.

Class-by-class Schedule and Assignments

Below, find class-by-class resources, including lecture notes, in-class agendas and exercises, and further reading. All videos can be found Canvas, or also on the YouTube playlist here.

Classes that have not happened yet may have broken links or links to draft (last year's) materials, and are subject to change.

9/22. Class 1: Introduction, Polynomial Identity Testing

9/24. Class 2: Karger's algorithm and the Karger-Stein algorithm