# Collatz, striking visualization of binary density for 3x + 1 operation!

:!: :?: :!: “OMG”, holy cow, this is a very simple exercise banged out minutes ago yet has an incredibly striking result, never-before-seen, not documented anywhere afaik, and its the kind of utterly basic yet significant exercise with 2020 hindsight wish was done ~2½ decades ago when starting out on collatz analysis. feel very dumb saying this, but its totally unexpected and has me aghast for the moment. it seems to be a excitingly critical piece of the puzzle if not an astoundingly pivotal aspect. kicking myself!   :? :o :evil: ^^’ o_O

this simply looks at the density of 1s in the binary representation of a f(x) = 3x + 1 operation, with input and output density plotted on a graph, for a range of randomly sampled starting numbers of varying density having 500 binary positions (bits). it shows the 3x + 1 operation contrary to expectation does not at all scramble the density as (utterly naively!) expected and in fact basically preserves it in a highly correlated, near-linear, sigmoidal-like fashion. 2000 astonishing points in a scatterplot. the idea came about thinking some on the density view/ angle in the last batch of posted experiments (near the end).

```def d(l)
return l.select { |x| x }.size.to_f / l.size
end

def d2(x)

return d(x.split('').map { |x| {'0' => false, '1' => true}[x] })
end

z = 500
a = (0...z).to_a

m = 2000
m.times \
{
|x|
c = (x.to_f / m * z).to_i

n = ('0' * (z - 1)) + '1'
a2 = a.dup.shuffle
c.times \
{
|j|
n[a2[j], 1] = '1'
}
puts([d2(n), d2((n.to_i(2) * 3 + 1).to_s(2))].join("\t"))
}
```

# Grothendieck 1928-2014 — Genius or Crank? BOTH!

hi all. Grothendieck showed up on my cyber radar more lately and it was an interesting coincidence/ synchronicity to have mentioned/ cited him in a se number theory chat room shortly before he died. now there is much great writing on him circulating, and have collected many highlights here. have been reading the excellent Notices of AMS for many years and found several excellent accounts/ writeups there.

its been very busy in math world lately with the breakthrough prize ceremony and related publicity, and discovered that Grothendieck died roughly right as was writing the last math blog on the breakthrough prizes. Grothendieck is a singular, stunning, towering historical character in the large variegated/ wondrous mathematical pantheon.

alas, full disclosure, his math is far over my head (“whoosh”), but he was a mathematician’s mathematician, and said to be one of the most influential of the 20th century. so in ones appreciation for mathematics, one is sure to run across him.

(update: a vulnerable admission in excellent company. Gowers quickly responds! “I admire him greatly, but from a position of considerable ignorance…”)

# joy of code 2014, imitation game with Turing, more diverse zeitgeist

hi all. seems like only a blink since the 2013 compilation. its been a very eventful/ buzzing year in coder/ CS world. these links are an attempt to capture some of the zeitgeist.

its definitely never a dull moment in the IT/CS field and these links attest to that.

the hollywood angle continues with the release of the major motion picture Imitation Game about Turing in WWII, a big deal which this post is timed with. releases in a week. have long thought this would make a brilliant movie and amazed it took hollywood so long to seize on it. certainly understandably, movies with mathematicians in the lead roles are rather rare, but WWII movies are a dime a dozen… starring Benedict Cummerbatch and Keira Knightly, both stars possibly at the very top of their careers. [a]

# star-studded, cash-overflowing 2015 breakthru prizes

:star: :star: :star: hi all. the glitzy star-studded 2015 breakthrough prize ceremony ran Nov 10th. incl two notable stars Cameron Diaz and Benedict Cumberbatch. coincidentally Cumberbatch stars as lead role in a new movie about Turing called “Imitation Game” costarring Keira Knightly and opening in major theaters at end of November. cant wait to see that movie! have a huge pile of links on that too & am gonna bang those out and share those in a bit. (wonder if Keira might have some thing for science given her other major recent movie Dangerous Method about birth of psychology with Freud/ Jung). Diaz was just in two major hilarious comedies that have absolutely nothing to do with computer science eg “The other woman” about marital infidelity and costarring Kate Upton. oh wait, maybe the other one actually does! “Sex tape” has lots of geek jokes about inadvertently uploading a personal video to the internet cloud via ipads and the hijinx that ensue. saw it (after waiting patiently and with anticipation for months to get it on itunes store), laughed a lot, thought it was decently written & acted.

as written in my last blog on the subj, there is a lot of mixed feeling in scientific communities about these awards and imho justifiably so. by some measures its been over a century since there was a major “celebrity scientist” eg Einstein. my feeling is, lets accept these awards with some good humor and not overthink it & not take it all too seriously. science has many challenges in the 21st century and one of the main ones is obtaining steady government commitment and funding in the face of budget stresses and squeezes (and sometimes crises). but that is a much bigger problem than a bunch of tech billionaires can solve. (and thank god a few manage to get through the capitalist darwinian winner-take-all rat race with a bit of philanthropic conscience intact.) they are well-meaning and have high profiles and can indeed increase the visibility and cachet of science through these awards. there might be some “unintended side effects” but life goes on eh?

# collatz reverse tree traversal/ visualization revisited

happy 2nd anniversary to this blog! :star: :!: :cool: :D returning to a theme of collatz reverse tree visualization. a bunch of riffs and some other misc ideas tried out recently. nothing spectacular (in bland contrast to the last flashy-but-semimanic episode) but just posting these partly for archival/ log purposes. (brief related news, got some positive feedback on the subj on mathoverflow.)

these algorithms use more complex comparison metrics, a few quadratic complexity instead of linear complexity, to decide which points to advance next. they exhibit transition-point and tipping-point like behaviors where eg there are two different regimes, one where points are scattered between horizontally increasing lines and one where they line up in “fenceposts” (vertical). (they also fix a defect noted in that earlier code where some additional spurious points (not strictly in the collatz problem) were included.)