Automata and Grammars
Code  Completion  Credits  Range  Language 

BIAAG  Z,ZK  6  2P+2C  Czech 
 Garant předmětu:
 Lecturer:
 Tutor:
 Supervisor:
 Department of Theoretical Computer Science
 Synopsis:

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,
Relationships between formal languages and automata.
Knowledge acquired through the module is applicable in
designs of algorithms for searching in text, data
compression, simple parsing and translation, and design of
digital circuits.
 Requirements:

Active algorithmic skills for solving basic types of computational tasks and programming skills in C++ are expected.
 Syllabus of lectures:

1. Motivation to study formal languages. Basic notions (language, alphabet, grammar, automaton), Chomsky hierarchy.
2. Nondeterministic and deterministic finite automata (NFA, DFA), NFA with epsilon transitions.
3. Operations on automata (transformation to NFA without epsilon transitions, to DFA, minimization), intersection, union.
4. Programming implementations of DFA and NFA, circuit implementations.
5. Adding translation, Mealey, Moore, conversions.
6. Operations on regular grammars, conversions to FA.
7. Regular expressions, regular expression conversions, finite automata and regular grammars, Kleene theorem.
8. Principles of use of regular expressions in UNIX (grep, egrep, perl, PHP, ...).
9. Finite automaton as a lexical analyzer, lex/flex generators.
10. Properties of regular languages (pumping lemma, Nerode theorem).
11. Contextfree languages, pushdown automaton.
12. Parsing of contextfree languages (nondeterministic versus deterministic).
13. Contextsensitive and recursively enumerable languages, Turing machine. Classes P, NP, NPC, NPH
 Syllabus of tutorials:

1. Implementation of FA.
2. Examples of formal languages. Intuitive considerations of grammars for given languages. Estimation of the classification of a given language in Chomsky hierarchy.
3. Intuitive creation of finite automata (DFA, NFA, with epsilon transitions) for a given langauage.
4. Transformations and compositions of FA.
5. FA with output function and its implementation.
6. Conversions of grammars to FA and vice versa.
7. Considerations, modifications and transformations of regular expressions.
8. Use of regular expressions for text processing tasks (e.g. sh, grep, sed, perl).
9. Creation and implementation of lexical analyzers.
10. Classification of languages.
11. Examples of contextfree languages, creation of pushdown automata.
12. Examples of deterministic parsing of contextfree languages (e.g. LL, yacc, bison).
13. Examples of contextsensitive and recursively enumerable languages, creation of grammars, creation of Turing machines.
 Study Objective:

The module introduces students to finite automata, regular expressions, grammars, and translation finite automata, with an emphasis on their practical use. Furthermore, the module introduces students to the class of contextfree languages, basic use of pushdown automata, as well as the classification of languages.
 Study materials:

1. Aho, A. V., Lam, M. S., Sethi, R., Ullman, J. D. „Compilers: Principles, Techniques, and Tools“ (2nd Edition). Addison Wesley, 2007. ISBN 0321486811.
2. Kozen, D. C. „Automata and Computability“. Springer, 1997. ISBN 0387949070.
3. Melichar, B., Holub, J., Mužátko, P. „Languages and Translations“. Praha: Publishing House of CTU, 1997. ISBN 8001016927.
 Note:
 Further information:
 https://courses.fit.cvut.cz/BIAAG/
 No timetable has been prepared for this course
 The course is a part of the following study plans:

 Bachelor program Informatics, unspecified branch, in Czech, 20152020 (compulsory course in the program)
 Bachelor branch Security and Information Technology, in Czech, 20152020 (compulsory course in the program)
 Bachelor branch Computer Science, in Czech, 20152020 (compulsory course in the program)
 Bachelor branch Computer Engineering, in Czech, 20152020 (compulsory course in the program)
 Bachelor branch Information Systems and Management, in Czech, 20152020 (compulsory course in the program)
 Bachelor branch Web and Software Engineering, spec. Software Engineering, in Czech, 20152020 (compulsory course in the program)
 Bachelor branch Web and Software Engineering, spec. Web Engineering, in Czech, 20152020 (compulsory course in the program)
 Bachelor branch Web and Software Engineering, spec. Computer Graphics, in Czech, 20152020 (compulsory course in the program)
 Bachelor branch Knowledge Engineering, in Czech, 20182020 (compulsory course in the program)