Description of “The Conjecture”

The conjecture statement states –
Take any natural number n. If n is even, divide it by 2 to get n/2, if n is odd multiply it by 3 and add 1 to obtain 3n+1. Repeat the process indefinitely. The conjecture is that no matter what number you start with, you will always eventually reach 1. 

So for a natural number n, we can define the following function –

T(n) = n/2                              n≡0(mod2)
       = (3*n) + 1                     n≡1(mod2)

Some Study :
The function’s progress over successive iteration while n>1 can be easily studied and visualized with the help of a graph. For this, we have this corresponding Python code for simulating some runs and creating a plot.

Python
from matplotlib import pyplot as plt
n = int(input())
x = []
x.append(n)
while(n > 1):
    if(n % 2 == 0):
        n = n//2
        x.append(n)
        print(n)
    else:
        n = (3*n) + 1
        x.append(n)
        print(n)
plt.plot(x, '-ok')
plt.show()

The above graph is for starting value of 100. You can try out the simulation code with some starting values of your own. As you can see the above graph is quite chaotic. There’s no distinct pattern other than it eventually converging to 1, As the values may become quite large very quickly. 100 takes 25 steps to converge, but others might take even more or less. 

Let’s try out some more graphs, by graphing in a semi-log grid where the y-axis is logarithmic, the x-axis remains linear. The python code for the method is :

Python
from matplotlib import pyplot as plt
import numpy as np
  
y = []
n = 100
y.append(n)
while(n > 1):
  if (n % 2 == 0):
    n = n//2
  else:
    n = (3*n) + 1
  y.append(n)
x = range(0,len(y))
plt.plot(x,np.log(y))
plt.show()

The graph for the above code is:

Now we can reverse the y-axis in another graphing methodology, to study the growth from 1 and create a plot as follows:

Now to find some “patterns” on how many steps it takes for our input number to converge to 1, let’s change the x-axis of the above graphing method to log scale. The python code for the said is as follows:

Python
from matplotlib import pyplot as plt
import numpy as np
  
y = []
n = 100
y.append(n)
while(n > 1):
  if (n % 2 == 0):
    n = n//2
  else:
    n = (3*n) + 1
  y.append(n)
x = range(0,len(y))
plt.plot(np.log(x),np.log(y[::-1]))
plt.show()

The graph for the above code is as shown below, where the y-axis is the collatz value in log and the x-axis is the reversed step order.

Now with the above graphing method we can try and plot a bunch of different such series to study and compare the growth of each series.

Importance of the Collatz Conjecture

Importance of the Collatz Conjecture: The Collatz conjecture, also known as the 3n + 1 conjecture, is a mathematical problem that involves a simple iterative process: starting with any positive integer n, if n is even, divide it by 2; if n is odd, multiply it by 3 and add 1. Repeating this process is conjectured to eventually reach the number 1, regardless of the starting value. Although the conjecture has not been proven, it has various intriguing applications in engineering and computational fields.

Table of Content

  • What is Collatz Conjecture?
  • Description of “The Conjecture”
  • Applications of Collatz Conjecture in Engineering
    • Algorithm Design and Cryptography
    • Statistical and Data Analysis
    • Dynamic Systems and Control Theory
    • Chaos Theory and Fractal Geometry

Similar Reads

What is Collatz Conjecture?

The Collatz Conjecture, also known as the 3n + 1 conjecture, the Ulam conjecture, or the Syracuse problem, is a famous unsolved problem in mathematics. It was first proposed by Lothar Collatz in 1937....

Description of “The Conjecture”

The conjecture statement states –Take any natural number n. If n is even, divide it by 2 to get n/2, if n is odd multiply it by 3 and add 1 to obtain 3n+1. Repeat the process indefinitely. The conjecture is that no matter what number you start with, you will always eventually reach 1....

Applications of Collatz Conjecture in Engineering

Algorithm Design and Cryptography...

FAQs on Importance of the Collatz Conjecture

What is the Collatz conjecture?...

Contact Us