Lecture 22. Time of DTM
Time of DTM
TimeM (x) = # of moves that DTM M takes
on input x.
TimeM(x) < infinity iff x L(M).
Time Bound
M is said to have a time bound t(n) if for
every x with |x| < n,
Ti
Lecture 23 Space Complexity
of DTM
Space
SpaceM(x) = # of cell that M visits on the
work (storage) tapes during the
computation on input x.
If M is a multitape DTM, then the work
tapes do not includ
Lecture 25 NP Class
P = ? NP = ? PSPACE
They are central problems in
computational complexity.
If P = NP, then
P
NP-complete
Ladner Theorem
If NP P, then there exists a set A lying
-between P and NP
CS 4384: Automata Theory Fall 2017
Homework #1
1. Examine the following formal descriptions of sets so that you understand which members they
contain. Write a short informal English description of eac
Midterm 1 Practice Problems
1
Set Theory
Answer each of the following as whether the statement is True or False.
2
1.
0 cfw_1
2.
(0, 1) cfw_(1, 0), 1, cfw_0
3.
cfw_0 cfw_0
4.
9N9Z
5.
cfw_9 cfw_9
6.
cf
CS 4384: Automata Theory Fall 2017
Homework #2
Problem #1: Consider the regular languages L1 = cfw_wcfw_0,1* | 00 is not a substring of w, and
L2 = cfw_wcfw_0,1* | w ends with 01.
a) Create DFA's that
Midterm 1 Practice Problems
Alexamler L.\-lmjes
Solutions (with p'scuSSIonj
1 Set Theory
Answer each of the following as whether the statement is True or False.
1. Eli 0 E cfw_1 Zero does nu+ '09-92]
Lecture 16
Deterministic Turing Machine
(DTM)
tape
head
Finite Control
a
l
p
h
a
B
e
The tape has the left end but infinite to the
right. It is divided into cells. Each cell
contains a symbol in an al
Lecture Pushdown Automata
tape
tape head
stack head
finite
control
stack
a
l
p
h
a
b
e
t
The tape is divided into finitely many cells.
Each cell contains a symbol in an alphabet
.
a
The head scans at
Lecture 13 Parsing and
Ambiguity
Given a string x and a CFG G = (V, , R, S),
determine whether x L(G) and if x L(G),
find a derivation S * x.
This problem is called Parsing.
To solve the parsing probl
Lecture 1 String and
Language
String
string is a finite sequence of symbols.
For example,
string
( s, t, r, i, n, g)
CS4384
( C, S, 4, 3, 8)
101001
(1, 0)
Symbols are given through alphabet.
An alp
Lecture 3 Graph Representation
for Regular Expressions
digraph (directed graph)
A digraph is a pair of sets (V, E) such that
each element of E is an ordered pair of
elements in V.
A path is an alter
Lecture 5 Examples of DFA
Construct DFA to accept (0+1)*
0
1
Construct DFA to accept 00(0+1)*
0
0
1
0
0
1
1
1
(0+1)*00(0+1)*
Idea: Suppose the string x1x2 xn is on
the tape. Then we check x1x2, x2x3,
Lecture 6 Nondeterministic
Finite Automata (NFA)
NFA
tape
head
Finite Control
a
l
p
h
a
b
e
t
The tape is divided into finitely many cells.
Each cell contains a symbol in an alphabet
.
a
The head sca
Lecture 7 From NFA to DFA
DFA
For every string x, there is a unique path
from initial state and associated with x.
x
x is accepted if and only if this path ends
at a final state.
NFA
For any string
Lecture 8 From NFA to
Regular Language
Induction on k= # of states other
than initial and final states
K=0
a
a*
b
c*a(d+bc*a)*
a
c
d
k>1
ac*e
c
a
e
ac*d
bc*e
d
b
bc*d
Example 1
0
1
0+10
0
1
0
Why?
10
Lecture 9 Minimum DFA
For each regular language, there is a
unique minimum DFA.
How do we find it?
Applications.
For each language L, how many DFA
accepts L?
Answer: infinity
If we dont allow an
Lecture 10 Pumping Lemma
A property of regular sets
Weak version
Strong version
Applications
Pumping Lemma (weak)
If a language L is accepted by a DFA M
with m states, then any string x in L with |
Lecture 11 Context-Free
Grammar
Definition
A context-free grammar (CFG) G is a
quadruple (V, , R, S) where
V: a set of non-terminal symbols
: a set of terminals (V = )
R: a set of rules (R: V (V U
Lecture 12 Examples of CFL
n
n
Example 1. L=cfw_0 1 | n > 0 is a CFL.
To show that L is a CFL, we need to construct a
CFG G generating L.
Let G = (V, , R, S) where
V = cfw_S
= cfw_0, 1
R =cfw_S |0S1
Course
Professor
Term
Meetings
CS 4384 001 Automata Theory
Dr. William J. Pervin
Fall 2015
TR 8:30am-9:45am in ECSN2.112
Professors Contact Information
Office Phone 972-883-2719 (e-mail preferred)
Off