theory of computation tutorial iiiwkhon/lectures/tutorial3.pdf · logic & recursion theory...
TRANSCRIPT
![Page 1: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/1.jpg)
Theory of ComputationTutorial III
Speaker: Yu-Han LyuOctober 31, 2006
![Page 2: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/2.jpg)
Minimum Pumping Length
•0001*–4, because 000 can’t be pumped
•0001–??
![Page 3: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/3.jpg)
Stochastic Context Free Grammar
•Each production is augmented with aprobability
•Like Hidden Markov Model–Learning
•Application–Natural language processing–RNA
![Page 4: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/4.jpg)
Context Sensitive Grammar
•Context Free Grammar–Left-hand side must be non-terminal
•aA → aB–lhs length is smaller than or equal to rhs
•Example: {anbncn|n≥1}–S → aSBc|abc–cB → Bc–bB → bb
![Page 5: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/5.jpg)
Linear Bounded Automata
•Like Turing machine, but the tape length isnot infinite
•Tape length is linear to the input length•LBA and DLBA are not equivalent
–DLBA : deterministic subset of LBA
•LBA = CSG•Chapter 5
![Page 6: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/6.jpg)
Unrestricted Grammar
•aA → aB–No length limitation
•Unrestricted Grammar = Recognizable
![Page 7: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/7.jpg)
Chomsky Hierarchy
Unrestricted
ContextSensitive
ContextFree
LinearGrammar
DeciderRecursive
TM=DTMTuringMachine
RecursiveEnumerableType-0
LBA≠DLBALBAContextSensitiveType-1
PDA≠DPDAPDAContextFreeType-2
NFA=DFANFARegularType-3AutomatonLanguageType
![Page 8: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/8.jpg)
Closure properties
YYYYYRecursive
YYNYYRecursiveEnumerable
YYYYYContextSensitive
YYNNYContextFree
YYYYYRegularstarconcatenationcomplement∩∪Closed?
![Page 9: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/9.jpg)
Decidability
NNNRecursiveEnumerable
NNYContextSensitive
NYYContextFree
YYYRegularEqualEmptyAcceptDecidable?
![Page 10: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/10.jpg)
Question
•Let M1 be an NTM. Suppose that M1 is adecider for language L. If we exchange theaccept state and reject state and getanother NTM M2, is it a decider for L’scomplement?–No–If M2 accepts x, it means that there exists one
path to M1’s reject state–But L’s complement means that there is no
path to accept state
![Page 11: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/11.jpg)
Chomsky
•Institute Professor Emeritusof linguistics at theMassachusetts Institute ofTechnology
![Page 12: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/12.jpg)
Complexity
•Computational Complexity–Time, Space, ….
•Information Entropy–Complexity in data
•Descriptive Complexity–Complexity to specify the data–Kolmogorov Complexity (6.4)–Algorithmic Information Theory–An Introduction to Kolmogorov Complexity and Its
Applications, by Ming Li and Paul Vitanyi
![Page 13: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/13.jpg)
Logic & Recursion theory
•1931 –GodelIncompleteness
•1933 –Godeldeveloped the ideasof computability andrecursive functions
•Lambda calculus byChurch and Kleene
•1936 –TuringMachine by Turing,Formulation 1 by Post
RecursiveEnumerable
PartialRecursive
RecursiveTotalRecursive
PrimitiveRecursive
Semantic/Automata
Syntactic/Logic
![Page 14: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/14.jpg)
Reference 1
•Computational Complexity•Christos H. Papadimitriou•1994~
![Page 15: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/15.jpg)
Reference 2
•Complexity Theory: A Modern Approach–Sanjeev Arora and Boaz Barak–http://www.cs.princeton.edu/theory/complexity–First part covers the Papadimitriou’s book
•Computational Complexity: A ConceptualPerspective–Oded Goldreich–http://www.wisdom.weizmann.ac.il/~oded/cc-
book.html•Not published
![Page 16: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/16.jpg)
Reference 3
•Complexity Zoo–http://qwiki.caltech.edu/wiki/Complexity_Zoo
•Wikipedia–http://en.wikipedia.org/wiki/Main_Page
![Page 17: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/17.jpg)
Problem 1
•Every tree with height k has at most 2k-1internal nodes.
•2b derivation steps → height > b•At least one variable occurs twice•Pumping lemma..
![Page 18: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/18.jpg)
Problem 2
•If we read a ‘a’–Eliminate 2b–Push 2a
•If we read a ‘b’–Eliminate 3a–Push 3b
•After read input–If stack isn’t empty then accept
q1
q3 q4
q6 q5
a,b/εa,$/a
b,a/εb,$/b
ε,a/εε,ε/b
ε,a/εε,ε/b
ε,a/εε,b/ε
ε,a/εε,b/ε
q2
ε,b/εε,ε/a
![Page 19: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/19.jpg)
Problem 3
•C = {xy | x, y ∈ {0,1}* and |x|=|y|, x≠y}•First half and second half are different in
some position•S→AB|BA•A→XAX|0•B→XBX|1•X→0|1
![Page 20: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/20.jpg)
Problem 4
•A = {wtwR | w,t ∈{0,1}* and |w| = |t|}•S=02p0p1p02p
•If v and y are all 0 or all 1–Impossible
•If v is 0 and y is 1–Impossible
•If v is 1 and y is 0–Impossible
![Page 21: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/21.jpg)
Problem 5
•An internal node is marked if it has at leasttwo children, and both of them contain amarked leaf as a descent
•Prove by induction that if every path of Tcontains at most i marked node, then Thas at most bi marked leaves
•K=b|V|+1
![Page 22: Theory of Computation Tutorial IIIwkhon/lectures/tutorial3.pdf · Logic & Recursion theory •1931 –Godel Incompleteness •1933 –Godel developed the ideas of computability and](https://reader033.vdocuments.us/reader033/viewer/2022042019/5e76ad202dc49a39761ace93/html5/thumbnails/22.jpg)
Problem 6
•z=apbpcp+p!=uvxyz•s1=uv2xy2z, #b(s)≦2p<p+p!≦#c(s)
–#a(s)=#b(s)–v=at and x=bt for some t
•Let n=p!/t + 1–s1’=uvnxynz=ap+p!bp+p!cp+p!