Algorithm-generating algorithm

132 Views Asked by At

Is there an algorithm that can create other algorithms based on any number of arguments? For example, a way to determine a function $ f (x) $ from a given input and a given output? I.e. if $ f (2)=4 $ and $ f (3)= 9$ then a good function that could aproximate these results would be $ f (x)=x^2$. However, is there a method or algorithm to do this? Even if there is an infinite amount of functions that could yield these outputs? Any approximation is good enough if it gives the same answers to the same questions.