NotesM.Sc ITTheory of Computation
PGCA1927

Theory of Computation Notes

Program:M.Sc IT
Semester:Semester 4
Credits:4
Units:4 Units

Subject Overview

The first Elective-I option, covering formal language theory — finite automata and regular languages, context-free grammars and normal forms, pushdown automata, and Turing machines, computability and computational complexity including the halting problem. A 4-credit elective theory paper.

Unit-wise Syllabus

4 units — open any unit for detailed topic-wise notes, diagrams and important exam questions

  • Formal language
  • diagonal argument
  • deterministic and non-deterministic finite automata and their equivalence
  • Mealy and Moore models
  • finite automata minimization
  • regular languages/grammars/expressions
  • pumping lemma
  • non-regular languages
  • lexical analysis
ComparisonDFA vs NFA
DFA
NFA

Transitions per input

Exactly one

Zero, one or many

ε-moves

Not allowed

Allowed (ε-NFA)

Power

Same: regular languages

Same: regular languages

Size

Can be exponentially larger

Often smaller

Study guide

This unit covers formal languages, the diagonal argument, DFA and NFA and their equivalence, Mealy and Moore machines, minimisation, regular languages, grammars and expressions, the pumping lemma and lexical analysis. Practise constructing DFAs for given languages.

Read Unit 1 notes
  • Properties of context-free languages
  • Chomsky classification
  • context-free grammars
  • grammar simplification
  • Chomsky Normal Form
  • Greibach Normal Form
HierarchyChomsky hierarchy
  1. Type 0: recursively enumerable

    Turing machine

  2. Type 1: context-sensitive

    Linear bounded automaton

  3. Type 2: context-free

    Pushdown automaton

  4. Type 3: regular

    Finite automaton

Study guide

You study properties of context-free languages, the Chomsky classification, context-free grammars, simplification, Chomsky Normal Form and Greibach Normal Form. Practise converting grammars to CNF.

Read Unit 2 notes
  • Ambiguity
  • parse trees
  • equivalence of PDAs
  • non-deterministic PDA
  • standard Turing machines and variations
  • universal Turing machines
  • Church-Turing thesis
  • recursive and recursively enumerable languages
  • context-sensitive languages
  • Chomsky hierarchy
  • TM construction for simple problems
ComparisonCNF vs GNF
Chomsky Normal Form
Greibach Normal Form

Rule shapes

A → BC or A → a

A → a followed by variables

Use

CYK parsing algorithm

Top-down parsing, PDA construction

Derivation length

2n − 1 steps for a string of length n

n steps

Study guide

You study ambiguity, parse trees, pushdown automata and equivalence, non-deterministic PDA, Turing machines and variations, universal Turing machines, the Church-Turing thesis, recursive and recursively enumerable languages and the Chomsky hierarchy. Construct Turing machines for simple problems.

Read Unit 3 notes
  • Unsolvable problems
  • the halting problem
  • Post correspondence problem
  • unsolvable problems for context-free languages
  • measuring and classifying complexity
  • tractable and intractable problems
ComparisonDecidability and complexity classes
Meaning
Example

Decidable

A TM always halts with yes or no

Is a string in a regular language?

Undecidable

No algorithm exists

Halting problem, Post correspondence

P

Solvable in polynomial time

Sorting, shortest path

NP-complete

Hardest problems in NP

SAT, travelling salesman (decision)

Study guide

You study unsolvable problems, the halting problem, Post correspondence problem, undecidability for CFLs, complexity measurement and tractable versus intractable problems. Understand why the halting problem cannot be solved.

Read Unit 4 notes

Why Theory of Computation Matters

Theory of computation explains what computers can and cannot do, and underlies compiler design, language processing and algorithm theory, as well as GATE and research.

How to Prepare for Theory of Computation

  • Practise automata constructions and proofs.
  • Learn the Chomsky hierarchy as a table of machines and grammars.
  • Understand the intuition behind undecidability.

Theory of Computation: Frequently Asked Questions

What is the halting problem?

It is the problem of deciding whether a given program will stop or run forever, which has been proven impossible to solve in general.

Want the Complete Notes & Past Papers?

WhatsApp us and we'll send you the full notes, question banks, and previous year papers for Theory of Computation.