Collaptz is an open computational task, a collaborative verifiable system, to empirically verify the Collatz conjecture.
The computational integrity we obtain from running part of the computation in a zkVM allows to trustlessly distribute the computation, thereby allowing contributions from public/untrusted participants.
A Collatz sequence begins with a positive integer. The sequence follows two simple rules: if the current number is even, it is divided by two; if it is odd, it's tripled and increased by one.
The Collatz conjecture proposes that no matter the starting integer, the sequence will inevitably reach one.
Why?
While the conjecture has been heavily studied, sequences have explored up to
Useful patterns and surprises might lie within this computation.
cd collatz-api
# python -m venv .venv # create a virtual environment
source .venv/bin/activate
pip install pip-tools alembic
pip install -r requirements.txt
Also ensure that docker and docker-compose are installed.
Create .env file with full DB_URL
docker-compose up -d db
make migration
make migrate
make run
Compile the Rust program on risc0 zkVM, run it and generate the proof of computational integrity. After the computation is complete, it will be uploaded to the storage layer via HTTP API.
cd collatz-risc0/examples/collatz/
cargo run
pip install -e .
Spin up a Frontend for live visualization of the newly computed sequences.
python frontend/dashboard.py
Check out the following pages for even cooler visualisations of Collatz sequences:
A NFT of the resulting public computation will be offered in auction late 2023. You can think of a progressive sequence generation as a form of generative art!