home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   sci.math.symbolic      Symbolic algebra discussion      10,432 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,919 of 10,432   
   S.K.R. de Jong to Richard Fateman   
   Re: Symbolic systems and Ackermann funct   
   24 Jun 18 20:07:29   
   
   From: SKRdJ@nowhere.net   
      
   On Sat, 23 Jun 2018 18:23:02 -0700, Richard Fateman wrote:   
      
   > On Saturday, June 23, 2018 at 5:34:27 PM UTC-7, S.K.R. de Jong wrote:   
   >> Are there any symbolic systems that can deal with Ackermann functions   
   >> computations?   
   >   
   > Can you be more specific on what you mean by "deal"?   
   >   
   > It is not especially symbolic. The obvious definition usually causes   
   > problems with stack space because it is a heavily-recursive function.   
   >   
   > Symbolic systems also use stack space, so they suffer the same fate.   
   >   
   >   
   >  Here's a definition in lisp.   
   >   
   > (defun ackermann (x y)   
   >   (cond ((= y 0) 0)   
   >         ((= x 0) (* 2 y))   
   >         ((= y 1) 2)   
   >         (t (ackermann (- x 1) (ackermann x (- y 1))))))   
      
   	That's what I am asking about. Implementing it in Lisp (or I   
   guess any other language that allows one to do recursion) is fairly   
   straighforward. The problem is, like you point out, that the fact that it   
   is heavily recursive makes this function choke for even small arguments.   
   However, by hand, and using uparrow notation, one can do significantly   
   better. For example, let's define a variant of what you defined above:   
      
   	A(x, y) = A(x - 1, A(x, y - 1)), where A(x, 1) = x, A(1, y) = 2y,   
   with y > 1, and x, y positive integers   
      
   With uparrow notation, it is not difficult to return an explicit result   
   for A(4, 4). However, a straightforward Lisp implementation, similar to   
   the one above, would choke trying to compute A(4, 4). Hence my question.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca