Math 2.0

Computer science Definition

Formal language

Builds on StringSubset

Definition

Let Σ\Sigma be an alphabet and let Σ∗\Sigma^* be the set of strings over Σ\Sigma. A formal language over Σ\Sigma is a subset L⊆Σ∗L \subseteq \Sigma^*.

Remarks

Example: L={anbn:n≥0}={ε,ab,aabb,… }L = \set{a^n b^n : n \ge 0} = \set{\varepsilon, ab, aabb, \dots} is a language over {a,b}\set{a, b}, since each member is a finite string over {a,b}\set{a, b}. Non-example: a set that contains the infinite sequence aaa⋯aaa\cdots is not a language over {a}\set{a}, since that sequence is not in Σ∗\Sigma^*. The empty language ∅\emptyset and the language {ε}\set{\varepsilon} are different: the first has no strings, the second has one. Languages are combined by the set operations and by concatenation L1L2={uv:u∈L1,v∈L2}L_1 L_2 = \set{uv : u \in L_1, v \in L_2}. Since Σ∗\Sigma^* is countably infinite, there are uncountably many languages over Σ\Sigma but only countably many Turing machines, so most languages are not recursively enumerable.

Reading path

To understand this page from the ground up, read these 24 pages in order. The foundations come first.

Show the path as a graph
Element, definition, no evidence levelElementdefinitionMonoid, concept, no evidence levelMonoidconceptProposition, concept, no evidence levelPropositionconceptSet, definition, no evidence levelSetdefinitionImplication, definition, no evidence levelImplicationdefinitionPredicate, definition, no evidence levelPredicatedefinitionOrdered pair, definition, no evidence levelOrdered pairdefinitionExistential quantifier, definition, no evidence levelExistential quantifierdefinitionUniversal quantifier, definition, no evidence levelUniversal quantifierdefinitionCartesian product, definition, no evidence levelCartesian productdefinitionSubset, definition, no evidence levelSubsetdefinitionUniqueness quantifier, definition, no evidence levelUniqueness quantifierdefinitionBinary relation, definition, no evidence levelBinary relationdefinitionFunction, definition, no evidence levelFunctiondefinitionCodomain, definition, no evidence levelCodomaindefinitionInjective function, definition, no evidence levelInjective functiondefinitionFree monoid, definition, no evidence levelFree monoiddefinitionSurjective function, definition, no evidence levelSurjective functiondefinitionBijective function, definition, no evidence levelBijective functiondefinitionEquinumerous sets, definition, no evidence levelEquinumerous setsdefinitionFinite set, definition, no evidence levelFinite setdefinitionAlphabet, definition, no evidence levelAlphabetdefinitionString, definition, no evidence levelStringdefinitionFormal language, definition, no evidence levelFormal languagedefinition
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Element definition
  2. Monoid concept
  3. Proposition concept
  4. Set definition
  5. Implication definition
  6. Predicate definition
  7. Ordered pair definition
  8. Existential quantifier definition
  9. Universal quantifier definition
  10. Cartesian product definition
  11. Subset definition
  12. Uniqueness quantifier definition
  13. Binary relation definition
  14. Function definition
  15. Codomain definition
  16. Injective function definition
  17. Free monoid definition
  18. Surjective function definition
  19. Bijective function definition
  20. Equinumerous sets definition
  21. Finite set definition
  22. Alphabet definition
  23. String definition
  24. Formal language definition

Where this leads

7 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Formal_language
About this page
Tag5VRS8PJEFT
URIm2://5VRS8PJEFT
Kinddefinition
WritingW0 stub
MSC68Q45, 03D05
DefinesFormal language
UsesString, Subset
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Used by