Automata and Grammars

Login to KOS for course enrollment Display time-table
Code Completion Credits Range Language
BIK-AAG.21 Z,ZK 5 14KP+4KC Czech
Garant předmětu:
Jan Holub
Ondřej Guth, Eliška Šestáková
Ondřej Guth, Eliška Šestáková
Department of Theoretical Computer Science

Students are introduced to basic theoretical and implementation principles of the following topics: construction, use and mutual transformations of finite automata, regular expressions, and regular grammars, translation finite automata, construction and use of pushdown automata, hierarchy of formal languages. Knowledge acquired through the module is applicable to creation of algorithms for pattern matching, data compression, translation, simple parsing, and creation of digital circuits.


Knowledge of basic data structures and computer programming.

Syllabus of lectures:

1. Motivation to study formal languages. Basic notions (language, alphabet, grammar, automaton), Chomsky hierarchy. Nondeterministic and deterministic finite automata (NFA, DFA), NFA with epsilon transitions.

2. Operations on automata (transformation to NFA without epsilon transitions, to DFA, minimalization), intersection, union. Programming implementations of DFA and NFA, curcuit implementations.

3. Extensions to translation, Mealey, Moore, conversions. Operations on regular grammars, conversions to FA.

4. Regular expressions, conversions among regular expressions, finite automata and regular grammars, Kleene theorem. Principles of use of regular expressions in UNIXu (grep, egrep, perl, PHP, ...).

5. Finite automaton as lexical analyzer, lex/flex generators. Properties of regular languages (pumping lemma, Nerode theorem).

6. Context-free languages, pushdown automaton. Parsing of context-free languages (nondeterministic versus deterministic).

7. Context-sensitive and recursively enumerable languages, Turing machine.

Syllabus of tutorials:

1. Examples of formal languages. Intuitive considerations of grammars for given languages. Estimation of the classification of given language in Chomsky hierarchy. Intuitive creation of finite automata (DFA, NFA, with epsilon transitions) for given langauage. Transformations and compositins of FA. Implementation of FA. FA with output function and its implementation.

2. Conversions of grammars to FA and vice versa. Considerations, modifications and transformations of regular expressions. Use of regular expressions for solving tasks of processing text (e.g. sh, grep, sed, perl). Creation and implementation of lexical analyzer. Classification of languages.

3. Examples of context-free languages, creation of pushdown automata. Examples of deterministic parsing of context-free languages (e.g. LL, yacc, bison). Examples of context-sensitive and recursively enumerable languages, creation of Turing machines.

Study Objective:

The course introduces students to finite automata, regular expressions, regular grammars and translation finite automata with stress on their practical use. Furthermore, the course introduces students to the class of context-free languages and basic use of pushdown automata. Chomsky hierarchy of languages is also introduced for students to better understand the automata theory. Knowledge acquired through the course is applicable to creation of algoritmhs for pattern matching, data compression, translation, simple parsing, and creation of digital circuits.

Study materials:

1. Sipser M. : Introduction to the Theory of Computation. Cengage Learning Custom Publishing, 2020. ISBN 978-0357670583.

2. Hopcroft J.E., Motwani R., Ullman J. D. : Introduction to Automata Theory, Languages, and Computation, 3rd Edition. Pearson, 2008. ISBN 978-8131720479.

3. Kozen D. C. : Automata and Computability. Springer, 1997. ISBN 978-0387949079.

4. Šestáková E.: Automaty a gramatiky: Sbírka řešených příkladů, ČVUT 2017, ISBN 978-80-01-06306-4

5. Šestáková E.: Automata and Grammars, A Collection of exercises and Solutions, ČVUT, 2018, ISBN 978-80-01-06462-7

Time-table for winter semester 2024/2025:
Time-table is not available yet
Time-table for summer semester 2024/2025:
Time-table is not available yet
The course is a part of the following study plans:
Data valid to 2024-05-23
Aktualizace výše uvedených informací naleznete na adrese https://bilakniha.cvut.cz/en/predmet6546406.html