Analysis of Busy Beaver Machines Via Induction Proofs
Total Page:16
File Type:pdf, Size:1020Kb
Analysis of Busy Beaver Machines via Induction Proofs James Harland School of Computer Science and Information Technology RMIT University GPO Box 2476V Melbourne, 3001 Australia [email protected] Abstract halts. This function is often denoted as Σ(n); in this paper we will use the more intuitive notation The busy beaver problem is to find the maximum of bb(n). The number of 1’s printed by the machine number of 1’s that can be printed by an n-state is known as its productivity. Turing machine of a particular type. A critical This function can be shown to grow faster than step in the evaluation of this value is to determine any computable function. Hence it is not only whether or not a given n-state Turing machine non-computable, it grows incredibly quickly. Ac- halts. Whilst this is undecidable in general, it is cordingly, despite over 40 year’s worth of exponen- known to be decidable for n ≤ 3, and undecidable tial increases in hardware capabilities in line with for n ≥ 19. In particular, the decidability question Moore’s famous law, its value has only been es- is still open for n = 4 and n = 5. In this paper we tablished with certainty for n ≤ 4. The values for discuss our evaluation techniques for busy beaver n = 1, 2, 3 were established by Lin and Rado [11] in machines based on induction methods to show the the 1960s and the value for n = 4 by Brady in the non-termination of particular classes of machines. 1970s [3]. Larger values have proved more trou- These are centred around the generation of induc- blesome [14, 13, 10, 20], and the lower bounds for tive conjectures about the execution of the ma- n = 6 are already spectacularly large [13]. There chine and the evaluation of these conjectures on a are some interesting analyses of the current cham- particular evaluation engine. Unlike previous ap- pion machines for the n = 5 and n = 6 cases proaches, our aim is not limited to reducing the [17, 16], but due to the sheer size of the numbers search space to a size that can be checked by hand; involved, bb(n) for n ≥ 7 may never be known. we wish to eliminate hand analysis entirely, if pos- The current state of knowledge is given in the sible, and to minimise it where we cannot. We table below. We denote by ff(n) (for frantic frog) describe our experiments for the n = 4 and n = 5 the maximum number of state transitions per- cases appropriate inductive conjectures. formed by a terminating Turing machine with n states. 1 Introduction n bb(n) ff(n) 1 1 1 The busy beaver is a well-known example of a 2 4 6 non-computable function. It was introduced by 3 6 21 Rado[18] as a simple example of such functions, 4 13 107 and is defined in terms of a particularly simple 5 ≥ 4098 ≥ 47, 176, 870 class of Turing machines [21]. This class of ma- 6 ≥ 1.29 ∗ 10865 ≥ 3 ∗ 101730 chines has a single tape, infinite in both directions, which is blank on input. There are only two tape There is some strong evidence that bb(5) = symbols, 0 and 1, and the machine is required to 4, 098, and Kellett [10] has shown this for the be deterministic, i.e. that for any state and input quadruple version of 5-state Turing machines (i.e. symbol there is exactly one transition. Each ma- those in which each transition can either change chine also contain a special state known as the halt what is on the tape, or move the tape pointer, state, from which there are no transitions. A ma- but not both). This is tantalisingly close, but in chine is said to have n states when it has one halt the absence of a proof of equivalence between this state and n other states. The busy beaver function variant and the quintuple one (or more particu- for n is then defined as the largest number of 1’s larly a proof that for every 5-state quintuple ma- that can be printed by an n-state machine which chine there is a 5-state quadruple equivalent), we Copyright c 2007, Australian Computer Society, Inc. This pa- cannot state definitively that bb(5) = 4, 098. per appeared at Thirteenth Computing: the Australasian The- There are a number of other points of inter- ory Symposium (CATS2007), Ballarat, Australia. Conferences est in this area, such as the placid platypus prob- in Research and Practice in Information Technology (CRPIT), lem discussed in [8], and investigating busy beaver Vol. 65. Joachim Gudmundsson and Barry Jay, Ed. Reproduc- functions for machines with 3, 4, 5 and 6 symbols. tion for academic, not-for profit purposes permitted provided In this paper, we concentrate on providing a this text is included. simple and extensible technique for establishing non-termination. In particular, we want to find One obvious class of non-terminating machines a method which can be extended, as larger classes are those which repeat exactly the same tape con- of machines generally require more sophisticated figuration. We refer to these machines as perennial techniques than smaller ones, and one that max- pigeons. These machines are comparatively rare in imises the possibilities for automated analysis. In our search, as they can be largely eliminated by the other words, we want to have a decision procedure generation process. for all decidable cases of this problem. Another class of non-terminating machines are Our technique is based on an analysis of ex- those which move infinitely in only one direc- ecution history, which is used to produce induc- tion. We refer to these machines as road runners. tive conjectures, which are then passed to a par- Again these are largely eliminated in the genera- ticular engine for evaluation. The extensibility of tion process. this techniques can thus be found in the ability to A further class of non-terminating machines are produce more inductive conjectures, with a corre- those which move in one direction, but in a cyclic sponding increase in the complexity of the compu- process involving movement in both directions. tations that can be performed by the engine. Essentially this involves re-creating the same tape This paper is organised as follows. In Section 2 sub-section and shifting it in one direction. For we discuss various cases of non-terminating ma- example, consider Machine 1 in Figure 1. chines and how they may be detected, and in Sec- This machine has the following execution trace. tion 3 we discuss our conjecture method in some Note that the notation 1{B}0 denotes that the detail. In Section 4 we discuss the hypothetical en- machine in state B with the tape head pointing at gine and in Section 5 we discuss our experiments the 0). with it. Finally in Section 6 we present our con- clusion and some areas of further work. {A}0 1{B}0 {A}10 2 Classification of Machines {A}010 1{B}10 There are a number of ways in which a given ma- {C}110 chine may fail to terminate, or to otherwise be of {C}0110 no interest for the search for busy beaver machines. {D}00110 The machine generation process is based on the {A}010110 tree normal form method [11, 3], in which a par- 1{B}10110 tially complete machine is executed until it reaches {C}110110 a transition which is not yet defined. Some con- {C}0110110 straints are applied at this point, to ensure that {D}00110110 only “sensible” machines are generated. These .... constraints include not allocating the halt transi- tion until all other transitions are defined, ensuring This machine repeatedly moves one step to the that no state is isolated (i.e. unreachable from any right and then four to the left. We can see this other state) and performing some simple checks for by noting that from the configuration {A}01 it loops. We refer to all machines pruned in this gen- never moves past the 1, and has a net movement to eration process as ignoble iguanas. These include the left which re-recreates this configuration three both machines which we can determine not to ter- places to the left, i.e. {A}01001. minate, as well as some others which may termi- Brady [3] refers to these machines as “travel- nate, but which will have no bearing on the busy ling loops”; following the literary lead of the busy beaver or placid platypus problem. One example beaver, we refer to them as dizzy ducks. is a machine which returns the tape to all blanks at A fourth class of non-terminating machines are some point in the computation (we refer to such a those for which the halt transition cannot be ex- machine as a phlegmatic phoenix1). This machine ecuted. For example, consider Machine 2 in Fig- may terminate, but as far as the calculation of its ure 1. productivity is concerned, the computation per- Now in order to reach the halt state, this ma- formed up to this point is wasted. In particular, chine must be in state C with input 0. The only there is another machine in the search space which way in which this configuration could be reached will perform whatever computation takes place af- is to previously be in state B with input 1, which ter this point without this initial loop. By building in turn can only arise from state A with input 0.