TOPICS
Search

Collatz Problem


A problem posed by L. Collatz in 1937, also called the 3x+1 mapping, 3n+1 problem, Hasse's algorithm, Kakutani's problem, Syracuse algorithm, Syracuse problem, Thwaites conjecture, and Ulam's problem (Lagarias 1985). Thwaites (1996) has offered a £1000 reward for resolving the conjecture. Let a_0 be an integer. Then one form of Collatz problem asks if iterating

 a_n={1/2a_(n-1)   for a_(n-1) even; 3a_(n-1)+1   for a_(n-1) odd
(1)

always returns to 1 for positive a_0. (If negative numbers are included, there are four known cycles (excluding the trivial 0 cycle): (4, 2, 1), (-2, -1), (-5, -14, -7, -20, -10), and (-17, -50, -25, -74, -37, -110, -55, -164, -82, -41, -122, -61, -182, -91, -272, -136, -68, -34).)

The members of the sequence produced by the Collatz are sometimes known as hailstone numbers. Conway proved that the original Collatz problem has no nontrivial cycles of length <400. Lagarias (1985) showed that there are no nontrivial cycles with length <275000. Conway (1972) also proved that Collatz-type problems can be formally undecidable. Kurtz and Simon (2007) proved that a natural generalization of the Collatz problem is undecidable; unfortunately, this proof cannot be applied to the original Collatz problem.

The Collatz algorithm has been tested and found to always reach 1 for all numbers <=19·2^(58) approx 5.48×10^(18) (Oliveira e Silva 2008), improving the earlier results of 10^(15) (Vardi 1991, p. 129) and 5.6×10^(13) (Leavens and Vermeulen 1992). Because of the difficulty in solving this problem, Erdős commented that "mathematics is not yet ready for such problems" (Lagarias 1985).

The following table gives the sequences obtained for the first few starting values (OEIS A070165).

a_0a_0, a_1, a_2, ...
11
22, 1
33, 10, 5, 16, 8, 4, 2, 1
44, 2, 1
55, 16, 8, 4, 2, 1
66, 3, 10, 5, 16, 8, 4, 2, 1
CollatzSteps

The numbers of steps required for the algorithm to reach 1 for a_0=1, 2, ... are 0, 1, 7, 2, 5, 8, 16, 3, 19, 6, 14, 9, 9, 17, 17, 4, 12, 20, 20, 7, ... (OEIS A006577; illustrated above). Of these, the numbers of tripling steps are 0, 0, 2, 0, 1, 2, 5, 0, 6, ... (OEIS A006667), and the number of halving steps are 0, 1, 5, 2, 4, 6, 11, 3, 13, ... (OEIS A006666). The smallest starting values of a_0 that yields a Collatz sequence containing n=1, 2, ... are 1, 2, 3, 3, 3, 6, 7, 3, 9, 3, 7, 12, 7, 9, 15, 3, 7, 18, 19, ... (OEIS A070167).

The Collatz problem can be implemented as an 8-register machine (Wolfram 2002, p. 100), quasi-cellular automaton (Cloney et al. 1987, Bruschi 2005), or 6-color one-dimensional quasi-cellular automaton with local rules but which wraps first and last digits around (Zeleny). In general, the difficulty in constructing true local-rule cellular automata arises from the necessity of a carry operation when multiplying by 3 which, in the worst case, can extend the entire length of the base-b representation of digits (and thus require propagating information at faster than the CA's speed of light).

The Collatz problem was modified by Terras (1976, 1979), who asked if iterating

 t_n={1/2t_(n-1)   for t_(n-1) even; 1/2(3t_(n-1)+1)   for t_(n-1) odd
(2)

always returns to 1 for initial integer value t_0 (e.g., Lagarias 1985, Cloney et al. 1987). This is simply the original statement above but combining the division by two into the addition step if t_(n-1) is odd, thus compressing the number of steps. The following table gives the sequences for the first few starting values t_0=1, 2, ... (OEIS A070168).

t_0t_1, t_2, ...
11
22, 1
33, 5, 8, 4, 2, 1
44, 2, 1
55, 8, 4, 2, 1
66, 3, 5, 8, 4, 2, 1
77, 11, 17, 26, 13, 20, 10, 5, 8, 4, 2, 1

If negative numbers are included, there are 4 known cycles: (1, 2), (-1), (-5, -7, -10), and (-17, -25, -37, -55, -82, -41, -61, -91, -136, -68, -34). It is a special case of the "generalized Collatz problem" with d=2, m_0=1, m_1=3, r_0=0, and r_1=-1. Terras (1976, 1979) also proved that the set of integers S_k={n:n has stopping time <=k} has a limiting asymptotic density F(k), such that if N_x(k) is the number of n such that n<=x and sigma(n)<=k, then the limit

 F(k)=lim_(x->infty)(N_x(k))/x,
(3)

exists. Furthermore, F(k)->1 as k->infty, so almost all integers have a finite stopping time. Finally, for all k>=1,

 1-F(k)=lim_(x->infty)(N_x(k))/x<=2^(-etak),
(4)

where

H(x)=-xlgx-(1-x)lg(1-x)
(5)
theta=1/(lg3)
(6)
eta=1-H(theta)=0.05004...
(7)

(Lagarias 1985).

A generalization of the Collatz problem lets d>=2 be a positive integer and m_0, ..., m_(d-1) be nonzero integers. Also let r_i in Z satisfy

 r_i=im_i (mod d).
(8)

Then

 T(x)=(m_ix-r_i)/d
(9)

for x=i (mod d) defines a generalized Collatz mapping. An equivalent form is

 T(x)=|_(m_ix)/d_|+X_i
(10)

for x=i (mod d) where X_0, ..., X_(d-1) are integers and |_r_| is the floor function. The problem is connected with ergodic theory and Markov chains. Matthews obtained the following table for the mapping

 T_k(x)={1/2x   for x=0 (mod 2); 1/2(3x+k)   for x=1 (mod 2),
(11)

where k=T_(5^k).

k# cyclesmax. cycle length
0527
11034
213118
317118
419118
521165
623433

Matthews and Watts (1984) proposed the following conjectures.

1. If |m_0...m_(d-1)|<d^d, then all trajectories {T^K(n)} for n in Z eventually cycle.

2. If |m_0...m_(d-1)|>d^d, then almost all trajectories {T^K(n)} for n in Z are divergent, except for an exceptional set of integers n satisfying

 #{n in S|-X<=n<X}=o(X).
(12)

3. The number of cycles is finite.

4. If the trajectory {T^K(n)} for n in Z is not eventually cyclic, then the iterates are uniformly distribution mod d^alpha for each alpha>=1, with

 lim_(N->infty)1/(N+1)card{K<=N|T^K(n)=j (mod d^alpha)} 
 =d^(-alpha)
(13)

for 0<=j<=d^alpha-1.

Matthews believes that the map

 T(x)={7x+3   for x=0 (mod 3); 1/3(7x+2)   for x=1 (mod 3); 1/3(x-2)   for x=2 (mod 3)
(14)

will either reach 0 (mod 3) or will enter one of the cycles (-1) or (-2,-4), and offers a $100 (Australian?) prize for a proof.


See also

Hailstone Number, Juggler Sequence, Wolfram Sequences

Explore with Wolfram|Alpha

References

Applegate, D. and Lagarias, J. C. "Density Bounds for the 3x+1 Problem 1. Tree-Search Method." Math. Comput. 64, 411-426, 1995.Applegate, D. and Lagarias, J. C. "Density Bounds for the 3x+1 Problem 2. Krasikov Inequalities." Math. Comput. 64, 427-438, 1995.Bruschi, M. "Two Cellular Automata for the 3x+1 Map." http://arxiv.org/abs/nlin/0502061/. 26 Feb, 2005.Burckel, S. "Functional Equations Associated with Congruential Functions." Theor. Comp. Sci. 123, 397-406, 1994.Cloney, T.; Goles, E.; and Vichniac, G. Y. "The 3x+1 Problem: A Quasi Cellular Automaton." Complex Sys. 1, 349-360, 1987.Conway, J. H. "Unpredictable Iterations." Proc. 1972 Number Th. Conf., University of Colorado, Boulder, Colorado, pp. 49-52, 1972.Crandall, R. "On the '3x+1' Problem." Math. Comput. 32, 1281-1292, 1978.De Mol, L. "Tag Systems and Collatz-Like Functions." Theor. Comput. Sci. 390, 92-101, 2008.Everett, C. "Iteration of the Number Theoretic Function f(2n)=n, f(2n+1)=f(3n+2)." Adv. Math. 25, 42-45, 1977.Guy, R. K. "Collatz's Sequence." §E16 in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, pp. 215-218, 1994.Kurtz, S. A. and Simon, J. "The Undecidability of the Generalized Collatz Problem." In Theory and Applications of Models of Computation: Proceedings of the 4th International Conference (TAMC 2007) held in Shanghai, May 22-25, 2007 (Ed. J.-Y. Cai, S. B. Cooper, and H. Zhu). Berlin: Springer, pp. 542-553, 2007.Lagarias, J. C. "The 3x+1 Problem and Its Generalizations." Amer. Math. Monthly 92, 3-23, 1985.Leavens, G. T. and Vermeulen, M. "3x+1 Search Programs." Comput. Math. Appl. 24, 79-99, 1992.Margenstern, M. and Matiyasevich, Y. "A Binomial Representation of the 3x+1 Problem." Acta Arith. 91, 367-378, 1999.Matthews, K. R. "The Generalized 3x+1 Mapping." http://www.numbertheory.org/pdfs/survey.pdf.Matthews, K. R. "A Generalized 3x+1 Conjecture." [$100 Reward for a Proof.] http://www.numbertheory.org/gnubc/challenge.Matthews, K. R. and Watts, A. M. "A Generalization of Hasses's Generalization of the Syracuse Algorithm." Acta Arith. 43, 167-175, 1984.Oliveira e Silva, T. "Maximum Excursion and Stopping Time Record-Holders for the 3x+1 Problem: Computational Results." Math. Comput. 68, 371-384, 1999.Oliveira e Silva, T. "Computational Verification of the 3x+1 Conjecture." Sep. 19, 2008. http://www.ieeta.pt/~tos/3x+1.html.Schroeppel, R.; Gosper, R. W.; Henneman, W.; and Banks, R. Item 133 in Beeler, M.; Gosper, R. W.; and Schroeppel, R. HAKMEM. Cambridge, MA: MIT Artificial Intelligence Laboratory, Memo AIM-239, p. 64, Feb. 1972. http://www.inwap.com/pdp10/hbaker/hakmem/flows.html#item133.Sloane, N. J. A. Sequences A006577/M4323, A006666/M3733, A006667/M0019, A070165, A070166, A070167, A070168, in "The On-Line Encyclopedia of Integer Sequences."Terras, R. "A Stopping Time Problem on the Positive Integers." Acta Arith. 30, 241-252, 1976.Terras, R. "On the Existence of a Density." Acta Arith. 35, 101-102, 1979.Thwaites, B. "Two Conjectures, or How to Win £1100." Math. Gaz. 80, 35-36, 1996.Vardi, I. "The 3x+1 Problem." Ch. 7 in Computational Recreations in Mathematica. Redwood City, CA: Addison-Wesley, pp. 129-137, 1991.Wirsching, G. J. "Über das 3n+1 Problem." Elem. Math. 55, 142-155, 2000.Wolfram, S. A New Kind of Science. Champaign, IL: Wolfram Media, pp. 100, 122, and 904, 2002.Zeleny, E. "Collatz Problem as a Cellular Automaton." http://demonstrations.wolfram.com/CollatzProblemAsACellularAutomaton/.

Cite this as:

Weisstein, Eric W. "Collatz Problem." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/CollatzProblem.html

Subject classifications