Let $a$ be a natural number and let $g: \mathbf{N} \times \mathbf{N} \rightarrow \mathbf{N}$ be a function. The function $h: \mathbf{N} \rightarrow \mathbf{N}$ is said to be defined by primitive recursion from the constant $a$ and the function $g$ if
- $h(0) = a$,
- $h(n+1) = g(n, h(n))$.
Example:
- $h(0) = 1$
- $h(n+1) = g(n, h(n)) = (n+1) \times h(n)$
is the well-know faculty function.
( Open University, M381 ML-1 )
Beautiful, isn't it?
Tidak ada komentar:
Posting Komentar