Daniel Volya

Daniel

Volya

Collatz Conjecture

in science and tagged numerical

The iteration (or sequence):

n is a positive integer
0.5n if n is even
3n + 1 if n is odd

Wow plots! These were generated by preforming the sequence on a large set of numbers and recording the number of iterations it took to reach 1.

Collatz

Histogram

What's cool is that this sequence is easy to parallelize. Boom, lets use a GPU. The code was written using the native Rust implementation of WebGPU: wgpu.

AMD Nvidia

Read more on Wikipedia.


You may also like:

Matrix Multiplication with GPU

If you haven't checked out alkomp, I would recommend doing so before reading on. This post demonstra…

posted 2020-11-02

Announcing alkomp

Writing highly-parallelized code is non-trival. To aid this dilemma, a variety of "high-level" model…

posted 2020-10-29

Riemannian Geometry in Variational Autoencoders

Real data is often non-Euclidean. The space of 3D rotations, probability distributions on a statisti…

posted 2025-12-15