2012年3月7日

Ackermann Function C++实现

摘要: Ackermann Function 是用递归方法定义的,定义如下:(有的资料上阿克曼函数的定义中 m, n 的位置调换了,相应的函数式要对称性地变化,注意取值。)A: N^2 -> N 它的部分函数值如下:C++ 代码如下: 1 #include <iostream> 2 using namespace std; 3 4 __int64 Ackermann (int m, int n) 5 { 6 if(m == 0) 7 return (n + 1); 8 if( m > 0 && n == 0 ) 9 return Ackermann... 阅读全文

posted @ 2012-03-07 17:34 jjtx 阅读(554) 评论(0) 推荐(0) 编辑

导航