CSE 211 (Theory of Computation) : Atif Hasan Rahman
CSE 211 (Theory of Computation) : Atif Hasan Rahman
CSE 211 (Theory of Computation) : Atif Hasan Rahman
Assistant Professor
Department of Computer Science and Engineering
Bangladesh University of Engineering & Technology
Theory of Computation
Theory of Computation
Automata
Automaton - a machine made in imitation of a human being
DFA, NFA
Context-free grammar (CFG), pushdown automata (PDA)
Computability
Decidability
What can or cannot be solved
Complexity
Tractability
What can or cannot be solved “efficiently”
Time complexity: P, NP, NP-complete, NP-hard
Space complexity: PSPACE
Theory of Computation
— Edsger W. Dijkstra
Theory of Computation
Models of Computation
Finite Automata
DFA, NFA
Limited amount of memory
Applications in compilers, control units of hardware, etc.
Context-free grammar
More expressive than finite automata
Applications in compilers, AI and many other areas
Turing Machine
Even more powerful
Can simulate a computer!
Problems Turing machine cannot solve are beyond
theoretical limits of computation
Alan Turing
Syllabus
Regular languages
Regular expressions
Finite automata
Deterministic finite automata (DFA)
Nondeterministic finite automata (NFA)
Context-free languages
Context free grammars (CFG)
Pushdown automata (PDA)
Turing machines
Equivalence with a computer
Decidability
Complexity
Time and space complexity
Syllabus
Regular languages
Regular expressions
Finite automata
Deterministic finite automata (DFA)
Nondeterministic finite automata (NFA)
Context-free languages
Context free grammars (CFG)
Pushdown automata (PDA)
Turing machines
Equivalence with a computer
Decidability
Complexity
Time and space complexity
Syllabus
Regular languages
Regular expressions
Finite automata
Deterministic finite automata (DFA)
Nondeterministic finite automata (NFA)
Context-free languages
Context free grammars (CFG)
Pushdown automata (PDA)
Turing machines
Equivalence with a computer
Decidability
Complexity
Time and space complexity
Regular Languages
Regular languages
Languages recognized by finite automata - DFA, NFA
Languages described by regular expressions
Limitations
Finite number of states
Hence finite amount of memory
An example of a non-regular language
B = {0n 1n |n ≥ 0}
Regular Languages
Regular languages
Languages recognized by finite automata - DFA, NFA
Languages described by regular expressions
Limitations
Finite number of states
Hence finite amount of memory
An example of a non-regular language
B = {0n 1n |n ≥ 0}
Context-Free Languages
Context-Free Languages
Languages described by context-free grammars (CFG)
Languages recognized by pushdown automata (PDA)
Extensively used in compilers (parsers)
First used in study of human languages
An Informal Example
Language of palindromes
Palindrome
A string that reads the same backward and forward
0110, 11011,
Recursive definition for palindromes (over binary alphabet)
0, 1 and are palindromes
if w is a palindrome, then 0w0 and 1w1 are palindromes
An Informal Example
An Informal Example
Exercise
{0n 1n |n ≥ 0}
01
0011
000111
...
n n
CFG for {0 1 |n ≥ 0}
Logistics
Classes
Tuesdays and Wednesdays - 10am
Zoom link https://bdren.zoom.us/j/69041606159?
pwd=TXZDd0ZCcFg0VGdQbnZWa052VG1lQT09
Office hours
?
Textbook
J. E. Hopcroft, R. Motwani, and J. D. Ullman, Introduction
to Automata Theory, Languages, and Computation
Reference books
M. Sipser, Introduction to the Theory of Computation
H. R. Lewis and C. H. Papadimitriou, Elements of the
Theory of Computation