Skip to content

khuldraeseth/zeckendorf-sequences

 
 

Repository files navigation

Generator for Simple Zeckendorf Sequences

Tony Bai
July 14, 2019

Inspiration

Annie asked me to help her develop an algorithm to generate Simple Zeckendorf Sequences in 2 dimensions. The definition for such sequences can be found in a mathematical paper from Williams College titled Gaussian Behavior In Zeckendorf Decompositions From Lattices by Chen et al. The following image is taken from the paper, and shows the first 45 entries of the two-dimensional sequence.

How to Run This Program

  1. Download this repository and navigate to it in terminal
  2. Compile the C++ file with g++ zeckendorf.cpp -std=c++11 -o bin/zeckendorf
  3. Run the executable with ./zeckendorf
  4. Follow the prompts

Example:

Issues & Limitations

It seems like the program can only execute reasonably fast (under 20 seconds) on my computer for up to about 23 rows as of now.

Extensions

If you want to implement this algorithm for higher dimensions or optimize it, feel free to read & edit zeckendorf.cpp. It should be clear how to implement this algorithm for 3 or more dimensions -- it would involve more nested vectors, but the idea behind the algorithm is the same.

About

Generator for Simple Zeckendorf Sequences

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%