Will ’17 be the Year of the Pig?

You probably haven’t heard of David C. Kelly; he doesn’t write best-sellers or give TED talks, or study the center of the galaxy or the human genome or the social impact of algorithms. But he’s inspired and nurtured hundreds of people who’ve done these things and much more. The vehicle of this inspiration is a summer program that that Allyn Jackson has called “a national treasure” and that for the past forty years has been quietly shaping American mathematics. Some people call it “Yellow Pig Camp“, but many of its alums (including yours truly) simply call it “Hampshire”. It’s the Hampshire College Summer Studies in Mathematics program, or HCSSiM for short, founded by Kelly in 1971.

Hampshire doesn’t teach students how to be better at high school math. It leapfrogs over AP Calculus and jumps directly to college- and graduate-level topics: graph theory, cellular automata, non-orientable surfaces, etc.  If you went to Hampshire as a student in past decades, you might have gotten to meet visiting guest lecturers like Paul Erdős (one of the great mathematicians of the 20th century and also a great contributor to graph theory) and John Conway (whose Game of Life played a pivotal role in the theory of cellular automata). If you go to Hampshire nowadays, you’re likely to get a free copy of Mathematica from Stephen Wolfram (another pioneer in the theory of cellular automata as well as the creator of Mathematica), or a free hand-blown glass Klein bottle from Clifford Stoll, 100% guaranteed to be non-orientable.

To get an idea of what a Hampshire course can be like, check out data-scientist and author Cathy O’Neil‘s blog about the three-week course she taught in 2012.


If you go to Hampshire, the learning starts before you even show up. One of the ways Kelly figures out who’s a good fit for the program is an ever-changing evaluation instrument called the Interesting Test. Kelly isn’t interested in what you know; he wants to know how you think. So he deliberately chooses non-traditional, open-ended problems. Here’s a sample problem, taken from the 1998 Interesting Test:

At time t=0, seventeen electrons are situated at various points on a circular track, seventeen miles in circumference. Some of the electrons are moving along the track in a clockwise direction and others are moving in a counterclockwise direction, but all of the electrons are moving at the same speed: 17 miles per second. Whenever two electrons collide, each instantly reverses direction, losing no time or velocity.

1. Prove that, at time t=1 second, each of the positions initially occupied by an electron will again be occupied by an electron traveling in the same direction as the electron initially at that location.

2.  Prove that there will be a time when all 17 electrons will have simultaneously returned to their initial positions and directions.

These are not easy questions! You can see solutions in the Endnotes. In the meantime, to help you think about the problem, here’s a GIF courtesy of Matt Enlow (a math teacher at the Dana Hall School, who goes by @CmonMattTHINK on Twitter). To make the action easier to follow, Matt’s GIF shows 7 particles (rather than 17) going around a circular track, and (ignoring the collisions, which are marked with little halo-bursts) the particles are travelling at 1/10 of a revolution per second (rather than 1 revolution per second).

Seven electrons going around a circle. GIF courtesy of Matt Enlow.

Seven electrons going around a circle. GIF courtesy of Matt Enlow.

If you’re invited to HCSSiM, and you show up at Hampshire College, it’s likely that the first thing you’ll learn is that someone can solve Rubik’s Cube faster than you, or juggle more balls than you. (Deal with it.)

Then, in classes, you’ll learn that doing mathematics is, at base, about finding patterns, making conjectures, and proving things. Eric Lander (one of my teachers when I was a student at Hampshire) describes his own earlier experience as a student at Hampshire this way: “I discovered research that year. I learned a lot of number theory that summer, loved number theory. I hung out one afternoon in the library just picking up random number theory books. In one book, I found a discussion of quasiperfect numbers — including a reference to some obscure theorem of Sierpiński that provided a constraint about them. I said ‘That’s interesting; I wonder if you could say more?’ I started working on it and managed to extend the result; it was the first real research problem I’d ever gotten involved in. The experience of proving something nobody had ever proven before was a life-changing experience. It was addictive.”


Hampshire students have to come to grips with the imperative of proving things rigorously. Some high school courses dabble in rigor, with artificial formats like two-column proofs in Euclidean geometry, but that’s a far cry from the sorts of proofs mathematicians publish. Our proofs are more like essays — often written in deliberately drab, utilitarian prose featuring a monotony of word-choices that would horrify your freshman comp teacher, but still, essays: compositions made of words, not (for the most part) equations. Learning proof-craft is a challenge for most students, even the well-prepared students who attend Hampshire. Cathy O’Neil, in the midst of a teaching stint at Hampshire, wrote: “Every proof that one of these young kids offers up is an act of courage. They don’t know exactly how to explain their thinking, nor do they yet know exactly how to shoot holes in arguments, including their own. It’s an exercise in being wrong and admitting it. They are being trained to get shot down, to admit their mistake, and then immediately get back up again with better reasoning. The goal is to get so good at being wrong that it doesn’t hurt, that it’s not taken personally, and that it’s even fun to be wrong and to improve your argument.”

I remember visiting one Hampshire class in which a student, realizing the logical fallacy he’d fallen into, grinned and hooted “I been smoked!” That’s exactly the sort of spirit Kelly tried to inculcate in us. We need to have wry admiration for the adversary who bests us, even when that adversary is our own human tendency to jump to conclusions. And then we need to dust ourselves off and try again.

It’s not easy to admit error or confusion or ignorance, but it’s key to making continued progress in domains like math. Making these sorts of admissions gets easier with practice, but even after decades of practice I still find it hard sometimes. Just this past week, I had to email a collaborator, a person much younger than I, and say “I seem to be confused about blah-blah, and here’s why: … Can you please unconfuse me?” Confessing this sort of thing can be painful, but if we aren’t willing to do it now and then, we won’t grow.

Although here and elsewhere I like to lay emphasis on the idea of getting comfortable with being wrong (in part because it goes so much against the grain of the habits we inadvertently inculcate in our kids), I don’t want to inadvertently make you think that this is the core of what programs like HCSSiM teach. Even more than teaching tough-mindedness and risk-taking, Hampshire’s approach to math encourages teamwork. The program doesn’t force students to work together, but it tries to get them to realize how much fun collaboration can be.


Mathematician and writer Steven Strogatz writes: “I was junior staff in the summer of 1979 just before my senior year at Princeton. That’s where I met my friend and collaborator Rennie Mirollo, and I also had the pleasure of teaching differential geometry to a high school student named Lisa Randall, among others! It’s absolutely true that that’s where I learned how to teach – I got several hours a day of teaching experience, and learned many pedagogical strategies from such masters as Ken Hoffman (the one who taught at Hampshire College for many years). For instance, to introduce the basics of metric spaces, he asked the students: what’s the distance between the sine function and the cosine function? This was so much more interesting than laying down the axioms. The students had to figure out various reasonable notions of what it would mean to define the distance between the graphs of two functions, and pretty soon the discussion and the theory was on its way! Beautiful.”

My sentiments exactly. Co-teaching with Ken Hoffman on a daily basis gave me lots of opportunities to try things out and see what worked and what didn’t, while getting exposed to great teaching every day. Ken provided a safety net; if at some point I realized that my planned lesson was a complete washout, I could just turn things over to Ken and he’d either put the lesson back on course or turn to a different topic.

If you want to learn how to teach, put yourself in a situation where you have to teach every day and see what works. It’s all the better if you teach smart kids who ask lots of questions that you can’t anticipate; you learn how to be fluid and improvise. I started out as a very rigid and non-interactive teacher; teaching at Hampshire gave me a chance to explore a style of teaching in which you share interesting ideas with students and then get out of their way.


Mathematician Dana Randall told me about her first two years at Hampshire, and the difference between them:

“In addition to exposing me to mind-bending and fun mathematics, HCSSiM taught me one of the most valuable lessons of my career early on.  Math crowds always seem to consist of the haves and have nots — some people just seem to get it, and others, not so much.  The first summer I attended Hampshire, I went full of confidence and enthusiasm, and then found myself solidly in the second category.  There were many incredibly talented students who seemed to be speaking a different language.  The pieces I did understand were like magic, both for their beauty and the ways in which they were explained, and for the joy of experiencing crossing over that seemingly impenetrable border, when I was able.  While I loved my time there and learned a ton, I left marveling at the true luminaries, convinced I could not be a mathematician — not with the great remorse or disappointment this might suggest, but simply with an enlightened realization that I was not part of the luckier, truly gifted crowd.

“Nonetheless, remembering how much I enjoyed the gems I did understand, and with a lack of imagination of what else to do, I returned the following summer.  Suddenly a light went on!  While still not among the most gifted, I suddenly found myself among the students leading the discussions, contributing solid ideas to problems, seeing the point of the lectures and even anticipating what would come next.  I remember recognizing the remarkable difference, and wondering what really changed.  More than the mathematics that I learned, it is this lesson that has helped me repeatedly throughout my career.  Whenever I felt like an impostor I remembered all the previous times that that feeling suddenly went away and I recalled that it usually happened when I started focusing on the math and less on the particular situation.”

I do sometimes worry that, for every student like Randall who initially feels like an outsider, there might be others who don’t come back for that second year, and maybe are lost to mathematics even though they could make valuable contributions. It’s a tough question. But I think that the way Kelly runs HCSSiM does a lot to counter the intimidating/competitive aspect of mathematics. An egalitarian ethos (reinforced by Hampshire College’s barefoot image) prevails, and classroom show-offs are discreetly told to knock it off. You’re not here to compete with other people; you’re here to learn math, and to enjoy doing it. Math is a social process. Math is fun. And when the math stops being fun for you, or for the people you are teaching, or the people you are learning from, or the people you are learning with, that means you are doing it wrong.

One of my teachers at Hampshire was computer scientist Susan Landau, who herself was one of Kelly’s first students. She says: “The program certainly was the single most important factor in my becoming a mathematician (and in my succeeding in graduate school). I came in 1971 to this summer math program and one of the things I learned was to find patterns, make conjectures, and prove theorems; if there is any impact that anybody has ever had on the research I have done in mathematics—which is highly computational work—it’s the summer math program and Kelly. And the program also gave me the confidence to go on when I was dealing with sexism in the field. It’s had a remarkable impact on my life.”


Mathematician Dan Ullman said, at a gathering of past and present HCSSiM students: “I was inaugurated into this Yellow Pig club 32 years ago, and I wonder if the students who decided to come this summer knew what they were getting themselves into.  This is a club that you now have membership in and you can never get out of.” I should add that, although you can’t get out of the club, and it’s not easy to get invited to attend the program as a student, it’s easy to get into the “Yellow Pig club” after high school, whether or not you were a student there: just visit HCSSiM for a day, or teach there, or send a child of yours to the program, or all of the above. This porosity of the ingroup/outgroup barrier makes this club less clique-ish (though that may not be much consolation to a non-HCSSiM high schooler forced to listen to HCSSiM-ers singing Yellow Pig carols on the long bus ride to the math team state finals).

Many mathematical collaborations came out of friendships that started or deepened at Hampshire. For instance, two of the earliest HCSSiMers, Eric Lander and Neil Immerman, collaborated on a paper on computational graph theory. I already mentioned how Steve Strogatz and Renato Mirollo met through Hampshire; the two did foundational work on synchronization in networks, described in Strogatz’s book Sync.

Above and beyond its role in spurring collaborations years or decades later, Hampshire lets mathematically-inclined youngsters meet other members of their tribe. “Mathbabe” Cathy O’Neil, describing her arrival at HCSSiM (in her post about the origin of the name of her blog), says: “It was the first moment I had ever felt like I belonged somewhere, that I was with my peeps.”


Back in 1976 (the year I attended as a student), HCSSiM applicants whose parents couldn’t afford the tuition received scholarships from the National Science Foundation, through its Young Scholars Program, which supported student participation in HCSSiM for most summers up through 1995. Then, in 1995, NSF cut the Young Scholars Program. Mathematician Robert Cowen, father of computer scientist and HCSSiM alum Lenore Cowen, wrote an impassioned letter protesting this governmental decision.

Fortunately, by 1995 there were hundreds of grateful alums, willing to step in and make sure that budding mathematicians had the opportunities that they had had. In the past two decades, the generous support of alums has enabled HCSSiM to keep a high faculty-to-student ratio (a senior professor and 2 math majors or grad students for each 15-student class) and to offer financial aid to qualified students who need it.

See Allyn Jackson’s article “Supporting a National Treasure” and Susan Landau’s addendum “Summer Studies Mathematician Alumnae“.


Oh, yes, about those pigs (you knew I’d get to them eventually): the official emblem of the Hampshire program is a yellow pig. Don’t ask why. The yellow pig can also be found adorning the covers of some books written by mathematician Michael Spivak. Don’t ask about that either. The origins of the yellow pig have been shrouded in mystery and I plan to do my part to keep things that way. Here’s all I’ll say, straight from Kelly: “Mike Spivak was a grad student while I was an undergraduate at Princeton; we didn’t know each other particularly well until I got him to teach in my 2 UNH programs. The Yellow Pig dates from those later years.” (Here “my 2 UNH programs” refers to the two years during which Kelly’s summer math program was run out of the University of New Hampshire instead of Hampshire College.)

Kelly has collected many yellow pigs, and his former students have sent him many more; his home and office jointly contain thousands of them.  You can get more information about the yellow pig at the “17 (Seventeen) and Yellow Pigs” website. Unfortunately, that information is largely inaccurate.

The other emblem of the program is the number 17. Kelly has been collecting facts about 17 for many years. This is a respectable obsession, since math legend Carl Friedrich Gauss too was enamored of 17, largely because at a young age Gauss figured out how to construct a regular 17-gon with only straightedge and compass (the first new construction of this kind to have been discovered in two millennia). In fact, the Mathematical Sciences Research Institute, which was given free rein to name the street it occupied and pick its own address, chose to be at 17 Gauss Way. You can see a Numberphile video about Gauss’ construction featuring MSRI director David Eisenbud, or you can just watch a wordless but pretty animation of the construction.

17 is also the number of distinct mathematical wallpaper patterns, and it’s the minimum number of clues for a Sudoku puzzle. There are many other interesting mathematical properties of 17, but they would occupy a whole essay to themselves (and in fact Kelly has been known to give a full-length talk focused entirely on that one number). I’ll content myself with just one sociological observation about 17: when asked to pick a random number between 1 and 20, more people pick 17 than any other option. Probabilist WIlliam Feller (who taught at Princeton at the time when David Kelly and Robert Cowen were both students there), as a running joke, would always pick 17 when a random number was required.

Kelly’s obsession with 17 received an interesting recognition from Hampshire College: on his retirement from what he calls the College’s “Off-season” (September-to-May), the campus speed limit was raised from 15 mph to 17mph in his honor. This was written about in the Hampshire College newsletter and in the Boston Globe.


Okay, but why might 2017 be the Year of the (Yellow) Pig?

Maybe the change won’t be dramatic, but I think HCSSiM alums have reached a kind of critical mass in the mathematical community, and the recent collaboration between Cathy O’Neil and Susan Landau is the latest symptom of it. (The two met through HCSSiM in 2013 and published an article together a few weeks ago, listed in the References.) I think you’ll hear a lot from O’Neil in 2017; her new book “Weapons of Math Destruction” may lead a new generation of data-scientists to take a harder look at the social uses to which algorithms are put. I suspect that in 2017, some HCSSiM applicants will say that they learned of the program through their parents, who discovered it by reading O’Neil’s mathbabe blog.

Speaking of mathbabe, here are links to some particular mathbabe posts that relate to Hampshire:

* Why “mathbabe”?
* I love math nerd kids
* Mathematicians know how to admit they’re wrong
* Exploit me some more please
* The 17-armed spiral within a spiral
* Yellow Pig carols


Kelly believes that a program that survived his loose reins and negative organizational skills should survive him. He’s pleased that gifted and enthusiastic teachers are still drawn to the opportunity to live with and to do math with bright high school kids; and he learns a lot from them as the format, mathematical content, and pedagogy of the Summer Studies continues to evolve.

For 17 years Program Coordinator Susan Goff (whose address is 17 Newton Lane) has tracked down alums, managed budgets, returned phone calls, and done the rest of the non-teaching jobs of running a 60-person 6-week “college”. The YP Math Foundation now exists and is making progress toward endowing program director and program coordinator positions on a permanent basis.

I take some solace in the fact that, even when Kelly stops running the program, its spirit will live on through his successors and all of us who carry its lessons. For instance, at mathforlove.com HCSSiM alum Dan Finkel works to revitalize math teaching. Former HCSSiM teacher Stephen Maurer directs a great summer program called MathPath, aimed at middle schoolers. For much of a decade, sarah-marie belcastro sparked and co-directed HCSSiM; she now runs MathILy.org, another “intensely residential” opportunity for excellent high school math students.

As I told some HCSSiM students at the first Yellow Pig Math Days conclave a few years ago: “The final thing I want to say to those of you who really like the program and are sad at the end of it, is: Cheer up, because you never have to leave! By this I mean not that you can stay in the dorm and never surrender your keys, but that you can take from this program some seeds, and plant them in the places that you’ll go after today, and build other communities that are like this one, that have the same spirit. So in that sense you never have to leave.”

Thanks to Dan Asimov, Matt Enlow, Sandi Gubin, David C. Kelly, Susan Landau, Eric Lander, Andy Latto, Cathy O’Neil, Dana Randall, Shecky Riemann, Rich Schroeppel, Steven Strogatz, James Tanton, and Peter Winkler.

Next month (Jan. 17): Avoiding chazakah with the Prouhet-Thue-Morse sequence.


#1: The trick hinges on being able to imagine the particles not as colliding with one another but as passing through one another. Matt Enlow and I designed the GIF to be deliberately ambiguous, so that through an act of will you can choose to see it whichever way you like! If in viewing the GIF you think of each particle as passing through other particles with its velocity unchanged, then after ten seconds each particle is back where it started. (The “halo burst” that surrounds each collision was included to foster the visual ambiguity of the GIF; without it, your eye’s object-tracking firmware tends to strongly favor the passing-through-each-other interpretation. Also, if you look closely at the site of a collision, you can tell that the particles are passing through each other rather than rebounding off each other; the other reason we put the halo-bursts in was to distract you from looking too closely!)

If you view the particles in the GIF as passing through each other, then after 10 seconds, each particle is back where it was at the start and heading in the same direction. If you view the particles in the GIF as bouncing off each other, then after 10 seconds, each particle is back where some particle was at the start and heading in the same direction.

In the Interesting Test problem, the same reasoning applies, except that the time it takes for the repeat to occur is 1 second rather than ten seconds.

#2: Where are the electrons after 1 second? They don’t pass through each other (even though we temporarily pretended that they did when we solved problem #1), so after one second they’re in the same “cyclic order”. But they need not be in the same exact positions. For instance, if we number the electrons 1 through 17 (going clockwise), then electron #1 might end up where electron #2 was before, and electron #2 might therefore end up where electron #3 was before, and so on. How can we figure out which electron is where? Is it possible that every electron is back where it started after 1 second?

A student tackling this aspect of the problem might write something like this: “I don’t think that after 1 second the electrons can all be back where they started without having gone around the track once, because 17 is odd, so either there are more clockwise-going electrons than counterclockwise electrons, or the other way around, and either way, there’s going to be a kind of swirl going on, with particles tending to go one way more than the other. Which I guess isn’t a proof, because couldn’t all the particles make a full trip around the circle?  But I don’t think that’s possible either, because 1 second isn’t long enough to allow all the particles to make it around, with all the collisions going on.”

That’s not a solution to the problem, but it’s brimming with ideas, and more importantly, with an appreciation for what counts as a proof and what doesn’t. A student who wrote something like that would definitely be on Kelly’s short-list.

Let’s try to make that idea of “swirl” more precise. It’s helpful to think about angular velocity (though physicists might prefer to use angular momentum). Every time two particles collide, the total angular velocity of the two particles stays the same, because before the collision we have one clockwise-going particle and one counterclockwise-going particle, and after the collision we also have one clockwise-going particle and one counterclockwise-going particle; the fact that they’ve exchanged angular velocities doesn’t affect the sum of their angular velocities. It follows that the sum of the angular velocities of all the particles is also unchanging over time. So if at the start (and throughout the process) there are k clockwise-going particles and 17 − k counterclockwise-going particles, after 1 second the total net angular displacement experienced by the particles (where clockwise counts as positive and counterclockwise counts as negative) is going to be k × (+1) plus (17 − k) × (−1) total revolutions, or 2k − 17. This can’t be zero, since 17 is odd and k is a whole number. So it’s simply not possible that, after 1 second, all the particles are back where they started, with each particle having done equal amounts of clockwise travel and counterclockwise travel.

(Note my use of the word “net” in the phrase “net angular displacement”. When a particle travels clockwise all the way around the circle, its net angular displacement is 360 degrees in the clockwise direction.  On the other hand, when a particle travels halfway around the circle, bounces off another particle, and then travels halfway around the circle in the other direction, arriving back at its starting point, its net angular displacement is 0 degrees. Instead of using degrees, we can measure angular displacement in full turns, where a full turn is 360 degrees. But we have to say whether the displacement is clockwise or counterclockwise.)

Going back to the student’s analysis of what’s happened after 1 second: Could each particle have undergone a net displacement of 1 full turn clockwise? No, because there isn’t enough time in 1 second. (The only way a particle can return to its starting point in 1 second, traveling at an angular velocity of 1 revolution per second, is if it never bounces off another particle.) The same is true if we replace “clockwise” by “counterclockwise”.

But wait! Is it possible that (say) some of the particles made 0 full turns, and others made 1 full turn clockwise or counterclockwise, so that the total net angular displacement of the 17 particles works out to be 2k − 17?

The answer is No, and it’s because the particles aren’t passing through each other. So you can’t have one particle ending up at its starting place having undergone m full turns and another particle ending up at its starting place have undergone n full turns unless m=n.

This last insight unlocks the problem. After 17 seconds, the net angular displacements of the particles sum to 17 times 2k − 17, and each particle occupies the position that some other particle or itself occupied at the start of the process. This can be shown to imply that each particle is in fact back where it started, having undergone a net displacement of 2k − 17 full turns clockwise (which, when 2k − 17 is negative, means 17 − 2k full turns counterclockwise).

#3: Here’s a different answer: As we saw in #1, at time t=1 every particle is occupying a spot that was occupied by some particle at time t=0. That is, during the intervening second, the particles have undergone some sort of permutation. Every permutation of 17 objects arranged in some initial order has the property that if you apply the permutation 17! times, you get back the arrangement you started with. Here “17!” means 17 factorial, or 1 × 2 × 3 × … × 16 × 17, which is about 356 trillion. A little more thought shows that 17! can be replaced by the least common multiple of the numbers 1, 2, 3, … , 16, 17, which is “only” about 12 million. But in fact the permutation of the particles must be a cyclic permutation (because they don’t pass through each other), and every cyclic permutation of 17 objects has the property that if you apply the permutation a mere 17 times, you get back to the arrangement you started with.

Could there be an earlier time at which every particle has returned to its starting point? I’ll leave that for you to figure out, taking into account the fact that 17 is a prime number.

In the GIF, the time it takes for each particle to return to where it started is 7 × 10 = 70 seconds. See if you can watch this happen without getting distracted along the way!


Robert Cowen, “Keep Young Scholars Programs Running“, Notices of the American Mathematical Society, May 1998, page 569.

Allyn Jackson, “The Demise of the Young Scholars Program“, Notices of the American Mathematical Society, March 1998, pages 381–387.

Allyn Jackson, “Supporting a National Treasure“, Notices of the American Mathematical Society, November 2003, page 1221.

Susan Landau, “Summer Studies Mathematician Alumnae“, Notices of the American Mathematical Society, February 2004, page 182.

Susan Landau and Cathy O’Neil, “Why Ghosts in the Machine Should Remain Ghosts“, December 2016.

Cathy O’Neil, Weapons of Math Destruction: How Big Data Increases Inequality and Threatens Democracy, 2016.

Steven Strogatz, The Joy of x: A Guided Tour of Math, from One to Infinity, 2012.

Steven Strogatz, Sync: The Emerging Science of Spontaneous Order, 2004.

Peter Winkler, Mathematical Mind-Benders, 2007. The chapter “The Adventures of Ant Alice” contains many variants on the bouncing electrons puzzle. Winkler has also collected errata for the book.

5 thoughts on “Will ’17 be the Year of the Pig?

  1. goldenoj

    Oh, the mystery of the yellow pig! I thought you were going to reveal the Spivak history I’ve wondered about for decades. Curse your fidelity!

    But blessings on a deep and lovely meditation.


  2. Pingback: Breaking logic with self-referential sentences |

  3. Pingback: Carnival of Mathematics #170 |

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s