= Generalized McCarthy function
A <generalized McCarthy function> replaces the constants or nesting depth in the <McCarthy 91 function> by parameters. One explicit two-call family is
$$
M_{a,b,c}(n)=\begin{cases}n-b,&n>a,\\M_{a,b,c}(M_{a,b,c}(n+c)),&n\leq a.\end{cases}
$$
The classical example has $(a,b,c)=(100,10,11)$. This name covers several parameter conventions, so the recurrence and parameter restrictions must accompany a claim about termination or values. Arbitrary constants do not guarantee termination: with $b=c=0$ and $n\leq a$, evaluation immediately depends on the same unresolved call again. The family is useful for separating a recursive definition from an established total <function>.
Back to article page