{"id":5909,"date":"2013-11-18T20:57:37","date_gmt":"2013-11-19T04:57:37","guid":{"rendered":"http:\/\/experimentalmath.info\/blog\/?p=5909"},"modified":"2013-11-29T17:47:02","modified_gmt":"2013-11-30T01:47:02","slug":"pi-in-the-simpsons","status":"publish","type":"post","link":"https:\/\/experimentalmath.info\/blog\/2013\/11\/pi-in-the-simpsons\/","title":{"rendered":"Pi in the Simpsons"},"content":{"rendered":"<p><\/span><div id=\"attachment_5956\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/experimentalmath.info\/blog\/wp-content\/uploads\/2013\/11\/SM114Pie-Posters.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5956\" src=\"https:\/\/experimentalmath.info\/blog\/wp-content\/uploads\/2013\/11\/SM114Pie-Posters-300x211.jpg\" alt=\"Homer contemplates pi\" width=\"300\" height=\"211\" class=\"size-medium wp-image-5956\" srcset=\"https:\/\/experimentalmath.info\/blog\/wp-content\/uploads\/2013\/11\/SM114Pie-Posters-300x211.jpg 300w, https:\/\/experimentalmath.info\/blog\/wp-content\/uploads\/2013\/11\/SM114Pie-Posters-150x105.jpg 150w, https:\/\/experimentalmath.info\/blog\/wp-content\/uploads\/2013\/11\/SM114Pie-Posters.jpg 400w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-5956\" class=\"wp-caption-text\">Homer contemplates pi<\/p><\/div><\/p>\n<h4>Mathematics in the Simpsons<\/h4>\n<p>In a newly published <a href=\"http:\/\/www.amazon.com\/The-Simpsons-Their-Mathematical-Secrets\/dp\/1620402777\/\">book<\/a>, Simon Singh presents a too little-known back story about the Simpsons TV show: underlying much of the clever screenplay are numerous references to somewhat sophisticated mathematics both in the Simpsons and in the follow-up <a href=\"http:\/\/en.wikipedia.org\/wiki\/Futurama\">Futurama<\/a>.<\/p>\n<p>Simon Singh is no stranger to either mathematics or show business. He directed an award\u2013winning BBC documentary on Fermat&#8217;s Last Theorem and authored the best-selling book <a href=\"http:\/\/www.amazon.com\/Fermats-Enigma-Greatest-Mathematical-Problem\/dp\/0385493622\/\">Fermat&#8217;s Enigma<\/a> on the same topic. He is a physicist by training, with a Ph.D. from Cambridge and is engaged in a host of science popularization ventures.<\/p>\n<h4>Fermat&#8217;s Last Theorem disproved?<\/h4>\n<p>One of the more striking tidbits revealed by Singh is from an episode &#8220;The Wizard of Evergreen Terrace,&#8221; which aired on 20 December 1998. In this show Homer is determined to follow in Edison&#8217;s footsteps. The title itself is an allusion to Edison, who was known as the &#8220;Wizard of Menlo Park&#8221; (Menlo Park, New Jersey, not Menlo Park, California). At one point in the episode, several equations appear on a blackboard in the background, including the enigmatic &#8220;identity&#8221; 3987<sup>12<\/sup> + 4365<sup>12<\/sup> = 4472<sup>12<\/sup>.<\/p>\n<p>Only a handful of viewers recognized that this is a remarkable near-equality of the form of Fermat&#8217;s Last Theorem. The three integers are<br \/>\n16134474609751291283496491970515151715346481<br \/>\n47842181739947321332739738982639336181640625<br \/>\n63976656348486725806862358322168575784124416<br \/>\nIn fact, the sum of the first two is<br \/>\n63976656349698612616236230953154487896987106<br \/>\nwhich agrees with the third number above to 10-digit accuracy, but of course is not equal.<\/p>\n<p>This &#8220;identity&#8221; is the work of screenwriter David S. Cohen, one of several young mathematically-minded and trained screenwriters working on the show at the time. Singh also describes lovely episodes playing with time travel and dimensionality&#8212;remember the Simpsons are two-dimensional.<\/p>\n<h4>Pi in the Simpsons<\/h4>\n<p>Singh includes not one but two chapters on appearances of pi in the Simpsons. In the Simpsons show <a href=\"http:\/\/en.wikipedia.org\/wiki\/Marge_in_Chains\">Marge in Chains<\/a>, which aired on 6 May 1993, Marge is arrested for shoplifting some liquor. During the trial, Marge&#8217;s lawyer questions the reliability of the store&#8217;s proprietor, Apu Nahasapeemapetilon. However, when Apu is brought to the witness stand, he says that he has perfect memory: &#8220;In fact I can recite pi to forty thousand places. The last digit is 1.&#8221;<\/p>\n<p>In his account of the creation of this script, Singh writes that writers Bill Oakley and Josh Weinstein originally just had Apu simply saying that he had been famous in India for his mental ability. But while discussing the draft script, they saw an opportunity to insert some mathematics. Their colleague Al Jean, who had just read of a world-record-setting recitation of pi, suggested that Apu could recite the 40,000th digit of pi.<\/p>\n<p>Singh writes &#8220;The writers decided they needed some expert advice, so they contacted a brilliant mathematician named David Bailey, who at the time was working at the NASA Ames Research Center. Bailey responded by printing out all forty thousand decimal places of pi and mailing them to the studio.&#8221; (Today they could just look on the web.)<\/p>\n<p>This &#8220;David Bailey&#8221; is, as you might guess, one of the two co-bloggers of this site. Indeed, in October 1992 Bailey received a fax from the Simpson&#8217;s show, requesting the 40,000 digits. A photocopy of this fax is available <a href=\"http:\/\/www.davidhbailey.com\/pi\/simpson-pi2.pdf\">here<\/a>. He dutifully performed the computation and sent the results back to the studio. Bailey justified the computation to his superiors at NASA by saying, in a report, that he was &#8220;helping the U.S. entertainment industry maintain leadership in the international marketplace.&#8221;<\/p>\n<p>In a footnote, Singh writes<\/p>\n<blockquote><p>Bailey helped to invent the spigot algorithm for finding the digits of pi. A spigot is a type of tap, and a spigot algorithm generates answers in a tap like fashion, which means that pi is calculated drip by drip, digit by digit. The spigot algorithm can be tuned to generate any particular digit with perfect accuracy, so you might then think that it would be easy for Bailey to tune his algorithm to deliver the forty-thousandth digit. Unfortunately, Bailey&#8217;s algorithm only works in hexadecimal (base 16), not decimal (base 10), as Jonathan Borwein (the other co-blogger of this site)\u00a0has proved.<\/p><\/blockquote>\n<p>This isn&#8217;t quite right. It is certainly true that Bailey was a co-discoverer, with Peter Borwein (brother of co-blogger Jonathan Borwein) and Simon Plouffe, of what is now known as the <a href=\"http:\/\/mathworld.wolfram.com\/BBPFormula.html\">BBP formula for pi<\/a>, namely:<\/p>\n<p><a href=\"https:\/\/experimentalmath.info\/blog\/wp-content\/uploads\/2013\/11\/bbp-formula.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-5911\" alt=\"bbp-formula\" src=\"https:\/\/experimentalmath.info\/blog\/wp-content\/uploads\/2013\/11\/bbp-formula-300x31.jpg\" width=\"300\" height=\"31\" srcset=\"https:\/\/experimentalmath.info\/blog\/wp-content\/uploads\/2013\/11\/bbp-formula-300x32.jpg 300w, https:\/\/experimentalmath.info\/blog\/wp-content\/uploads\/2013\/11\/bbp-formula-150x15.jpg 150w, https:\/\/experimentalmath.info\/blog\/wp-content\/uploads\/2013\/11\/bbp-formula-400x42.jpg 400w, https:\/\/experimentalmath.info\/blog\/wp-content\/uploads\/2013\/11\/bbp-formula.jpg 688w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This formula, after a certain transformation, does permit one to directly calculate the nth digit of pi, in hexadecimal (or binary). For details on how this is done, see this <a href=\"http:\/\/crd-legacy.lbl.gov\/~dhbailey\/dhbpapers\/bbp-alg.pdf\">brief note<\/a>.<\/p>\n<p>However, in other respects Singh isn&#8217;t quite right. The BBP formula is <em>not<\/em> correctly described as a &#8220;spigot&#8221; algorithm. Instead, its virtue is that it permits one to compute the nth digit, without any reference to any of the digits that came before; indeed, the previous digits have no place in the algorithm. Perhaps Singh was thinking of the <a href=\"http:\/\/www.cecm.sfu.ca\/~jborwein\/Expbook\/Manuscript\/Related%20files\/spigot.pdf\">spigot algorithm<\/a> of Stanley Rabinowitz and Stan Wagon. This scheme indeed calculates digits of pi in a &#8220;spigot&#8221; fashion, with each new digit computed based on the string of all previous digits.<\/p>\n<p>Actually, to compute the 40,000 digits requested by the Simpson&#8217;s show, Bailey used the <a href=\"http:\/\/www.davidhbailey.com\/dhbpapers\/pi.pdf\">Borwein quartically convergent algorithm for pi<\/a>, which had been discovered a few years earlier by Jonathan Borwein \u00a0and his brother Peter Borwein. But this algorithm is not related to the BBP algorithm. Indeed, the BBP formula and algorithm were not discovered until 1996, three years after &#8220;Marge in Chains&#8221; appeared on TV.<\/p>\n<h4>Mathematics and science in popular TV<\/h4>\n<p>It is truly refreshing to see that at least a few renegade Hollywood screenwriters have been brave enough to introduce some non-trivial mathematics and science into popular TV.<\/p>\n<p>It is sad that in most other Hollywood productions, scientific fields such as mathematics and physics, if they are mentioned at all, are objects of jokes and sometimes derision. The &#8216;mad scientist&#8217; is an industry staple. One example is the long-running and Emmy-winning &#8220;Big Bang Theory,&#8221; in which the main characters are brilliant scientists who are depicted as the epitome of nerdiness.<\/p>\n<p>That said, no one doubts they &#8212; or the mathematician hero of the 2005-2010 CBS show\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/Numbers_(TV_series)\">NUMB3<\/a><span style=\"font-size: small;\"><span style=\"line-height: 19px;\"><a href=\"http:\/\/en.wikipedia.org\/wiki\/Numbers_(TV_series)\">RS<\/a>\u00a0&#8212;<\/span><\/span>\u00a0<span style=\"font-size: 13px; line-height: 19px;\">are smart or that science is important. <a href=\"http:\/\/www.hollywoodreporter.com\/gallery\/big-bang-theory-guest-stars-439826#related-galleries\">Steven Hawking<\/a>, Nobel prize winner <a href=\"http:\/\/en.wikipedia.org\/wiki\/George_Smoot\">George Smoot<\/a>, StarTrek actors and others are delighted to make cameo performances. <\/span><\/p>\n<p><span style=\"font-size: 13px; line-height: 19px;\">And as <a href=\"http:\/\/en.wikipedia.org\/wiki\/Michael_Crichton\">Michael \u00a0Crichton<\/a> \u00a0said in 1999\u00a0<i>&#8220;All professions look bad in the movies &#8230; why should scientists expect to be treated differently?&#8221;\u00a0<\/i><\/span><span style=\"font-size: 13px; line-height: 19px;\">Perhaps we should be happy to settle for &#8216;geek-chic&#8217;, or preferably &#8216;geeky&#8217;, being viewed as a positive attribute.\u00a0<\/span><span style=\"font-size: 13px; line-height: 19px;\">It is doubtful that our current <\/span><a style=\"font-size: 13px; line-height: 19px;\" href=\"https:\/\/experimentalmath.info\/blog\/2012\/07\/algebra-is-essential-in-a-21st-century-economy\/\">educational deficits in mathematics and science<\/a><span style=\"font-size: 13px; line-height: 19px;\"> will be remedied until that is the case.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p><p id=\"caption-attachment-5956\" class=\"wp-caption-text\">Homer contemplates pi<\/p>\n<\/p>\n<p> Mathematics in the Simpsons <\/p>\n<p>In a newly published book, Simon Singh presents a too little-known back story about the Simpsons TV show: underlying much of the clever screenplay are numerous references to somewhat sophisticated mathematics both in the Simpsons and in the follow-up Futurama.<\/p>\n<p>Simon Singh is no stranger to either mathematics or show business. He directed an award\u2013winning BBC documentary on Fermat&#8217;s Last Theorem and authored the best-selling book Fermat&#8217;s Enigma on the same topic. He is a physicist by training, with a Ph.D. from Cambridge and is engaged in a host of science <\/p>\n<p>Continue reading <a href=\"https:\/\/experimentalmath.info\/blog\/2013\/11\/pi-in-the-simpsons\/\">Pi in the Simpsons<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-5909","post","type-post","status-publish","format-standard","hentry","category-essays","odd"],"_links":{"self":[{"href":"https:\/\/experimentalmath.info\/blog\/wp-json\/wp\/v2\/posts\/5909","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/experimentalmath.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/experimentalmath.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/experimentalmath.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/experimentalmath.info\/blog\/wp-json\/wp\/v2\/comments?post=5909"}],"version-history":[{"count":41,"href":"https:\/\/experimentalmath.info\/blog\/wp-json\/wp\/v2\/posts\/5909\/revisions"}],"predecessor-version":[{"id":5958,"href":"https:\/\/experimentalmath.info\/blog\/wp-json\/wp\/v2\/posts\/5909\/revisions\/5958"}],"wp:attachment":[{"href":"https:\/\/experimentalmath.info\/blog\/wp-json\/wp\/v2\/media?parent=5909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/experimentalmath.info\/blog\/wp-json\/wp\/v2\/categories?post=5909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/experimentalmath.info\/blog\/wp-json\/wp\/v2\/tags?post=5909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}