Tuesday, 4 April 2017

Collatz Conjecture - a study.

God does not care about our mathematical difficulties. He integrates empirically. - Einstein.
In Mathematics, we often come across Conjectures. A conjecture is a conclusion or proposition based on incomplete information, for which no proof has been found[1].
Collatz Conjecture is named after Lothar Collatz [2]. The conjecture is also known as the conjecture.
Now, let us see how it works, it is, in fact very simple, no , no , no etc.
For any given positive integer ,

If we keep repeating this process,
We use the Half Or Triple Plus One acronymed to .
So, for any given positive number, say , we do the following steps:
15 is odd 15 3+1=4646 is even
23 is odd 233+1=703510653160
80402010516842
You get the idea now. In this blogpost, I will explore various aspects of the Collatz Conjecture. A loose structure of the blog is going to be,
  1. Collatz for Negative numbers.
  2. Collatz for Fractions.
  3. Collatz for Irrational Numbers.
  4. Collatz for Prime numbers and pattern recognition (if any) in the number of steps it needs for different scenarios to reach to one.
  5. What is the possible approach for the proof of collatz conjecture?
  6. Difficult and beautiful.


1.

I don’t understand why do they have the condition, in the conjecture. Let’s look at an example and see what happens when Collatz conjecture is applied to number, when .

For, , let us do the collatz conjecture,
-5 is odd -5 3+1 -14 is even -7 is odd -20 is even -10 is even -5 is odd -5 3+1 -14 is even -7 is odd -20 is even -10 is even -5

So, there it is.
If we use the Collatz conjecture to negative numbers, we get oscillating values and they even eventually set to the starting number itself.

Modified Collatz Conjecture:


These are called “Cycles” that exist for negative numbers and probably also for positive numbers. There is no form of proof, that says that there is absolutely no positive number that gives rise to a similar situation.

2.

For this section, we define something called Number-decimals.
Although, we already know that Even, Odd or Prime are only defined for whole numbers.
: Even-Number-decimal are defined as terminating fractions, say that are converted to decimals, say . Then we remove the decimal point from the number to get .
(If you find this definition to be strange, please comment below and mail me with a possible modification)

Now, if , then is an Even-Number-decimal and if , then then is an Odd-Number-decimal
So, it is pretty clear that the conjecture behaves the same in this scenario.

For example, take , which when converted to decimals comes as . Now, we run the algorithm on to get 1. Similarly for other fractions as well.


In the above approach, we considered fractions as decimal numbers, that is only how we can use the Collatz Conjecture on fractions; that too only if the decimal is terminating in nature. Fractions such as (), , etc. cannot be used in the Collatz conjecture for fractions.

3.

Collatz conjecture for irrational numbers is same as saying that we apply Collatz Conjecture to non-terminating decimals.
Just like , as mentioned above cannot work for Collatz; irrational numbers won’t work too.
For revision purpose, an irrational number is defined as a number that cannot be determined as the ratio of two integers. For illustration, , however, , no exact way of saying this.

4.

Collatz for primes will behave the same, that is my guess. Let’s have a look at it.


Let’s take all the primes from , namely, .

We are sure that all of them will reach eventually. I want to analyze that, in how many steps do they reach and if there is any correlation.

For this, I wrote a small script in R. The code is as follows:
collatz_numbers <- function(n, list_col=c()) {
  if(n==1) return(c(list_col, 1));
  collatz(ifelse(n%%2==0, n/2, 3*n +1), c(list_col, n))} 

We shall define the number of steps taken by the number to reach as .

So,
collatz_number(2)=1 ( = 1)
collatz_number(3)=3, 10, 5, 16, 8, 4, 2, 1 ( = 8)
collatz_number(5)=5, 16, 8, 4, 2, 1( = 6)
collatz_number(7)=7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1( = 16)
collatz_number(11) =11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1 ( = 15)
collatz_number(13)=13, 40, 20, 10, 5, 16, 8, 4, 2, 1 ( = 10)
collatz_number(17)=17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1( = 13)
collatz_number(19)=19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1( = 21)
If we plot the numbers versus the number of steps it took to get to , we get the following plot,

Which is an increasing series, as per the Wikipedia article[1], have a look at this [3] to have a more clear idea.
The picture below also agrees to our finding,

One interesting observation is how HUGE numbers appear in the sequence. For that, I thoughtlessly try numbers out on my function,
collatz_number(20) = 20 10 5 16 8 4 2 1.
collatz_number(21)=21 64 32 16 8 4 2 1
collatz_number(22)=22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1
collatz_number(23)=23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1
collatz_number(24)=24 12 6 3 10 5 16 8 4 2 1
collatz_number(25)=25 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1
collatz_number(26)=26 13 40 20 10 5 16 8 4 2 1
collatz_number(27)=27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1
collatz_number(28)=28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1

All the largest numbers in the sequence are made bold. We can clearly see their chaotic nature, but there is never really any chaos, we just don’t look from a broad enough perspective.


5.

I have failed pathetically, at finding a proper proof for the the conjecture. However, I have some points that could be the lines on which someone could work for proving the conjecture. I will mention them in bullet points,
  • The first task is to show that for all positive numbers, there is not a single number that gives rise to a cycle (to know what is a “cycle”, read section 1).
  • Understanding the behavior of steps with increasing or decreasing numbers.
  • Understanding that is usually the universal way of converting any number into an Even number, so I guess, he played the CLEVER trick there.
  • Looking at even and odd as and and finding if they follow a particular pattern. Further, we can convert these Binary strings to Hexadecimal strings and see if there is a possibility of a Collatz conjecture in Alphabetical domain. [Original idea by Pragyaditya Das].

6.

Collatz conjecture is very nice, if you haven’t seen it already, let me point it out to you.

No matter how many time we do and to a system; if we semi-periodically keep pulling from the system; it will eventually lead to .

Collatz conjecture is the simplest mathematical open-problem available; you can explain all your non-math, non-science or non-engineering friends about it; hell! they might even give a noob try to prove it even.


Cheers! with a sad end…

No comments:

Post a Comment