ArticleslgStudy

computer science

Recursive language

Recursive language is a computer science 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 Recursive language rather than just read about it. In short: In mathematics, logic and computer science, a recursive (or decidable) language is a recursive subset of the Kleene closure of an alphabet. Equivalently, a formal language is recursive if there exists a Turing machine that decides the formal language.

Key takeaways

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

Reference excerpt

In mathematics, logic and computer science, a recursive (or decidable) language is a recursive subset of the Kleene closure of an alphabet. Equivalently, a formal language is recursive if there exists a Turing machine that decides the formal language. In theoretical computer science, such always-halting Turing machines are called total Turing machines or algorithms. The concept of decidability may be extended to other models of computation. For example, one may speak of languages decidable on a non-deterministic Turing machine. Therefore, whenever an ambiguity is possible, the synonym used for "recursive language" is Turing-decidable language, rather than simply decidable. The class of all recursive languages is often called R, although this name is also used for the class RP. This type of language was not defined in the Chomsky hierarchy. All recursive languages are also recursively enumerable. All regular, context-free and context-sensitive languages are recursive.

Definitions There are two equivalent major definitions for the concept of a recursive language:

A recursive language is a recursive subset of the set of all possible finite-length words over an alphabet. A recursive language is a formal language for which there exists a Turing machine that decides it. On the other hand, we can show that a decision problem is decidable by exhibiting a Turing machine running an algorithm that terminates on all inputs. An undecidable problem is a problem that is not decidable.

Examples As noted above, every context-sensitive language is recursive. Thus, a simple example of a recursive language is the set L={abc, aabbcc, aaabbbccc, ...}; more formally, the set

L = { w ∈ { a , b , c } ∗ ∣ w = a n b n c n for some n ≥ 1 } {\displaystyle L=\{\,w\in \{a,b,c\}^{*}\mid w=a^{n}b^{n}c^{n}{\mbox{ for some }}n\geq 1\,\}}

is context-sensitive and therefore recursive. Examples of decidable languages that are not context-sensitive are more difficult to describe. For one such example, some familiarity with mathematical logic is required: Presburger arithmetic is the first-order theory of the natural numbers with addition (but without multiplication). While the set of well-formed formulas in Presburger arithmetic is context-free, every deterministic Turing machine accepting the set of true statements in Presburger arithmetic has a worst-case runtime of at least 2 2 p n {\displaystyle 2^{2^{pn}}} , for some constant p>0. Here, n denotes the length of the given formula. Since every context-sensitive language can be accepted by a linear bounded automaton, and such an automaton can be simulated by a deterministic Turing machine with worst-case running time at most q n {\displaystyle q^{n}} for some constant q, the set of valid formulas in Presburger arithmetic is not context-sensitive. On a positive side, it is known that there is a deterministic Turing machine running in time at most triply exponential in n that decides the set of true formulas in Presburger arithmetic. Thus, this is an example of a language that is decidable but not context-sensitive.

Closure properties Recursive languages are closed under the following operations. That is, if L and P are two recursive languages, then the following languages are recursive as well:

The Kleene star L ∗ {\displaystyle L^{*}}

The image φ(L) under an e-free homomorphism φ The concatenation L ∘ P {\displaystyle L\circ P}

The union L ∪ P {\displaystyle L\cup P}

The intersection L ∩ P {\displaystyle L\cap P}

The complement of L {\displaystyle L}

The set difference L − P {\displaystyle L-P}

The last property follows from the fact that the set difference can be expressed in terms of intersection and complement.

See also Recursively enumerable language Computable set Recursion

Notes

References Book, Ronald V. (1974). "Comparing complexity classes". Journal of Computer and System Sciences. 9: 213–229. doi:10.1016/S0022-0000(74)80008-5. MR 0366099. Chomsky, Noam (1959). "On certain formal properties of grammars". Information and Control. 2 (2): 137–167. doi:10.1016/S0019-9958(59)90362-6. Fischer, Michael J.; Rabin, Michael O. (1974). "Super-Exponential Complexity of Presburger Arithmetic". Proceedings of the SIAM-AMS Symposium in Applied Mathematics. 7: 27–41. Oppen, Derek C. (1978). "A 222pn Upper Bound on the Complexity of Presburger Arithmetic". J. Comput. Syst. Sci. 16 (3): 323–332. doi:10.1016/0022-0000(78)90021-1. Sipser, Michael (1997). "Decidability". Introduction to the Theory of Computation. PWS Publishing. pp. 151–170. ISBN 978-0-534-94728-6. Sipser, Michael (2012). "The Church-Turing Thesis". Introduction to the Theory of Computation. Cengage Learning. p. 170. ISBN 978-1-133-18779-0.

Worked examples

Example 1 — a first encounter with Recursive language

Start with the simplest possible case. Write down what Recursive language claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, 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 Recursive language 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 Recursive language 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 Recursive language

In research
Recursive language appears in computer science 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 Recursive language 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
Recursive language is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computability theory, Formal languages, Recursion, so understanding it makes those chapters shorter.
In everyday life
Look for Recursive language 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.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Recursive language in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Recursive language 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 Recursive language out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Recursive language in simple terms?

In mathematics, logic and computer science, a recursive (or decidable) language is a recursive subset of the Kleene closure of an alphabet. Equivalently, a formal language is recursive if there exists a Turing machine that decides the formal language.

Why does Recursive language matter?

Because it connects several computer science 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 Recursive language?

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 Recursive language.

Tags

  • Computability theory
  • Formal languages
  • Recursion
  • Theory of computation

Keep exploring