next up previous contents
Next: Recursive functions Up: Recursive functions Previous: Primitive recursion   Contents

Minimalization

Given $g : \mathbb{N}^{k{+1}} \to \mathbb{N}$, the function $f : \mathbb{N}^k \to \mathbb{N}$ is defined by minimalization from $g$ if


\begin{displaymath}
f(n_1,n_2,\ldots,n_k) = \mu n. (g(n,n_1,n_2\ldots,n_k) = 0)
\end{displaymath}

where $\mu$ is the minimalization operator: $\mu n. P(n)$ returns the least natural number $n$ such that $P(n)$ holds. If $P(n)$ does not hold for any $n$, then the result is undefined.

In modern algorithmic notation, $f$ can be computed by a while loop of the form

   n := 0; 
   while (g(n,n1,n2,...,nk) != 0) {n := n+1};
   return n;

For example, consider the function $\log_2 n$ defined as follows: $\log_2 n = k$, if $2^k = n$. If $n$ is not a power of 2, $\log_2 n$ is undefined. The function $\log_2$ can be defined by minimalization from the function $g(k,n) = 2^k - n$.12.2



Madhavan Mukund 2004-04-29