Discrete
II: Theory of Computation
Fall 2016 |
email:
charles.e.hughes@knights.ucf.edu
Structure: TR 1630-1745 (4:30PM - 5:45PM), CB2-204; 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 1430-1545
(2:30PM - 3:45PM)
GTA: Sina Lotfian; Harris Engineering Center 234, Desk 1; slotfian@knights.ucf.edu
Office Hours: W 1000-1200 (10:00AM - 12:00PM); F 1600-1800 (4:00PM - 6:00PM)
Image of Sina so you recognize him
Text: Sipser, Introduction
to the Theory of Computation 2nd/3rd Ed., Cengage Learning, 2005/2013+Notes
Secondary References: Hopcroft, Motwani and
Ullman, Introduction to Automata Theory, Languages and Computation
3rd Ed., Prentice
Hall, 2006.
Prerequisites: COT 3100; COP3503
Web Pages:
Base URL: http://www.cs.ucf.edu/courses/cot4210/Fall2016
Notes URL: http://www.cs.ucf.edu/courses/cot4210/Fall2016/Notes/COT4210Notes.pdf
Quizzes and 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 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 ;-)
Important Dates: Exam#1 -- Tentatively September 29; Withdraw Deadline --
October 31; Exam#2 -- Tentatively November 3; Final -- Thursday, December 8,
1600-1850 (4:00PM-6:50PM)
Evaluation (Tentative):
Mid Terms -- 100 points each
Final Exam -- 175 points
Quizzes and Assignments -- 75 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: (8/23, 8/25) -- Notes pp. 2-66 (Chapters 0 and 1 of
Sipser); Syllabus
- Ground rules
- Sets, sequences, relations and
functions (review)
- Ordinals, cardinals and infinities
- Graphs
- Languages
- Set/Language recognizers and generators
- Introduction to computability: historical and motivation perspective
- Basic notions of automata theory, formal languages,
computability and complexity
- Brief introduction to Chomsky
Hierarchy (sets context for much of course)
- Proof techniques
- Some
history of the genesis of the theory of computation (Hilbert, Godel,
Turing, Post, Kleene)
- Complexity theory: basic goals; big question is P=NP?
- Discussions
about non-determinism versus determinism
- 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)
- 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
- Some hand-written notes for this week.
Assignment #1
See page 13 of Notes
Due: Midnight Friday, 8/26 (Key)
Assignment #2
See page 44 of Notes
Due: Thursday, 9/1 at 4:30PM (Key)
Week#2: (8/30, 9/1)
-- Notes pp. 67-100 (Chapter 1 of Sipser)
- DFA closure (complement, union, intersection, difference, exclusive or)
- Non-determinism (NFA)
Closure under concatenation, Kleene *
Formal definition and examples
- The epsilon (lambda) closure of a set of states
- Equivalence of DFAs and NFAs (subset of all states
construction)
- 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
- Languages defined by Regular Equations (not in text)
and NFAs without lambda transitions
- Some hand-written notes for this week.
Assignment #3
See page 83 of Notes
Due: 9/8 by 4:30PM (Key)
Week#3: (9/6, 9/8) -- Notes pp. 95-124
(Chapter
1 of Sipser); Samples
- Right model for closure of Regular Languages under
Intersection, Complement, and Reversal
- Closure of Regular Languages under Substitution, Homomorphism, and Quotient
- Meta approach to closure based on Substitution and Intersection
- Closure of Regular Languages under Prefix, Postfix,
Substring, Min and Max
- Reachable states from some given state
- Reaching states to some given state
- Minimizing the states of a DFA (indistinguishable vs
distinguishable states)
- Minimization example using notion of distinguishable
states
- 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
- 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 Myhill-Nerode Theorem
- Some handwritten notes for this week
Assignment #4
See page 114-115 of Notes
Due: 9/15 by 4:30PM (Key)
Week#4: (9/13, 9/15)
-- Notes pp. 125-142 (Chapter
1 of Sipser); Samples
- Additional minimization example using notion of distinguishable
states
- More proofs that certain
languages
are not
regular using Pumping Lemma and Myhill-Nerode
- Transducers (automata with
output); Mealy and Moore Models
- Post, Thue rewriting systems
- Basic notion of grammars and
languages generated by grammars
- Chomsky hierarchy (Type 3
through Type 0 grammars and languages)
- Notions of derivation and the
language generated by a grammar
- Regular (right linear, Type 3)
grammars
- Every language generated by a
regular grammar is regular
- Every regular language is
generated by a type 3 grammar
- Some handwritten notes for this week
Assignment #5
See page 136 of Notes
Due: 9/22 by 4:30PM (Key)
Week#5: (9/20, 9/22)
-- 9/23 (Help Session in ENG2-203), Notes pp. 143-168 (Chapters
1 and 2 of Sipser); Samples
- Every language generated by a
regular grammar is regular (Formal prrof)
- Every regular set (language) is
generated by a type 3 grammar (Formal proof)
- The right and left linear
grammars generate equivalent classes of languages
- Can extend regular grammars to include strings rather than single characters
- Decidable Properties -- membership, emptiness, everything, finiteness, equivalence
- Grammars and closure properties
(union, concatenation, Kleene *)
- Context free grammars and context free languages
- Sample grammars: {a^n b^n}; {w
w(reversed)}; {w | #a(w) = #b(w)}
- Derivations (leftmost/rightmost)
- Parsing (parse trees; top
down/bottom up)
- Notion of ambiguity (inherent
versus due to a specific grammar)
- Definition of ambiguity -- some string leads to two or more
- Parse trees
- Leftmost derivations
- Rightmost derivations
- Parsing problems (left recursion bad for top-down; right recusion bad for bottom-up)
- DCFLs (unambiguous CFLs) versus DCFGs (unambiguous CFGs)
- LR(k) languages versus grammars; LL(k) languages versus grammars
- LR(1) languages = DCFLs; LR(k) grammars properly contained in DCFGs
- LL(k) languages properly contained in LL(k+1) languages
- LL(k) grammars properly contained in DCFGs
- In the limit as k goes to infinity LL(k) languages = DCFLs
- Some handwritten notes for this week
- Help Session in ENG2-203 on Friday, 9/23, September 23 from 4:30PM – 5:50PM
- Exam#1 Topics pp. 152-156 in Notes
- Sample Exam
-- Complete this for
discussion on 9/27 (key)
Week#6: Notes pp. 152-156, 9/28 (Help Session in HEC-101C), 9/27 (Chapter 2 of Sipser, review),
9/29 (Midterm1)
- Help Session in HEC-101C on Wednesday, 9/28, from 10:00AM
to 12:00PM
- Exam#1 Topics pp. 152-156 in Notes
- Review and go over sample questions
- MidTerm
1 (Chapters 0, 1; Notes pp. 1-156; Assignments
1-5)
Week#7: (10/4, 10/6 -- Hurricane Matthew) -- Notes pp. 169-179; Chapter
2 of Sipser
- More top-down versus bottom-up
- Removing left or right recursion to accommodate top-down or bottom-up
- 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 non-productive
non-terminals (no terminal string can be generated from them)
- Eliminate unreachable
non-terminals (cannot get to them from S)
- To be continued after Matthew Mayhem
- Some handwritten notes for this week
Assignment #6
See page 187 of Notes
Due: 10/18 by 4:30PM (Key) Comments
Week#8: (10/11, 10/13) --
Notes pp.
172-215; Chapter 2 of Sipser
- 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 non-productive
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
- Recursively change rhs of length k,
k>2, to two rules, one with rhs of length 2 and the other of length
k-1
- Cocke-Kasami-Younger (CKY) polynomial time CFG
parser
- Pumping Lemma for CFLs
- Constructive proof of Pumping Lemma for CFLs
- Some handwritten notes for this week
- More examples of CKY
- Non-CFLs {a^n b^n c^n }, {ww | w is a string over Sigma* }
- Pushdown automata (PDA)
non-determinstic vs deterministic
- Notion of instantaneous description (ID)
- 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
- Recognition by accepting
state, by empty stack and by both
- Chomsky Normal Form (CNF) and
the algorithm to convert a CFG to a CNF
- Shorthand notation for PDA
- Non-determinism in PDAs
- Examples PDAs
- Top down parsing of a CFL by PDA
- Bottom up parsing of CFL by PDA
- Using just pop and push operations in a PDA
- Converting PDA to CFG
- Some handwritten notes for this week
- Midterm Exam#1 Key
Week#9: (10/18, 10/120 -- Notes pp. 213-251;
Chapter
2 of Sipser
- Greiback Normal Form (GNF) and linear parsing (with great guessing)
- Example to show PDA language is a CFL by two different methods
- Closure properties for CFLs (intersection with regular, substitution)
- Using substitution and
intersection with regular to get many more,
e.g., prefix, suffix , substring and
quotient with regular
- Non-closure (intersection and
complement)
- Intersection of {a^n b^n c^m}
and {a^m b^n c^n}
- Complement
- Max and Min non-closure
- Complement of {ww | w is a
string over Sigma* } is a CFL
- Solvable Decision Probelms about CFLs and CFGs
- Solvable Decision Problems for CFL, L
- Is w in L?
- Is L empty (non-empty)?
- Is L finite (infinite)?
- Context Sensitive Grammars (CSG) and Languages (CSL)
- Phrase Structured Grammars (CSG) and Languagess (re)
- Some handwritten notes for this week
- This ends the material for Exam#2
- Solved/Unsolved, Solvable/Unsolvable, Enumerable (semi-decidable)/Non-Enumerable
- Hilbert 10th
- Cantor and diagonalization -- countable versus uncountable
- Countability of machines/programs in any model of computation
- Counting argument that there are undecidable problems
- Halting Problem defined
- Notations for convergence and non-convergence
- Halting Problem -- undecidabibility using diagolization
- Turing Machines
- Some handwritten notes for this week
Assignment #7
See page 220 of Notes
Due: 10/27 by 4:30PM (Key)
Week#10: (10/25, 10/27) -- Notes pp. 252-310; Chapter 3 of Sipser;
10/28 Help Session in MSB 260) 4:00PM-6:00PM
- Variants of Turing Machines
- Turing Machines as enumerators/recognizers
- Review and go over topics and sample questions
- Register Machines
- Factor Replacement Systems (FRS) as simple models of
computation
- The necessity of order with FRSs
- Some handwritten notes for this week
- Discussion of determinism versus non-determinism in models of computation
- Primitive (incomplete) and mu recursive (complete) functions
- Numbering machines
- Universal Machine
- The Halting Problem -- classic undecidable but recognizable
(semi-decidable, enumerable) problem
- Diagonalization proof for Halting Problem
- Halt is semi-decidable
- Sample Exam#2
- Sample Exam#2 Key
- Exam#2 Topics pp. 224-225 in Notes
- Only Help Session is on 10/28 at 4:00PM-6:00PM in MSB 260
- Note: 10/31 is the
Withdraw Deadline
Week#11: (11/1, 11/3) -- Notes pp. 311-319; 11/2 Help Session in Engr1-427 9:00-9:50; 11/3 (Midterm2)
- Help Session on Wednesday is from 9:00 to 9:50 in ENG1-427
- Handrwriien Notes for Tuesday
- MidTerm 2 on Thursday, 11/3
Week#12: (11/8,
11/10) -- Notes pp. 320-373; Chapters 4, 5 of Sipser
- The set of algorithms is non-re
- Diagonalization proof for non-re nature of set of algorithms
- Enumeration Theorem
- Set TOTAL
- Reducibility as a technique to show undecidability
- Reducibility as a technique to show non-re-ness
- Using reducibility to show properties of Zero = { f | for all
x f(x) =0 }
- Many-one reducibility and equivalence
- Notion of (many-one) re-complete sets (HALT is one such set)
- One-one reducibility and one-one degrees
- Turing reducibility and Turing degrees
- The sets K and K0 are equivalent and re-complete
- Rice's Theorem (weak and strong forms)
- Applying Rice's
- Handwritten Notes for Tuesday
- RE sets
- STP predicate (STP(f,x,t) iff f(x) converges in t steps or
fewer)
- VALUE(f,x,t) = f(x) if STP(f,x,t), else 0
- Finally, proof that re and semi-decidable are same
- Proof that re and co-re iff recursive (decidable, solvable)
- Quantification as a tool to identify upper bound complexity
- Rewriting Systems -- Semi-Thue systems
- Undecidability of Semi-Thue word problem (ST(Word)
- Post Correspondence Problem (PCP)
- ST(Word) reduced to PCP shows PCP unsolvable
- Applications of PCP (Undecidability of Ambiguity of CFLs and
Non-emptiness of Intersection of CFLs)
- Application of PCP to Undecidability of Non-emptiness of CSLs
- CSL emptiness
- Handwritten Notes for Thursday
Assignment #8
See page 339 of Notes
Due: 11/17 by 4:30PM (Key)
Assignment
#9
Due: 11/29 by 4:30PM (Key)
Week#13: (11/15,
11/17) -- Notes pp. 374-409 Chapters 5 and 6 of Sipser
- Traces (computational histories)
- Quotients of CFLs
- Traces and Type 0 (PSG)
- ST(Word) reduced to re membership
- Lots of consequences of above
- Is L = Sigma*? Is L = L^2? undecidable for CFL
- Non-closure of L1/L2 (both CFLs)
- More Unsolvable Decision Problems for CFL, L
- Is L = L', where L' is some other CFL?
- Is L intersect L' empty (non-empty)
- Handwritten Notes for Tuesday
- 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, Partition
- 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
- 3SAT as a second NP-Complete problem
- 3SAT to SubsetSum reduction
- SubsetSum equivalence (within a
polynomial factor) to Partition
- Midterm Exam#2 Key
Week#14: (11/22, Thanksgiving) -- Notes pp. 410-434;
Chapters, 5 and
7 of Sipser (pp. 246-256 were informational only)
- Handwritten Notes on Sample Questions from Notes pp. 352-355
- 0-1 Integer Linear Programming
- Vertex Cover
- Independent Set
- K-Color
- Sample Final
Assignment
#10
Due: 12/1 by 4:30PM (Key)
Week#15: (11/29, 12/1) -- Notes pp. 435-467;
Chapter 7 of Sipser; Final Exam Review
- K-Color Continued
- Register Allocation
- Scheduling on multiprocessor
systems
- Final Exam Topics (Notes
pp. 462-467)
- Sample Final (Key)
- Final Exam Review
- Picture of Relations of REC, RE, Co-RE, NRNC, NR
- Following material will not be on exam and may not even be discussed (Notes pp. 468-496)
- Hamilton Circuit
- Travelling Salesman
- Tiling (undecidable in plane; NP-Complete in polynomial size limited plane)
Review Sessions: HEC-103; Monday, December 5; 1300 - 1500 (1:00PM - 3:00PM)
Final Exam; Thursday,
December 8; 1600 - 1850 (4:00PM - 6:50PM)
© UCF Last Updated December 8, 2016