Save this video free

Subset Sum and the Secret Language of Numbers

Kent Quanrud · 57:13 · Watch on YouTube

Part of Purdue University Fundamental Algorithms (Fall 2026). See all 20 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Kent Quanrud connects subset sum to the course’s earlier SAT reductions, showing how a 3-SAT instance can be encoded as positional digits in numbers so that a target-sum solution corresponds exactly to a satisfying assignment. He also explains why the natural dynamic program takes O(nT) time, polynomial in the target’s value but not necessarily its bit-length, and uses this reduction to show that subset sum is NP-hard.

Key takeaways

Chapters

0:00 From SAT and 2-SAT to the Theme of Hardness Reductions
6:00 From Making Change to the Subset Sum Decision Problem
9:30 Why Subset Sum Looks Searchable but May Still Be Hard
12:09 The Include-or-Exclude Recurrence for Subset Sum
17:00 Dynamic Programming Gives O(nT), Not Polynomial Bit Complexity
19:00 The Reduction Idea: Hide Boolean Constraints Inside Numbers
23:00 Representing Truth Assignments as Selected Literals
31:00 Literal Numbers Encode Variables and Clause Membership
38:00 Padding Numbers Turn Clause Satisfaction into Exact Equality
50:00 The Target Sum Captures the 3-SAT Requirements
54:00 Recovering Assignments from Yes-or-No Solvers

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

Transcript excerpt

0:04 Okay, so today's uh yet another lecture. It's about a problem called subset sum, which is going to look radically different than what we're doing the last couple times, at least initially. So, okay. So, what have we been doing? We're doing all this weird stuff um based on kind of like problems being hard or very general. So, it starts with something just like uh boolean formulas. I give you a boolean formula like lots of ands ors or not and I just ask is there some way to make the formula output true and of course you can see the whole formula you can represent as a tree it's very easy for a computer to compute the formula but somehow we don't seem to have a better algorithm than just trying everything right and this is a bit mysterious you know we can look at yeah that's the big algorithm can we solve this and then we can start looking

0:52 at like yeah maybe that seems too hard but we can start looking at more special cases like CNF form where it's like just ands of or so it's like a flat tree right it's like ah this must be simpler but you know with some cleverness you can actually take any kind of deep boolean formula and turn it into one of these flat trees the main thing was this assignment trick which I think partly showed up on your midterm right and and you can keep going right we can do like three setat but then we find out that three set is also hard a more general version is circuit set okay so Then we we found ourselves just before the midterm in this funny situation where I mean these are all problems we'd really

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

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.