OEIS/3x+1 Problem

From tehowiki
Revision as of 21:34, 5 August 2019 by imported>Gfis (Permutation)
Jump to navigation Jump to search

Abstract

The graph defined by Collatz for his 3x + 1 problem is overlaid with a set of small, finite trees with two branches. It is shown that this set of trees not only contains all numbers, but that it defines a permutation of the numbers. Furthermore, rules are defined how some subsets of these trees can be attached to other subsets. It is shown that no cycles can arise, and that finally the process leads to only one set of interconnected subtrees. Therefore, the Collatz graph is a tree which contains all numbers.

Introduction

Collatz sequences (also called trajectories) are sequences of integer numbers > 0. For some start value > 0 the elements of a particular sequence are constructed with two simple rules:

  1. Even numbers are halved.
  2. Odd numbers are multiplied by 3 and then incremented by 1.

Since decades it is unknown whether the final cyle 4 - 2 - 1 is always reached for all start values. This problem is the Collatz conjecture, for which the English Wikipedia states:

It is also known as the 3n + 1 conjecture, the Ulam conjecture (after Stanisław Ulam), Kakutani's problem (after Shizuo Kakutani), the Thwaites conjecture (after Sir Bryan Thwaites), Hasse's algorithm (after Helmut Hasse), or the Syracuse problem; the sequence of numbers involved is referred to as the hailstone sequence or hailstone numbers (because the values are usually subject to multiple descents and ascents like hailstones in a cloud), or as wondrous numbers.

Simple visualizations of Collatz sequences do not show any obvious structure. The sequences for the first dozen of start values are rather short, but the sequence for 27 suddenly has 112 elements.

Da sieht man den Wald vor lauter Bämen nicht.
German proverb: You cannot see the wood for the trees.

References

  • Jeffry C. Lagarias, Ed.: The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010, ISBN 978-8218-4940-8. MBK78
  • OEIS A070165: File of first 10K Collatz sequences, ascending start values, with lengths
  • Manfred Trümper: The Collatz Problem in the Light of an Infinite Free Semigroup. Chinese Journal of Mathematics, Vol. 2014, Article ID 756917, 21 p.

Collatz Graph

When all Collatz sequences are read backwards, they form the Collatz graph starting with 1, 2, 4, 8 ... . At each node n > 4 in the graph, the path from the root (4) can be continued

  • always to n * 2, and
  • to (n - 1) / 3 if n ≡ 1 mod 3.

The Collatz conjecture claims that the Collatz graph

  • contains all numbers,

and that - except for the leading cycle 1 - 2 - 4 - 1 - 2 - 4 ... -

  • it has the form of a tree (without cycles).

We will not consider the leading cycle, and we start the graph with node 4, the root. Furthermore we observe that a path can only be continued with duplications once it reaches a node n ≡ 0 mod 3. We omit these trivial continuations.

Graph Operations

Following Trümper, we use abbreviations for the elementary operations which map a node (element, number) n in the Collatz graph to the neighbouring node as shown in the following table (T1):

Name Mnemonic Distance to root Mapping Condition
d "down" -1 n ↦ n / 2 n ≡ 0 mod 2
u "up" -1 n ↦ 3 * n + 1 (none)
s := ud "spike" -2 n ↦ (3 * n + 1) / 2) n ≡ 1 mod 2
δ "divide" +1 n ↦ (n - 1) / 3 n ≡ 1 mod 3
µ "multiply" +1 n ↦ n * 2 (none)
σ := δµ "squeeze" +2 n ↦ ((n - 1) / 3) * 2 n ≡ 1 mod 3

The operations will be noted as infix operators, with the source node as left operand and the target node as right operand, for example 10 δµ 6. In the following, we will mainly be interested in the reverse mappings (denoted by greek letters) which move away from the root 4 of the graph.

Motivation: Patterns in sequences with the same length

A closer look at the Collatz sequences shows a lot of pairs of adjacent start values which have the same sequence length, for example (from OEIS A070165):

143/104: 143 u 430 d 215 u 646 d 323 u 970 d 485 u 1456 d 728 d 364 ] d 182 ... 4 d 2 d 1
142/104: 142 d  71 u 214 d 107 u 322 d 161 u 484 d  242 d 121 u 364 ] d 182 ... 4 d 2 d 1

Beginning at some node of the form 6*i - 2 (364 in the example), these sequences join and follow the same path down to the root 4. The two differing parts of the sequences show a regular pattern, where nodes of the form 6*i - 2 alternate with other nodes, and where the operations u and d also alternate. This pattern of operations can be continued to the left with additional d and u operations:

126 d [ 63 u 190 d  95 u 286 d 143 u ...
 n? u [ 62 d  31 u  94 d  47 u 142 d ...

Finally the pattern stops because there is no integer n such that n * 3 + 1 = 62.

Example (E1) shows the sequences above, read from right to left, with the inverse operations:

[ 364 µ 728 µ 1456 δ 485 µ 970 δ 323 µ 646 δ 215 µ 430 δ 143 µ 286 δ  95 µ 190 δ 63 ]
[ 364 δ 121 µ  242 µ 484 δ 161 µ 322 δ 107 µ 214 δ  71 µ 142 δ  47 µ  94 δ  31 µ 62 ]

Segments

These patterns lead us to the construction of special subtrees in the Collatz graph which we call segments. This construction is the main result of this article, and as we will see, it exhibits a nested structure reminding to a ruler. Though the structure is still complicated, it is - in contrast to the Collatz graph - very regular and "predictible" in all it's properties.

Starting at some node of the form 6*i - 2 (the left side, LS), the construction creates two subpaths (the upper branch and the lower branch) which to the right by a prescribed sequence of operations.

The nodes of the form 6*i - 2 play a special role because both a δ and a µ operation can be applied to them. We could also have used 6*i + 4 instead, but the formulas seem easier with 6*i - 2, therefore we always use this form. Later we will consider nodes where 6*i - 2 is transformed to j, where j also may have the form j = 6*k - 2, etc.

Informally, a segment is constructed as follows:

  • Step 1: Start with some node 6*i - 2 as the left side (LS).
  • Step 2: Apply δ to the LS to get the first node in the lower branch.
  • Step 3: Apply µ to the LS to get the first node in the upper branch.
  • Steps 4, 5: Apply µ to both branches.
  • In a loop, apply opposite operations to both branches, starting with µ (step 6) on the lower and δ (step 7) on the upper branch, continuing with δ (step 8) on the lower and µ (step 9) on the upper branch, and so on, as long as the next δ operation is possible.

The construction is such that increasing instances of σ operations are accumulated in each branch.

Segment directory

The resulting set of small trees is listed in a so-called segment directory (the link shows several thousand subtrees arranged by increasing left side, together with some additional information).

The segment directory shows the segments in rows of a table. The steps are mapped to columns of the table. In order to maintain the subtree structure with two branches, each row contains a pair of columns numbered 3, 5, 7, ... for the upper branch and 2, 4, 6, ... for the lower branch.
Nodes in the branches of a segment which have the form 6*i - 2 are shown in bold face. If i also has the form 6*k - 2, the node has a yellow background.

Details of a segment

The following table (T1) shows various properties of the steps reps. columns in the segment construction:

Column j Branch Operation Form of i Formula First elements Covered nodes Remaining nodes
1 (LS) 6*i - 2 4, 10, 16, 22 1, 2, 4, 5 mod 6
2 lower δ 2*i - 1 1, 3, 5, 7 1, 3, 5 mod 6 2, 4 mod 6
3 upper µ 12*i - 4 8, 20, 32, 44 8 mod 12 2, 4, 10 mod 12
4 lower σ 12*(i - 1)/1 + 2 2, 14, 16, 38 2 mod 12 4, 10 mod 12
5 upper µ2 24*(i - 1)/1 + 16 16, 40, 64, 88 16 mod 24 4, 10, 22 mod 24
6 lower σµ i = 3*k + 1 24*(i - 1)/3 + 4 4, 28, 52, 76 4 mod 24 10, 22, 34, 46 mod 48
7 upper µ2δ i = 3*k + 1 24*(i - 1)/3 + 5 5, 29, 53, 77 (cf. column 2)
8 lower σµδ i = 3*k + 1 24*(i - 1)/3 + 17 17, 41, 65, 89 (cf. column 2)
9 upper µ2σ i = 3*k + 1 48*(i - 1)/3 + 10 10, 58, 106, 154 10 mod 48 22, 34, 46 mod 48
10 lower σµσ i = 9*k + 7 48*(i - 7)/9 + 34 34, 82, 130, 178 34 mod 48 22, 46, 70, 94 mod 96
11 upper µ2σδ i = 9*k + 7 48*(i - 7)/9 + 35 35, 83, 131, 179 (cf. column 2)
12 lower σµσδ i = 9*k + 7 48*(i - 7)/9 + 11 11, 59, 107, 155 (cf. column 2)
13 upper µ2σ2 i = 9*k + 7 96*(i - 7)/9 + 70 70, 166, 262, 358 70 mod 96 22, 46, 94 mod 96
14 lower σµσ2 i = 27*k + 7 96*(i - 7)/27 + 22 22, 118, 214, 310 22 mod 96 46, 94, 142, 190 mod 192
15 upper µ2σ2δ i = 27*k + 7 96*(i - 7)/27 + 23 23, 119, 215, 311 (cf. column 2)
16 lower σµσ2δ i = 27*k + 7 96*(i - 7)/27 + 71 71, 167, 263, 359 (cf. column 2)
17 upper µ2σ3 i = 27*k + 7 192*(i - 7)/27 + 46 46, 238, 430, 622 46 mod 192 94, 142, 190 mod 192
18 lower σµσ3 i = 81*k + 61 192*(i - 61)/81 + 142 142, 334, 526, 718 142 mod 192 94, 190, 286, 382 mod 384
19 upper µ2σ3δ i = 81*k + 61 192*(i - 61)/81 + 143 143, 225, 527, 719 (cf. column 2)
j i = qj*k + rj sj*(i - rj)/qj + tj tj, ... tj mod sj

The general formula (in the last row of T1) for a column j >= 5 uses the following parameters:

  • qj = 3^(floor((j - 2) / 4),
  • rj = A066443(floor((j - 2) / 8)), where A066443 is the OEIS sequence a(n) defined by a(0) = 1; a(n) = 9 * a(n-1) - 2 for n > 0; the terms are the indexes 1, 7, 61, 547, 4921 ... of the variable length segments with left sides 4, 40, 364, 3280, 29524 (OEIS A191681),
  • sj = 3*2^floor((j + 7) / 4),
  • tj = 6*A308709(floor(j + 2*floor((j - 3) / 4))/3)) - 2, where A308709 = 3, 1, 2, 6, 12, 4, ... is a simple, linear recurrent OEIS sequence (only for j = 5,6, 9,10, 13,14, ...).

Finite, arbitrary length of the segments

First we have to show that the segment construction process always stops. For this purpose, we observe that the σ operation, when applied to left sides of the form 6*(3*k) - 2 has the interesting property that it maintains the general form 6*i - 2:

6*(3*k) - 2 σ (2*(3*k) - 1) * 2 = 12*k - 2 = 6*(2*k) - 2

That means that

σ replaces one factor 3 by a factor 2

The mnemonic is that σ "squeezes" a 3 into a 2. In the opposite direction, the s ("spike") operation replaces one factor 2 by a factor 3.

The branch prolongation in the segment construction process must stop when the successive σ operations have exhausted all factors of 3 in the left side. Therefore, all segments have a finite length.

It is also clear that there is no limit on the length of a segment, since we only need to take a segment which has a factor of 3 with a sufficiently high power in its left side. The σ operations will then stretch out to the corresponding length.

Segments do not contain cycles

The modulo conditions of the columns (column "Covered nodes" in T1) ensure that all nodes in a segment are different. Therefore the two branches remain disjoint, and they cannot lead to a cycle.

Coverage

We are now interested how the numbers >= 1 are distributed over the segments. Corresponding remarks are contained in the last two columns of table T1.

First we state again that we are not interested in even nodes of the form 3*2*k, because only µ operations can be applied on them. We disregards such nodes.

Next we see that column 2 contains all odd numbers (i ≡ 1, 3, 5 mod 6). Columns 7, 8, 11, 12, 15, 16, 19, 20 ... also contain subsets of odd numbers, but we disregard these columns, since their terms are duplicated in column 2.

So far we did not yet cover numbers of the form i ≡ 2, 4 mod 6 (or i ≡ 2, 4, 8, 10 mod 12).

Column 3 contains numbers of the form i ≡ 8 mod 12, so we are left with 2, 4, 10 mod 12. Column 4, if it exists, contains numbers of the form i ≡ 2 mod 12. This leaves i ≡ 4, 10 mod 12.

As indicated in the last two columns of table T1 above, the columns 5, 6, 9, 10, 13, 14 ... each contribute numbers with a more refined modulo condition. Since the segment directory contains arbitrarily long segments respectively arbitrarily many columns, the modulo conditions of any height are finally fulfilled.

Furthermore, since the modulo conditions lead to disjoint subsets of the numbers, it is ensured that any number can occur only once in the columns 2-6, 9, 10, 13, 14, ...

In total, the nodes in the aforementioned columns are a permutation of the numbers which are not divisible by 6.