Automata and Formal Languages
How do we describe a language formally, and which computational models can recognize it?
This course is being built. Only some of the units are published; the rest are marked ‘in preparation’. What is published is complete and can be studied now.
Learning materials and visual explanations
- Visited
- Not yet
- Coming soon
Strings and Formal Languages
AvailableAlphabets, words, operations on languages, and decision problems.
- 1.1LessonWords: Inductive Definitions and OperationsWords defined inductively (length, letter count, concatenation, powers, reverse), and why every yes/no question about text is a question about a language.
- 1.2LessonLanguages: Operations and EqualitiesFormal languages, the operations on them (complement, concatenation, powers, star, reverse, prefixes), and how to prove or refute an equality of languages.
Practice pages (6)
- 1.2.1ExerciseLanguages: Practice and Check of UnderstandingPractice by levels on formal languages: membership and set operations by hand, a real-life DNA example, proofs of claims about languages, and refutations by counterexample.
- 1.2.2ExerciseSort the Words: Languages as SetsPractice languages as sets: sort the 15 words of length at most 3 into the regions of a Venn diagram of two or three languages, or choose the words of a set expression, and get an explanation for every mistake.
- 1.2.3ExerciseCounterexample HunterClaims about languages and their operations: decide whether each is true for all languages, refute the false ones with a counterexample that the tool checks exactly, and order the proof of the true ones.
- 1.2.4ExerciseTables and Splits: Concatenation, Star, PrefixesPractice concatenation of languages with a product table, powers and star with split searches, cutting a word into two parts, and prefixes, suffixes and substrings. Every question is drawn at random and checked at once.
- 1.2.5ExerciseDescribe the Language with OperationsPractice describing languages with union, intersection, difference, complement, concatenation, star, reverse and prefixes: requirements from DNA, codes and file names turned into expressions and checked exactly, three representations of one language, and an open lab.
- 1.2.6ExerciseRandom Practice Questions on LanguagesA stream of freshly drawn questions on languages: compute operations on small sets, decide membership, count words, find a shortest word, and judge claims, with instant checking, hints and step-by-step solutions.
Deterministic Finite Automata and Regular Languages
AvailableStates, transitions, acceptance, designing an automaton for a language, combining automata, minimization, and the Myhill–Nerode classes.
- 2.1LessonDeterministic Finite Automata: Deciding with Fixed MemoryThe formal and graphical definition of a deterministic finite automaton, its language, its run, and trap states.
- 2.2LessonDesigning a Deterministic Finite AutomatonHow to build a deterministic finite automaton for a given language: ask what the machine must remember, discover five design strategies (one fact, progress in a pattern, counting modulo, stages, a trap state) and practise each at once, on validators from real life.
- 2.3LessonCombining Automata: Complement and ProductA form field with two validity rules: building the product and the complement of deterministic finite automata, proving that the product runs both in parallel, and combining simple validators for and, or and negation.
- 2.4LessonMinimizing Automata by Table FillingTwo correct automata for the same language, one larger than the other: unreachable states, distinguishing words and equivalent states, table filling in rounds, and the quotient automaton that recognizes the same language.
- 2.5LessonMyhill–Nerode: What a State RemembersWhat each state of an automaton remembers, indistinguishable words and Myhill–Nerode classes, a lower bound on the number of states, and the smallest automaton for a language: how to build it and why it is unique up to renaming.
Practice pages (4)
- 2.5.1ExerciseMyhill–Nerode Classes and Minimization: Practice with ToolsCollect words that are pairwise distinguishable and get a lower bound, check whether an automaton is minimal with a certificate of words, minimize an automaton through the words that reach its states, and map each state of a large automaton to a class of the smallest automaton.
- 2.5.2ExerciseMyhill–Nerode PracticeComplete the automaton of the classes in a tool that checks every transition, and questions to solve on paper: the classes of a finite language and of new languages, the classes of the complement, a bound on the number of classes of an intersection, and a claim to refute.
- 2.5.3ExerciseThe Lower Bound in ActionTry to build a DFA with one state fewer than the number of classes of the language; for each attempt the tool shows two words from different classes that reach the same state and the word on which the automaton is wrong.
- 2.5.4ExerciseDistinguishable or NotRepeated practice: the tool draws a language and two words, and you decide whether they are in the same class or write a distinguishing word that the tool checks.
Nondeterministic Finite Automata
In preparationNondeterminism, epsilon transitions, and the equivalence of DFAs and NFAs.
Regular Expressions
In preparationRegular expressions, and conversion in both directions between regular expressions and finite automata.
The Pumping Lemma
AvailableWhy some languages are not regular, and how to prove it.
Context-Free Languages
In preparationContext-free grammars, derivations, and parse trees.
Pushdown Automata
In preparationAdding a stack to a finite automaton, its equivalence with grammars, and the pumping lemma for context-free languages.
Concepts and Notation
AvailableA linked glossary of concepts and a formula sheet of notation, definitions and procedures.
- 8.1LessonGlossary of Concepts and SymbolsDefinitions and notation for alphabets, words, languages and finite automata, linked to explanations and practice.
- 8.2LessonFormula SheetNotation, definitions, constructions and procedures of the Automata and Formal Languages course in one place, in course order.
For the whole course
These materials supplement the teaching in the course. The syllabus, deadlines, assessment instructions, and group announcements are published in the institution’s course system.