Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

By closed form I mean basically, "You can write down a formula."

A trivial example of a problem that cannot be solved in closed form is to construct a sequence x(n) with x(0) = 1, x(1) = x(2) = x(3) = x(4) = 0, and x(n+5) = x(n+1) - x(n). There does happen to be a formula, but it is in terms of the roots of a 5th degree polynomial whose roots cannot be written with radicals.

A more interesting class of problems is solving for f(x) = y with complicated functions f. Assuming that f is continuous, we can use binary search recursively until our answer is good enough. But generally there is no analytical answer.

Then there are problems that we can tackle with recursion on top of recursion. For example suppose that we want a numerical solutions to a non-linear first order differential equation with specified values for f(0) and f(1). It is straightforward to recursively calculate the trajectory with specified f(0) and f'(0). (For example http://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods work well.) Then we can set up binary search to find the right value of f'(0) to get the desired f(1). This is not even a particularly complicated program to write, especially if you've got closures in your language. But trust me when I say that we have no hope of solving this analytically.

(A more complicated version of this technique is used to calculate what the masses of planets must be based on their gravitational influence on other planets over a very long time.)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: