logoalt Hacker News

emil-lptoday at 6:09 AM3 repliesview on HN

Whenever the pigeon-hole principle is name dropped, we should also drop Dijkstra's commentary The undeserved status of the pigeon-hole principle.

https://www.cs.utexas.edu/~EWD/transcriptions/EWD10xx/EWD109...


Replies

qsorttoday at 9:24 AM

I love Dijkstra's writing, but I don't think this is his strongest piece. In general parlance, when we say "by piegonhole" we mean "any variant of it". I'd still call what he's doing "piegonhole" lol. You can even further generalize it, e.g. by making expected value arguments.

This is not uncommon: we can say that "by the fundamental theorem of algebra" two polynomials of degree N that agree on N+1 points are identically equal. "By induction" includes Cauchy induction, sometimes with "this and that are the same" we mean "up to isomorphism" and so on.

The advice he ends on is extremely solid, though:

  The moral of the story is that we are much better off with the neutral, general standard procedure: name the unknown(s) so that you can formalize all conditions given or to be established and simplify by formula manipulation.
The math will always math.
peacebeardtoday at 6:47 AM

Wow. I thought the metaphor was stupid when I was taught this in college, and only now, decades later, I find out Dijkstra agreed.

show 1 reply
paulddrapertoday at 7:11 AM

The first time I saw the Pigeonhole Principle was in the following:

Problem: A plane has every point colored red, blue, or yellow. Prove that there exists a rectangle whose vertices are the same color.

Solution: Consider a grid of points, 4 rows by 82 columns. There are 3^4=81 possible color patterns of columns, so by the Pigeonhole Principle, at least two columns have the same color pattern. Also by the Pigeonhole Principle, each column of 4 points must have at least two points of the same color. The two repeated points in the two repeated columns form a rectangle of the same color. QED.

The Pigeonhole Principle is very neat. It would be hard not to use it for the proof.

Partly that article argues against proof by contradiction which does seem to be overused.

show 1 reply