My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
DesignSummary  
Updated Sep 10, 2010 by doctorsmite

Project:

Find maximum 3n+1 solutions in multiple ranges of numbers, using a cache to speed up the computation. These functions will be implemented in Java and Python.

Input:

Receives 2 numbers, which specify the range from where to find the cycle lengths.

Cache:

It's a simple array which stores as a value the number of cycles to complete the 3n+1 problem for each index which has been visited earlier in the program.

Evaluate:

Runs a cycle-counter on every number between the two input numbers, using the cache to substitute values for redundant cycle calculations. The maximum cycle length is saved through the loop and eventually returned.

Output:

The two numbers from the input and maximum cycle length is outputted.

Powered by Google Project Hosting