Bacteria manage to punish cheaters, even without overloading their prison system. (Apologies to SolieLInitiative and Raul654 of wikimedia for my poor graphics skills)
Many bacteria cooperate when they reach high population density. For example, some nutrients must be digested outside the cell, which bacteria can do by releasing enzymes. But secreting extracellular enzymes would be a waste for a lone bacterium, since the digested nutrients would float away before the cell could "eat" them. If a lot of bugs all secrete enzymes at once, though, the digested nutrients will build up to a high enough concentration for all to benefit. For this reason*, bacteria also secrete "quorum sensing" (QS) molecules that allow them to detect how many of their fellows are around. When they reach quorum, the bacteria switch on their high-cell-density genes.
All this sounds good, but it raises the possibility of "cheaters" who don't respond to QS. Cheaters wouldn't make or release digestive enzymes, but they would still get to eat the nutrients broken down by all the cooperators. Cheaters have an immediate advantage, yet in the wild we mostly see cooperators. Why?
The Greenberg lab at the U. Washington med school noted that the QS switch doesn't only turn on genes that make extracellular goods – QS also turns on some genes that control private metabolism inside the cell. If these nutrients aren't shared, why would they be regulated by QS? To find out, the group grew pseudomonas bacteria in a few different nutrient conditions. First, as a control, they grew the bugs on just casein, which requires secreted enzymes to digest. As expected, cheater mutants emerged and took over nearly half the population within a few weeks. But when they added another food source (adenosine) to the medium, the cheaters never prospered!
The guy on the left would not do well as a pseudomonas bacterium.*Adenosine is metabolized inside the cell, so it is a private good. But adenosine metabolism is one of those private genetic systems paradoxically controlled by QS. It turns out that by putting adenosine metabolism under QS control, pseudomonas has rigged the game so that when cooperators turn on their QS switch, they get enough private benefit (from adenosine) in addition to public benefit (from casein) that they grow better than cheater mutants with broken QS switches (who get free casein but no adenosine). Since natural environments have more than one nutrient around, this system effectively punishes cheaters and protects cooperation.
This finding is important because it shows that not only do bacteria cooperate, but they have evolved a built-in genetic enforcement to punish cheaters. The bacteria put genes controlling some private goods under control of the same genetic switch that controls public goods, which ensures that cooperators are those who prosper.
Dandekar, Chugani,&Greenberg (2012). "Bacterial quorum sensing and metabolic incentives to cooperate." Science 338, 264-266.
*Yes, the metaphor is somewhat tortured. Apply anthropomorphism at your own risk!