Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -1,4 +1,6 @@
|
|||
The '''[[wp:Ackermann function|Ackermann function]]''' is a classic recursive example in computer science. It is a function that grows very quickly (in its value and in the size of its call tree). It is defined as follows:
|
||||
The '''[[wp:Ackermann function|Ackermann function]]''' is a classic recursive example in computer science.
|
||||
It is a function that grows very quickly (in its value and in the size of its call tree).
|
||||
It is defined as follows:
|
||||
|
||||
:<math> A(m, n) =
|
||||
\begin{cases}
|
||||
|
|
@ -10,3 +12,8 @@ The '''[[wp:Ackermann function|Ackermann function]]''' is a classic recursive ex
|
|||
<!-- <table><tr><td width=12><td><td><math>n+1</math><td>if <math>m=0</math> <tr><td> <td><math>A(m, n) =</math> <td><math>A(m-1, 1)</math> <td>if <math>m>0</math> and <math>n=0</math> <tr><td><td><td><math>A(m-1, A(m, n-1))</math> <td> if <math>m>0</math> and <math>n>0</math></table> -->
|
||||
|
||||
Its arguments are never negative and it always terminates. Write a function which returns the value of <math>A(m, n)</math>. Arbitrary precision is preferred (since the function grows so quickly), but not required.
|
||||
|
||||
Interestingly enough, the Ackermann function is one of the very few known examples of function that can ''only'' be implemented recursively. It is impossible to implement it with just for loops and other control flow commands. See this [http://youtube.com/watch?v=i7sm9dzFtEI computerphile episode] for more information.
|
||||
|
||||
;See also:
|
||||
* [[wp:Conway_chained_arrow_notation#Ackermann_function|Conway chained arrow notation]] for the Ackermann function.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue