I want to solve the recurrence of Ackermann function using Generating Function in Mathematica.

GeneratingFunction[RSolve[{f[x, y] == f[x - 1, f[x, y - 1]],
f[0, y] == y + 1,f[x, 0] == f[x - 1, 1]}, 
f[x, y], x, y], x, y, n]

But I am not getting the result. As far as I know we can only pass 3 arguments to Generating Function but I am sending 4. Please let me know how to solve it.

P.S. I just started using Mathematica. So please suggest the solution though it is trivial.

  • $\begingroup$ What is the definition for Rsolve? $\endgroup$ – Edmund Mar 5 '16 at 18:45
  • $\begingroup$ I checked this question and thought I need to use Rsolve: stackoverflow.com/questions/4911900/… $\endgroup$ – siraj Mar 5 '16 at 18:51
  • 2
    $\begingroup$ SiMemon, notice that the built-in Mathematica function is RSolve, notice the uppercase S. $\endgroup$ – MarcoB Mar 5 '16 at 18:57
  • $\begingroup$ I changed it. But still I am getting error as "RSolve::nestdv: "The expression f[x,-1+y] has nested dependent variables. " $\endgroup$ – siraj Mar 5 '16 at 19:03
  • 1
    $\begingroup$ RSolve cannot handle nested expressions, like f[x - 1, f[x, y - 1]]. Can you write your formula in another way? $\endgroup$ – bbgodfrey Mar 5 '16 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.