Proofs · Chapter 22

Stable Matching

Students ask tutors in order; tutors hold their best offer. It always ends and nobody can break it. Run it on your own lists.

Home › Calculators › Proofs › Stable Matching

Opens on Chapter 22’s example: Anouk’s four students and four tutors, and her first try at pairing them.

Enter your own case, then press Work it out.

How it works

One side asks down its list; the other holds its best offer so far and can trade up. The chapter proves it ends within n × n asks and always gives a stable pairing, best for the side that asks. The tool also checks every possible pairing (a complete check for your lists).

From the book, Chapter 22. Anouk’s first try has 1 blocking pair. The students-ask method ends after 8 asks in 5 rounds: Lazlo–Bastian, Mireya–Philippa, Oriel–Soren, Ximena–Zora. Of the 24 pairings, 3 are stable and 21 aren’t; with the tutors asking it takes 5 asks. The book and every chapter’s tool →

Tests and proofs. When a tool tries cases, it tells you how many: a test of a million cases is still evidence, not a proof, because it says nothing about the cases it didn’t try. When an answer is proved (a count, a check digit, a complete list of every case, an algebra step that holds for every value), the page says so and why. Numbers can be typed as 1,200, −7, 3/4 or 0.05; formulas as 2^n − 1, n(n + 1)/2, n², C(n, 4) (choices of 4 from n), n! or sum(2k − 1) (the terms for k = 1 to n). Everything stays in your browser: no sign-up, nothing stored or sent.