Patterns: Collatz Conjecture

student
Preview of Patterns: Collatz ConjecturePreview of Patterns: Collatz Conjecture

About this model

This diagram is a simulation of the Collatz conjecture, a mathematical sequence that is intriguing due to its simple rule set yet unpredictable behavior. The core of the diagram is a register that applies the classic Collatz operation: for any number (n), if (n) is even, the next number is (n / 2), but if (n) is odd, the next number is (3n + 1). This operation continues for each number generated, leading towards the conjecture's hypothesis that no matter the starting number, the sequence will eventually reach 1.

The diagram begins with a source node that generates a random seed (using a die roll simulated by (D100)) to initiate the sequence, input into a pool labeled "Value." This value is then subjected to the Collatz operation through the register, and the sequence progresses as resources move between pools, simulating each step of the sequence ("Value," "Temp," and "Total"). Connections ensure the continuous flow and transformation of resources, performing the necessary operations at each step and accumulating the total number of steps in a separate pool. The end condition node might be utilized to halt the simulation once certain criteria are met, such as reaching the number 1, illustrating the conjecture's hypothesis in action. Through this dynamic interaction and resource manipulation, the diagram serves as an educational tool to visualize and understand the behaviors of the Collatz conjecture over multiple iterations.

“Patterns: Collatz Conjecture” is a diagram in the Machinations Community by student.

You can open the original diagram in the Machinations app, press Play to watch how resources move through it, and change its values to see how the system responds. Machinations is a visual tool for designing, simulating and balancing game economies and other systems, where resources flow through sources, pools, drains, converters and gates. In a diagram, a source creates resources, a pool stores them, a drain removes them, a converter changes one resource into another and a gate decides where they go next.