Next Article in Journal
Solar Energy Production Forecasting Based on a Hybrid CNN-LSTM-Transformer Model
Previous Article in Journal
Spatial Autocorrelation of Global Stock Exchanges Using Functional Areal Spatial Principal Component Analysis
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Statistical Analysis of Descending Open Cycles of Collatz Function

1
Department of Mathematics and Natural Sciences, Prince Mohammad Bin Fahd University, Al Khobar 31952, Saudi Arabia
2
Department of Mathematics, University of Ottawa, Ottawa, ON K1N 6N5, Canada
3
Department of Mathematics, Yarmouk University, Irbid 21163, Jordan
*
Author to whom correspondence should be addressed.
Mathematics 2023, 11(3), 675; https://doi.org/10.3390/math11030675
Submission received: 6 December 2022 / Revised: 20 January 2023 / Accepted: 25 January 2023 / Published: 28 January 2023

Abstract

:
Collatz dynamic systems present a statistical space that can be studied rigorously. In a previous study, the author presented Collatz space in a unique dynamic numerical mode by tabulating a sequential correlation pattern of division by 2 of Collatz function’s even numbers until the numbers became odd with a consecutive occurrence, following an attribute of a 50:50 probability of division by 2 once (ascending behavior) as opposed to division by 2 more than once (descending behavior). In this paper, we describe the path of the Collatz function as sequences comprised of groups of the function’s iterates (open cycles) that end up with the first odd integer that is less than the starting odd integer. The descending behavior of the open cycles is attributed to a deterministic factor as observation of the cycles’ sequences shows. We do statistical analysis on 4 large samples of open cycles and orbits to 1. We define R ( n ) as the cycles’ deterministic variable defined as the ratio of division by 2 once to division by 2 more than once. We use statistical analysis to study the randomness of the orbits of the cycles’ starting odd positive integers as well as orbits to 1 up to 1,002,097,149.

1. Introduction

The Collatz conjecture, known as the 3 n + 1 conjecture, is a dynamical system that concerns positive even integers of mod 2 [1,2]. It is defined by the function (see Equation (1)). It concerns what happens to a starting positive integer 𝑛 by the operation of   f ( n ) . It asserts that the sequence obtained by iterating Equation (1) always reaches 1. The iterations made by applying the function have been observed to always reach the trivial cycle 4-2-1-4, and the path of the function’s trajectories seem to have no correlation to other variables of the function, such as start number, maximum path lengths, which suggests a probabilistic behavior of the function when picking its iterates. The Conjecture has been verified by experiments up to n = 5.76 × 10 18 [3,4]. Probabilistic models of the function have been developed mainly due to experimental observation of such behavior and due to the absence of a clear underlying pattern that indicates otherwise. A number of authors presented models that describe random walks to simulate the function [5,6,7]. Tao recently proved that “Almost all orbits of the Collatz map attain almost bounded values” [8]. The Collatz system may be described as a physical system as it behaves similarly to a physical system operating under a feedback design system using a sliding mode control process [9]. Recently, it has been proven that dynamical systems generally describe a mix of random and deterministic behavior as described by the weak Pinsker conjecture [10]. Dynamical systems then may describe sequences that are distributed in a certain way and cluster into a small number of subregions in a deterministic way but their overall distribution may be described as random. In a previous paper, the author Barghout [11], studied the descending path of the Collatz function underlying the influence of the probabilistic theoretical approach, utilizing the fact that the dynamic behavior of the Collatz function dictates that an iterate that starts from any odd natural number either increases the starting odd number if division by 2 once follows or decreases the starting odd number if division by 2 more than once follows. This behavior allows a distinction between the two operations of the Collatz function in terms of an increase versus a decrease of the starting odd numbers to quantify the direction a specific trajectory takes. The author also presented a probabilistic model of the operation of the   3 n + 1   function over its positive even numbers by showing that their division by 2 once as opposed to division by 2 more than once follows a recurrent pattern of the form   x , 1 , x , 1 , where x represents divisions by 2 more than once, with a 50:50 probability. Collatz function’s trajectories were proposed to exhibit a descending path because the process they follow was shown to indicate the behavior of a winning nature in the descending direction because division by 2 once increases the starting odd Collatz number by about 50% on average and division by 2 more than once decreases it by 62% on average (a small sample data was assessed). As clear in Table A1, Appendix A, all rows have the same frequency of division by 2 of Collatz even numbers, and all columns repeat the same subspace of division by 2 of Collatz even numbers with the correlation pattern of division by 2 holding over all natural numbers N. In this paper, we study how close the Collatz iterates are to normality distribution by identifying a deterministic factor that defines the function’s trajectories and studying the normality of their distributions over the natural numbers. We define groups of the function’s iterates (called here open cycles) that end up with the first positive odd integer that is less than the starting positive odd integer. A similar approach was proposed by Andrei et al. [12], who proposed that graph C of the Collatz function starting with root 8 after the initial loop is an infinite binary tree A(8). Those groups of iterates were found to have interesting statistical attributes and maybe be regarded as the building blocks of the Collatz function. Further study of those groups may lead to proof of the Collatz conjecture. All starting positive odd integers of the function eventually make up open cycles as indicated by the apparent descending behavior of the function. We categorized all Collatz function’s open cycles into long open cycles and short open cycles and showed that they present a 50:50 probability over an open cycles’ space of the odd natural numbers, where short open cycles characterized by division by 2 more than occurring one time while long open cycles that have at least one sub-cycle and characterized by a dominant division by 2 more than once. Long open cycles then define nested cycles. In a nutshell, it was found that open cycles of the Collatz function’s trajectories of all of the odd natural numbers lead to 50% of long open cycles and 50% of short open cycles. We seek to study those groups statistically as they represent a unique approach to solving the conjecture. We studied the probability frequency distribution of their long open cycles in terms of their determining variable R ( n ) of the ratio of division by 2 once (an increase of the starting number of Collatz operations) to division by 2 more than once (decrease of the starting number of Collatz operation). We show that the long open cycles of such a statistical model exhibit a probabilistic behavior of a bell-shaped curve of the frequency distribution of the proposed deterministic variable of the ratio of division by 2 once to division by 2 more than once of the long open cycles over the function’s open cycles’ space with a definitive mean and median over a sizable range of the variable, which may help identify a mathematical correlation between the descending factor of division by 2 once in relation to the ascending factor of division by 2 more than once of the function’s path. We also studied quantitatively the relationship between R ( n ) of open cycles and their maxima path lengths as a constraint to their divergence behavior. We found compelling evidence that the Collatz conjecture picks its iterates at random by studying the skewness and Kurtosis of the open cycles as well as the conjecture’s orbits to 1.
f ( n ) = { n 2   i f          n 0   ( m o d   2 ) 3 n + 1       n 1   ( m o d   2 )  

2. Open Cycles of Collatz Function

In this section, we define and sketch open cycles and give examples.
Definition 1. 
Let  n  be an odd natural number, and let   n ,   f k ( n ) ,   , 1  be Collatz function’s orbit of  n .  O ( n ) = n , ,   f k ( n )  is defined as Collatz open cycle when  f k ( n ) < n  occurs for the first time.
Definition 2. 
For the open cycle  O ( n ) = n , ,   f k ( n ) , if    k = 1 , we call the cycle short open cycle  S ( n ) ; if  k > 1 , we call it long open cycle  L ( n ) .
A schematic illustration of short and long open cycles is shown in Figure 1.
We can see from Figure 1 that type L ( n ) open cycles are nested and contain both types of open cycles with a descending behavior because it contains the right number of type S ( n ) open cycles. We can see that as Collatz orbit ascends due to division by 2 once after the application of 3 n + 1 but is forced to descend by the application of type S ( n ) open cycles forming a nested long open cycle in the case of L ( n ) .
Lemma 1. 
All of the open cycles  O ( n )  defined by Equation (1) with the set   n = { 3 ,   7 ,   11 }  as starting numbers are of the type  O ( n ) = L ( n ) .
Proof of Lemma 1. 
The proof is obvious from Table 1. Since the table shows that for odd natural numbers, i.e.,   n = { 3 ,   7 ,   11 } , the function f ( n ) assumes the iterate   n k = f k ( n ) < n ; where   k = 1 , and the f k ( n ) yields the next odd number by division by 2 once. □
Lemma 2. 
All open cycles of  O ( n )  defined by Equation (1) with the set  n = { 5 ,   9 ,   13 }  as starting numbers are of the type    O ( n ) = S ( n ) .
Proof Lemma 2. 
The proof is obvious from Table 1 since the table shows that for odd natural numbers, i.e.,   n = { 5 ,   9 ,   13 } , the function f ( n ) assumes the iterate   n k = f k ( n ) < n ; where   k > 1 , and the f k ( n ) yields the next odd number by division by 2 more than once. □

3. Distribution of Open Cycles over the Natural Numbers

The distinction between ascending and descending behavior of Collatz orbits, as defined in [11], is fundamental in determining the convergence of the Collatz function to 1. In reference [11], it was shown that on average, division by 2 once increases the start with an odd number of Collatz orbits while division by 2 more than once decreases it, therefore the choice of the ratio of the two parameters as the defining factor of the converging behavior of the function. Here we defined the ratio of division by 2 once (ascending behavior) to division by 2 more than once (descending behavior) of open cycles as R ( n ) and generated their values for the first consecutive positive odd integers as listed in Table 1.
Definition 3. 
For any Collatz cycle  C ( n ) = n , ,   f k ( n ) , we call the ratio of division by 2 once to division by 2 more than once of the even numbers of the orbit of   C ( n )  as  R ( n ) .
Example 1. 
For  n = 7 , Collatz long open cycle orbit gives
O ( n ) = 7 ,   22 ,   11 ,   34 ,   17 ,   52 ,   26 , 13 ,   40 ,   20 , 10 ,   5 ,   division   by   2   ratios   R ( n ) = 2 / 5 = 0.4 .
Example 2. 
For  n = 7 , Collatz cycle’s orbit to 1 gives,
C ( n ) = 7 ,   22 ,   11 ,   34 ,   17 ,   52 ,   26 , 13 ,   40 ,   20 , 10 ,   5 , 16 , 8 , 4 , 2 , 1 ,   division   by   2   ratios   R ( n ) = 2 / 9 = 0.222 .
We found that half of the Collatz open cycles over the odd natural numbers are of type S ( n ) , while the other half is of type L ( n ) and their R ( n ) is 0 and positive number consecutively as shown in Table 1.

4. Relationship between R ( n ) and the Path Length of Open Cycles

The relationship between R ( n ) and the path length of open cycles of the Collatz function is important since the function may progress to high numbers, e.g., the longest progression for any initial starting number less than 10 billion has been found to be 9780657630, which has 1132 steps (length) [13]. Here, we investigated the relationship between R ( n ) and other parameters such as the path length of Collatz orbits as well as the path length of open cycles. We found a compelling correlation between R ( n ) and Collatz orbits to 1 but no obvious relationship with their orbital maximum numbers. We also found that the path lengths of L ( n ) cycles have maxima that may follow a Gaussian distribution. We concluded that R ( n ) values of L ( n ) cycles are bound by the maxima of their corresponding path lengths in a defined process. This gave a possible indication of the need for the statistical study of L ( n ) cycles as well as orbits to 1 in terms of their deterministic factor R ( n ) . We used C++ code, included in Appendix B, to generate the parameters listed in Table 2 and used them to do statistical analysis.
We found no correlation between odd natural numbers and their trajectories’ maximum numbers or steps to their maximum numbers as expected from the literature or their corresponding R ( n ) ratios.

5. Analysis of Collatz Function’s Upper Bound Path-Lengths

Here we look into how the function picks its open L ( n ) cycles of their corresponding upper bound path lengths. We have done that by studying the path length of L ( n ) cycles as a function of their R ( n ) . We found that the path lengths of open cycles (StepsToMin) when plotted against long open cycles’ R ( n ) (RatioToMin) indicated a bell-shaped curve of bounded values when the function chooses its open cycles indicative of a probabilistic behavior. The distribution of R ( n ) seems to be correlated to the upper bound of the cycle’s path length for R ( n ) values. This hints at a limiting action by the dynamicity of the Collatz function. The following examples illustrate the idea,
Example 3. 
For  n = 7 , which produces the long open cycle’s orbit  L ( n ) = 7 ,   22 ,   11 ,   34 ,   17 ,   52 ,   26 ,   13 ,   40 ,   20 ,   10 ,   5 , division by 2 ratios  R ( n ) = 2 / 5 = 0.4 . For  n = 23 , which produces the long open cycle’s orbit  L ( n ) = 23 ,   70 ,   35 ,   106 ,   53 ,   160 ,   80 ,   40 ,   20 ,   10 ,   5 , division by 2 ratios  R ( n ) = 2 / 5 = 0.4 . For  n = 187 , which produces the long open cycle’s orbit  L ( n ) = 187 ,   562 ,   281 ,   844 ,   422 ,   211 ,   634 ,   317 ,   952 ,   476 ,   238 ,   119 , division by 2 ratios  R ( n ) = 2 / 5 = 0.4 . We can see that  R ( 7 ) = R ( 23 ) = R ( 187 ) = 0.4 .
Definition 4. 
Let  n  be an odd natural number, and let  n ,   f ( n ) ,   ,   f k ( n )  be the Collatz function’s orbit of the open cycle of  n . The path length of the Collatz open cycle is the number of iterates the function takes until it reaches    f k ( n ) .
Example 4. 
For  n = 7 , which produces the long open cycle’s orbit,
O ( n ) = 7 , 22 ,   11 ,   34 ,   17 ,   52 ,   26 , 13 ,   40 ,   20 ,   10 ,   5 , the path length is 11 .
To check the correlation between open cycles and their path lengths we plotted the path lengths as a function of their cycles’ R ( n ) for natural odd numbers from 1 to 1617019, shown in Figure 2. The plot had a maximum path length of 368 steps. Other R ( n ) ranges showed similar correlations.
The correlation between R ( n ) values of L ( n ) cycles and their path lengths as seen in Figure 2 are unique. While half of the open cycles are the type of S ( n ) and lie on the point (0,0), the rest shows L ( n ) as a function of their R ( n ) and hints at the frequency of L ( n ) type cycles in correlation to their R ( n ) and shows a bell-shaped bound path length that hints at a similar bell-shaped frequency distribution of the deterministic variable R ( n ) . Since all of the S ( n ) type cycles lie on the point (0,0) as related to their respective R ( n ) , we expect that the frequency distribution of the R ( n ) of the L ( n ) type cycles of the function rather reflects the true identity of the function’s behavior.

6. Comparative Statistical Analysis of 4 Datasets of L ( n ) Open Cycles

Here we seek to study the degree of randomness of how the function picks its L ( n ) type open cycles from a space made of 50% L ( n ) and 50% of S ( n ) cycles distributed evenly and consecutively over the natural numbers as Table 2 shows [14,15,16,17].
To check the function’s probabilistic behavior then, we conducted a comparative analysis of the deterministic factor R ( n ) of 4 L ( n ) open cycles’ datasets of odd natural numbers ranging from 1 to 1002097149. We used RStudio and Microsoft Excel software to do data analysis for the data obtained from running a C++ code that generated R ( n ) values for the function’s open cycles as well as its orbits to 1 for the chosen ranges. We found such frequency distributions fluctuate about a tight average as indicated by the fairly bell-shaped distributions for all of the four chosen ranges of starting odd natural numbers Collatz open cycles. The biased descending behavior of the Collatz function is believed to originate from the deterministic factor of the ratio of division by 2 once to division by 2 more than once; R ( n ) of the function. Figure 3, Figure 4 and Figure 5 show the frequency distribution of R ( n ) of the chosen 4 groups, their Boxplots, and their q-q plot generated by using RStudio software.
We used Microsoft Excel to generate a Skewness, Kurtosis, mean, median, and mode of the 4 groups of L ( n ) type cycles up to 1,002,097,149 and listed them in Table 3.

7. Comparative Statistical Analysis of 4 Datasets of Collatz Orbits to 1;

Here we perform statistical analysis of the Collatz orbits to the trivial cycle for the same 4 ranges of the datasets. We studied their degree of randomness and compared it to the degree of randomness of L ( n ) cycles since they are merely comprised of nested L ( n ) cycles.
As with the dataset of L ( n ) , to check the function’s probabilistic behavior then, we conducted a comparative analysis of the deterministic factor R ( n ) of the 4 datasets of Collatz orbits to 1 of the odd natural numbers up to 1002097149. Figure 6, Figure 7 and Figure 8 show the frequency distribution of R ( n ) of the chosen 4 groups, their Boxplots, and their q-q plot generated by using RStudio software.
We used Microsoft Excel to generate a Skewness, Kurtosis, mean, median, and mode of the 4 groups of Collatz orbits to 1 up to 1,002,097,149 and listed them in Table 4.

8. Conclusions

By numerically checking consecutive open cycles over the odd natural numbers, we see that they make a sequence of   L ( n ) , S ( n ) , L ( n ) , S ( n ) . , which presents a 50:50 probability of L ( n ) vs. S ( n ) open cycles over the odd natural numbers, as clear from Table 2. In short, since all natural odd numbers have this sequential correlation, a random pick of the Collatz function’s event of its O ( n ) suggests that half of them of descending behavior by the action of the ‘nested’ L ( n ) open cycles with integrated S ( n ) cycles.
Upon conducting statistical analysis of the frequency distributions of the chosen groups we found that they have attributes of normality. We showed that L ( n ) open cycles present a Bell-shaped curve of the frequency distribution of their deterministic factor R ( n ) over the natural numbers, suggestive of random behavior of the function. Also, the histograms of all of the 4 groups of the open cycles as well as orbits to 1 are almost replicas of each other and show normality. This peculiar observation indicates that the behavior of the Collatz function repeats itself across the natural numbers. In other words, the descending behavior of the function indicates that it remains unchanged across the natural numbers.
The close values of the means, medians, and modes of the frequency distributions for all of the samples, L ( n ) and orbits to 1, suggest that the distributions are fairly symmetrical, but a closer look at the visual analysis of the distributions, depicted from boxplots and q-q plots, did not indicate strong normality for the 4 groups of L ( n ) cycles, with the outliers might indicate a natural variation process and seem to be a feature of the fairly “well-shaped” data. The boxplots of the 4 groups of the orbits to 1 exhibited centered medians with little outliers with fair symmetry. Furthermore, all samples from both types (all datasets) showed skewness and kurtosis between +1 and −1 implying normality. It is then safe to conclude that the Collatz function chooses its iterates at random.

Author Contributions

Concept, analysis, and writing of drafts K.B.; Data production K.B. and W.H.; Review of data and drafts and invaluable suggestions N.A.-L. and M.A.-J. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data is available on request from the authors.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

Table A1. Representation of horizontal and vertical symmetry of the frequency (F) of division by 2 of 3 n + 1 even elements of Collatz function. Columns are tabulated in the sequence of Collatz even numbers until the next even number that lies on the collapsing line of 2 n that starts a new column.
Table A1. Representation of horizontal and vertical symmetry of the frequency (F) of division by 2 of 3 n + 1 even elements of Collatz function. Columns are tabulated in the sequence of Collatz even numbers until the next even number that lies on the collapsing line of 2 n that starts a new column.
#F3n + 1F3n + 1F3n + 1F3n + 1F3n + 1F3n + 1
  2 n 41666482561010241240962416,777,216
112217012621103014102116,777,222
222827622682103624108216,777,228
313418212741104214114116,777,234
434038832803104834120316,777,240
514619412861105414126116,777,246
6252210022922106024132216,777,252
7158110612981106614138116,777,258
8 411243044107244144416,777,264
9 111813101107814150116,777,270
10 212423162108424156216,777,276
11 113013221109014162116,777,282
12 313633283109634168316,777,288
13 114213341110214174116,777,294
14 214823402110824180216,777,300
15 115413461111414186116,777,306
16 516053525112054192516,777,312
17 116613581112614198116,777,318
18 217223642113224204216,777,324
19 117813701113814210116,777,330
20 318433763114434216316,777,336
21 119013821115014222116,777,342
22 219623882115624228216,777,348
23 120213941116214234116,777,354
24 420844004116844240416,777,360
25 121414061117414246116,777,366
26 222024122118024252216,777,372
27 122614181118614258116,777,378
28 323234243119234264316,777,384
29 123814301119814270116,777,390
30 224424362120424276216,777,396
31 125014421121014282116,777,402
32 64486121664288616,777,408

Appendix B

  C++ Code B1
/* C++ Code to generate R ( n ) for any positive integer and related
Collatz function’s variables: Ratio to 1; Steps to 1; Max to 1; Steps to Max; Ratio to Min; Steps to Min */
//
#include <iostream>
#include <fstream>
#include<string>
#include <iomanip>
#include <ctime>
using namespace std;
 
bool isValid(long long int num) {
// if number is less than or equal to 0
  if (num <= 0) {
      return false;
  }
else {
      return true;
  }
}
// Determine if the number is even
bool isEven(long long int num) {
  if (num % 2 == 0) {
      return true;
  }
  else {
      return false;
  }
}
/* Here, we define variables and assign their initial values: Number: the start integer; ratio: R(n) to 1; sum: Path length to 1; Max: Max number of the orbit to 1; iMax: Path length to max number of the orbit to 1; rMin: R(n) to minimum; iMin: Path length of the orbit to 1 */
// minimum is the first integer less than the start number in O(n) orbit
// Of interest to our calculation: ratio; rMin; iMin
void calculate(long long int num,long long int Number, long long int j, long long int t,long long int h,long long int Max,long long int iMax,long long int Condition, double rMax,long long int iMin) {
  int i = 0;
  int sum=0;
  int Alpha=0;
  int Beta=0;
  double ratio = 0;
 
  if (num>Max){
  Max=num;
  iMax=t+j+h;
  }
 
  if (num == 1) {
      ratio = (double)j / (double)t; // R(n)
      sum=t+j+h; // length of the orbit
      ifstream indata;
      ofstream outdata;
      outdata.open("Collatz.csv", ios::app);
      // Assign outdata variables
      outdata << Number << "," << ratio << "," << sum << "," << Max << "," << iMax << "," << rMax <<"," << iMin <<endl;
 
      return;
  }
  else if (isEven(num)) {
// If num is even, divide by 2
      while (isEven(num)) {
       num = num / 2;
       i = i + 1;
      }
 
      if (i == 1) {
       j = j + i;
      }
      else {
       t = t + i;
      }
      if (Condition==0){
   if (num==1){
      Alpha=j;
      Beta=t;
      rMax=(double)Alpha / (double)Beta;
      iMin=Beta+Alpha+h;
   Condition=1;
   }
   }
 
      calculate(num,Number, j, t,h, Max,iMax, Condition, rMax, iMin);
 
   }
   else {
      if (Condition==0){
   if (num<Number){
      Alpha=j;
      Beta=t+i;
      rMax=(double)Alpha / (double)Beta;
      iMin=Beta+Alpha+h;
   Condition=1;
   }
   }
   // If number is odd, multiply by 3 and add 1 to make it even
   num = (num * 3) + 1;
      h=h+1;
      calculate(num,Number, j, t,h, Max,iMax, Condition, rMax, iMin);
   }
}
 
int main() {
 
   long long int input, x = 0, y = 0, z=0, iMax=0, iMin=0, Condition=0;
   double rMax=0;
   cout << "Please enter an odd integer greater than 3." << endl;
/* Prompt the user to enter the first number in the specified group; here 1 in the first group 1-1617091 */
 
   cin >> input;
while ( input % 2 == 0 || input <= 3) {
   cout << " This number is not an odd integer greater than 3, please enter an odd integer greater than 3." << endl;
   cin >> input;
   }
   if (isValid(input)) {
   ifstream indata;
   ofstream outdata;
// Data output in Collatz.csv file
 
   outdata.open("Collatz.csv", ios::app);
/* Output data are: The input integer; R(n) to 1; Path length to 1; Max number of the orbit to 1; Path length to max number of the orbit to 1; R(n) to minimum; Path length of the orbit to 1 */
/* Of interest to our calculation is R(n) to 1; R(n) to minimum; Path length of the orbit to minimum */
 
  outdata << "Number" << "," << "RatiotoONE" << "," << "StepsToOne" << "," << "Max"<< "," << "StepsToMax"<< "," << "RatioToMin"<< ","<< "StepsToMin"<<endl;
/* Range of groups’ input numbers; here for the first group, we have the last input integer 1617019 */
 
     while (input < 1617019) {
       calculate(input,input, x, y,z, input, iMax, Condition,rMax,iMin);
// increase input number by 2 until the number is equal to 1617091
 
       input = input + 2;
       Condition=0;
     }
   }
   else {
     cout << "Not a valid input." << endl;
     return 0;
   }
 
   return 0;
}

References

  1. Lagarias, J.C. The 3x + 1 problem: An annotated bibliography (1963–1999) (sorted by author). arXiv 2011, arXiv:math/0309224. [Google Scholar]
  2. Lagarias, J.C. The 3x + 1 problem: An annotated bibliography, II (2000–2009) (sorted by author). arXiv 2012, arXiv:math/0608208. [Google Scholar]
  3. Oliveira, T.S. Empirical Verification of the 3x + 1 and Related Conjectures. In The Ultimate Challenge: The 3x+1 Problem (book edited by Jeffrey C. Lagarias). Am. Math. Soc. 2010, 189–207. [Google Scholar]
  4. Oliveira, T.S. Computational Verification of the 3x+1 Conjecture. Available online: http://sweet.ua.pt/tos/3x_plus_1.html (accessed on 25 May 2022).
  5. Borovkov, K.; Pfeifer, D. Estimates for the Syracuse problem via a probabilistic model. Theory Probab. Its Appl. 2000, 45, 300–310. [Google Scholar] [CrossRef]
  6. Rawsthorne, D.W. Imitation of an iteration. Math. Mag. 1985, 58, 172–176. [Google Scholar] [CrossRef]
  7. Wagon, S. The collatz problem. Math. Lntelligencer T 1985, 72–76. [Google Scholar] [CrossRef]
  8. Terence, T. Almost all orbits of the Collatz map attain almost bounded values. arXiv 2019, arXiv:1909.03562. [Google Scholar]
  9. Grauer, J.A. Analogy Between the Collatz Conjecture and Sliding Mode Control; Langley Research Center: Hampton, VA, USA, 2021; NASA/TM–20210019810. [Google Scholar]
  10. Austin, T. Measure concentration and the weak Pinsker property. arXiv 2018, arXiv:1705.00302. [Google Scholar] [CrossRef] [Green Version]
  11. Barghout, K. On the Probabilistic Proof of the Convergence of the Collatz Conjecture. J. Probab. Stat. 2019, 2019, 6814378. [Google Scholar] [CrossRef] [Green Version]
  12. Andrei, Ş.; Kudlek, M.; Niculescu R, Ş. Some results on the Collatz problem. Acta Inform. 2000, 37, 145. [Google Scholar] [CrossRef]
  13. Leavens, G.T.; Vermeulen, M. 3x + 1 Search Programs. Comput. Math. Appl. 1992, 24, 79–99. [Google Scholar] [CrossRef] [Green Version]
  14. Cesaro, E. Demonstration elementaire et generalisation de quelques theoremes de M. Berger. Mathesis 1881, 1, 99–102. [Google Scholar]
  15. Bach, E.; Jeffrey, S. Algorithmic Number Theory: Efficient algorithms, Volume 1. Foundation of Computing Series; The MIT Press: Cambridge, MA, USA, 1996. [Google Scholar]
  16. Xu, D.; Tamir, D.E. Pseudo-random number generators based on the Collatz conjecture. Int. J. Inf. Technol. 2019, 11, 453–459. [Google Scholar] [CrossRef]
  17. Shapiro, S.S.; Wilk, M.B. An analysis of variance for normality (complete samples). Biometrika 1965, 52, 591–611. [Google Scholar] [CrossRef]
Figure 1. Schematic diagram of Collatz long (A,B), type   L ( n ) and short (C), type S ( n ) open cycles, where a, b, c, and d are consecutive odd numbers in a Collatz orbit.
Figure 1. Schematic diagram of Collatz long (A,B), type   L ( n ) and short (C), type S ( n ) open cycles, where a, b, c, and d are consecutive odd numbers in a Collatz orbit.
Mathematics 11 00675 g001
Figure 2. Open cycles’ path lengths as a function of their R ( n ) .
Figure 2. Open cycles’ path lengths as a function of their R ( n ) .
Mathematics 11 00675 g002
Figure 3. Frequency distribution of R ( n ) of 4 groups of L ( n ) type cycles up to 1,002,097,149.
Figure 3. Frequency distribution of R ( n ) of 4 groups of L ( n ) type cycles up to 1,002,097,149.
Mathematics 11 00675 g003
Figure 4. Boxplot of R ( n ) of 4 groups of L ( n ) type cycles up to 1,002,097,149.
Figure 4. Boxplot of R ( n ) of 4 groups of L ( n ) type cycles up to 1,002,097,149.
Mathematics 11 00675 g004
Figure 5. q-q plot of R ( n ) of 4 groups of L ( n ) type cycles up to 1,002,097,149.
Figure 5. q-q plot of R ( n ) of 4 groups of L ( n ) type cycles up to 1,002,097,149.
Mathematics 11 00675 g005
Figure 6. Frequency distribution of R ( n ) of 4 groups of orbits to 1 up to 1,002,097,149.
Figure 6. Frequency distribution of R ( n ) of 4 groups of orbits to 1 up to 1,002,097,149.
Mathematics 11 00675 g006
Figure 7. Boxplot of R ( n ) of 4 groups of orbits to 1 up to 1,002,097,149.
Figure 7. Boxplot of R ( n ) of 4 groups of orbits to 1 up to 1,002,097,149.
Mathematics 11 00675 g007
Figure 8. q-q plot of R ( n ) of 4 groups of orbits to 1 up to 1,002,097,149.
Figure 8. q-q plot of R ( n ) of 4 groups of orbits to 1 up to 1,002,097,149.
Mathematics 11 00675 g008
Table 1. Half of the odd natural numbers make L ( n ) cycles while the other half makes S ( n ) cycles, sequenced consecutively over the natural number as L ( n ) , S ( n ) , L ( n ) , S ( n ) .
Table 1. Half of the odd natural numbers make L ( n ) cycles while the other half makes S ( n ) cycles, sequenced consecutively over the natural number as L ( n ) , S ( n ) , L ( n ) , S ( n ) .
Odd NumberOpen Cycle 3 n + 1 Action R ( n )
3 L ( n ) 3 ( 3 ) + 1 = 10 0.25
5 S ( n ) 3 ( 5 ) + 1 = 16 0
7 L ( n ) 3 ( 7 ) + 1 = 22 0.4
9 S ( n ) 3 ( 9 ) + 1 = 28 0
Table 2. First odd natural numbers and their Collatz variables; RatioToOne: R ( n ) to 1 of orbits to 1, StepsToOne: Steps to 1 of orbits to 1, Max: Maximum number to 1 of orbits to 1, StepsToMax, Steps to a Maximum number of orbits to 1, RatioToMin: R(n) of O ( n ) , and StepsToMin: Steps of O ( n ) .
Table 2. First odd natural numbers and their Collatz variables; RatioToOne: R ( n ) to 1 of orbits to 1, StepsToOne: Steps to 1 of orbits to 1, Max: Maximum number to 1 of orbits to 1, StepsToMax, Steps to a Maximum number of orbits to 1, RatioToMin: R(n) of O ( n ) , and StepsToMin: Steps of O ( n ) .
NumberRatioToOneStepsToOneMaxStepsToMaxRatioToMinStepsToMin
30.2571630.257
50516105
70.222222165250.411
90.1818181952803
110.111111145230.29
130940104
Table 3. Statistical summary of R ( n ) of 4 groups of L ( n ) open cycles up to 1,002,097,149.
Table 3. Statistical summary of R ( n ) of 4 groups of L ( n ) open cycles up to 1,002,097,149.
RangeCountsSkewnessKurtosisMeanMedianMode
1–1,617,0194042550.56901−0.296030.425130.40.33333
1,000,001–3,097,1495242870.57060−0.289610.425150.40.33333
10,000,001–12,097,1495242860.56957−0.293500.425160.40.33333
1,000,000,001–1,002,097,1495242870.56900−0.295130.425150.425150.33333
Table 4. Statistical summary of R ( n ) of 4 groups of orbits to 1 up to 1,002,097,149.
Table 4. Statistical summary of R ( n ) of 4 groups of orbits to 1 up to 1,002,097,149.
RangeCountsSkewnessKurtosisMeanMedianMode
1–1,617,019807518−0.35485−0.609070.308450.323070.33333
10,000,01–3,097,1491048575−0.39579−0.331090.354630.365850.33333
10,000,001–12,097,1491048352−0.35770−0.408660.312370.3250.35714
1,000,000,001–1,002,097,1491048495−0.377340.208940.321100.326530.24719
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Barghout, K.; Hajji, W.; Abu-Libdeh, N.; Al-Jamal, M. Statistical Analysis of Descending Open Cycles of Collatz Function. Mathematics 2023, 11, 675. https://doi.org/10.3390/math11030675

AMA Style

Barghout K, Hajji W, Abu-Libdeh N, Al-Jamal M. Statistical Analysis of Descending Open Cycles of Collatz Function. Mathematics. 2023; 11(3):675. https://doi.org/10.3390/math11030675

Chicago/Turabian Style

Barghout, Kamal, Wadii Hajji, Nidal Abu-Libdeh, and Mohammad Al-Jamal. 2023. "Statistical Analysis of Descending Open Cycles of Collatz Function" Mathematics 11, no. 3: 675. https://doi.org/10.3390/math11030675

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop