Save this video — free

Selection and closest pair

Kent Quanrud · 1:13:22 · Watch on YouTube

Selection and closest pair Watch on YouTube →

Overview

Kent Quanrud develops two divide-and-conquer algorithms: deterministic linear-time selection using the median-of-medians pivot, and an O(n log n) algorithm for the closest pair of planar points. The selection analysis contrasts useful multiplicative shrinkage with ineffective additive progress, then proves that groups of five produce a pivot leaving at most about 70% of the input; the closest-pair analysis uses a narrow strip and a packing argument to limit comparisons to a constant number per point.

Key takeaways

Chapters

0:00 Selection: Finding the Rank-K Element
0:26 Sorting and Heaps as Selection Baselines
5:23 Why Selection Needs a Carefully Chosen Pivot
10:02 An Exact-Median Oracle Would Give Linear Selection
18:48 Approximate Medians and Geometric Shrinkage
30:07 Why Removing Only a Few Extreme Values Fails
41:20 Why a Small Sample Median Can Still Be Too Slow
51:09 Median of Medians: Build a Robust Pivot from Groups of Five
55:26 Groups of Five Guarantee a 30%-70% Pivot Split
1:00:13 Closest Pair: From Quadratic Search to Divide and Conquer
1:03:19 Split Planar Points by the Median X-Coordinate
1:05:10 Use Y-Order to Bound Strip Comparisons
1:09:00 Packing Argument Limits Nearby Points
1:11:55 Closest-Pair Recurrence and O(n log n) Bound

Keep these chapters and the full searchable transcript in your own library.

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Kent Quanrud.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.