Skip to content

Skayyali3/Collatz_Multiverse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collatz Multiverse: A Visualizer and Data Exporter

A high-caliber tool that explores the 3n + 1 problem, but with a twist of allowing users to replace the multiplier (3) and modifier (+1) with a number of their desires in the format qn+r and test any number besides 0 on them.

Inspired by: The Collatz Multiverse by carykh on YouTube


Note: entered numbers lose precision as they become more unspeakably high

To test unspeakably high numbers accurately or see the Research behind this project: Click Here


Features Special to this Tool

  • Allows users to enter any number they want besides 0 to form their own conjectures in a $qn+r$ format

  • Allows users to test any number they want besides 0 on their $qn+r$ conjecture

  • There exists a CLI version that also provides the name of the loop your tested number has fallen into

  • You can continue Simulation past one


Features found in both Collatz Standard and Collatz Multiverse GUIs:

  • Algorithmic Calculation: Fast processing of the Collatz sequence for any integer, positive or negative

  • Interactive Visualization: Generates dynamic line graphs using Matplotlib to show the hailstone peaks and valleys.

  • Data Export: Utilizes Pandas to serialize sequence data into a .csv file for external analysis in Excel or SQL.

  • Adaptive Logarithmic Scaling: Automatically switches to $Log_{10}$ visualization for unspeakably high numbers to prevent hardware overflow and maintain graph readability.

  • Loop Detection using Floyd's Algorithm

  • Maximum of $10^{64}$ for memory safety


Technologies Used for GUI:

Programming Language: Python

Libraries Used: Tkinter, Pandas and Matplolib

Concepts: Data Engineering Pipelines, State Management, Mathematical Modeling.


Technologies Used for CLI:

Programming Language: Java

Library Used: Java Standard Library

Packages Used: BigInteger, Scanner, Collections, Collectors, ArrayList, List, FileWriter and PrintWriter

Concepts: Mathematical Research, Data Engineering Pipelines, Mathematical Computation

How to Run:

1. Clone the repository and enter:

git clone https://github.com/Skayyali3/Collatz_Multiverse.git
cd Collatz_Multiverse

2. Do the following steps to run the:

- I GUI:

1. Enter the GUI directory

cd GUI

2. Make a virtual environment

    python -m venv venv

    source venv/bin/activate # Linux/macOS
    venv\Scripts\activate # Windows

3. Install the needed requirements

pip install -r requirements.txt

4. Run the script

python main.py

- II CLI:

1. Compile the Java source files

javac CLI/*.java

2. Run the script

java CLI.Main

License

This project is licensed under the MIT License – see the license file for details.

Author

Saif Kayyali

About

A high performance tool built to experiment on generalized qn+r formats of the original Collatz conjecture

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors