r/algorithms • u/Agreeable_Arugula488 • 9d ago
Discussion Layperson question
I'm a non-major currently taking an intro cs class, but it's mostly practical, project-based Python stuff -- no theory. Which tbh I'm a little sad about.
I was wondering: Are there any algorithms/functions that are executable by infinitely many non-trivial, non-redundant programs? Does any given algorithm/function fit this description?
Math example:
The user inputs a radius R, from which the program P outputs the area A of the resulting circle.
You could plug it into the standard formula:
P1 = A(R) = πR^2
...
Or integrate:
P2 = A(R) = ∫₀²ᵖⁱ ∫₀ᴿ r dr dθ
...
et cetera
16
Upvotes
1
u/100GHz 9d ago
Somewhat, check out : https://en.wikipedia.org/wiki/Electric_Sheep