Theory → Formal Languages
Formal Language
A mathematically defined set of strings over an alphabet.
Motivation
Formal language solves the problem of defining sets of strings with precise mathematical rules.
Where it fits
Formal Language belongs to theory of computation and programming language theory.
Mental model
A formal language is not about human communication; it is a mathematically defined set of valid symbol sequences.
Common mistakes
- Confusing formal languages with programming languages only.
- Ignoring the grammar or automaton that defines the language.
Related concepts
Formal Language connects to grammar, regular language, context-free language, automata, and compiler design.