Double recursion function Ackermann Function is defined as ack(0,n) = n + 1 ack(m,0) = ack( m-1, 1) ack(m,n) = ack( m – 1, ack( m, n – 1 )) For example ack( 1, 1 ) = ack ( 0, ack ( 1, 0 ) ) = ack ( 0 , ack( 0, 1 ) ) = ack ( 0, 2 ) = 3 Try to work out ack( 1 , 2 ) and ack ( 1, 3 ) by hand. Write a program that will accept two parameters and display the value of the corresponding Ackermann function. For example: $ ack 1 1 The Ackermann value of ack(1,1) is 3 Using your program, try to find out the values of ack(2,3), ack(3,2) and ack(4,2). WARNING!!!! It may not be as easy as it looks
>> 本文固定链接: http://www.vcgood.com/archives/2835
>> 转载请注明: ying_860624 2008年10月16日 于 C语言帝国 发表
是不是最大是ack(4,n)?