Download A Study to the 3n+1 Problem with State Transition Model

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of logarithms wikipedia , lookup

Georg Cantor's first set theory article wikipedia , lookup

Positional notation wikipedia , lookup

Law of large numbers wikipedia , lookup

Large numbers wikipedia , lookup

Arithmetic wikipedia , lookup

Hyperreal number wikipedia , lookup

Non-standard analysis wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Location arithmetic wikipedia , lookup

Addition wikipedia , lookup

Collatz conjecture wikipedia , lookup

Elementary mathematics wikipedia , lookup

Transcript
Manuscript
Click here to download Manuscript: A Study to the 3n1 with state transition model tocs version 2.docx
Click here to view linked References
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
A Study to the 3n+1 Problem with State
Transition Model
Shu-Ming Chang
Department of Applied Mathematics
National Chiao Tung University
1001 University Road, Hsinchu, Taiwan 300, ROC
[email protected]
Lung-Lung Liu
International College
Ming Chuan University
5 De-Ming Road, Gui-Shan, Taoyuan County, Taiwan 333, ROC
[email protected]
Corresponding Author: Lung-Lung Liu
Telephone: 886-3-3507001 ext. 3386
Fax: 886-3-3599883
Abstract: In this study to the 3n+1 problem, we observed the “behaviors” of a subset of 32 odd
numbers in binary, and we found that: (1) the numbers can be classified into 4 groups according
to their bit sequences, (2) to the numbers, at any instance right after the 3n+1 and all possible n/2
operations were done, the results can still be classified into the 4 groups, and (3) if “a number in a
specific group” can be defined as a “state” and the “operations for a result” can be applied as a
“transition”, then it is feasible that a state transition model can be built. We did a quick analysis to
support the observations and then try to build such a model. We have been clear that we are not
to solve this open problem since the very beginning. Instead, we are to propose an alternate way
to find and understand the non-determinism in this problem. The result of the study indicated
that: (1) a general state transition model can be built, (2) at the instance of a state transition, the
chance that the next state is non-deterministic is less than 1 among the 8 possible cases, and (3) a
finite state machine is not able to finish the 3n+1 and n/2 operations when a given number n is
large.
Keywords: 3n+1, Collatz conjecture, state transition model, non-determinism
1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
1 Introduction
A description of the 3n+1 problem can be found in [1]. However, the problem can
be simply stated as follows: (1) Let n be a given positive number. (2) If n is even,
then assign it with n/2. Otherwise (i.e., n is odd), assign it with 3n+1. (3) Repeat
the above mentioned even/odd checking and assigning operations, the result will
finally be 1. (4) Is it true for any given positive number n? For example, let n be 7.
The sequence of numbers being encountered is 7→ 22→ 11→ 34→ 17→ 52→ 26→
13→ 40→ 20→ 10→ 5→ 16→ 8→ 4→ 2→ 1. It is true since the result is 1. But what
if n is given as 7,777,777? Is it still true that the result will finally be 1? It is hard
to tell.
In fact, this 3n+1 problem is an open question and it is also known as the Collatz
conjecture (i.e., a mathematical statement seemed to be true but not yet been
proved) [3]. When n is large, even a computer may not be able to tell the result in
time. General studies and discussions are in [3] and [6]. An annotated
bibliography is collected as [4], which is publically available. The latest results
about the study are those such as [5], which discussed the undecidable variants,
and [2], which discussed the nature of 3n+1 map. We learned in the literature that
binary (or ternary) numbers were applied before, and we think that there can be
possible follow-up works. We are not to solve the problem, but instead, we would
like to study in some way which may be clearer than others. Actually, the study is
with the state transition model.
The study is with three steps: (1) to observe the results of 3n+1 and n/2 operations
of given numbers in binary, or their bit sequences, (2) to induce the possible rules
in the change of the bit sequences with analytical support, and (3) to try to build a
state transition model and find the embedded non-determinism. In the following,
observations are described in section 2, and a quick analysis to support the
observations is provided in section 3. With the support, a state transition model is
gradually constructed. It is specified and discussed in section 4. The analysis of
working values (i.e., numbers encountered in the 3n+1 and n/2 operations) is
provided in section 5. That the study is logically sound is demonstrated with
proofs in section 6, and conclusions are given in section 7.
2 Observations with a Subset of Numbers in
Binary
To study the 3n+1 problem, a binary number system (e.g., only bits 0 and 1 are
used) is convenient for observation. First, evens and odds can be easily recognized
by checking their last bits. Second, the needed arithmetic operations 3n+1 and n/2
to any given number n can also be simplified by using basic “shift” and “add”
operations. For example, by appending a 0 to the end of n (shifting left), add n,
and then add 1, it is the result of 3n+1. On the other hand, by dropping the last bit
of n (shifting right), it is the result of n/2 when n is even.
Let a number n be “qualified” if finally it will be 1 after the possible 3n+1 and n/2
operations according to the checking and assigning rules. It is clear that binary
numbers 1, 10, 100, 1000 … are qualified. It is interesting that numbers 101,
10101, 1010101, 101010101 … are qualified, too. To each of these numbers, the
3n operation will obviously result a number with all 1s, and the next +1 operation
2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
makes it qualified. For example, giving 10101 as n, the result of 3n is
101010+10101=111111, and that of 3n+1 is 1000000. It is trivial that if n is
qualified then 2n is qualified, too. Hence, we have to pay attention to odd
numbers only.
Binary numbers 11, 111, 1111, 11111 …, which are with more than 1 “trailing 1s”,
are with a unique feature in the 3n+1 and n/2 operations. If we check the result of
the operations performed on any of these numbers, then we will see that the
number of remaining “trailing 1s” is decreased by 1, compared with that of the
original number. Besides, only one n/2 operation can be performed since after that
the result is odd, and the result is greater than n. For example, giving 1111 as the
number n, then (3n+1)/2 is 10111.
Binary numbers 1001, 10001, 100001, 1000001 …, which are with more than 1
“in-between 0s” of the two 1s at the end, are with another unique feature in the
3n+1 and n/2 operations. If we check the result of the operations performed on
any of these numbers, then we will see that the number of remaining “in-between
0s” is decreased by 2, compared with that of the original number. Besides, only
two n/2 operations can be performed since after that the result is odd, and the
result is less than n. For example, giving 10001 as the number n, then ((3n+1)/2)/2
is 1101.
However, there are many other numbers in addition to those mentioned. To
prevent that no any number is missed in the observations, we use a systematic
discipline to count all of the elements in a set of odd numbers. The following is an
example set of such numbers between 000001 and 111111. In this set, there are 32
odd numbers in binary, and they are classified into 4 groups according to their last
bit sequences. The groups are named as Z1, S11, S101, and S1Z01 for being
mnemonic: Z represents a bit sequence of 0, and S represents a bit sequence of
either 0 or 1. In short, (1) the number 1 is in group Z1, (2) the numbers with more
than 1 “trailing 1s” are in group S11, (3) those with only 1 “in-between 0” are in
group S101, and (4) those with more than 1 “in-between 0s” are in group S1Z01.
Numbers in each of the 4 groups are then arranged in ascending orders. This
discipline guarantees that no number will be missed, since it is with a
combinatorial count on the number of “trailing 1s” and then the “in-between 0s”.
In the previous example, the numbers of elements in the groups Z1, S11, S101,
and S1Z01 are 1, 16, 8, and 7, respectively. Or, in general, the numbers are 1, c/2,
c/4, and c/4-1, where c is the total number of elements in the set.
With the discipline, the details of observation on the numbers in the set are
recorded, and they are depicted in Table 1.
Note that in Table 1, there are 32 entries and they are classified in 4 groups. For
every entry, n is the number in binary, n’ is the result of 3n+1 and then all possible
n/2 operations. The Group’ is the group that n’ belongs to (to be applied later in
Section 4). Since n’ is greater than n for the entries in the S11 group, one extra bit
is added to properly represent n’ in binary. (However, the classification rules
remain). The underlined bits of the binary numbers are just for easy checking.
In summary, what we have observed are:
1a: For n in S11, only 1 n/2 operation is done, and n’>n.
1b: For n in S11, the number of trailing 1s of n’ is 1 less than that of n.
2a: For n in S101, at least 3 (may be more) n/2 operations are done, and n’<n.
2b: Only for n in S101, n’=1 is possible.
3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
3a: For n in S1Z01, only 2 n/2 operations are done, and n’<n.
3b: For n in S1Z01, the number of “in-between 0s” of n’ is 2 less than that of n.
Table 1: An Observation of odd numbers between 000001 and 111111
Group
Z1
S11
n (binary) value 3n+1 and then possible n/2
n’ (binary) Group’
000001
1
000011
3
10→5
0000101
S101
001011
11
34→17
0010001
S1Z01
010011
19
58→29
0011101
S101
011011
27
82→41
0101001
S1Z01
100011
35
106→53
0110101
S101
101011
43
130→65
1000001
S1Z01
110011
51
154→77
1001101
S101
111011
59
178→89
1011001
S1Z01
000111
7
22→11
0001011
S11
010111
23
70→35
0100011
S11
100111
39
118→59
0111011
S11
110111
55
166→83
1010011
S11
001111
15
46→23
0010111
S11
101111
47
142→71
1000111
S11
011111
31
94→47
0101111
S11
111111
63
190→95
1011111
S11
S101
000101
5
16→8→4→2→1
000001
Z1
001101
13
40→20→10→5
000101
S101
010101
21
64→32→16→8→4→2→1 000001
Z1
011101
29
88→44→22→11
001011
S11
100101
37
112→56→28→14→7
000111
S11
101101
45
136→68→34→17
010001
S1Z01
110101
53
160→80→40→20→10→5 000101
S101
111101
61
184→92→46→23
010111
S11
S1Z01 001001
9
28→14→7
000111
S11
011001
25
76→38→19
010011
S11
101001
41
124→62→31
011111
S11
111001
57
172→86→43
101011
S11
010001
17
52→26→13
001101
S101
110001
49
148→74→37
100101
S101
100001
33
100→50→25
011001
S1Z01
Note: n’ is the result of 3n+1 and then possible n/2, Group’ is the Group for n’
3 A Quick Analysis to What Have Observed
The purpose of doing a quick analysis is to arithmetically support what we
observed. That is, although the behaviors such as the decreasing of trailing 1s or
in-between 0s seemed to be features only, they have to be significant based on
general arithmetic. We are to do that according to the numbers in groups S11,
S101, and S1Z01, respectively.
3.1 Numbers in group S11
Let n be a number represented as S11 in binary, where S is a sequence of either 0
or 1 representing the value s. Then, n=s22+21+20, and
3n+1
4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
=3(s22+3)+1
=3(s22)+9+1
=12s+10
=2(6s+5).
This indicated that 3n+1 can be divided by 2 only once, since after the operation
of division by 2 the result is 6s+5 which is odd. The result is greater than n, since
(3n+1)/2>n. (Observation 1a has a support.)
Let s be some value t2k-1 where t >0 and k>0. In this case, S is the sequence
staring with T, representing t in binary, and then k trailing 1s. Naturally, the
number of trailing 1s of n in binary is k+2. We have
6s+5
=6(t2k-1)+5
=6(t2k)-6+5
=3t(2k+1)-1.
The number of trailing 1s of the value 3t(2k+1)-1 in binary is k+1, which is 1 less
than that of n. (Observation 1b has a support.)
3.2 Numbers in group S101
Let n be a number represented as S101 in binary, where S is a sequence of either 0
or 1 representing the value s. Then, n=s23+22+20, and
3n+1
=3(s23+5)+1
=3(s23)+15+1
=23(3s) +23(2)
= 23(3s+2).
This indicated that 3n+1 can be straightly divided by 2 at least 3 times, and after
the 3 operations of division by 2 the result is 3s+2. The result is less than n, since
(3n+1)/8<n for n>0. (Observation 2a has a support.)
If s is odd, then there will be no further operation of division by 2. However, if s is
0 or even, then there may be a number of consecutive operations of division by 2,
even for a possible final result as 1. Cases happen when s=∑ 2i, i=1,3,5,7… , or
s=2,10,42,170 …, since 3s+2=8,32,128,512…, which are 23,25,27,29…,
respectively. (Observation 2b has a support.)
3.3 Numbers in group S1Z01
Let n be a number represented as S1Z01 in binary, where S is a sequence of either
0 or 1 representing the value s, and Z is a sequence of k 0s, k>0. Then,
n=s2k+3+2k+2+1, and
3n+1
=3(s2k+3+2k+2+1)+1
=3(s2k+3)+3(2k+2)+3+1
=22(3s2k+1)+22(3)(2k)+22
=22(3s2k+1+(3)(2k)+1).
This indicated that 3n+1 can be divided by 2 only twice, since after the two
operations of division by 2 the result is 3s2k+1+(3)(2k)+1 which is odd. The result
is less than n, since (3n+1)/4<n for n>1. (Observation 3a has a support.)
5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
The number of “in-between 0s” of n in binary is k+1. For checking the number of
that of 3s2k+1+(3)(2k)+1 in binary, we can have
3s2k+1+(3)(2k)+1
=3s2k+1+(2)(2k)+(2k)+1
=3s2k+1+(2k+1)+2k+1
=(3s+1)(2k+1)+2k+1.
This value is represented in binary as a bit sequence starting by the sequence
representing the value 3s+1, followed by 1, k-1 0s, and then terminated by 1. The
number of “in-between 0s” of the result is k-1, which is 2 less than that of n.
(Observation 3b has a support.)
4 The Construction of a State Transition Model
Models are always helpful in doing analytical works, since complicated details
may be symbolically simplified. A state transition model is a typical example.
When the possible states of a system are clear, there is the mechanism to describe
the behaviors in the system. According to Table 1, a given odd number n, which
belongs to one of the 4 groups (i.e., Z1, S11, S101, and S1Z01), will be changed
to another odd number n’ after the 3n+1 and all possible n/2 operations were done.
We also see that n’ can still be classified into some one of the 4 groups. We are to
apply the numbers, groups, and the changes of numbers in groups to gradually
draft a state transition model.
4.1 The First State Transition Diagram and State Transition Table
Let z1, s101, s11, and s1z01 be states. Mnemonically, z1 stands for a given odd
number being in group Z1, s101 stands for that in group S101, s11 stands for that
in group S11, and s1z01 stands for that in group S1Z01. There is an extra starting
state “s0” and the terminal state is z1. A given odd number n is initially at the “s0”
state. Then, after the 3n+1 and all possible n/2 operations, the next state is
determined. This is the state transition. A state transition diagram can thus be
depicted as Figure 1. Although simple, it has indicated that there are many
possible paths from s0 to z1. (The state transition is to terminate ultimately if there
is no infinite loop.)
Figure 1: A State Transition Diagram
z1
s101
s11
s0
s1z01
The state transition diagram seemed to be good for specifying a general behavior
6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
of the odd numbers encountered in the computation process. There are only 4
states (excluding s0) introduced to the study to this hard problem.
We are interested in the determination of next state by directly checking n but not
n’, or the result of the 3n+1 and all possible n/2 operations, based on the previous
observations and analytical works. That is, we can try to predict the coming next
states as earlier as possible. Initially, a state transition table which is equivalent to
the state transition diagram in Figure 1 is drafted as Table 2. According to the
columns, the entries in the table specified the current states, possible input
numbers from the 4 classified groups, and the corresponding next states. Note that
there are entries with multiple next states hence the state transition is nondeterministic. For example, at state s11, with input number n in group S11, the
next state can be s11, s101, or s1z01. In the following, we are to try to refine the
table such that the state transition can be deterministic (or more deterministic).
Table 2: The Draft State Transition Table
s /n
s0
z1
s11
s101
s1z01
Z1
z1
-
S11
s11
s11, s101, s1z01
-
S101
s101
z1, s11, s101, s1z01
-
S1Z01
s1z01
s11, s101, s1z01
4.2 Refining Columns S1Z01 and S11 in the State Transition
Table
At state s1z01, the number of “in-between 0s” of n’ is 2 less than that of n. Hence
the next state can be determined by checking n directly as: (1) s11 if n is with bit
sequence S1001, (2) s101 if n is with that of S10001, and (3) s1z01 if n is with
that of S1Z0001. The S1Z01 column in Table 2 is then refined to 3 columns as
indicated in Table 3. Note that the state transition is deterministic.
Table 3: Refined columns to the original S1Z01 column
s /n
s0
z1
s11
s101
s1z01
S1001
s1z01
s11
S10001
s1z01
s101
S1Z0001
s1z01
s1z01
At state s11, the number of “trailing 1s” of n’ is 1 less than that of n. Hence the
next state for n with more than 2 “trailing 1s” is still s11. The next state for n with
exact 2 “trailing 1s” can be either s101 or s1z01 (i.e., ended with bit sequence 01).
We recall that when n is in group S11, n’ or the result of (3n+1)/2, is 6s+5 where s
is the value of bit sequence S. In addition, the value of 6s+5 is odd. It is clear that
the next state is s101 if n’ is with the bit sequence of X101, where X is a bit
sequence of either 0 or 1. The next state is 1z01 otherwise. Let x be the value of
the bit sequence X. We are trying to match bit sequences S11 and X101 for proper
S and X pairs where the value of S11 is n and the value of X101 is n’, which
actually is 6s+5. We can set up the equation and find the solutions as follows:
6s+5=x23+22+20
7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
6s+5=8x+5
6s=8x
s=4x/3.
Since the value of 6s+5 is odd, s must be even. The proper pairs of s and x are
hence: (0, 0), (4, 3), (8, 6) … (4k, 3k) for all k≥0. For example, the next state of
number 19 at state s11 can be predicted as s101. In this example, n is 19 or 10011
in binary, S is the underlined bit sequence 100 and s is 4. The obtained n’ is 29 or
11101 in binary, where X is the underlined bit sequence 11 and x is 3. This (s, x)
pair fits well.
The S11 column in Table 2 is then refined to 3 columns as indicated in Table 4.
The first column is for n with bit sequences S111, and the second column is for n
with bit sequences S0011. The third column is for n with other bit sequences (or
S1011, equivalently). Note that the state transition is deterministic.
Table 4: Refined columns to the original S11 column
s /n
s0
z1
s11
s101
s1z01
S111
s11
s11
-
S0011
s11
s101
-
S1011
s11
s1z01
-
4.3 Refining Column S101 in the State Transition Table
At state s101, it is more complicated. The key concern is that there may be more
than 3 straight n/2 operations after the 3n+1 operation. We recall that when n is in
group S101, then (3n+1)/8=3s+2 where s is the value of bit sequence S. If 3s+2 is
odd, then n’ is 3s+2, and if 3s+2 is even, then n’ is (3s+2)/2m for a certain m (the
number of more n/2 operations), m>0. We are to try to set up equations and solve
them again, as we did previously.
When 3s+2 is odd, we are to match (1o) bit sequences S101 and X11 for proper S
and X pairs where the value of S101 is n and that of X11 is n’, and (2o) bit
sequences S101 and X101 for proper S and X pairs where the value of S101 is n
and that of X101 is n’. We know that there is no such match for S101 and Z1,
since no s can fit for 3s+2=1. We expect that all the remainders for s are good to
match bit sequences S101 and X1Z01.
For matching (1o), we can set up the equation and find the solutions as follows:
3s+2=x22+21+20
3s+2=4x+3
3s=4x+1
s=(4x+1)/3.
Since 3s+2 is odd, s must be odd. The proper pairs of s and x are hence: (3, 2), (7,
5), (11, 8) … (4k+3, 3k+2) for all k≥0.
For matching (2o), we can set up the equation and find the solutions as follows:
3s+2=x23+22+20
3s+2=8x+5
3s=8x+3
s=(8x+3)/3.
8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Since 3s+2 is odd, s must be odd. The proper pairs of s and x are hence: (1, 0), (9,
3), (17, 6) … (8k+1, 3k) for all k≥0.
The remainders for s to fit 3s+2 (which is odd) are collected as 5, 13, 21 … 8k+5,
for all k>0. A complete and clear table for odd s values of the match or remainder
is organized as Table 5. Note that the bit sequence of n is S101 where S is the bit
sequence of value s.
Table 5: The complete odd s values of match and remainder
match/remainder
match (1o)
match (2o)
remainder
s (odd)
3, 7, 11, …, 4k+3 for all k≥0
1, 9, 17, …, 8k+1 for all k≥0
5, 13, 21, …, 8k+5 for all k≥0
When 3s+2 is even, there must be a certain number m (m>0) of more n/2
operations for an odd result. Hence, n’ is (3s+2)/2m. We are to match (1e) bit
sequences S101 for proper S where the value of S101 is n and n’ is 1, with the
certain m, (2e) bit sequences S101 and X11 for proper S and X pairs where the
value of S101 is n and that of X11 is n’, with the certain m, and (3e) bit sequences
S101 and X101 for proper S and X pairs where the value of S101 is n and that of
X101 is n’, with the certain m. We expect that all the remainders for s are good to
match bit sequences S101 and X1Z01.
For matching (1e), we can set up the equation and find the solutions as follows:
(3s+2)/2m=1
(3s+2) =2m
3s=2m-2
s=(2m-2)/3.
We have had the common idea about the “qualified” numbers, so the proper pairs
of s and m are: (0, 1), (2, 3), (10, 5) … (q, 2k+1), where q= ∑ 2i, i=1,2(k-1)+1,2,
for all k≥0.
For matching (2e), we can set up the equation and find the solutions as follows:
(3s+2)/2m=x22+21+20
(3s+2)/2m=4x+3
3s=(4x+3)2m-2
s=((4x+3)2m-2)/3.
Since 3s+2 is even, s must be even or 0. The proper pairs of s and x with the
certain value of m are: (4, 1), (12, 4), (20, 7) … (8k+4, 3k+1) for all k≥0 with m=1;
(14, 2), (30, 5), (46, 8) … (16k+14, 3k+2) with m=2; (18, 1), (50, 4), (82, 7) …
(32k+18, 3k+1) with m=3; and there are more.
For matching (3e), we can set up the equation and find the solutions as follows:
(3s+2)/2m=x23+22+20
(3s+2)/2m=8x+5
3s=(8x+5)2m-2
s=((8x+5)2m-2)/3.
Since 3s+2 is even, s must be even or 0. The proper pairs of s and x with the
certain value of m are: (8, 1), (24, 4), (40, 7) … (16k+8, 3k+1) for all k≥0 with
m=1; (6, 0), (38, 3), (70, 6) …(32k+6, 3k) for all k≥0 with m=2; (34, 1), (98, 4),
(162, 7) … (64k+34, 3k+1) for all k≥0 with m=3; and there are more.
The remainders for s to fit 3s+2 are partially collected as: 16, 22 …, and they are
9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
determined after m matches were done, where 2m+2>s. An incomplete table for
even s values of the match and remainders is suggested as Table 6.
Table 6: An incomplete even s values of match and remainder
match/remainder m
match (1e)
match (2e)
1
2
3
4
:
match (3e)
1
2
3
4
:
remainder
-
s (even)
0, 2, 10, …, ∑i, i=0, 21, 23, 25, …
4, 12, 20, …, 8k+4, for all k≥0
14, 30, 46, …, 16k+14, for all k≥0
18, 50, 82, …, 32k+18, for all k≥0
58, 122, 126, …, 64k+58, for all k≥0
:
8, 24, 40, …, 16k+8, for all k≥0
6, 38, 70, …, 32k+6, for all k≥0
34, 98, 162, …, 64k+34, for all k≥0
26, 154, 282, …, 128k+26, for all k≥0
:
16, 22, …
The S101 column in Table 2 can be, if we insist, refined to 4 columns as indicated
in Table 7. The first column is for n with bit sequences 10101 where 10 represents
any repetition (including none) of the bit sequence 10. The second, third, and the
last columns are for n with different bit sequences indicated. The notations (A*),
(B*), and (C*) represent bit sequences of s values obtained by matching (2e), (3e),
and remainders, in Table 6, respectively. Note that the state transition is nondeterministic, unless all of the m matches were done and the remainders were
properly collected.
Table 7: Refined columns to the original S101 column
10101
start
z1
s11
s101
s1z01
s101
z1
-
S11101,
(A*)0101
s101
s11
-
S001101,
(B*)0101
s101
s101
-
S101101,
(C*)0101
s101
s1z01
-
4.4 A Short Discussion on the Benefits of the Model
The study of using binary and constructing the state transition model did not solve
the problem, since we were blocked at providing definite bit sequences of (A*),
(B*), and (C*). However, we did simplify the understanding of its complexity.
Here are the benefits: (1) Only 4 states (excluding the “start” state) are defined,
the model is relatively simple. (2) Input numbers are classified into 4 groups
according to their bit sequences, and the count of them is clear and complete. (3)
It is indicated in the state transition diagram that there guarantees a path from the
start state to the terminal state z1, if no infinite loop exists. (4) The nondeterminism of state transition is narrowed down to binary numbers ended with
bit sequence 0101, and it is less than 1 among all of the 8 cases. (The case for
10101 is deterministic.)
10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
5 Working Value Analysis
In a known 3n+1 and n/2 computation process, temporary numbers encountered
may be large before the process terminated at n=1 finally. Let these numbers be
mentioned as working values in the following. When we are to use a finite state
machine, such as a conventional digital computer, to verify a computation process,
the working value is a concern. For example, if at an instance in the computation
process the working value is beyond the capacity of the finite state machine, then
the computation cannot continue. In fact, numbers larger than any specific number
are always there.
As we checked in the analytical works, the working value grows only at the s11
state, since the next computation process is (3n+1)/2, which is greater than n.
Hence, the working values will keep on going up at an instance that the bit
sequence of an encountered number is with consecutive trailing 1s. There will be
straight (3n+1)/2 computations in this case. If the number is n and there are k
straight (3n+1)/2 computations to be performed, then the working value is
expected as (3kn+Σi=0,k-2(2/3)i3k-1+2k-1)/2k. The analysis is briefed as follows. Let ni
be the number encountered at the ith (3n+1)/2 computation, then
n0=n
n1=(3n0+1)/2=(3n+1)/2
n2=(3n1+1)/2=(3(3n+1)/2+1)/2=(9n+3+2)/4
n3=(3n2+1)/2=(3(9n+3+2)/4+1)/2=(27n+9+6+4)/8
n4=(3n3+1)/2=(3(27n+9+6+4)/8+1)/2=(81n+27+18+12+8)/16
:
nk=(3nk-1+1)/2=(3kn+Σi=0,k-2(2/3)i3k-1+2k-1)/2k.
When n is a very large number and k is also significant in magnitude, we have to
think of the working value to the capacity of a specific finite state machine.
6 Logical Soundness of the Study
We have exercised the observations, quick analysis works, trying to build the state
transition tables, and working value analysis. In the following, we are to
demonstrate the logical soundness of the study. We list the facts (predicates which
are assumed to be always true) first and then give the theorems (rules for
inferences) with proofs.
Fact 1. The 3n+1 problem is an open question.
Fact 2. Nature numbers can be represented in binary.
Fact 3. The state transition model can be applied for analysis.
Fact 4. A practical finite state machine is limited by its memory size.
Theorem 1. The diagram provided in Figure 1 represents a state transition model.
[Proof] Since a state transition model can be described as M={S, I, T, s0}, where
S is the set of states, I is the set of input, T is the set of transitions, and s0 in S is
the starting state, we can fit the diagram into such a model. Let S be the set {z1,
s11, s101, s1z01, s0}, I be the set of odd numbers in binary, and T be the set of
transitions {s0→z1, s0→s101, s0→s11, s0→s1z01, s101→s101, s101→s11,
s101→z1 …} as indicated in the diagram. Then, there is the state transition model.
Theorem 2. Given a number n, if n=2mΣ4k where m, k≥0, then the 3n+1 and n/2
computation process will terminate successfully.
11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
[Proof] Since 3(Σ4k)+1=4k+1 for all k, 3n+1=(2m)(Σ4k)=2m+2k+2, which is qualified
(i.e., we can see that after m+2k+2 times of n/2 operation, the result is 1).
Theorem 3. Given an odd number n, whenever n mod 2k=2k-1 where k≥2, then an
instantly continuous increasing of working values (in the computation process) is
expectable.
[Proof] As it was analyzed in the previous section, the expected largest working
value is (3kn+Σi=0,k-2(2/3)i3k-1+2k-1)/2k.
Theorem 4. By using a finite state machine such as a computer, the computation
process trying to solve the 3n+1 problem does not always terminate successfully.
[Proof] There are two cases that the computation process will not terminate
successfully: (1) there is no such match that n=2mΣ4k where m, k≥0, in the whole
life of the computation process, and (2) the memory size of the finite state
machine is not capable to handle the working values. In the first case, we cannot
be sure whether there is the match or not, although Theorem 2 stands. However, in
the second case, the finite state machine may not be able to handle the working
values due to the limitation of its memory size, as Theorem 3 stands.
7 Conclusions
This study to the 3n+1 problem covers the works in observation, analysis,
modeling, and logical soundness. As a result, we have indicated that (1) numbers
in binary are helpful in the general observation, (2) there are features for numbers
with “trailing 1s” or “in-between 0s” in the computation process, (3) a state
transition model can be build to handle the major check points in the computation
process with possible state transition rules, (4) the state transition is nondeterministic in less than 1 of 8 possible cases, or it is deterministic if there is a
finite set of numbers, (5) working values can be expected at an instance in the
computation process, and (6) the study is logically sound.
The significance of the study is the trying to construct a state transition model.
There are only 4 states (excluding the starting state), and the input numbers can be
classified into 4 groups, depending on their bit sequences in binary. The
complexity of the original problem can be limited in the specification of state
transitions. Actually, the state transition of numbers with bit sequences S11 and
S1z01 is deterministic, and only that with bit sequence S101 is non-deterministic.
The degree of non-determinism is narrowed down again. Theoretically, a general
state transition table can be provided with 3 check lists for the possibly infinite
number of input candidates in the S101 group. However, this is beyond the current
scope.
The future works include the look-ahead analysis and the memory/memory-less
analysis. This study seems to have exercised the 1-step look-ahead feature since
next state or bit sequence of the result obtained after the 3n+1 and n/2 operations
is mostly expectable. (The state transition in current model is memory-less.)
Whether a model for 2-step or k-step analysis is possible or not is an interesting
issue. In this case, a finite state machine with stack memory (with push/pop
operations) for keeping previous information is required. Nevertheless, we can
foresee that the stack size is the key concern.
References
rd
[1] R.K. Guy, Unsolved problems in number theory, 3 ed., New York, Springer-Verlag, 2004, pp.
330-332.
12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
[2] B. Kraft, K. Monks, On conjugacies of the 3x+1 map induced by continuous endomorphisms of
the shift dynamic system, Discrete Mathematics 310 (2010) 1875-1883.
[3] J.C. Lagarias, The 3x + 1 problem and its generalizations, Amer. Math. Monthly 92 (1985) 3-23.
[4] J.C. Lagarias, “The 3x + 1 Problem: An Annotated Bibliography, II (2000-2009), available at
http://arxiv.org/abs/math/0608208, accessed on 12/06/2010.
[5] E. Lehtonen, Two undecidable variants of Collatz’s problems, Theoretical Computer Science
407 (2008) 596-600.
[6] G.J. Wirsching, The dynamical system generated by the 3n + 1 function, Berlin, Springer, 1998,
(Lecture Notes in Mathematics series: 1681), ISBN 978-3-540-63970-1.
13