Introducing a Finite State Machine for Processing Collatz Sequences

The present work will introduce a Finite State Machine (FSM) that processes any Collatz Sequence; further, we will endeavor to investigate its behavior in relationship to transformations of a special infinite input. Moreover, we will prove that the machine’s word transformation is equivalent to the standard Collatz number transformation and then discuss the possibilities for utilizing this approach for solving similar problems. The benefit of this approach is that the investigation of the word transformation performed by the Finite State Machine is less complicated than the traditional number-theoretical transformation.

This function is surjective, but it is not injective (for example g(3) = g (20)) and thus it is not reversible.
In his book "The Ultimate Challenge: The 3x + 1 Problem," [2] along with his annotated bibliographies [3], [4] and other manuscripts like an earlier paper from 1985, [5] Lagarias has reseached and put together different approaches from various authors intended to describe and solve the Collatz conjecture.
For the integers up to 2,367,363,789,863,971,985,761 the conjecture holds valid. For instance, see the computation history given by Kahermanes [6] that provides a timeline of the results which have already been achieved.
Inverting the Collatz sequence and constructing a Collatz tree is an approach that has been carried out by many researchers. It is well known that inverse sequences [7] arise from all functions h ∈ H, which can be composed of the two mappings q, r : N → N with q : m → 2m and r : m → (m − 1)/3: An argumentation that the Collatz Conjecture cannot be formally proved can be found in the work of Craig Alan Feinstein [8], who presents the position that any proof of the Collatz conjecture must have an infinite number of lines and thus no formal proof is possible. However, this statement will not be acknowledged in depth within this study.
Treating Collatz sequences in a binary system can be performed as well. For example, Ethan Akin [9] handles the Collatz sequence with natural numbers written in base 2 (using the Ring Z 2 of two-adic integers), because divisions by 2 are easier to deal with in this method. He uses a shift map σ on Z 2 and a map τ : The shift map's fundamental property is σ(x) i = x i+1 , noting that σ(x) i is the i-th digit of σ(x). This property can easily be comprehended by an example x = 5 = 1010000 . . . = x 0 x 1 x 2 . . ., containing σ(x) = 2 = 0100000 . . .
Akin then defines a transformation Q : is even and then it is one in any other instance. This transformation is a bijective map that defines a conjugacy between τ and σ: Q • τ = σ • Q and it is equivalent to the map denoted Q ∞ by Lagarias [5] and it is the inverse of the map Φ introduced by Bernstein [10]. Q can be described as follows: Let x be a 2-adic integer. The transformation result Q(x) is a 2-adic integer y, so that y n = τ (n) (x) 0 . This means, the first bit y 0 is the parity of x = τ (0) (x), which is one, if x is odd and otherwise zero. The next bit y 1 is the parity of τ (1) (x), and the bit after next y 2 is parity of τ • τ (x) and so on. The conjugancy Q • τ = σ • Q can be demonstrated by transforming the expression as follows: A simulation of the Collatz function by Turing machines has been presented by Michel [11]. He introduces Turing machines that simulate the iteration of the Collatz function, where he considers them having 3 states and 4 symbols. Michel examines both turing machines, those that never halt and those that halt on the final loop.
A function-theoretic approach this problem has been provided by Berg and Meinardus [12], [13] as well as Gerhard Opfer [14], who consistently relies on the Berg's and Meinardus' idea. Opfer tries to prove the Collatz conjecture by determining the kernel intersection of two linear operators U, V that act on complex-valued functions. First he determined the kernel of V, and then he attempted to prove that its image by U is empty. Benne de Weger [15] contradicted Opfer's attempted proof.
Reachability Considerations based on a Collatz tree exist as well. It is well known that the inverted Collatz sequence can be represented as a graph; to be more specific, they can be depicted as a tree [16], [17]. It is acknowledged that in order to prove the Collatz conjecture, then one needs to demonstrate that this tree covers all (odd) natural numbers.
The Stopping Time theory has been introduced by Terras [18], [19], [20]. He introduces another notation of the Collatz function T (n) = (3 X(n) n + X(n))/2, where X(n) = 1 when n is odd and X(n) = 0 when n is even, and defined the stopping time of n, denoted by χ(n), as the least positive k for which T (k) (n) < n, if it exists, or otherwise it reaches infinity. Let L i be a set of natural numbers, it is observable that the stopping time exhibits the regularity χ(n) = i for all n fulfilling n ≡ l(mod2 i ), 15, 59} and so on. As i increases, the sets L i , including their elements, become significantly larger. Sets L i are empty when i ≡ l(mod19) for l = 3, 6,9,11,14,17,19. Additionally, the largest element of a non-empty set L i is always less than 2 i . Many other approaches exist as well. From an algebraic perspective Trümper [21] analyzes The Collatz Problem in light of an Infinite Free Semigroup. Kohl [22] generalized the problem by introducing residue class-wise affine, in short, by utilizing rcwa mappings. A polynomial analogue of the Collatz Conjecture has been provided by Hicks et al. [23] [24] and there are also stochastical, statistical and Markov chain-based and permutation-based approaches to proving this elusive theory.

Introducing a Dependent Threads State Machine (DTSM)
Let us regard a Finite State Machine (Σ, S, s 0 , δ, F ∈ S), Σ as the input alphabet, S a set of states, s 0 the starting state, F a set of final states, and δ : S × Σ → S the transition function. We may concisely write δ 0 (x) = δ(x, 0) : S → S.

A transition S × Σ → S is considered synonymous with a directed edge. Any bit that is an input
of the function δ and thus a value of the corresponding edge, we call a δ-bit. Additionally, we label each edge with an ϵ-bit using a function ϵ : S × Σ → Σ. The meaning of this labeling will be explored later.

The Collatz DTSM
The Collatz DTSM is an example of a DTSM and defined by four states S = {s 0 , a, b, c} and the functions δ, ϵ provided by Table 1. The positions that are inputs of both functions δ and ϵ are the source positions, not the target positions.
We can represent the δ and ϵ functions in a more compact way. Let's focus on the edges which connect the nodes s 0 , a, b and c. Every edge has it's δ-bit and it's ϵ-bit. In such a way, we have a graph with double colored edges. The δϵ-adjuncency matrix is provided by Table 2.
The graph of the Collatz DTSM is exhibited by Figure 1. The edges of the graph presented in Figure 1 are labeled with their δϵ-colorings. The node s 0 is the starting node. The node b is highlighted in blue, since all of it's outgoing edges have uniquely unequal δ-and ϵ-bits. Additionally, this node represents the center of symmetry.

Series of State Transition Sequences
Allow us to regard a binary sequence (d k ) k∈N 0 defined by a mapping D : N → Σ that has a finite preimage D −1 (1). In other words, a natural k exists, for which all m ≥ k are mapped to zero D(m) = 0 and thus all sequence members d m are zero. This binary sequence describes the DTSM's state transitions starting from s 0 . Hence the sequence members correspond to the δ-bits. In accordance to the DTSM definition, this sequence must end up and remain eternally in the state a. The following example illustrates the state transitions of the DTSM. It is important to point out that for an input bit d k the corresponding position p k is the target position into which the token moves to and not the source position from which the tokens moves from. Hence we consider the starting position s 0 to have a negative index −1, which in our notation means p −1 = s 0 .
The ϵ-bit, an edge is labeled with, belongs to a sequence of ϵ-bits that result from the DTSM's state transitions. A sequence of δ-bits describes a sequence of state transitions through the DTSM's edges beginning at the starting node s 0 . The sequence of ϵ-bits is defined by the order of passed edges in the walk through, which each (naturally) are specified by an ϵ-bit. This sequence of ϵ-bits forms the sequence of δ-bits describing the state transitions for the next walk through. This continuing principle is illustrated by Table , which provides a simulative description (state by state) of these consecutive walk throughs up to 10101011010000000000. Along the δ-bit sequences, Table portrays the corresponding sequences of DTSM positions, which have been walked through up to their respective states.
In Table we can reproduce and verify the repeated application of ϵ-bit sequences. If we take a closer look at the example (p 1,k ) which is the sequence of DTSM positions describing the first token's walk through, that generates the ϵ-bit sequence 00000001000100000000. This bit sequence corresponds to the δ-bit sequence (d 2,k ) that defines the walk through of the second token.
Red colored edges indicate the first token's walk through. The edge between the starting node s 0 and the node c is highlighted dotted, when a new token becomes active by leaving the starting node, respectively moving to c. For greater readability, we symbolize the starting state simply with s. If we consider the δ-bit sequences (d 1,k ), (d 2,k ), . . . , (d 6,k ) shown in Table as the inverse binary representation of odd numbers (from the first 1 to the last 1) we are given the number sequence provided by Table 4. This example corresponds to the Collatz sequence started at 725 (binary 1011010101, inverse binary 1010101101), which is illustrated by Table 5.
Since d is odd, we know that d 0 = 1. Additionally we fill this sequence infinitely with zero bits on the right side, which means, an index exists n, for which all bits that are indexed with an k ≥ n are zero d k≥n = 0.
An operation x → 3x + 1 on d can be described as (2d + 1) + d, where the multiplication with 2 is equivalent to a right shift of the bit sequence. The addition with an integer 1 means to insert a bit 1 at the front of the bit sequence: 2d + 1 = (1, d 0 , d 1 , d 2 , . . .). The sum (2d + 1) + d can be represented as follows: We initiate a sequence (e k ) k∈N 0 defined by the recurrence e k = ⌊(e k−1 + d k−1 + d k )/2⌋. And we define another (non-recursive) sequence . For the sake of completeness we define e −1 = 1 and d −1 = 0, which can be understood as predecessor of a first sequence element, but which technically is not a member of the sequence. Because we have already stated that d is odd, we know that d 0 = 1 and thus d ′ 0 = 0: A member of the sequence (e k ) k∈N 0 is the overflow bit that results from binary adding two successive members of (d k ) k∈N 0 , which is illustrated with the example of (2d + 1) + d = 27 + 13 = 40: We assume that the sequence (d k ) k∈N 0 is an odd input into the state machine controlling the n-th token. To prove the theorem it would be sufficient to demonstrate that the sequence (d ′ k ) k∈N 0 controls the next token which is the same as saying this sequence is equal to the sequence of that generated ϵ-bits as given later by (4). Let the n-th token be in a state p n,k , that is k + 1 steps have been taken by processing the sequence (d 0 , . . . , d k ). Therefore p n,−1 = s 0 and p n,0 = c, since d 0 = 1. The state machine's mechanics are given by the following explicit definition of the n-th token's target position

IJPMS Volume 19
p n,k (shorthand noted as p k ) that depends on the sum d k + e k . At this point, we refer to example 1 to remind that p k continually refers to the target (and not to the source) position.
The sequence of ϵ-bits, generated by the walk of the n-th token is exactly equal to the sequence (d ′ k ) k∈N 0 . We remember that in compliance with Table 1 the input position of the ϵ-function is the token's source and not target position: Using induction over k we prove that both the DTSM's mechanics (3) and the equality of the bit sequences stated in (4).

Start of induction:
The n-th token is in the DTSM's starting node s 0 , furthermore k = 0, d 0 = 1 (the input is odd) and as given by (2) we are also aware that e 0 = 1. The first bit d 0 = 1 of the input sequence causes the token to move from s 0 into node c (see Figure 1). For this reason the construct (3) describing the DTSM's mechanics are correct. Because of the input's oddness we recognize as validated in (2) that d ′ 0 = 0. The edge connecting s with c is labeled with the ϵ-bit 0, which conforms to the equality ϵ(p −1 , d 0 ) = ϵ(s, 1) = d ′ 0 = 0 stated by (4). Induction steps: We assume that the statements (3) and (4) are valid for all integers up to k − 1 (induction hypothesis) and we corroborate the validity of these statements for k. We will now examine the three cases defined by (3)  So far we have substantiated that e k = 1 when a token has moved into the target position p k−1 = c within the context of our induction hypothesis. In the course of proving the legitimacy of (3) for the next target position p k , the node c is our source position. Conformant with the conditions given by (3) the token's next target position p k is b for an input bit d k = 0 (d k + e k = 0 + 1 = 1) and it remains c for an input d k = 1 (d k + e k = 1 + 1 = 2). This is consistent with the DTSM's mechanics, see Figure 1. Now we must validate the correctness of the statement (4). In this case we have d ′ k = ϵ(p k−1 , d k ) = ϵ(c, d k ) and as of (2) we have d ′ k = mod(e k−1 + d k−1 + d k , 2). Utilizing the induction hypothesis we know the sum d k−1 + e k−1 = 2 and thus ϵ(c, d k ) = mod(2 + d k , 2) = d k . Since the ϵ-bit of each edge outgoing from c is equal to the σ-bit as shown in Figure 1 the statement (4) is correct in this case as well.
Case 2: p k−1 = b. Analoguous to the first case, we apply the induction hypothesis to (3) and thus assume the sum d k−1 + e k−1 = 1, which leads us to e k = ⌊(1 + d k )/2⌋ = d k by substituting this assumed sum into (2). Now we prove the exactness of (3) for the next target position p k , whereby b becomes the source position. In compliance with the DTSM's mechanics posed in Figure 1, an input d k = 0 causes the token to move to a. The condition defined by (3) for the target position p k = a is the sum d k + e k = 0, which is correct in our current case d k = e k = 0. An input d k = 1 causes the token's movement from b to c. Here again the condition d k + e k = 2 specified by (3) matches our case d k = e k = 1.
Now we have to affirm the statement (4). For this we proceed in the same way as in the first case referring to (2) and substitute again into d ′ k = mod(e k−1 + d k−1 + d k , 2) the sum d k−1 + e k−1 = 1 with the result that d ′ k = mod (1 + d k , 2). The consequence is that d ′ k has the inverse value of d k . In fact each edge outgoing from b is labeled with a σ-and ϵ-bit that are mutually inverse (see Figure 1). For this reason (4) is valid in this case too. Case 3: p k−1 = a. The induction hypothesis will now be applied for this third case to (3) with the result d k−1 + e k−1 = 0, that is d k−1 = e k−1 = 0. With reference to (2) we are given e k = ⌊d k /2⌋ = 0.
Simply put e k is in each case zero, notwithstanding which value d k has.
So far we have authenticated that e k = 0 when a token has moved into the target position p k−1 = a within the context of our induction hypothesis. In the course of proving the legitimacy of (3) for the next target position p k , the node a is our source position. As illustrated in 1 an input bit d k = 1 will cause the tokens move to node b and an input d k = 0 will cause the token to remain at position a. The formula (3) that explicitely defines the tokens target position p k complies to this behaviour in its conditions d k + e k = 1 + 0 = 1 (token's movement to b) and d k + e k = 0 + 0 = 0 (token's stay in position a). Hence (3) is credible in this third case.
Finally we have to substantiate the statement (4) in this third case. Substituting the sum d k−1 + e k−1 = 0 into (2) we are given d ′ k = mod(d k , 2) = d k and thus ϵ(a, d k ) = d ′ k = d k . Both edges that are outgoing from a have an ϵ-and σ-bit which are the same. Finally (4) is accurate as well in this third case.
The equality of the sequence (d ′ k ) k∈N 0 to the sequence of generated ϵ-bits has been validated and due to the fact that the sequence of ϵ-bits forms the sequence of σ-bits that describes the next token's walk through, we have proven the theorem 1.

Further Research
By introducing the DTSM we defined an algebraic structure of automata that forms a basis for extended further research. Through a contemporary idea we will express a monoid (M, +, e) that is freely generated by the set of two letters p and q. The monoid's operator is the string concatenation. The monoid's set contains elements that are strings made of the 2-letter alphabet p, q, where each letter represents an ϵ-bit of an integer that is a Collatz sequence member (p is zero, q is one). For example, 5 is represented by qpq. The neutral element e is an empty string.
To further develop this idea, we will outline a surjective homomorphism (an epimorphism) of this monoid into the permutation group S 3 of the DTSM's nodes {a, b, c}. The image of the string p is the permutation written in one-line notation (a c b) and the image of q is (b a c).
Furthermore, an interesting mapping exists from M into M , which in follow-up research will be investigated as an algebraic feature that transforms a token's walk through into the walk-through of the subsequent token. This mapping may possibly form a basis for a promising proof of Collatz conjecture.