Computer Science
CS402 Past Papers
Theory of Automata
CS402 current papers · Fall 2026
Questions students remember from this semester's exams
Midterm
5 PDFs
CS402 Midterm Compiled
- Solved subjective · by Moaaz Siddiq
- Solved MCQs · by Moaaz Siddiq
Final Term
4 PDFs
CS402 Final Term Compiled
- Solved MCQs · by Moaaz Siddiq
- Solved subjective · by Moaaz Siddiq
About CS402
Theory of Automata, course code CS402, is the Virtual University introduction to formal languages and abstract machines. The official synopsis divides it into two strands. Formal languages cover recursive definitions of languages, regular grammars, regular expressions, and context-free grammars and languages. Automata cover deterministic and non-deterministic finite automata, transition graphs, and deterministic and non-deterministic pushdown automata, along with Moore and Mealy machines and Turing machines. The official course calendar starts with languages and computer theory, the Kleene star closure, regular expressions and equivalent regular expressions. Finite automata come next, with equivalent FAs and FAs for finite languages, then transition graphs and generalised transition graphs. Kleene's theorem is worked through over several lectures, alongside nondeterminism, the nondeterministic finite automaton, NFAs with null strings, and building NFAs for the concatenation of FAs. The course then covers distinguishable and indistinguishable strings, Moore and Mealy machines and their equivalence, finite automata with output, and regular languages and the complement of a language, where the calendar places the midterm. After the midterm, students study non-regular languages and the pumping lemma in two versions, a pseudo theorem, decidability, and deciding whether two languages are equivalent. Context-free grammars follow, with trees, Polish notation, regular grammars, null productions and Chomsky normal form. Pushdown automata are introduced through a new format for FAs, then the nondeterministic PDA, the PDA for a given CFG, and conversion forms of a PDA. The last lectures cover non-context-free languages and the pumping lemma for CFLs, decidability and parsing techniques, and the Turing machine. According to the official learning outcomes, a learner should be able to explain different ways of defining languages, describe finite automata, separate regular from non-regular languages, and work with context-free grammars, parse trees, ambiguity and pushdown automata. Solved CS402 past papers are listed here as they are added.
More Computer Science courses
- CS101Introduction to Computing
- CS201Introduction to Programming
- CS205Information Security
- CS301Data Structures
- CS302Digital Logic Design
- CS304Object Oriented Programming
- CS401Computer Architecture and Assembly Language Programming
- CS403Database Management Systems