Comments on: Ackermann Function in Java http://www.terminally-incoherent.com/blog/2007/03/15/ackermann-function-in-java/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Chris Wellons http://www.terminally-incoherent.com/blog/2007/03/15/ackermann-function-in-java/#comment-12022 Tue, 14 Apr 2009 20:12:09 +0000 http://www.terminally-incoherent.com/blog/2007/03/15/ackermann-function-in-java/#comment-12022

My first thought would be to do it in bc,

define ack(m, n) {
  if (m == 0) {
    return (n + 1)
  }
  if (n == 0) {
    return (ack (m - 1, 1)) 
  }
  return (ack (m - 1, ack (m, n - 1)))
}
Reply  |  Quote
]]>
By: Luke http://www.terminally-incoherent.com/blog/2007/03/15/ackermann-function-in-java/#comment-4214 Sun, 22 Apr 2007 02:44:57 +0000 http://www.terminally-incoherent.com/blog/2007/03/15/ackermann-function-in-java/#comment-4214

Yup, that’s what it seems like. Thanks.

Reply  |  Quote
]]>
By: anonymous http://www.terminally-incoherent.com/blog/2007/03/15/ackermann-function-in-java/#comment-4213 Sat, 21 Apr 2007 22:19:01 +0000 http://www.terminally-incoherent.com/blog/2007/03/15/ackermann-function-in-java/#comment-4213

if you try to work the function out on paper the value “m” variable is so much more important than the value of “n” variable that A(4,1) is not that different from A(4,2) at all! a huge number of “n”‘s must be needed to equal just one “m”

Reply  |  Quote
]]>