Daily Archives: 2012-10-02

Pigeonhole Contamination

I just had one of those “My whole life is a lie!” moments while preparing to teach the CS275 (discrete math) recitation that includes the Pigeon Hole Principle section.
Years ago, I took my basic discrete math course from Dr. Ken Calvert, who notably recieved his Ph. D. from U.T. Austin during the time Edsger W. Dijkstra was faculty there (this will become important in a moment). Dr. Calvert taught us several formulations of the Pigeon Hole Principle, including the traditional

Pigenhole Principle: “if more than n objects are distributed into a set of n compartments, some compartment must receive more than one of the objects.”

the Purified Pigeonhole Principle: “For a non-empty, finite bag of numbers, the maximum value is at least the average value.”

And finally the Refined, Purified Pigenhole Principle:“In any finite set of numbers, the maximum is at least the average, and the minimum is at most the average.”

What I didn’t realize until now is that the Purified Pigeonhole Principle is a Dijkstra-ism, and the Refined, Purified Pigenhole Principle may be unique to Dr. Calvert (or at least some set of people contaminated by Dijkstra).

Dijkstra objected to teaching the traditional formulation of the pigeonhole principle, and lays out his argument against it in EWD980 (for those not familiar, one of Dijkstra’s famous quirks is that he took meticulous hand-written notes, all marked “EWD” and numbered. There are a number of mathematical concepts named for whoever related them to Dijkstra, simply because his notes are the first rigorous written record.) Basically, he claims that the typical form requires explicit instantiation, is an operational formulation (and those are bad), and is a statement that locks the student into its chosen analogy. The PPP formulation is also more general than the traditional PP formulation with less verbiage, and makes the (also correct) contrapositive more obvious. I am not as clever as he was, just go read the EWD. Furthermore, I can’t find any mention of the RPPP online except for on Dr. Calvert’s own pages. Since the RPPP is the PPP with the contrapositive manifestly stated, I suspect the name may simply be to indicate it is a refinement of Dijkstra’s approach to teaching the PP.

…So naturally, I started at EWD980 until I understood it well enough to teach, took some notes, and will contaminate my students with the alternative formulations tomorrow, because it is a better formulation for many tasks, and because EWD is one of those rare people who is generally more correct than the common wisdom. I do think knowing the traditional formulation is important, and easier to apply to a variety of common tasks, but knowing both is better than either.

Posted in Computers, General, School | Leave a comment