Discrete
II: Theory of Computation
Fall 2009 |

email:
charles.e.hughes@knights.ucf.edu
Structure: TR 13:30-14:45 (1;30PM - 2:45PM), HEC-117; 29 class periods, each 75 minutes long.
Go To Week 1, 2, 3, 4,
5, 6, 7,
8, 9, 10,
11, 12, 13,
14, 15
Instructor: Charles Hughes; Harris Engineering Center 247C;
823-2762
Office Hours: TR 15:15-16:45
(3:15PM - 4:45PM)
GTA: Raymond Ho HEC308; yiuyuho@cs.ucf.edu
; OH: MW 16:00 -1800 (4:00PM - 6: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/Fall2009
Notes URL: http://www.cs.ucf.edu/courses/cot4210/Fall2009/Notes/COT4210Notes.pdf
Assignments: 10 or so.
Exams: 2 midterms and a final.
Material: I will draw heavily from Chapters 0-7 of Sipser.
Some material will also come from Hopcroft. 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 ;-)
Important Dates: Exam#1 -- October 1; Withdraw Deadline --
October 16; Exam#2 -- November 5; Final -- Tuesday, December 8,
13:00-15:50
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%, B+ >= 87%, B >= 80%, C+ >=
77%, C >= 70%, D >= 50%, F < 50%
Weeks#1: (8/25, 8/27) -- 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
Assignment #0
Send me and Raymond 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: 8/28 by midnight
Assignment #1
See page 39 of Notes
Due: 9/3 by 1:30PM (Key) Pages 1-5
Week#2: (9/1, 9/3)
-- Notes pp.
46-75 (Chapters 0 and 1 of Sipser); Dr. Workman's Notes pp. 1-8
- 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?
- Determinitic Finite (State) Automaton (DFA): what and why?
Sequential circuits; pattern matchers; lexical analyzers; simple
game/simulation behaviors
Formal definition and examples
State diagrams versus state transition tables
Simple closure *union, intersection, exclusive or, negation"
- Non-determinism (NFA)
Why: Closure under concatenation, Kleene *
Formal definition and examples
Assignment #2
See page 64 of Notes
Due: 9/10 by 1:30PM (Key) Pages 6-9
Week#3: (9/8, 9/10) -- Notes pp. 68-77
(Chapter
1 of Sipser); Regular
Equations; Samples; Dr. Workman's Notes pp. 8-18
- Equivalence of DFAs and NFAs (subset of all states
construction)
- Closure of Regular Languages under union, concatenation,
Kleene *
- 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 pages 76 of Notes (See Notes, I reduced this to 3 questions)
Due: 9/17 by 1:30PM (Key)

Week#4: (9/15, 9/17)
-- Notes pp.
77-80
(Chapter
1 of Sipser); 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 77 of Notes
Due: 9/24 by 1:30PM (Key) Comments

Week#5: (9/22, 9/24)
-- (Chapters
1 and 2 of Sipser); Samples; Dr. Workman's Notes pp. 40-44
- 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 (Not on
Exam#1)
- Notion of ambiguity (inherent
versus due to a specific grammar) (Not on Exam#1)
- Dr. Workman talking on parsers
- 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 9/29 (key)
Week#6: (9/28 (Help Session), 9/29 (review),
10/1 (Midterm1)
- Raymond will do Help Session in
HEC-101 on 9/28 from 4:00 to 6:00
- Review and go over sample questions
- There are more sample questions on pp. 86-89 of Notes.
- MidTerm 1 (Chapters 0, 1; Notes pp. 1-80; Assignments
1-4;
Regular Equations; Pumping Lemma, Myhill-Nerode;
Dr. Workman's Notes, pp. 1-39 that were covered in class)
Week#7: (10/6, 10/8) -- 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 90 of Notes
Due: 10/15 by 1:30PM (Key) Comments
Week#8: (10/13, 10/15) --
Chapter 2 of Sipser; Dr.
Workman's Notes pp. 57-68
- Midterm Exam#1 Key
- 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: 10/16 is the
Withdraw Deadline
Week#9: (10/20, 10/22) -- Chapter
2 of Sipser; Dr.
Workman's Notes pp. 68-83
- Parse trees, leftmost and
rightmost derivations, and ambiguity
- Chomsky Normal Form (CNF) and
the algorithm to convert a CFG to a CNF
- Eliminate useless
non-terminals (no terminal string can be generated from them)
- Eliminate unreachable
non-terminals (cannot get to them from S)
- Eliminate lambda rules and
accommodate for nullable non-terminals
- Eliminate unit rules (chains
of non-terminals)
- On rhs's of length >1,
replace each terminal with symbol that derive 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. 77,79 of Dr.
Workman's Notes
- Pushdown automata (PDA)
non-determinstic vs deterministic
- Shorthand notation for PDA
- Equivalence of a variety of
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
Assignment #6 (also a prep for Exam#2)
It's a pdf
Due: 10/29 by 1:30PM (Key)
Week#10: (10/27, 10/29) --
Notes pp.
91-95; Chapter 2, 3 of Sipser; Dr.
Workman's Notes pp. 83-87
- PDA equivalence to CFG
- Greibach Normal Form
- Top-down vs bottom-up acceptance
- Proof of Pumping Lemma for CFLs
- 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
- Introduction to computability theory (a bit of history)
- Topics and Promises for
MidTerm # 2
- Sample Exam -- This is mostly Assignment#6, a topic for
discussion on 11/3
- Supplementary
questions (topics since Assignment#6) (key)

Week#11: (11/3,
11/5) -- Notes
pp. 96-120; Chapter 4 of Sipser
- Raymond will do Help Session in
ENGR2-302 on 11/2 from 4:00 to 5:50
- Basic notions of what is computable/non-computable, what is
recognizable/non-recognizable
- Review and go over sample questions
- Raymond will do second Help Session in
TBD on 11/4 from 4:00 to 5:30
- MidTerm 2
Week#12: (11/10,
11//12) -- Notes pp.
120-179; Chapters 4, 5 of Sipser
- Hilbert 10th problem (over one variable; over many variables
- 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
- Many-one reducibility
Assignment #7 (also a postmortem from
Exam#2)
It's a pdf
Due: 11/19 by 1:30PM (Key) Comments
Week#13: (11/17,
11//19) -- Notes pp.
120-179; Chapters 5, 7 of Sipser
- Rice's Theorem
- Undecidable problems in formal language theory
- Traces (computational histories)
- Linear bounded automata
- Post Correspondence Problem (PCP)
- Applications of PCP
- Introduction to Complexity Theory
Assignment
#8
See page 155 of Notes
Due: 12/1 by
1:30PM (Key) Comments
Week#14: (11/24, Turkey Day) -- Notes pp. 179-195;
Chapter
7 of Sipser
- 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
- co-P and co-NP
- P = co-P ; P contained in intersection of NP and co-NP
- 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)
- Start of construction that maps every problem solvable in non-deterministic polynomial time on TM to SAT

Week#15: (12/1,
12/3) -- Notes pp. 179-195;
Chapter 7 of Sipser
- Finish showing SAT is NP-Complete
- 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 (in Notes, pages 202-209)
- Sample Final (Key)
Raymond's Review Session; Monday December 7; 16:00 - 18:00 (4:00PM to 6:00PM); Room: ENGR2-302
Final Exam; Tuesday December 8; 13:00 - 15:50 (1:00PM - 3:50PM)
© UCF (Charles E. Hughes)
-- Last Modified December 6, 2009