ArticleslgStudy

mathematics

General recursive function

General recursive function is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand General recursive function rather than just read about it. In short: In mathematical logic and computer science, a general recursive function, partial recursive function, or μ-recursive function is a partial function from natural numbers to natural numbers that is "computable" in an intuitive sense – as well as in a formal one. If the function is total, it is also called a total recursive function (sometimes shortened to recursive function).

Key takeaways

  • General recursive function belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect General recursive function to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of General recursive function from memory before moving on to harder problems.

Reference excerpt

In mathematical logic and computer science, a general recursive function, partial recursive function, or μ-recursive function is a partial function from natural numbers to natural numbers that is "computable" in an intuitive sense – as well as in a formal one. If the function is total, it is also called a total recursive function (sometimes shortened to recursive function). In computability theory, it is shown that the μ-recursive functions are precisely the functions that can be computed by Turing machines (this is one of the theorems that supports the Church–Turing thesis). The μ-recursive functions are closely related to primitive recursive functions, and their inductive definition (below) builds upon that of the primitive recursive functions. However, not every total recursive function is a primitive recursive function—the most famous example is the Ackermann function. Other equivalent classes of functions are the functions of lambda calculus and the functions that can be computed by Markov algorithms. The subset of all total recursive functions with values in {0,1} (that is, solving decision problems) is known in computational complexity theory as the complexity class R.

Definition The μ-recursive functions (or general recursive functions) are partial functions that take finite tuples of natural numbers and return a single natural number. They are the smallest class of partial functions that includes the initial functions and is closed under composition, primitive recursion, and the minimization operator μ. The smallest class of functions including the initial functions and closed under composition and primitive recursion (i.e. without minimisation) is the class of primitive recursive functions. While all primitive recursive functions are total, this is not true of partial recursive functions; for example, the minimisation of the successor function is undefined. The primitive recursive functions are a subset of the total recursive functions, which are a subset of the partial recursive functions. For example, the Ackermann function can be proven to be total recursive, and to be non-primitive. Primitive or "basic" functions:

Constant functions Ckn: For each natural number n and every k Cnk(x1,…,xk) =def n Alternative definitions use instead a zero function as a primitive function that always returns zero, and build the constant functions from the zero function, the successor function and the composition operator. Successor function S: S(x) =def x+1 Projection function Pik (also called the Identity function): For all natural numbers i,k such that 1≤i≤k: Pik(x1,…,xk) =def xi. Operators (the domain of a function defined by an operator is the set of the values of the arguments such that every function application that must be done during the computation provides a well-defined result):

Composition operator ∘ (also called the substitution operator): Given an m-ary function h(x1,…,xm) and m k-ary functions g1(x1,…,xk),…,gm(x1,…,xk): h∘(g1,…,gm) =def f,wheref(x1,…,xk)=h(g1(x1,…,xk),…,gm(x1,…,xk)). This means that f(x1,…,xk) is defined only if g1(x1,…,xk),…,gm(x1,…,xk), and h(g1(x1,…,xk),…,gm(x1,…,xk)) are all defined. Primitive recursion operator ρ: Given the k-ary function g(x1,…,xk) and k+2 -ary function h(y,z,x1,…,xk): ρ(g,h) =def fwhere the k+1-ary function f is defined byf(0,x1,…,xk)=g(x1,…,xk)f(S(y),x1,…,xk)=h(y,f(y,x1,…,xk),x1,…,xk). This means that f(y,x1,…,xk) is defined only if g(x1,…,xk) and h(z,f(z,x1,…,xk),x1,…,xk) are defined for all z<y. Minimization operator μ: Given a (k+1)-ary function f(y,x1,…,xk), the k-ary function μ(f) is defined by: μ(f)(x1,…,xk)=z⟺def f(i,x1,…,xk)>0fori=0,…,z−1andf(z,x1,…,xk)=0 Intuitively, minimisation seeks—beginning the search from 0 and proceeding upwards—the smallest argument that causes the function to return zero; if there is no such argument, or if one encounters an argument for which f is not defined, then the search never terminates, and μ(f) is not defined for the argument (x1,…,xk). While some textbooks use the μ-operator as defined here, others demand that the μ-operator is applied to total functions f only. Although this restricts the μ-operator as compared to the definition given here, the class of μ-recursive functions remains the same, which follows from Kleene's normal form theorem (see below). The only difference is, that it becomes undecidable whether a specific function definition defines a μ-recursive function, as it is undecidable whether a computable (i.e. μ-recursive) function is total. The strong equality relation ≃ can be used to compare partial μ-recursive functions. This is defined for all partial functions f and g so that

f(x1,…,xk)≃g(x1,…,xl) holds if and only if for any choice of arguments either both functions are defined and their values are equal or both functions are undefined.

Examples Examples not involving the minimization operator can be found at Primitive recursive function#Examples. The following examples are intended just to demonstrate the use of the minimization operator; they could also be defined without it, albeit in a more complicated way, since they are all primitive recursive.

The following examples define general recursive functions that are not primitive recursive; hence they cannot avoid using the minimization operator.

Total recursive function A general recursive function is called total recursive function if it is defined for every input, or, equivalently, if it can be computed by a total Turing machine. There is no way to computably tell if a given general recursive function is total—see Halting problem.

Equivalence with other models of computability

In the equivalence of models of computability, a parallel is drawn between Turing machines that do not terminate for certain inputs and an undefined result for that input in the corresponding partial recursive function. The unbounded search operator is not definable by the rules of primitive recursion as those do not provide a mechanism for "infinite loops" (undefined values).

Normal form theorem A normal form theorem due to Kleene says that for each k there are primitive recursive functions U(y) and T(y,e,x1,…,xk) such that for any μ-recursive function f(x1,…,xk) with k free variables there is an e such that

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with General recursive function

Start with the simplest possible case. Write down what General recursive function claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to General recursive function before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about General recursive function ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of General recursive function

In research
General recursive function appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses General recursive function in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
General recursive function is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computability theory, Theory of computation, so understanding it makes those chapters shorter.
In everyday life
Look for General recursive function outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “General recursive function” →

How to study General recursive function in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what General recursive function means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain General recursive function out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is General recursive function in simple terms?

In mathematical logic and computer science, a general recursive function, partial recursive function, or μ-recursive function is a partial function from natural numbers to natural numbers that is "computable" in an intuitive sense – as well as in a formal one. If the function is total, it is also c…

Why does General recursive function matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study General recursive function?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on General recursive function.

Tags

  • Computability theory
  • Theory of computation

Keep exploring