Thursday, April 18, 2024

Collatz Conjecture, or the 3n+1 Conjecture

I randomly remembered this interesting idea (I didn't want to call it a problem, because readers would think it needs to be solved immediately, or that it is like math homework, or something; it's not that sort of problem at all!) back from when my daughter was in Middle School.  She had just been admitted to what we used to call special activities in our school district, and was really a Title IX program.  We were invited to a seminar at Marywood University, for students and parents entering into special activities, just to show us something different and interesting.  Since then, being in the mathematics racket myself, I have come across it many times.  There are explanations for those who aren't math specialists, but I felt they weren't clear enough, so I'm going to try. 

The Process

The idea is to put a number into a routine calculation; then the number that comes out is put through the same calculation, and the result of that calculation is subjected to the same procedure, until the result is 1.

Are we going to get 1 sooner or later??  This is the million dollar question!  Every number they've started with so far has ended up yielding a 1, and computers have repeatedly subjected every number less than—I don't know, some huge number—to this process, and sooner or later, they do end up at 1.  But this does not mean that no matter with which number you start, you will always end with 1.

 I forgot to explain the calculation!  It's actually very simple. 

Take any number.  (A) If it is even, divide it by 2.  (B) If it is odd, multiply it by 3, and add 1.  That's the whole thing. 

We demonstrate with 5 and 6.  With 5, which is odd, multiply by 3 (which gives 15), and add 1 (which gives 16).  So the calculation always gives an even number of you start with an odd number. 

With 6, which is even, you divide by 2, which gives 3.

An interesting side issue is: how many steps does it take, for any number to get to 1?  One article, at code, a website in France, evidently, has set out this information in a clever way; it is at https://www.dcode.fr/collatz-conjecture

At the bottom of that page is a table.  Along the left of the table—the first column of the table—are the numbers 1, 2, 3, and so on. 

The next box contains all the numbers that end up at 1 in a single step, and that would just be the number 2.

In the second row, the box at the left contains 2.  The box on the right contains all the numbers that lead to 1, in two steps.  One such number is 4, and that's the only one. 

Here is the first eight rows of the table:


I'm going to stop here, and read it carefully, to see whether I can make it more readable by tinkering with the post.

No comments:

Final Jeopardy

Final Jeopardy
"Think" by Merv Griffin

The Classical Music Archives

The Classical Music Archives
One of the oldest music file depositories on the Web

Strongbad!

Strongbad!
A weekly cartoon clip, for all superhero wannabes, and the gals who love them.

My Blog List

Followers