In their recently published book Inside Jokes: Using Humor to Reverse-Engineer the Mind, Matthew Hurley, Daniel Dennett, and Reginald Adams Jr.—a cognitive scientist, a philosopher, and a psychologist—set out to discover a grand unified theory of humor. That theory would properly address questions such as: Why do only humans seem to have humor? Why do we communicate it with laughter? How can puns and knock-knock jokes be in the same category as comic insults? Why does timing matter in joke telling? And, of course, what are the necessary and sufficient conditions for a thing to be funny?  
In brief, the researchers assert that humor serves an evolutionary purpose: In comprehending the world, we sometimes commit too soon to conclusions we've jumped to; the humor emotion, mirth, rewards us for figuring out where we've made such mistakes. In developing this view, the authors considered—but ultimately had to discard—some long-cherished theories. Here, they present five such hypotheses—plus the jokes that demonstrate that they don't hold water: