{"id":2725,"date":"2016-05-03T18:04:26","date_gmt":"2016-05-03T22:04:26","guid":{"rendered":"https:\/\/scottaaronson.blog\/?p=2725"},"modified":"2019-01-30T02:38:55","modified_gmt":"2019-01-30T08:38:55","slug":"the-8000th-busy-beaver-number-eludes-zf-set-theory-new-paper-by-adam-yedidia-and-me","status":"publish","type":"post","link":"https:\/\/scottaaronson.blog\/?p=2725","title":{"rendered":"The 8000th Busy Beaver number eludes ZF set theory: new paper by Adam Yedidia and me"},"content":{"rendered":"<p>I&#8217;ve supervised a lot of great student projects in my nine years at MIT, but my inner nerdy teenager&nbsp;has never been as <em>personally<\/em> delighted by a project&nbsp;as it is right now. &nbsp;Today, I&#8217;m proud to announce that Adam Yedidia, a PhD student at MIT (but an MEng student when he did most of this work), has explicitly constructed a&nbsp;one-tape, two-symbol Turing machine with 7,918 states, whose behavior (when run on a blank tape) can never&nbsp;be proven from the usual&nbsp;axioms of set theory, under reasonable consistency hypotheses. &nbsp;Adam has also constructed a 4,888-state Turing machine that halts iff there&#8217;s a counterexample to Goldbach&#8217;s Conjecture, and a 5,372-state machine that halts iff there&#8217;s a counterexample to the Riemann Hypothesis. &nbsp;In all three cases, this is the first time we&#8217;ve had a reasonable explicit upper bound on how many states you need in a Turing machine before you can see the behavior in question.<\/p>\n<p><a href=\"http:\/\/www.scottaaronson.com\/busybeaver.pdf\">Here&#8217;s our research&nbsp;paper<\/a>, on which Adam generously&nbsp;included me as a coauthor, even though he did the heavy lifting. &nbsp;Also, <a href=\"https:\/\/github.com\/adamyedidia\/parsimony\">here&#8217;s a github repository<\/a> where you can download&nbsp;all the code Adam used to generate these Turing machines, and even use it to build your own small Turing machines that encode interesting mathematical statements. &nbsp;Finally, <a href=\"https:\/\/www.youtube.com\/watch?v=Rt_SfOkk0YM\">here&#8217;s a YouTube video<\/a> where Adam walks you through how to use his&nbsp;tools.<\/p>\n<p>A&nbsp;more precise statement of our main result is this: we give a 7,918-state Turing machine, called Z (and actually explicitly listed in our paper!), such&nbsp;that:<\/p>\n<ol>\n<li>Z runs forever, assuming the consistency of a large-cardinal theory called SRP (Stationary Ramsey Property), but<\/li>\n<li>Z&nbsp;can&#8217;t be <em>proved<\/em>&nbsp;to run forever in ZFC (Zermelo-Fraenkel set theory with the Axiom of Choice, the usual foundation for mathematics), assuming that ZFC is consistent.<\/li>\n<\/ol>\n<p>A bit of background: it follows, as an immediate&nbsp;consequence of G\u00f6del&#8217;s Incompleteness Theorem, that there&#8217;s&nbsp;<em>some<\/em> computer program,&nbsp;of&nbsp;<em>some<\/em>&nbsp;length, that eludes the power of ordinary mathematics&nbsp;to prove what it does, when it&#8217;s run with&nbsp;an unlimited amount of memory. &nbsp;So for example, such a program could simply&nbsp;enumerate all the possible consequences of the ZFC axioms, one after another, and halt if it ever found a contradiction (e.g., a proof of 1+1=3). &nbsp;Assuming ZFC is consistent, this program must run forever. &nbsp;But again assuming ZFC is consistent, ZFC can&#8217;t <em>prove<\/em> that the program runs forever, since if it did, then it would prove its own consistency, thereby violating the Second Incompleteness Theorem!<\/p>\n<p>Alas, this argument still leaves us in the dark about <em>where<\/em>, in space of computer programs, the &#8220;G\u00f6delian gremlin&#8221; rears its undecidable head. &nbsp;A program that searches for an inconsistency in ZFC is a fairly&nbsp;complicated animal: it needs to encode not only the ZFC axiom schema, but also the language and inference rules of first-order logic. &nbsp;Such a program might be thousands of lines long if written in a standard programming language like C, or millions&nbsp;of instructions if&nbsp;compiled down to a bare-bones machine code. &nbsp;You&#8217;d certainly never&nbsp;run across such a program by chance&#8212;not even if you had a computer the size of the&nbsp;observable universe, trying one random program after another for billions of years in a &#8220;primordial soup&#8221;!<\/p>\n<p>So the question stands&#8212;a question that strikes me as&nbsp;<em>obviously<\/em>&nbsp;important, even though as far as I know, only one or two people&nbsp;ever asked the question before us; <a href=\"http:\/\/mathoverflow.net\/questions\/62859\/simpler-statements-equivalent-to-conpa-or-conzfc\">see here<\/a> for example. &nbsp;Namely: do the axioms of set theory&nbsp;suffice to analyze the behavior of every computer program that&#8217;s at most, let&#8217;s say, 50 machine instructions long? &nbsp;Or are there super-short programs that <em>already<\/em> exhibit &#8220;G\u00f6delian behavior&#8221;?<\/p>\n<p>Theoretical computer scientists might object that this is &#8220;merely a question of constants.&#8221; &nbsp;Well yes, OK, but the origin of life in our universe&#8212;a not entirely unrelated puzzle&#8212;is also &#8220;merely a question of constants&#8221;! &nbsp;In more detail, we know that it&#8217;s <em>possible<\/em>&nbsp;with our laws of physics to build a self-replicating machine: say, DNA or RNA and their associated paraphernalia. &nbsp;We also know that tiny molecules like H<sub>2<\/sub>O and CO<sub>2<\/sub> are not self-replicating. &nbsp;But we don&#8217;t know <em>how small<\/em>&nbsp;the smallest self-replicating molecule can be&#8212;and that&#8217;s an issue&nbsp;that influences&nbsp;whether we should expect to find ourselves alone in the universe or find it teeming with life.<\/p>\n<p>Some people might also object that what we&#8217;re asking about has already been studied, in the half-century quest&nbsp;to design the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Universal_Turing_machine#Smallest_machines\">smallest universal Turing machine<\/a>&nbsp;(the subject of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Wolfram%27s_2-state_3-symbol_Turing_machine\">Stephen Wolfram&#8217;s $25,000&nbsp;prize<\/a> in 2007, to which I responded with my own <a href=\"https:\/\/scottaaronson.blog\/?p=284\">$25.00 prize<\/a>). &nbsp;But I see that as&nbsp;fundamentally different, for the following reason. &nbsp;A universal Turing machine&#8212;that is, a machine that simulates any other machine that&#8217;s described to it on its input tape&#8212;has the privilege of offloading almost all of its complexity onto the description format for the input machine. &nbsp;So indeed, that&#8217;s exactly what all known&nbsp;tiny universal machines do! &nbsp;But a program that checks (say) Goldbach&#8217;s Conjecture, or the Riemann Hypothesis, or the consistency of set theory, on an initially blank tape, has no such liberty. &nbsp;For such&nbsp;machines, the number of states really <em>does<\/em> seem like an intrinsic measure of complexity, because the complexity can&#8217;t be shoehorned&nbsp;anywhere else.<\/p>\n<p>One can also phrase what we&#8217;re asking&nbsp;in terms of the infamous <a href=\"https:\/\/en.wikipedia.org\/wiki\/Busy_beaver\">Busy Beaver function<\/a>. &nbsp;Recall that BB(n), or the n<sup>th<\/sup> Busy Beaver number, is defined to be the maximum&nbsp;number of steps that any n-state Turing machine takes when run on an initially blank tape, assuming that the machine eventually halts. The Busy Beaver function was the centerpiece of my 1998 essay <a href=\"http:\/\/www.scottaaronson.com\/writings\/bignumbers.html\">Who Can Name the Bigger Number?<\/a>, which <i>might<\/i>&nbsp;still attract more readers than anything else I&#8217;ve written since. As I stressed there, if you&#8217;re in a biggest-number-naming contest, and you write &#8220;BB(10000),&#8221; you&#8217;ll <em>destroy<\/em> any opponent&#8212;however otherwise mathematically literate&nbsp;they are&#8212;who&#8217;s innocent of&nbsp;computability theory. &nbsp;For BB(n) grows faster than any&nbsp;computable sequence of integers: indeed, if it didn&#8217;t, then one could use that fact to solve the halting problem, contradicting Turing&#8217;s theorem.<\/p>\n<p>But the BB function has a second amazing&nbsp;property: namely, it&#8217;s a perfectly well-defined integer function, and yet once you fix the axioms of mathematics, only finitely many values of the function can ever&nbsp;be <em>proved<\/em>, even in principle. &nbsp;To see why, consider again&nbsp;a Turing machine M that halts if and only if there&#8217;s a contradiction in&nbsp;ZF set theory. &nbsp;Clearly such a machine could be built, with some&nbsp;finite number of states k. &nbsp;But then ZF set theory can&#8217;t possibly determine the value of&nbsp;BB(k) (or BB(k+1), BB(k+2), etc.), unless ZF is inconsistent! &nbsp;For to do so, ZF would need to prove that M ran forever, and therefore prove its own consistency, and therefore be inconsistent by G\u00f6del&#8217;s Theorem.<\/p>\n<p>OK, but we can now ask a quantitative question: <em>how many<\/em> values of the BB function is it possible for us to know? &nbsp;Where exactly is&nbsp;the precipice at which this function&nbsp;&#8220;departs the realm of mortals and enters the realm of God&#8221;: is it closer to n=10 or to n=10,000,000? &nbsp;In practice,&nbsp;<em>four<\/em> values of BB have been determined so far:<\/p>\n<ul>\n<li>BB(1)=1<\/li>\n<li>BB(2)=6<\/li>\n<li>BB(3)=21 (Lin and Rado 1965)<\/li>\n<li>BB(4)=107 (Brady 1975)<\/li>\n<\/ul>\n<p>We also know some&nbsp;lower bounds:<\/p>\n<ul>\n<li>BB(5) \u2265&nbsp;47,176,870 (Marxen and Buntrock 1990)<\/li>\n<li>BB(6)&nbsp;\u2265 7.4 \u00d7&nbsp;10<sup>36,534<\/sup> (Kropitz 2010)<\/li>\n<li>$$BB(7)\\gt 10^{10^{10^{10^{10^{7}}}}}$$&nbsp;(<a href=\"http:\/\/googology.wikia.com\/wiki\/User_blog:Wythagoras\/A_good_bound_for_S(7)%3F\">&#8220;Wythagoras&#8221; 2014<\/a>)<\/li>\n<li>BB(23) &gt; <a href=\"https:\/\/en.wikipedia.org\/wiki\/Graham%27s_number\">Graham&#8217;s number<\/a> (a famous huge number from Ramsey theory, obtained by iterating the Ackermann function 64 times) (<a href=\"http:\/\/googology.wikia.com\/wiki\/User_blog:Deedlit11\/Okay,_more_Turing_machines\">&#8220;Deedlit&#8221; and &#8220;Wythagoras&#8221; 2013<\/a>)<\/li>\n<\/ul>\n<p>See&nbsp;<a href=\"http:\/\/www.drb.insel.de\/~heiner\/BB\/\">Heiner Marxen&#8217;s page<\/a>&nbsp;or the <a href=\"http:\/\/googology.wikia.com\/wiki\/Googology_Wiki\">Googology Wiki<\/a> (which somehow I only learned about today) for more information.<\/p>\n<p>Some Busy Beaver enthusiasts&nbsp;have opined that even BB(6) will never be known exactly. &nbsp;On the other hand, the abstract argument from before&nbsp;tells us only that, if we confine&nbsp;ourselves to (say) ZF set theory, then there&#8217;s <em>some<\/em> k&#8212;possibly in the tens of millions or higher&#8212;such that the values of BB(k), BB(k+1), BB(k+2),&nbsp;and so on&nbsp;can never be proven. &nbsp;So again: is the number of knowable values of the BB function more like 10, or more like a million?<\/p>\n<p>This is the question that Adam and I (but mostly Adam) have finally addressed.<\/p>\n<p>It&#8217;s hopeless to design a Turing machine by hand for all but the simplest tasks, so as a first step, Adam created a new programming language, called Laconic, specifically for writing programs that compile down to small Turing machines. &nbsp;Laconic programs actually compile to an intermediary language called TMD (Turing Machine Descriptor), and from there to Turing machines.<\/p>\n<p>Even then, we estimate that a direct attempt to write a Laconic program that searched for a contradiction in ZFC would lead to a Turing machine with millions of states. &nbsp;There were three ideas needed to get the state count down to something reasonable.<\/p>\n<p>The first was to take advantage of the <a href=\"https:\/\/u.osu.edu\/friedman.8\/foundational-adventures\/publications\/\">work of Harvey Friedman<\/a>, who&#8217;s one of the one or two people I mentioned earlier who&#8217;s written about these problems before. &nbsp;In particular, Friedman has been laboring&nbsp;since the 1960s&nbsp;to find &#8220;natural&#8221; arithmetical statements that are provably independent of ZFC or other strong set theories. &nbsp;(See <a href=\"http:\/\/www.ams.org\/notices\/200604\/fea-davis.pdf\">this <em>AMS Notices<\/em> piece<\/a> by Martin Davis for a discussion of Friedman&#8217;s progress as of 2006.) &nbsp;Not only does Friedman&#8217;s quest continue, but some of his&nbsp;most important progress has come only within the last year. &nbsp;His statements&#8212;typically involving objects called &#8220;order-invariant graphs&#8221;&#8212;strike me as alien, and as far removed from anything I&#8217;d personally have&nbsp;independent reasons to think about (but is that just a sign of my&nbsp;limited perspective?). &nbsp;Be that as it may, Friedman&#8217;s statements <em>still<\/em> seem a lot easier to encode as short computer programs than the full apparatus of first-order logic and set theory! &nbsp;So that&#8217;s what we started with; our work wouldn&#8217;t have been possible without Friedman (who we consulted by email throughout the project).<\/p>\n<p>The second idea was something we called &#8220;on-tape processing.&#8221; &nbsp;Basically, instead of compiling directly from Laconic down to Turing machine, Adam wrote&nbsp;an&nbsp;<em>interpreter<\/em> in Turing machine (which took about 4000 states&#8212;a single, fixed cost), and then had the final Turing machine first write a higher-level program onto its tape and then interpret that program. &nbsp;Instead of the compilation process producing a huge&nbsp;multiplicative overhead&nbsp;in the number of Turing machine states&nbsp;(and a repetitive machine), this approach gives us&nbsp;only an additive overhead. &nbsp;We found that this one idea decreased the number of states by roughly an order of magnitude.<\/p>\n<p>The third idea was first suggested in 2002 by Ben-Amram and Petersen (and refined for us by Luke Schaeffer); we call it &#8220;introspective encoding.&#8221; &nbsp;When we write the program to be interpreted onto the Turing machine tape, the na\u00efve approach would use one Turing machine state per bit. &nbsp;But that&#8217;s clearly wasteful,&nbsp;since in an n-state Turing machine, every state contains&nbsp;~log(n) bits of information (because of the other states it needs to point to). &nbsp;A better approach tries&nbsp;to exploit as many of those bits as it can; doing that gave us up to a factor-of-5 additional savings in the number of states.<\/p>\n<p>For Goldbach&#8217;s Conjecture and the Riemann Hypothesis, we paid the same 4000-state overhead for the interpreter, but then the program to be interpreted was simpler, giving a smaller overall machine. &nbsp;Incidentally, it&#8217;s not intuitively obvious that the Riemann Hypothesis is equivalent to the statement that some particular computer program runs forever, but it is&#8212;that follows, for example, from <a href=\"http:\/\/www.math.lsa.umich.edu\/~lagarias\/doc\/elementaryrh.pdf\">work by Lagarias<\/a>&nbsp;and by <a href=\"http:\/\/mathoverflow.net\/questions\/31846\/is-the-riemann-hypothesis-equivalent-to-a-pi-1-sentence\">Davis, Matijasevich, and Robinson<\/a> (we used the latter; an earlier version of this post incorrectly stated that we used the Lagarias result).<\/p>\n<p>To preempt the inevitable question in the comments section:&nbsp;yes, we <em>did<\/em> run these Turing machines for a while, and no, none of them had halted after a day or so. &nbsp;But before you interpret that as evidence in favor of Goldbach, Riemann, and the consistency of ZFC, you should probably know that a Turing machine to test whether <em>all perfect squares are less than 5<\/em>, produced using Laconic, needed to run for more than&nbsp;an hour before it found the first counterexample (namely, 3<sup>2<\/sup>=9) and halted. &nbsp;Laconic Turing machines are optimized only for the number of states, not for speed, to put it mildly.<\/p>\n<p>Of course, three orders of magnitude still remain between the largest value of n (namely, 4) for which BB(n) is known to be knowable in ZFC-based mathematics,&nbsp;and the smallest value of n (namely, 7,918) for which BB(n) is known to be unknowable. &nbsp;I&#8217;m optimistic that further improvements are possible to the machine Z&#8212;whether that means simplifications to Friedman&#8217;s statement, a redesigned interpreter (possibly using lambda calculus?), or a &#8220;multi-stage rocket model&#8221; where a bare-bones interpreter would be used to unpack a second, richer interpreter which would be used to unpack a third, etc., until you got to the actual program you cared about. &nbsp;But I&#8217;d be <em>shocked<\/em> if anyone in my lifetime determined the value of BB(10), for example, or proved the value independent of set theory. &nbsp;Even after the Singularity happens, I imagine that our robot overlords would&nbsp;find the determination of BB(10) quite a challenge.<\/p>\n<p>In an <a href=\"https:\/\/scottaaronson.blog\/?p=152\">early <em>Shtetl-Optimized<\/em> post<\/a>, I described theoretical computer science as &#8220;quantitative epistemology.&#8221; &nbsp;Constructing small Turing machines whose behavior eludes set theory is not&nbsp;conventional theoretical computer science by any stretch of the imagination: it&#8217;s closer in practice to programming languages or computer architecture, or even the recreational practice known as&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Code_golf\">code-golfing<\/a>. &nbsp;On the other hand,&nbsp;I&#8217;ve never been&nbsp;involved with any other project that was so&nbsp;clearly, explicitly&nbsp;about pinning down the&nbsp;quantitative boundary between the knowable and the unknowable.<\/p>\n<p>Comments on our paper are welcome.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>Addendum:<\/strong><\/span> Some people might wonder &#8220;why Turing machines,&#8221; as opposed to a more reasonable&nbsp;programming language like C or Python. &nbsp;Well, first of all, we needed a language that could&nbsp;address an unlimited amount of memory. &nbsp;Also, the BB function is traditionally defined in terms of Turing machines. &nbsp;But the most important issue is that we wanted there to be <em>no suspicion whatsoever<\/em> that our choice of programming language was artificially&nbsp;helping to&nbsp;make our machine small. &nbsp;And hopefully everyone can agree that one-tape, two-symbol Turing machines aren&#8217;t designed for <em>anyone&#8217;s<\/em> convenience!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve supervised a lot of great student projects in my nine years at MIT, but my inner nerdy teenager&nbsp;has never been as personally delighted by a project&nbsp;as it is right now. &nbsp;Today, I&#8217;m proud to announce that Adam Yedidia, a PhD student at MIT (but an MEng student when he did most of this work), [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[31,11],"tags":[],"class_list":["post-2725","post","type-post","status-publish","format-standard","hentry","category-announcements","category-nerd-interest"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/2725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2725"}],"version-history":[{"count":5,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/2725\/revisions"}],"predecessor-version":[{"id":4117,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/2725\/revisions\/4117"}],"wp:attachment":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}