> The points look quite uniformly distributed to me. If I squint, then maybe I can see some structure, but it's hard to describe and I could be imagining it.
It doesn't, these points look like what happens if you ask someone who doesn't know what a uniform distribution looks like to generate a uniformly distributed set of points though.
Credit to the book "Struck By Lightning" for making me aware of this fact, many years ago now. Disclaimer that the author is a family friend.
Edit: I misunderstood what was being plotted in the article, and as a result had claude plot random instead of evenly spaced X coordinates. It doesn't change my point, but this version has the appropriate distribution to compare to (evenly spaced x, uniformly randomly y coordinates): https://claude.ai/public/artifacts/a04a3023-25d3-4d99-889d-a...
"Uniformly distributed" doesn't just mean sampled from a uniform distribution.
It also means evenly spaced, as is the case here. It reminds me of Poisson disk sampling. Here's an article about Poisson disk sampling that uses "uniform" in the sense the author is, and also compares to the uniform probability distribution: https://medium.com/@hemalatha.psna/implementation-of-poisson...
Really the germane point isn't that it isn't specifically a uniform distribution, but that there is clearly structure to the distribution of those points. The locations are visibly not a set of IID random variables, because IID random variables don't space out that... uniformly.
That said, while I agree "uniform" not followed by an inflection of "distribution" has many other meanings, I do not agree that it the context of math, in a context where there is a standard uniform distribution, and without other relevant context, "uniformly distributed" can properly be understood to mean anything other than distributed via the standard uniform distribution.
For what it's worth, I thought "uniform" was a fine description - as you zoom out, the pattern looks more organised and less random. That is a property of uniform distributions.
Irrational rotations of a torus are uniformly distributed and closely resemble the image from the blog. The images you linked, on the other hand, are random sequences with positive entropy (which are also uniformly distributed). Confusing these two things is what happens when someone without the necessary expertise tries to sound smart.
Here is a python script that plots on the Z axis - each number through an entire Collatz cycle until the result of 1, on the X axis - the number of cycles needed to get to 1, on the Y axis - add 1 for odd numbers, subtract 1 for even numbers.
https://gist.github.com/bwanaaa/4c77b33311916b230c8b1891bab4...
You can open it in colab to visualize it.
You can change the range of integers by modifying line 33 in the function
def generate_all_sequences():
Interestingly, it seems there are more odd numbers than even ones in a collatz sequence as all graphs tend to the positive Y axis.
All numbers tend to generate 3x as many odd results as even and they all seem to do this at this same rate.
In the first 750 integers, the number 703 reaches as high a collatz result as 250504.
As for the randomness, I have wondered if Collatz sequences are somehow related to the properties of a common prng with multiplier 3/2, infinite length state vector, and mod 2 on the output with this formula: https://en.m.wikipedia.org/wiki/Linear_congruential_generato.... I assume this could be part of what makes the conjecture both interesting and difficult and beautiful.
Very cool to see there is some patterns hiding in the randomness too!
Interesting take. The visualization of the inverse tree highlights just how sparse the “preimage space” is under Collatz iterations. The idea that this sparsity contributes to the apparent randomness is compelling. I’m curious whether modeling the process modulo powers of 2 and 3, or via 2-adic analysis, could formalize some of these heuristic observations. Also, the assumption that most numbers “fall off” rapidly aligns with empirical behavior, but it’s still not clear how to bound exceptional trajectories.
> I've been telling people for years if businesses want employees to have better ideas, they should have more showers in their offices. So far everyone seems to think I'm joking. I'm not.
I have definitely noticed that some of my best ideas or breakthroughs come to me when showering, or sleeping, or eating, or driving, or doing the dishes, or basically any mundane autopilot task where my mind is free to wander. But yeah no, having a shower room in the office is both gross and weird. Maybe offices should.. encourage you to... wash some dishes?
I've worked in an office with a very nice (clean, private, towels and soap dispensers provided) shower. Actually two (in separate rooms). And taken showers in them. It definitely was not gross, nor do I think anyone thought it weird, nor was I the only person who used them.
After a bicycle commute to work though, not randomly during the day.
Still going to disagree... these are effectively equivalent to the bathrooms you would see in the average house. Designed for purpose of course (e.g. no tub, and a rack of rolled towels instead of a place to hang them).
If they were communal ones like you'd see in many gyms I'd see your point. Or if they weren't very well cleaned. But this was just... convenient and nice. Apart from enabling more active transport to work, I don't think anyone thought twice about them.
The office was technically multifloor, 2. Probably a few hundred people in the office on an average day (no clients, just employees). Solely in use by the company I was working for.
Most places I work have a shower - albeit not just off the main office. Usually part of the building infra. It's great if you cycle to work for example or play sport at lunchtime. It's a good thing if well placed.
Talking about shower thoughts on Collatz visualizations..
A while ago I though of a way of structuring the collatz orbits by arranging integers in a 2d grid with odd numbers being arranged along the X axis and multiples of the power of two along the Y axis.
So essentially any odd number n and all numbers n * 2^m belong to the same group of numbers that eventually reduces to n. All that's left is the 3n+1 orbits which are shown as lines from the odd numbers.
This reveals quite a bit of structure (IMO) especially only every second odd number goes to an orbit reducing to an odd number larger than it (and it's always in the form n * 2^1) all the other orbits every 4th, 8th, 16th odd integer immediately reduce to an odd number that's lower.
Anyone seen an arrangement like this for the Collatz orbits?
Just wanted to chime in and say that's a really interesting visualization of the conjecture, I haven't seen it before (and I have wasted more than a few hours on this problem).
> The points look quite uniformly distributed to me. If I squint, then maybe I can see some structure, but it's hard to describe and I could be imagining it.
It doesn't, these points look like what happens if you ask someone who doesn't know what a uniform distribution looks like to generate a uniformly distributed set of points though.
Here's what an actual uniform distribution looks like... much less "uniform": https://claude.ai/public/artifacts/00549caf-2ec1-4803-b909-6...
Credit to the book "Struck By Lightning" for making me aware of this fact, many years ago now. Disclaimer that the author is a family friend.
Edit: I misunderstood what was being plotted in the article, and as a result had claude plot random instead of evenly spaced X coordinates. It doesn't change my point, but this version has the appropriate distribution to compare to (evenly spaced x, uniformly randomly y coordinates): https://claude.ai/public/artifacts/a04a3023-25d3-4d99-889d-a...
"Uniformly distributed" doesn't just mean sampled from a uniform distribution. It also means evenly spaced, as is the case here. It reminds me of Poisson disk sampling. Here's an article about Poisson disk sampling that uses "uniform" in the sense the author is, and also compares to the uniform probability distribution: https://medium.com/@hemalatha.psna/implementation-of-poisson...
Really the germane point isn't that it isn't specifically a uniform distribution, but that there is clearly structure to the distribution of those points. The locations are visibly not a set of IID random variables, because IID random variables don't space out that... uniformly.
That said, while I agree "uniform" not followed by an inflection of "distribution" has many other meanings, I do not agree that it the context of math, in a context where there is a standard uniform distribution, and without other relevant context, "uniformly distributed" can properly be understood to mean anything other than distributed via the standard uniform distribution.
The notion of being uniformly distributed has a very specific meaning in mathematics [1]. If you don't believe me, maybe you believe Tao [2].
[1] https://en.m.wikipedia.org/wiki/Equidistribution_theorem
[2] https://terrytao.wordpress.com/2020/01/25/equidistribution-o...
For what it's worth, I thought "uniform" was a fine description - as you zoom out, the pattern looks more organised and less random. That is a property of uniform distributions.
https://bookdown.org/kevin_davisross/probsim-book/sec-linear...
Irrational rotations of a torus are uniformly distributed and closely resemble the image from the blog. The images you linked, on the other hand, are random sequences with positive entropy (which are also uniformly distributed). Confusing these two things is what happens when someone without the necessary expertise tries to sound smart.
The author invented a new low discrepancy sequence generator
Here is a python script that plots on the Z axis - each number through an entire Collatz cycle until the result of 1, on the X axis - the number of cycles needed to get to 1, on the Y axis - add 1 for odd numbers, subtract 1 for even numbers. https://gist.github.com/bwanaaa/4c77b33311916b230c8b1891bab4...
You can open it in colab to visualize it. You can change the range of integers by modifying line 33 in the function def generate_all_sequences():
Interestingly, it seems there are more odd numbers than even ones in a collatz sequence as all graphs tend to the positive Y axis. All numbers tend to generate 3x as many odd results as even and they all seem to do this at this same rate.
In the first 750 integers, the number 703 reaches as high a collatz result as 250504.
As for the randomness, I have wondered if Collatz sequences are somehow related to the properties of a common prng with multiplier 3/2, infinite length state vector, and mod 2 on the output with this formula: https://en.m.wikipedia.org/wiki/Linear_congruential_generato.... I assume this could be part of what makes the conjecture both interesting and difficult and beautiful.
Very cool to see there is some patterns hiding in the randomness too!
Interesting take. The visualization of the inverse tree highlights just how sparse the “preimage space” is under Collatz iterations. The idea that this sparsity contributes to the apparent randomness is compelling. I’m curious whether modeling the process modulo powers of 2 and 3, or via 2-adic analysis, could formalize some of these heuristic observations. Also, the assumption that most numbers “fall off” rapidly aligns with empirical behavior, but it’s still not clear how to bound exceptional trajectories.
Awesome! Now, what about plotting in 3D? with the coordinates of (f_n, f_{n+1}, f_{n+2}) ?
> I've been telling people for years if businesses want employees to have better ideas, they should have more showers in their offices. So far everyone seems to think I'm joking. I'm not.
I have definitely noticed that some of my best ideas or breakthroughs come to me when showering, or sleeping, or eating, or driving, or doing the dishes, or basically any mundane autopilot task where my mind is free to wander. But yeah no, having a shower room in the office is both gross and weird. Maybe offices should.. encourage you to... wash some dishes?
I've worked in an office with a very nice (clean, private, towels and soap dispensers provided) shower. Actually two (in separate rooms). And taken showers in them. It definitely was not gross, nor do I think anyone thought it weird, nor was I the only person who used them.
After a bicycle commute to work though, not randomly during the day.
Taking a wild guess, was this at Fog Creek / Stack Overflow?
That last 3 companies I've worked for have had this. 2 FAANGs and 1 mid size, household name, tech company.
Nope, Bay Area not NYC.
Depends. In skyscrapers with multifloor offices, sure. Regular small-ish offices, the showers would be too proximal for comfort.
Still going to disagree... these are effectively equivalent to the bathrooms you would see in the average house. Designed for purpose of course (e.g. no tub, and a rack of rolled towels instead of a place to hang them).
If they were communal ones like you'd see in many gyms I'd see your point. Or if they weren't very well cleaned. But this was just... convenient and nice. Apart from enabling more active transport to work, I don't think anyone thought twice about them.
The office was technically multifloor, 2. Probably a few hundred people in the office on an average day (no clients, just employees). Solely in use by the company I was working for.
Sinks where you wash dishes tend to be far more dirty than any shower.
Having showers at work is awesome, it means you can take a proper bike ride to work, and freshen up.
Most places I work have a shower - albeit not just off the main office. Usually part of the building infra. It's great if you cycle to work for example or play sport at lunchtime. It's a good thing if well placed.
What's the trick to finding it?
Finding a job with an office with a shower? Guess it is luck lol
I think that the shower just slows your brain down just enough to get into flow. I've found that walking and driving do the same for me as well.
Talking about shower thoughts on Collatz visualizations..
A while ago I though of a way of structuring the collatz orbits by arranging integers in a 2d grid with odd numbers being arranged along the X axis and multiples of the power of two along the Y axis.
https://gist.githubusercontent.com/ginkgo/13121db56b65b1237e...
So essentially any odd number n and all numbers n * 2^m belong to the same group of numbers that eventually reduces to n. All that's left is the 3n+1 orbits which are shown as lines from the odd numbers.
This reveals quite a bit of structure (IMO) especially only every second odd number goes to an orbit reducing to an odd number larger than it (and it's always in the form n * 2^1) all the other orbits every 4th, 8th, 16th odd integer immediately reduce to an odd number that's lower.
Anyone seen an arrangement like this for the Collatz orbits?
Just wanted to chime in and say that's a really interesting visualization of the conjecture, I haven't seen it before (and I have wasted more than a few hours on this problem).
[flagged]