## Experimenting with the Collatz Conjecture and C#’s GC

# For those new to the Collatz Conjecture

## EDIT: Commented the latex tabular code. Get it here.

More after the break.

Upcoming: split the child propagation into its own thread, then create a second thread that reads from true queue top down to current, and writes to file. It will eventually get IO bound, though, so perhaps I’ll just add a second queue and batch write calls on the popped elements once it’s closing on some memory limit. Anyone have a better suggestion than XML for… really large columns of data? Not that I’ll be able to touch the upper limit of (see here). For giggles, if you will.

The program pops a value off the queue (in the initial case, 1) and tries to create both children- and , provided in the second case, that . As expected, the number of values grows somewhere under the order (if each number could be formed by both dividing by two and ALSO by multiplying by three and adding one, then there would be 2 points added per child per iteration- ).

The log2 view:

Test run halted after calculating 125,000,000 numbers. Table formatting + pictures created with python utilities; I’ll pastebin the code eventually (**EDIT: here**). Most of them are available in my stats blog (chapter 1, in this case).

Table!

## Leave a Reply