L1VM - 3x1 problem update
I did develop some small programs to use my
init-database program writes
num1 up to
num1000 into the database.
3x1-worker program then connects to the database and removes an entry which is still in the database.
The worker now solves the
3x1 problem. Say we got
10. If the number is even, then divide by two. If it is odd, then multiply by three and add one.
So here we go:
10, 5, 16, 8, 4, 2, 1. For every natural number this should end by
The worker client now saves all calculation steps in the database! So the result of the first step of
10 is named res10-1 and so on.
Now the worker requests a new number. It will continue this until the max loop of 1000 is reached.
You also can run more than one worker at a time!
My l1vmgodata database is written in Go and it’s open source on GitHub. You can set the IP address, the port and the maximum element count. To make the database safe you set up an IP address whitelist in the config file. The database can handle multiple clients at a time. So it can scale up very easy to your needs.
The l1vmgodata database needs about 12.1 MiB RAM to store the
59545 data entries.
The example is in my GitHub repo inside the