- ES Español

- EN English

5.20. Theory of Computation (Mandatory)
- Semester: 4th Sem. Credits: 4
- Hour of this course: Theory: 2 hours; Practice: 2 hours; Laboratory: 2 hours;
- Syllabus:
- htmlonly

Español

English - Prerrequisites:
- CS1D1 Discrete Structures (2nd Sem) itemize
5.20.1. Justification ↑ Back to top
Theory of Computation provides the mathematical foundations to understand what can be computed and how efficiently. It introduces formal languages, automata, and the limits of algorithmic solvability. This knowledge is fundamental for understanding compiler construction, formal verification, and the inherent complexity of computational problems.
5.20.2. Generales Goals ↑ Back to top
- Master the concepts of finite automata and regular expressions.
- Analyze context-free grammars and pushdown automata.
- Understand the Universal Turing Machine as a model of computation.
- Comprehend the boundaries of computability and the Halting Problem.
- Differentiate between complexity classes like P and NP.
5.20.3. Contribution to Outcomes ↑ Back to top
- AG-C08) Problem Analysis: Identifies, formulates, and analyzes complex computing problems. (Usage)
- AG-C12) Applies computer science theory and software development fundamentals to produce computer-based solutions. (Usage)
5.20.4. Content ↑ Back to top
5.20.4.1. Formal Languages and Automata (18 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Sipser, 2012; Hopcroft et al., 2013)
Topics
- Formal automata:
- Finite State
- Pushdown
- Linear Bounded
- Turing Machine enumerate
- Formal languages, grammars and Chomsky Hierarchy:
- Regular (Type-3):
- Regular Expressions enumerate
- Context-Free (Type-2)
- Context-Sensitive (Type-1)
- Recursively Enumerable (Type-0) enumerate )
- Deterministic and nondeterministic automata
- Pumping Lemma proofs:
- Proof of Finite State/Regular-Language limitation
- Pushdown Automata/Context-Free-Language limitation enumerate
Learning Outcomes
- For each formal automaton in this unit:
- Explain its definition comparing its characteristics with this unit's other automata
- Using an example, explain step-by-step how the automaton operates on input including whether it accepts the associated input
- Explain an example of inputs that can and cannot be accepted by the automaton. enumerate [Explain]
- Given a problem, develop an appropriate automaton that addresses the problem [Create]
- Develop a regular expression for a given regular language expressed in natural language [Create]
- Convert among equivalently powerful notations for a language, including among DFAs, NFAs, and regular expressions, and between PDAs and CFGs [Apply]
- Apply pumping lemmas, or alternative means, to prove the limitations of Finite State and Pushdown automata [Apply]
5.20.4.2. Formal Languages and Automata (16 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Sipser, 2012; Hopcroft et al., 2013)
Topics
- Formal automata:
- Finite State
- Pushdown
- Linear Bounded
- Turing Machine enumerate
- Formal languages, grammars and Chomsky Hierarchy:
- Regular (Type-3):
- Regular Expressions enumerate
- Context-Free (Type-2)
- Context-Sensitive (Type-1)
- Recursively Enumerable (Type-0) enumerate
- Normal Forms: Chomsky and Greibach
- Pumping Lemma proofs:
- Proof of Finite State/Regular-Language limitation
- Pushdown Automata/Context-Free-Language limitation enumerate
- Relations among formal automata, languages, and grammars
Learning Outcomes
- For each formal automaton in this unit:
- Explain its definition comparing its characteristics with this unit's other automata
- Using an example, explain step-by-step how the automaton operates on input including whether it accepts the associated input
- Explain an example of inputs that can and cannot be accepted by the automaton. enumerate [Explain]
- Given a problem, develop an appropriate automaton that addresses the problem [Create]
- Convert among equivalently powerful notations for a language, including among DFAs, NFAs, and regular expressions, and between PDAs and CFGs [Apply]
- Apply pumping lemmas, or alternative means, to prove the limitations of Finite State and Pushdown automata [Apply]
- Construct CFGs for formal language descriptions [Assessment]
5.20.4.3. Formal Languages and Automata (16 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Sipser, 2012; Kozen, 2006)
Topics
- Formal automata:
- Finite State
- Pushdown
- Linear Bounded
- Turing Machine enumerate
- Formal languages, grammars and Chomsky Hierarchy:
- Regular (Type-3):
- Regular Expressions enumerate
- Context-Free (Type-2)
- Context-Sensitive (Type-1)
- Recursively Enumerable (Type-0) enumerate
- Decidability, (un)computability, and halting
- The Church-Turing thesis
- Reducibility and reductions
- Equivalent models of algorithmic computation:
- Turing Machines and Variations (e.g., multi-tape, non-deterministic)
- Lambda Calculus
- Mu-Recursive Functions enumerate
Learning Outcomes
- For each formal automaton in this unit:
- Explain its definition comparing its characteristics with this unit's other automata
- Using an example, explain step-by-step how the automaton operates on input including whether it accepts the associated input
- Explain an example of inputs that can and cannot be accepted by the automaton. enumerate [Explain]
- Explain a universal Turing Machine and its operation [Explain]
- Present to an audience of co-workers and managers the impossibility of providing them a program that checks all other programs, including some seemingly simple ones, for infinite loops including an explanation of the Halting problem, why it has no algorithmic solution, and its significance for real-world algorithmic computation [Explain]
- Explain the Church-Turing Thesis and its significance for algorithmic computation [Explain]
- Apply arithmetization and diagonalization to prove the Halting Problem for Turing Machines is Undecidability [Apply]
- Given a known undecidable language, apply a mapping reduction or computational history to prove that another language is undecidable [Apply]
5.20.4.4. Formal Languages and Automata (12 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Sipser, 2012; Kozen, 2006)
Topics
- Formal languages, grammars and Chomsky Hierarchy:
- Regular (Type-3):
- Regular Expressions enumerate
- Context-Free (Type-2)
- Context-Sensitive (Type-1)
- Recursively Enumerable (Type-0) enumerate
- Relations among formal automata, languages, and grammars
- Equivalent models of algorithmic computation:
- Turing Machines and Variations (e.g., multi-tape, non-deterministic)
- Lambda Calculus
- Mu-Recursive Functions enumerate
- Context-Sensitive Languages (Type-1) and applications
Learning Outcomes
- For each formal model in this unit:
- Explain its definition comparing its characteristics with the others in this unit
- Explain example inputs that are and cannot be accepted by the language/grammar. enumerate [Explain]
- Explain the Primitive and General Recursive functions (zero, successor, selection, primitive recursion, composition, and Mu), their significance, and Turing Machine implementations [Explain]
- Explain how computation is performed in Lambda Calculus (e.g., Alpha conversion and Beta reduction) [Explain]
- Explain Rice's theorem and its significance [Explain]
5.20.4.5. Complexity Analysis Framework (3 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Sipser, 2012; Cormen et al., 2022)
Topics
- Complexity Analysis Framework:
- Best, average, and worst-case performance of an algorithm
- Empirical and relative (Order of Growth) measurements
- Input size and primitive operations
- Time and space efficiency enumerate
Learning Outcomes
- Prepare a presentation that explains to first year students the basic concepts of algorithmic complexity including best, average, and worst-case algorithm behavior, Big-O, Omega, and Theta notations, complexity classes, time and space tradeoffs, empirical measurement, and impact on practical problems [Explain]
- Informally evaluate the foundational complexity class of simple algorithms [Evaluate]
5.20.4.6. Asymptotic Notation and Complexity Classes (4 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Sipser, 2012; Cormen et al., 2022)
Topics
- Asymptotic complexity analysis (average and worst-case bounds):
- Big-O, Big-Omega, and Big-Theta formal notations
- Foundational Complexity Classes and Representative Examples/Problems:
- \(O(1)\) Constant (e.g., array access)
- \(O(\log_2 n)\) Logarithmic (e.g., binary search)
- \(O(n)\) Linear (e.g., linear search)
- \(O(n \log_2 n)\) Log Linear (e.g., mergesort)
- \(O(n^2)\) Quadratic (e.g., selection sort)
- \(O(n^c)\) Polynomial (e.g., \(O(n^3)\) Gaussian elimination)
- \(O(2^n)\) Exponential (e.g., Knapsack, Satisfiability (SAT), Traveling Sales-Person (TSP), all subsets)
- \(O(n!)\) Factorial (e.g., Hamiltonian circuit, all permutations) enumerate enumerate
Learning Outcomes
- Using examples, explain each of the foundational complexity classes in this unit [Explain]
- Explain to a non-technical audience the significance of tractable versus intractable algorithms using an intuitive explanation of Big-O complexity [Explain]
5.20.4.7. Complexity Analysis: Recursion, Amortization, and Tight Bounds (7 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Sipser, 2012; Cormen et al., 2022)
Topics
- Little-o, Little-Omega, and Little Theta notations
- Formal recursive analysis
Learning Outcomes
- Use recurrence relations to evaluate the time complexity of recursively defined algorithms [Apply]
- Apply elementary recurrence relations using a form of the Master Theorem [Apply]
5.20.4.8. Computational Complexity Theory (6 hours) [Skills ] ↑ Back to top
Bibliography: (Sipser, 2012; Cormen et al., 2022)
Topics
- Tractability and intractability:
- P, NP, and NP-Complete Complexity Classes
- NP-Complete Problems (e.g., SAT, Knapsack, TSP)
- Reductions enumerate
- Turing Machine-based models of complexity:
- Time complexity:
- P, NP, NP-C, and EXP classes
- Cook-Levin theorem enumerate
- Space Complexity:
- NSpace and PSpace
- Savitch's theorem enumerate enumerate
Learning Outcomes
- Explain the significance of NP-Completeness [Explain]
- Explain how NP-Hard is a lower bound and NP is an upper bound for NP-Completeness [Explain]
- Explain examples of NP-complete problems [Explain]
- Explain the Cook-Levin Theorem and the NP-Completeness of SAT [Explain]
- Explain the classes P and NP [Explain]
- Prove that a problem is NP-Complete by reducing a classic known NP-C problem to it (e.g., 3SAT and Clique) [Create]
- Explain the P-space class and its relation to the EXP class [Explain]
5.20.5. Bibliography ↑ Back to top
Sipser, M. (2012). Introduction to the Theory of Computation. Cengage Learning, 3rd edition.
Hopcroft, J. E., Motwani, R., and Ullman, J. D. (2013). Introduction to Automata Theory, Languages, and Computation. Pearson, 3rd edition.
Kozen, D. C. (2006). Theory of Computation. Springer.
Cormen, T. H., Leiserson, C. E., Rivest, R. L., and Stein, C. (2022). Introduction to Algorithms. MIT Press, 4th edition.