MatrixDevFunnyVideosMusicBooksProjectsAncapsTechEconomicsPrivacyGIFSCringeAnarchyFilmPicsThemesIdeas4MatrixAskMatrixHelpTop Subs
4

Welcome to the first SubMatrix programming competition. For the first problem in the series we are going to start with a classic: Fibonacci.

You can code in any language you like. Each response will be hand-scored by myself on my hardware. The scoring for these competitions will be based on (peak memory usage) * (total process time). Whichever language you choose to use, I will likely be able to test it.

Rule adjustments specific to Fibonacci: Without giving away hints, different solutions can achieve entirely different magnitudes of inputs and outputs, so they can't really be scored on the same scale. Solutions will first be scored on the highest power of 10 input they can process in under 5 seconds on my hardware. Then, within its cohort, a submission will be scored on peak memory * process runtime for the main problem.

A consumer-grade GPU will be available in the environment for those who wish to make use of it.

Problem Specification:

Create a program that reads a series of newline-separated numbers as input. The program can choose to read inputs either from stdin or from a file named input.list. The program will output the sum of the Fibonacci values associated with those inputs.

Assume the standard Fibonacci definition: F(0)=0, F(1)=1, F(2)=1, F(3)=2, F(4)=3, F(5)=5, F(n)=F(n-1)+F(n-2)

For example, given the input:

5
3
7

The output should be: 20

Scoring structure:

For the first round, the program will be fed successively larger powers of 10 (10^1, 10^2, 10^3) until it can't produce a result within 5 seconds. The last successful input will be termed the program's cohort number, or CN.

For the second round of scoring, the program will be fed 30 random numbers ranging between CN/10 and CN. Programs in the same cohort will be fed the exact same sequence. The solution will be scored by peak memory * process runtime

When submitting a solution, please let us know what level of assistance was used (e.g., AI-assistance, research, or independent).

Comment preview