Git Product home page Git Product logo

collatz_finder's Introduction

colfind

Archive

Reason

Note

This repo is in maintenance hiatus/stasis.

Intro

This allows any human to aid in the search for a counter-example that disproves the Collatz Conjecture.

However, currently, this repo is just for learning purposes.

Usage

Important

Expect breaking API changes at literally any time.

I won't provide support for anything, but you can ask questions if you're curious about stuff.

This isn't meant for production environments, at all.

I won't publish it to any package repository.

Install:

cargo install --git https://github.com/Rudxain/collatz_finder.git

ℹinfo:

colfind help

FAQ

"What to do if I find a counter-example?"

This is not a stupid question! I would also not know what to do in one of the most epic moments in the history of math and CS!

I suggest you to post your results everywhere! except Wikipedia. To make people take you seriously, you must post the numeral that disproves CC. It'll be H U G E , so I recommend posting a gist containing the full numeral, and then share links to that gist.

Tip for smaller size: hexadecimal is more compact than dec, raw-binary is more compact than hex. If you use hex or raw, disambiguate endianness.

Another tip, ensure nobody else takes credit for it. I know that sounds egotistical, but nobody wants to give countless hours of computing power for free, am I right?

Features

Note

The program assumes that numbers don't diverge to +♾️, it only searches cycles. So it could enter an infinite loop that allocates increasingly more memory, until an OOM panic happens.

It supports negatives. It also supports multiple bases/radices (not anymore, sorry 🙁, I might fix it later).

The rationale behind radix support, is that CC is more interesting and helpful to explore/experiment in bases 2 & 3 and any other base whose factors are 2 and/or 3, and bases whose factors are +-1 offset from 2 and/or 3, so I had to add all bases from 1 to 10 (and hexdec, because it's binary in disguise)

See also

My blog

collatz_finder's People

Contributors

rudxain avatar

Watchers

 avatar

collatz_finder's Issues

Use env vars as cache

By using environment variables, users can change the values of lim_pos and lim_neg persistently, and a future version of the program with --search functionality could use it as memoization/cache

Range parallelism?

extremely related to #6 .

Is it possible to accelerate range-search by using multiple cores?

I have 2 implementation ideas (both are essentially the same concept):

Magnitude-based sync. All cores will skip n odd ints, where n is the number of cores. Each core is offset by c, where 0 <= c < n. When the ints they're checking increase in magnitude (1 bit more), each core waits for the other cores to get to the same magnitude level, after that happens, they save the progress to memory (lim_pos & lim_neg) and storage-based cache.

Loop unrolling technique. This works exactly the same as above, but in steps of m, rather than magnitudes. m should be 1 <= m <= 0x100

Table Optimization

See this post

For better performance, it should store the table in a file, so the table isn't computed for every call to the program. The file may also store multiple tables (each with a different size). Maybe there should be a directory where each file is its own table.

I don't know where to place these files

Add `stdin` support

This is crucial to have a fast way of checking files or random data from /dev/urandom. It can have a REPL mode for humans, and a "direct" mode for programs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.