Formal grammar
Builds on AlphabetStringFormal languageKleene star
Definition
A formal grammar is a tuple where:
- is a finite set of nonterminal symbols.
- is a finite alphabet of terminal symbols, disjoint from .
- is a finite set of production rules , where are strings in and contains at least one nonterminal.
- is the start symbol.
Here is the Kleene star of . For strings over , one writes if and for some rule in and some strings . Let be the reflexive and transitive closure of ; a chain is a derivation. The language generated by is the formal language
Remarks
Example: , , . Each derivation step either adds one and one around or removes , so . Non-example: a "rule" over is not allowed, because its left side has no nonterminal. Two grammars are equivalent if they generate the same language. Often is called and is called .
Reading path
To understand this page from the ground up, read these 5 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Alphabet concept
- Formal language concept
- Kleene star concept
- String concept
- Formal grammar definition
Further reading
About this page
| Tag | KB1791Y0P8 |
|---|---|
| URI | m2://KB1791Y0P8 |
| Kind | definition |
| Writing | W0 stub |
| MSC | 68Q42, 68Q45, 03D05 |
| Defines | Formal grammar |
| Uses | Alphabet, String, Formal language, Kleene star |
| Changed | 3 November 2026 |
Markdown · JSON · Edit on GitHub
What this page needs for W1
- an inventory row: the row of the inventory that the node accounts for (0 of 1)
- 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
No page links to this page yet.