Discrete
II: Theory of Computation
Spring 2010
|

email:
charles.e.hughes@knights.ucf.edu
Structure: TR 10:30-11:45, HEC-117;
28 class periods, each 75 minutes long.
Go To Week 1, 2, 3, 4,
5, 6, 7,
8, 9, 10,
11, 12, 13,
14
Instructor: Charles Hughes; Harris Engineering Center 247C;
823-2762
Office Hours: TR 9:30-10:00;
13:15-14:45 (1:15PM to 2:45PM)
GTA: Sarah Buchanan, sbuchanan@knights.ucf.edu,
HEC201; OH: MW 14:00-16:00 (2:00PM to 4:00PM)
Text: Sipser, Introduction
to the Theory of Computation 2nd Ed., Course Technologies, 2005+Notes
Secondary References: Hopcroft, Motwani and
Ullman, Introduction to Automata Theory, Languages and Computation
2nd Ed., Addison-Wesley, 2001.
Prerequisites: COT 3100; COP3503
Web Pages:
Base URL: http://www.cs.ucf.edu/courses/cot4210/Spring2010
Notes URL: http://www.cs.ucf.edu/courses/cot4210/Spring2010/Notes/COT4210Notes.pdf
Assignments: About 8 to 10.
Exams: 2 midterms and a final.
Material: I will draw heavily from Chapters 0-7 of Sipser.
Some material will also come from Hopcroft et al.. You are responsible
for
material discussed in notes and in in-class discussions. Not all of
this is addressed in either of these texts. I highly recommend
attending class, interacting with me and listening very carefully when
I say a topic is important to me; hint, hint about exam questions ;-)
Exam Dates (Tentative): Exam#1 -- February 18;
Withdraw Deadline -- March 5; Exam#2 -- April 1; Final -- Tuesday,
April 27,
10:00-12:50; Spring Break -- March 6-14
Evaluation (Tentative):
Mid Terms -- 100 points each
Final Exam -- 150 points
Assignments -- 100 points
Bonus -- 50 points added to your best exam
Total Available: 500
Grading
will be A >= 90%, A- >=88%, B+ >= 85%, B >=
80%, B- >=78%, C+ >= 75%, C >= 70%, C->=60%, D >=
50%, F < 50%.
Weeks#1: (1/12, 1/14) -- Notes pp. 2-45 (Chapter 0 of
Sipser); Syllabus
- Introduction to computability: an historical perspective
- Sets, sequences, relations and
functions (review)
- Basic notions of languages, computability and complexity
- Chomsky Hierarchy (sets context
for much of course)
Assignment #0
Send me and Sarah an e-mail with subject
COT4210 containing
(1) When and where did you take Discrete I or its equivalent?
(2) What times are you NOT free to make office hours?
Due: 1/15 by midnight
Assignment #1
See Page 39 in Notes
Due: 1/21 by 10:30AM (Key) Comments
Week#2: (1/19, 1/21)
-- Notes pp.
45-70 (Chapters 0 and 1 of Sipser); Dr. Workman's Notes pp. 1-8
- Chomsky Hierarchy (continued
from week 1)
Classes of languages
Phrase Structured Languages = (Recursively) Enumerable = Turing
Recognizable = Semi-Decidable; Membership in an re language is
undecidable
Decidable = Recursive: This class cannot be generated by any definable
class of grammars
Context Sensitive Languages (CSL) are generated by Context Sensitive Grammars
(CSG or Type1) and regognized
by Linear Bounded Automata (LBA); Membership in a CSl is decidable
Context Free Languages (CFL) are generated by Context Free Grammars
(CFG or Type2) and recognized by Non-Deterministic Pushdown Automata
(NPDA)
Deterministic (unambiguous) Context Free Grammars are an undecidable
subset of CSG, but all deterministic CSLs are generated by LR(1)
grammars (one token lookahead)
Regular Languages are
generated by Regular (Right Linear) Grammars (Type3) and recognized by
Finite State Automata (FSA, DFA or NFA)
- Computability:
basic goals and definitions (solved,
solvable,
semi-decidable and complements)
- How computability concepts relate to each other
- Complexity theory: basic goals; big question is P=NP?
- Formal definition of a Determinitic
Finite (State) Automaton (DFA)
A = (Finite State Set, Finite Input Alphabet, Transition Function,
Start State, Final States),
where transtion function maps (Current State, Current Input
Symbol) to Next State
Can represent Transition Function by State Transition Table or State
Transtion Diagram (preferred)
Assignment #2
See Page 58 in Notes
Due: 1/28 by 10:30AM (Key) Comments
Week#3: (1/26, 1/28) --
Notes pp.
73-79
(Chapter
1 of Sipser); Samples; Dr. Workman's Notes pp. 8-18
- Determinitic Finite (State) Automaton (DFA): what and why?
Sequential circuits; pattern matchers; lexical analyzers; simple
game/simulation behaviors
Formal definition and examples
State transition diagrams versus state transition tables
Simple closure (union, intersection, exclusive or, negation)
- Non-determinism (NFA)
Closure under concatenation, Kleene *
Formal definition and examples
- Equivalence of DFAs and NFAs (subset of all states
construction)
- Reachable states from some given state
- Reaching states to some given state
- Closure of Regular Languages under Prefix, Postfix and
Substring
- Minimizing the states of a DFA (indistinguishable vs
distinguishable states)
Assignment #3
See Page 71 in Notes
Due: 2/4 by 10:30AM (Key) Comments

Week#4: (2/2, 2/4)
-- Notes pp.
80-84
(Chapter
1 of Sipser); Regular
Equations; Samples;
Dr.
Workman's Notes pp. 17-39
- Minimization example using notion of distinguishable
states
- Regular Expressions (closure of
primitive sets under union, concatenation and star)
- Every language defined by a Regular Expression is
accepted by an NFA
- Generalized NFA (GNFA) -- Definition
- Every language accepted by a DFA is defined by a Regular
Expression (ripping states out)
- Alternate approach through Rij(k) construction
- Closure of Regular Languages under
Reversal
- Languages defined by Regular Equations (not in text)
and DFAs
Assignment #4
See Page 84 in Notes
Due: 2/11 by 10:30AM (Key) Comments

Week#5: (2/9, 2/11)
-- (Chapters
1 and 2 of Sipser); Samples; Dr. Workman's Notes pp. 40-46
- Basic notion of grammars and
languages generated by grammars
- Chomsky hierarchy (Type 3
through Type 0 grammars and languages)
- Regular (right linear, Type 3)
grammars
- Context free grammars
- Derivations (leftmost/rightmost)
- Parsing (parse trees; top
down/bottom up)
- Notion of ambiguity (inherent
versus due to a specific grammar) (Not on Exam#1)
- Classic non-regular languages {0n1n
| n is greater than or equal to 0}
- Pumping Lemma for Regular
Languages
- Proofs that certain languages
are not
regular using Pumping Lemma
- Topics and Promises for
MidTerm # 1
- Sample Exam
-- Complete this for
discussion on 2/15 and 2/16 (key)
Week#6: (2/15 (Help Session), 2/16 (review),
2/18 (Midterm1))
- Help Session in CL1-320 on 2/15 from
2:00
to 4:00
- Review and go over sample questions
- MidTerm 1 (Chapters 0, 1; Notes pp. 1-84; Assignments
1-4;
Regular Equations; Pumping Lemma;
Dr. Workman's Notes, pp. 1-33 and 40-46 that were covered in class)
Week#7: (2/23, 2/25) -- Chapter
2 of Sipser; Dr.
Workman's Notes pp. 34-63
- Right-invariant equivalence relationships and
Myhill-Nerode Theorem
- Existence of
minimal state machine for any Regular Language
- Proofs that certain languages
are not
regular using Pumping Lemma and Myhill-Nerode
- Review Chomsky hierarchy
- Notion of instantaneous
description for automata and grammars
- Notions of derivation and the
language generated by a grammar
- Every language generated by a
regular grammar is regular
- Every regular language is
generated by a type 3 grammar
- The right and left linear
grammars generate equivalent classes of languages
- Grammars and closure properties
(union, concatenation, Kleene *)
- Transducers (automata with
output); Mealy and Moore Models
Assignment #5
See Page 85 in Notes
Due: 3/4 by 10:30AM (Key) Comments
Week#8: (3/2, 3/4) --
Chapter 2 of Sipser; Dr.
Workman's Notes pp. 57-68
- Closure under homomorphism and
substitution
- Closure under quotient, prefix,
substring and suffix, using substitution and intersection
- Constructions using regular
expressions and NFAs
- Difficulty with direct proof and
right linear grammars
- Complexity of various algorithms
for finite automata and regular grammars
- Transducers (automata with
output); Mealy and Moore Models
- Context free grammars (CFGs) and
languages (CFLs)
- Sample grammars
- Pumping Lemma for CFLs (no proof)
- Closure properties for CFLs
(union, concatenation, Kleene *)
- Non-CFLs {a^n b^n c^n }, {ww | w is a string over Sigma* }
- Non-closure (intersection and
complement)
- Intersection of {a^n b^n c^m}
and {a^m b^n c^n}
- Complement of {ww | w is a
string over Sigma* } is a CFL
- Note: 3/5 is the
Withdraw Deadline
Week#9: (3/16, 3/18) -- Chapter
2 of Sipser; Dr.
Workman's Notes pp. 64-77, 86, 87
- Midterm Exam#1 Key
- Complement of {ww | w is a
string over Sigma* } is a CFL
- Parse
trees, leftmost and
rightmost derivations, and ambiguity
- Chomsky Normal Form (CNF) and
the algorithm to convert a CFG to a CNF
- Eliminate lambda rules and
accommodate for nullable non-terminals
- Eliminate unit rules (chains
of non-terminals)
- Eliminate useless
non-terminals (no terminal string can be generated from them)
- Eliminate unreachable
non-terminals (cannot get to them from S)
- On rhs's of length >1,
replace each terminal with symbol that derives it directly
- Change rhs of length k,
k>2, to two rules, one with rhs of length 2 and the other of length
k-1
- More on parse trees and relation
of height to longest length of string produced
- Cocke-Kasami-Younger polynomial
time CFG parser (details on pp. 86,87 of Dr.
Workman's Notes)
- Proof of Pumping Lemma for CFLs
- Pushdown automata (PDA)
non-determinstic vs deterministic
- Shorthand notation for PDA
Assignment #6 (also a prep for Exam#2)
PDF
Due: 3/25 by 10:30AM (Key) Comments
Week#10: (3/23, 3/25) --
Notes pp.
86-93; Chapter 2, 3 of Sipser; Dr.
Workman's Notes pp. 78-85
- Equivalence of a variety of
PDA formalizations
- Bottom of stack marker versus
none at start
- Ability to push none or one,
versus many characters on stack
- Limitation of pop or push as
only stack moves
- Recognition by accepting
state,
by empty stack and by both
- PDA equivalence to CFG
- Greibach Normal Form
- Top-down vs bottom-up acceptance
- Topics and Promises for
MidTerm # 2
- Sample Exam -- This is mostly Assignment#6
- Old Midterm (key)

Week#11: (3/29
(Help Session), 3/30 (Review), 4/1 (Midterm2))
- Help Session on 3/29 from 2:00 to 3:50 in
room HEC-101
- Closure properties for CFLs
(intersection with regular, substitution)
- Using substitution and
intersection with regular to get many more, e.g., prefix, suffix and
quotient with regular
- Review and go over sample questions
- MidTerm 2
Week#12: (4/6, 4/8)
-- Notes pp. 94-144; Chapters 4, 5 of Sipser
- Turing Machines
- Variants of Turing Machines
- Turing Machines as enumerators/recognizers
- The Halting Problem -- classic undecidable but recognizable
(semi-decidable, enumerable) problem
- Diagonalization proof for Halting Problem
- Complement cannot be enumerated (recognized by a TM)
- Reducibility as a technique to show undecidability
- Rice's Theorem
Assignment #7 (also a postmortem from
Exam#2)
PDF
Due: 4/15 by 10:30AM (Key) Comments
Week#13: (4/13,
4/15) -- Notes pp.
127-177; Chapter 5, 7 of Sipser
- Many-one reducibility
- Rice's Theorem
- Undecidable problems in formal language theory
- Linear bounded automata
- Post Correspondence Problem (PCP)
- Applications of PCP
- Traces (computational histories)
- Is L = Sigma*? Is L = L^2? Non-closure of L1/L2 (both CFLs)
- Notion of re completeness
- Introduction to Complexity Theory
- Verifiers versus solvers
- NP as verifiable in
deterministic polynomial time
- P as solvable in deterministic
polynomial time
- NP as solvable in
non-deterministic polynomial time
- Million dollar question: P = NP ?
- Some NP problems that do not
appear to be in P: SubsetSum, Hamiltonian Path, k-Clique
- Concepts of NP-Complete and
NP-Hard
- Canonical NP-Complete problem:
SAT (Satisfiability)
- Construction that maps every
problem solvable in non-deterministic polynomial time on TM to SAT
Assignment
#8
Sample Final
Due: 4/22 by
10:30AM (Key) This is for discussion only.
Week#14: (4/20, 4/22) -- Notes pp. 168-185;
Chapter
7 of Sipser
- NP-Hard
- QSAT as an example of NP-Hard, possibly not NP
- co-P and co-NP
- P = co-P ; P contained in
intersection of NP and co-NP
- 3SAT as a second NP-Complete problem
- 3SAT to SubsetSum reduction
- Scheduling on multiprocessor
systems
- Midterm Exam#2 Key
- Finish up undecidability results
about grammars
- Final Exam Topics
- Sample Final (Key)
Review Session; Monday April 26;
Time:2:00 to 4:00; Room: HEC-302
Final Exam; Tuesday April
27; 10:00 - 12:50 in HEC117
© UCF (Charles E. Hughes)
-- Last Modified April 22, 2010