The Undecidability of the Generalized Collatz Problem

Similar documents
The Halting Problem is Undecidable

Notes on Complexity Theory Last updated: August, Lecture 1

4/1/2017. PS. Sequences and Series FROM 9.2 AND 9.3 IN THE BOOK AS WELL AS FROM OTHER SOURCES. TODAY IS NATIONAL MANATEE APPRECIATION DAY

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

Turing Machines: An Introduction

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Computational Models Lecture 8, Spring 2009

Remarks on the computational complexity of small universal Turing machines

3515ICT Theory of Computation Turing Machines

Continued Fractions and the Euclidean Algorithm

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

1 Definition of a Turing machine

Congruent Number Problem

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

Introduction to Turing Machines

Reading 13 : Finite State Automata and Regular Expressions

1 if 1 x 0 1 if 0 x 1

Collatz Sequence. Fibbonacci Sequence. n is even; Recurrence Relation: a n+1 = a n + a n 1.

Algorithms are the threads that tie together most of the subfields of computer science.

Chapter 7 Uncomputability

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

Overview. Essential Questions. Precalculus, Quarter 4, Unit 4.5 Build Arithmetic and Geometric Sequences and Series

An example of a computable

Factoring & Primality

CAs and Turing Machines. The Basis for Universal Computation

[Refer Slide Time: 05:10]

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

24 Uses of Turing Machines

Computability Theory

FACTORING SPARSE POLYNOMIALS

Graphical degree sequences and realizations

Prime Numbers and Irreducible Polynomials

Lies My Calculator and Computer Told Me

Regular Languages and Finite Automata

The Little Man Computer

Primes in Sequences. Lee 1. By: Jae Young Lee. Project for MA 341 (Number Theory) Boston University Summer Term I 2009 Instructor: Kalin Kostadinov

Math 319 Problem Set #3 Solution 21 February 2002

THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES

Is Sometime Ever Better Than Alway?

Lecture 3: Finding integer solutions to systems of linear equations

8 Primes and Modular Arithmetic

Alex, I will take congruent numbers for one million dollars please

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

Wald s Identity. by Jeffery Hein. Dartmouth College, Math 100

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

Automata and Computability. Solutions to Exercises

Doug Ravenel. October 15, 2008

CS 3719 (Theory of Computation and Algorithms) Lecture 4

Every Positive Integer is the Sum of Four Squares! (and other exciting problems)

10.2 Series and Convergence

Lecture 2: Universality

Handout #1: Mathematical Reasoning

SECTION 10-2 Mathematical Induction

Math Workshop October 2010 Fractions and Repeating Decimals

THE NUMBER OF REPRESENTATIONS OF n OF THE FORM n = x 2 2 y, x > 0, y 0

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Regular Expressions and Automata using Haskell

Brewer s Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services

T Tutorial D - A Short Summary

6.080/6.089 GITCS Feb 12, Lecture 3

Automata and Formal Languages

NP-Completeness and Cook s Theorem

Stanford Math Circle: Sunday, May 9, 2010 Square-Triangular Numbers, Pell s Equation, and Continued Fractions

Universal Turing Machine: A Model for all Computational Problems

C H A P T E R Regular Expressions regular expression

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Linear Risk Management and Optimal Selection of a Limited Number

FACTORING POLYNOMIALS IN THE RING OF FORMAL POWER SERIES OVER Z

There is no degree invariant half-jump

How To Understand The Theory Of Computer Science

Properties of Real Numbers

Introduction. Appendix D Mathematical Induction D1

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Turing Machines, Part I

11 Ideals Revisiting Z

Lecture 13 - Basic Number Theory.

Our Primitive Roots. Chris Lyons

Graphs without proper subgraphs of minimum degree 3 and short cycles

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Multiplication and Division with Rational Numbers

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

The van Hoeij Algorithm for Factoring Polynomials

A simple criterion on degree sequences of graphs

Math 55: Discrete Mathematics

8 Divisibility and prime numbers

9 More on differentiation

GENERIC COMPUTABILITY, TURING DEGREES, AND ASYMPTOTIC DENSITY

Phantom bonuses. November 22, 2004

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 4 Nancy Lynch

Sequence of Numbers. Mun Chou, Fong QED Education Scientific Malaysia

11 Multivariate Polynomials

4.6 The Primitive Recursive Functions

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP

Transcription:

The Undecidability of the Generalized Collatz Problem Stuart A. Kurtz Department of Computer Science The University of Chicago Janos Simon Department of Computer Science The University of Chicago December 26, 2006 Abstract The Collatz problem, widely known as the 3x + 1 problem, asks whether or not a certain simple iterative process halts on all inputs. We build on earlier work by J. H. Conway, and show that a natural generalization of the Collatz problem is recursively undecidable. 1 Introduction Define the function g : ω ω as follows: { x/2, if n is even; g(x) = 3x + 1, if n is odd. Let g (i) denote the i-th iterate of g, i.e., g (i) (x) = The Collatz problem asks i {}}{ g(g(... g(x)...)) Problem 1.1 For all integers x > 0, is there is an i such that g (i) (x) = 1. 1

Because of its tantalizingly elementary form, and our inability to settle it the Collatz problem has received substantial attention. Collatz started working on the problem in 1928, but, since he felt he made little progress, only published a history of its origin in 1986 [?]. There is a very extensive literature on the many attempts to settle the conjecture, as well as related questions, using an arsenal of technologies from Number Theory, to Dynamical Systems, and Markov Chains: there is a 47-page annotated bibliography [?], excellent surveys [?], even a monograph dedicated to the Dynamical Systems generalization [?]. Erdös offered $500,00 for a solution, and there are people working on it today [?]. We provide a good heuristic explanation for the apparent difficulty of the problem. We consider a generalization, defined by Conway [?], [?]. m 1.1. Definition 1.2 A function g is called an Collatz function if there is an integer n together with rational numbers {a i : i < n}, {b i : i < n} such that whenever x = i mod p, then g(x) = a i x + b i is integral. Note that this is a natural generalization: in the original problem p is 2, and the two functions are b 0 = n/2 and b 1 = 3n + 1 The corresponding problem is Problem 1.3 Given a representation for a Collatz function g, it can be decided whether for all integers x > 0, there is an i such that g (i) (x) = 1? Our result is Theorem 1.4 Given a Collatz function g, it is undecidable whether or not for all integers x there exists an i such that g (i) (x) = 1. The somewhat stronger version of the result is the following. Let g() be a Collatz function, and let range g() = {x there exists an i such that g (i) (x) = 1}. Theorem 1.5 The problem is range g() = ω} is Π 2 complete. Our results build on the beautiful results of Conway, who proved Theorem 1.6 Given a Collatz function g, it is undecidable whether or not for all integers x of the form 2 k, there exists an i such that g (i) (x) = 1. 2

Conway s proof works by constructing for each partial recursive function ϕ e a Collatz function g, such that various integers represent instantaneous descriptions of a register machine computing ϕ e, and (iterates of) g perform the same transformation on integers that the register machine performs on states. Integers of the form 2 k represent the configuration consisting of the initial state, with k as the input. such that g (i) (2 x ) = 1 if and only if ϕ e (x) converges in i steps, when ψ is computed on a simple register machine. Theorem 1.6 follows from the recursive undecidability of tot = {e : ϕ e is total}. The difficulty with extending Conway s proof to obtain a proof of the undecidability of Problem 1.3 is that the action of Conway s g s on integers not of the form 2 k has nothing to do with the totality ϕ e. Trying to extend Conway s proof requires producing a computational system whose behavior can be controlled when started in an arbitrary state, with garbage on its tape or in its store. We get around this difficulty by running a double simulation of a register machine. One simulation, the so-called outer simulation is run forward. This simulation will halt if and only if the original register machine halted. The other simulation, the so-called inner simulation checks the outer simulation for consistency. When the inner simulation agrees that the outer simulation is consistent, only then is the outer simulation permitted to advance. At this point, a new inner simulation is started. We furthermore arrange that the inner simulation is always guaranteed to halt. 2 Register Machines A register machine is a simple mathematical model of a digital computer. Register machines are equipped with finitely many registers, each of which can contain any natural number. Control is handled by a finite sequence of instructions. There are three kinds of instructions: increment a register, decrement a register, and halt. An increment instruction indicates which register is to be incremented, and the index of the next instruction to be executed. A decrement instruction indicates which register is to decremented, and two indices, one which will be the next instruction to be executed if the decrement succeeded, i.e., if the register to be decremented was originally nonzero, and the other which will be the next instruction if the decrement failed, i.e., if the register was originally zero. Each register machine M defines a function ψ M, where ψ M (i) = j if and 3

only if when i is placed in register 0, and the machine is started in state 0, it halts with j in register 0. Theorem 2.1 A function ϕ is partial recursive if and only if there is a register machine M such that ϕ = ψ M. Research on this particular formalism was initiated by Minski [Min61], who proved: Theorem 2.2 It suffices to consider register machines having only two registers, i.e., every register machine can be effectively converted into a register machine computing the same function which has only two registers. We will not use Theorem 2.2 in this paper, although it would slightly simply the presentation of our main results. Our contribution begins with the following: Theorem 2.3 A register machine M can be effectively converted into a register machine M such that M is total if and only if M reaches a halting configuration from every configuration. Proof: Fix a register machine M. Rather than providing an explicit instruction sequence for M, we will describe its behavior using certain higher level instructions and control structures which can be easily compiled into the language of register machines. This technique for register machine construction, as well as most of our high level primatives, is extensively justified in [?]. The machine M has the following registers: for every register of M, we give M two registers, one for the inner simulation, and one for the outer simulation; a register called the input register; two registers called the inner-clock, and the outer-clock; and several temporary registers used to implement higher level instructions. The machine M will also have two local variables: an inner-state and an outer-state. 4

begin outer-state := initial state of M (1) Figure 1: The simulation for Theorem 2.3. The range these variables consists of the states of M. As this range is finite, these variables will actually be compiled into the state of M. We believe the intent of each of the lines in Figure 1 are self-explanatory, with the possible exception of the advance commands at lines (5) and (11). Let us consider line (5) specifically. The intent of the command advance outer simulation is that M, using the notion of the state of M that it stored in the variable outer-state, is to do with the outer-registers whatever M does to its registers, and then to update outer-state to reflect the next state of M. It remains only to see that the simulation does what it purports to do. Assume that M diverges when begun in some configuration C. Observe that each line in the code requires only finitely much time to execute. Therefore, the only way for M to diverge is to have either the while loop beginning at line (4) require infinitely many iterations, or to have some invocation of the while loop beginning at line (10) require infinitely many iterations. This later case can never occur, as the variable inner-clock is decremented by one each time through the loop, and so eventually reaches the value 0, causing termination of the loop. 3 The Main Result References [col] [cona] [conb] [Laga] [lagb] [mat] 5

[Min61] Marvin L. Minski. Recursive unsolvability of Post s problem of tag and other topics in the theory of Turing machines. Annals of Mathematics, 74(3):437 455, November 1961. [wir] 6