News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

MASM64 and the Collatz Conjecture

Started by Gunther, March 12, 2022, 08:28:30 AM

Previous topic - Next topic

Gunther

The attachment to this post is the archive collatz.zip. It is about the so-called Collatz conjecture. The necessary details are contained
in the file collatz.pdf. It's part of the archive.

I've assembled the source with ml64. When you start the program collatz.exe, the screen should show something like this.


***********************************************
* The start is an arbitrary natural number N. *
* The input needs no periods and commas.      *
***********************************************

Please make your input:     5
Your start value is: N(0) = 5
It's an odd  number.

This leads to the following Collatz Sequence:
---------------------------------------------

N(1) = 16
N(2) = 8
N(3) = 4
N(4) = 2
N(5) = 1

Done.


I would be glad to hear about your experiences with the test values. But I'm most interested in whether the text in collatz.pdf is understandable and clear.

Many thanks in advance.
You have to know the facts before you can distort them.

HSE

Hi Gunther!

I think:

  • was the first to formulate the task in 1937
  • of the 20th Century (but I don't know, just look strange with a point)
  • In 2019 Terence Tao attempted

Very interesting.

Regards, HSE
Equations in Assembly: SmplMath

Gunther

HSE,

thanks for proofreading the whole paper.  :thumbsup:

Quote from: HSE on March 12, 2022, 09:26:41 AM

  • was the first to formulate the task in 1937
  • of the 20th Century (but I don't know, just look strange with a point)
  • In 2019 Terence Tao attempted

True. I've already fixed that. However, I'll wait a little bit more before I post the corrected archive. Maybe other members will find further errors, who knows?

Quote from: HSE on March 12, 2022, 09:26:41 AM
Very interesting.
I would certainly hope so. Was the text understandable so far? After all, it's not exactly easy terrain.
You have to know the facts before you can distort them.

daydreamer

I read it and is a theory related to black hole?
Any use in some particle physics?
For example fibonnaci can be used in creating things in nature, in sunflower places for seeds similar to fibonnaci columns and fibonnaci+1 rows

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

Gunther

Daydreamer,

first things first. Thank you for reading the article and for posting.

Quote from: daydreamer on March 12, 2022, 08:56:32 PM
I read it and is a theory related to black hole?

I am not entirely sure, but would answer with no.

Quote from: daydreamer on March 12, 2022, 08:56:32 PM
Any use in some particle physics?

The same answer as above.

Quote from: daydreamer on March 12, 2022, 08:56:32 PM
For example fibonnaci can be used in creating things in nature, in sunflower places for seeds similar to fibonnaci columns and fibonnaci+1 rows

Well, fibonacci sequences has been a source of fascination for mathematicians and hobby mathematicians since many centuries. That's a whole other question.
In contrast, the Collatz sequences are still very young. I can only repeat what I wrote on page 1 of collatz.pdf:

Quote
That' s not just a cool party trick or a crackpot story. The Collatz conjecture has connections to the number theory, the theory of dynamical systems,
the ergodic theory and also to questions of computability.

I think you won't be satisfied with these answers. But I can't give you any others at the moment. Maybe just this thought. However, the proof attempts
of the conjecture - especially that by Terence Tao - shake the whole fundament of mathematics. The reason for this goes back to the 19th century and
has to do with Leopold Kronecker, whom I quoted in a footnote on page 1 of the paper.

But that is beyond the scope of this topic. I wrote a paper on this years ago entitled Hilbert's Dream - however, only in German. I would have to
completely revise, update and translate it. But who the hell cares? I probably won't go to that trouble.
You have to know the facts before you can distort them.

Gunther

Greenhorn,

thank you for your corrections of the text. I've almost all of them integrated. You've been a great help to me. :thumbsup:

But I will wait with the archive's update. It's very likely, that the native speakers will find more inelegant phrases.

In the past, dedndave often helped me with such things very altruistically. He was a very diligent poster, but hasn't been active for many months. His last
login was May 3, 2021. I don't know why he lost his interest in the forum. I just have a suspicion about that. In any case, I miss him a lot - and not just
for the proofreading.
You have to know the facts before you can distort them.

Greenhorn

Gunther,

you're welcome.

I would also express the last sentence of the document in this way:
Beyond this, the number range [value range] will overflow.

But as I mentioned, English is not my mother language and I hope I didn't put too many "Verschlimmbesserungen" in it.  :mrgreen:
Kole Feut un Nordenwind gift en krusen Büdel un en lütten Pint.

Gunther

Greenhorn,

Quote from: Greenhorn on March 13, 2022, 02:35:41 AM
But as I mentioned, English is not my mother language and I hope I didn't put too many "Verschlimmbesserungen" in it.  :mrgreen:

I know that you are not a native speaker. But your corrections were all accurate so far and I've therefore included them in the text.

By the way, what tool did you use to convert the PDF file into an ODT file? It's quite strange which metamorphoses some files can run through.
In this case, it was like that:

  • It started with a collatz.tex file. That' s a pure ASCII file, which can be displayed with any halfway working editor.
  • This text is compiled with Latex and - among others - a file collatz.dvi is created. DVI stands for device independent
    and you need a DVI viewer to show it. This is part of the latex installation, but who else uses this?
  • With the utility dvips I therefore created the file collatz.ps from it. But who has a Post Script Viewer immediately
    available? Moreover, PS files tend to be outrageously large.
  • But Post Script and PDF have the same technological base. Using the GhostView application from my GhostScript
    installation, I created collatz.pdf at the end.
All this takes only a few seconds, because I wrote a batch file for that. Now even a collatz.odt has been created; that's strange, very strange.
You have to know the facts before you can distort them.

avcaballero

I have checked it for 5 and 16 and it seems to work ok for both of them:

Please make your input:     5
Your start value is: N(0) = 5
It's an odd  number.

This leads to the following Collatz Sequence:
---------------------------------------------

Press any key to continue...

N(1) = 16
N(2) = 8
N(3) = 4
N(4) = 2
N(5) = 1

Done.


Please make your input:     16
Your start value is: N(0) = 16
It's an even number.

This leads to the following Collatz Sequence:
---------------------------------------------

Press any key to continue...

N(1) = 8
N(2) = 4
N(3) = 2
N(4) = 1

Done.

Greenhorn

> By the way, what tool did you use to convert the PDF file into an ODT file?

I just copied the text from the PDF-Viewer and pasted it into TextMaker.  :biggrin:
Of course, the formatting was here and there broken.
I chose *.odt because I wasn't sure if *.docx will arrive as an attachment.
Kole Feut un Nordenwind gift en krusen Büdel un en lütten Pint.

Gunther

Caballero,

Quote from: caballero on March 13, 2022, 06:32:06 AM
I have checked it for 5 and 16 and it seems to work ok for both of them:

I sincerely hope so. But you can of course use larger values, perhaps those from p. 3 of collatz.pdf. With the start value 989 345 275 647 you have after 2 seconds
all the 1348 approximations on the screen. But you have to keep in mind that the used vc_printf from the Windows RTL isn't really race car class.
You have to know the facts before you can distort them.

Gunther

Greenhorn,

Quote from: Greenhorn on March 13, 2022, 06:44:01 AM
I just copied the text from the PDF-Viewer and pasted it into TextMaker.  :biggrin:
ah TextMaker. Do you mean this one?

Quote from: Greenhorn on March 13, 2022, 06:44:01 AM
Of course, the formatting was here and there broken.
Yep, that sounds pretty brutal to me too. But it works reasonably well and that's the key point.

Quote from: Greenhorn on March 13, 2022, 06:44:01 AM
I chose *.odt because I wasn't sure if *.docx will arrive as an attachment.
That was just right, since I have LibreOffice installed. This is enough for the letters to the bureaucrats of the authorities. All other texts I write
in latex anyway.
You have to know the facts before you can distort them.

Gunther

The current update is called collatz1.zip and is under the first post of this thread. The collatz.pdf file is now corrected. Very warmly I would like to thank
Greenhorn and HSE.  :thumbsup: :cool:

They proofread the text and found some inaccuracies. Through these improvements the whole problem is now better presented; moreover the reading
flow is improved.

For all other remaining errors - whether these are objective or language-related - of course only I'm responsible. Those two buddies have nothing
to do with that.
You have to know the facts before you can distort them.