# Is there an algorithm which was originally invented to solve a contrived problem but later found practical use?

This is probably a computer science history question.

Is there an algorithm which was originally invented to solve a contrived problem but later found practical use?

• IMO, it occurs more frequently the other way: mathematical methods are invented but remain impractical until an efficient algorithm is found. E.g. FFT, Reed-Solomon error correcting codes.
– user16034
Nov 3, 2022 at 21:09
• @YvesDaoust, what makes you say RS error correcting codes were impractical for a while? Nov 3, 2022 at 21:11
• @kodlu: efficient decoders took a few years to be found. en.wikipedia.org/wiki/…
– user16034
Nov 3, 2022 at 21:35
• @YvesDaoust, fair enough. The way Prof. Welch described it in class [I took another class not Coding theory from Prof. Reed] was that decoding algorithm was inefficient, his notes are still on the wayback machine if you are interested. web.archive.org/web/20100702224041/http://csi.usc.edu/PDF/… Nov 4, 2022 at 2:11
• @kodlu: thanks. I'll be quite interested in a clean procedure to handle the erasures in the Euclidean algorithm for RS decoding :-)
– user16034
Nov 4, 2022 at 7:56

The Ternary Golay Code has parameters $$[n,k,d]_3=[11,6,5]_3$$ and thus is a linear code over $$\mathbb{Z}_3=\{0,1,2\}$$ with $$3^6=729$$ codewords. It is perfect so that all the Hamming spheres of radius $$2$$ around codewords fill the whole space $$\{0,1,2\}^{11}$$ with no gaps left over. This means that the code has covering radius $$2,$$ any ternary string is at most Hamming distance 2 from a codeword.
This code was discovered by a Finnish football (soccer) enthusiast, which gives one a scheme of playing 729 guesses of 11 football matches (1 denotes home win, 0 denotes a draw and 2 denotes an away win) and being guaranteed to guess at least $$11-2=9$$ matches correctly.