Theory of Computation
Lecture 2
Bill Hollingsworth
billh@uga.edu
Text: "Introduction to the theory of computation" by Michael Sipser
Functions
A function maps elements from one set to
elements of another set.
If A and B are sets then we say that a func
YunHa Jung
810-380-480
1. (15 points) Construct a push-down automaton that accepts the fol-
lowing context-free language:
The Square brackets and the parentheses must be properly nested. So the strategy
will be to push the open brackets and parents and po
Automata and formal languages
Bill Hollingsworth
November 18, 2013
Time Complexity
Computational hierarchy
Machine
Language
Memory
DFA, NFA
PDA
LBA
Regular
Context-free
Context-sensitive
Turing machine
Turing-recognizable
None
Stack
Finite tape with
movab
Automata and formal languages
Bill Hollingsworth
November 18, 2013
NP
P
Denition
P is the class of languages that can be decided in polynomial
time by a single-tape deterministic Turing machine.
T IM E (nk ).
P=
k
Bill Hollingsworth | grafstate.com
2/32
N
Automata and formal languages
Bill Hollingsworth
November 19, 2013
N P -complete
N P -complete
N P -complete is a class of languages belonging to N P having the special
property that if any language L N P complete is decidable in polynomial
time then all
Automata and formal languages
Bill Hollingsworth
October 19, 2013
Converting a PDA to a CFG
Setup
The algorithm requires PDAs to be in a standard format.
1. There must be exactly one accept state.
2. The PDA must empty the stack before accepting.
3. Each
Automata and formal languages
Bill Hollingsworth
October 22, 2013
Reducibility
Functions
Denition
A function f : is called computable if there is a
Turing machine M such that, for each w , M halts on
w with f (w) left on its tape.
The word function in thi
Automata and formal languages
Bill Hollingsworth
October 19, 2013
Undecidability
HALTT M
HALTT M = cfw_< M, w > |M is a Turing machine accepting input w.
Theorem
HALTT M is undecidable.
Bill Hollingsworth | grafstate.com
2/28
Undecidability
HALTT M is und
Theory of Computation
Lecture 6
Bill Hollingsworth
billh@uga.edu
billnet.org/cs/automata
Text: "Introduction to the theory of computation" by Michael Sipser
Regular languages
Theorem: The union of two regular languages is
a regular language.
If A and B
Automata and formal languages
Bill Hollingsworth
November 19, 2013
P and N P
P
Denition
P is the class of languages that can be decided in polynomial
time by a single-tape deterministic Turing machine.
T IM E (nk ).
P=
k
Bill Hollingsworth | grafstate.com
Automata and formal languages
Bill Hollingsworth
October 22, 2013
Decidability
ADF A
ADF A = cfw_< D, w > |D is a DFA that accepts the string w.
The language ADF A can be viewed as the acceptance problem for DFAs.
ADF A is the set of all possible pairs <
Theory of Computation
Lecture 4
Bill Hollingsworth
billh@uga.edu
billnet.org/cs/automata
Text: "Introduction to the theory of computation" by Michael Sipser
Finite automata
A nite automaton is dened formally as a
5-tuple (Q, , , q, F) where:
1. Q is a n
Theory of Computation
Lecture 1
Bill Hollingsworth
billh@uga.edu
Text: "Introduction to the theory of computation" by Michael Sipser
Overview
We want to understand the capabilities and
limitations of computers.
How do we determine the level of intellig
Theory of Computation
Lecture 5
Bill Hollingsworth
billh@uga.edu
billnet.org/cs/automata
Text: "Introduction to the theory of computation" by Michael Sipser
Regular languages
Denition: A language is said to be regular
if there exists some nite automaton
Theory of Computation
Lecture 3
Bill Hollingsworth
billh@uga.edu
Text: "Introduction to the theory of computation" by Michael Sipser
Proofs
Let P and Q be statements (i.e., predicates). We
use the following terminology:
(P
Q) (If P then Q): Read P only
YunHa Jung
810380480
1). (10 points) Prove that the following function is computable by designing a detailed Turing machine.
Given an informal high-level description of your implementation.
f(x) = 5x + 6, for every x 0
Given a function, f(x) = 5x + 6. Her