RECAP CSE 318
Final Exam Cumulative: –Regular languages, automata: 20% –Context-free languages, pushdown automata: 20% –Turing machines, decidable, recognizable, nondecidable languages: 40% –(remaining 20%: flexibility)
Two Key Questions What is computation? –Non-deterministic computation What kinds of problems we can solve with computation? –limits of computation
Computation conf 1 trans 1 conf 2 trans 2 …. trans n conf n configurations transitions
Examples (s,100) (s,1,q) (q,00) ( q,0,p ) (f,e) ( p,0,f ) (p,0) Finite automata: (s,101,e) ((s,1,e),(q,*)) (q,01,*) (f,e,e)(p,1,*) Pushdown automata: ((q,0,e),(p,e)) ((p,1,*),(f,e)) (s,101) ((s,1,0),(q, )) (q,001) (f,010) Turing machines: ((q,0,1),(p, )) (p,011) ((p,1,0),(f, ))
Nondetermistic Computation Theoretical (i.e., artificial) construct that facilitates: Proving properties of computation Writing algorithms in a simplified form conf 1 trans 1 conf 2 Trans 1’ Conf 2’ ….
Configuration Finite automata ConfigurationMachine (state,string) Pushdown automata (state,string,stack) Turing machines (state,LShRS) LS,RS: strings, h:symbol A configuration indicate the current state of the computation
Transitions Finite automata TransitionMachine Pushdown automata Turing machines (state, symbol, state) ((state, symbol, pop), (state,push)) ((state, symbol, symbol), (state, / )) A transition indicates how the configurations are transformed
Notion of Acceptance Finite automata ConfigurationMachineAcceptance if (f,w) f: accepting state, w = e Pushdown automata (f,w, ) f: accepting state, w =e Turing machines (f, w) f: accepting state Acceptance indicates what kinds of configurations are considered successful computations
Machines versus Classes of Languages Machine Expressiveness Finite Automata Pushdown Automata Turing Machines Regular Languages Context-free Languages Decidable languages
Machine vs. n-stack NFA Machine n-stack NFA Finite Automata Pushdown Automata Turing Machines NFA + 0 stacks NFA + 1 stack NFA + 2 stacks
Computation and Countability Surprisingly deep connection If a language L can be enumerated then it is recognizable –To recognize if w is in L: 1.Print next string in L: 2.If w = w’ then accept else goto 1 And the other way around! Enumerator of L … w’
Problems that Can be Solved with Computation Church-Turing Thesis Algorithms = Turing machines Therefore, C, C++, Prolog, Lisp, Small talk, and Java programs can be simulated byTuring machines
Classes of Languages Regular languages Context-Free Languages Decidable Languages Recognizable Languages Non recognizable Languages Limits of computation Turing machines Pushdown Automata Finite Automata subset (Equivalence) (HALT) ({ww| w *}) (Palindrome) (a*b*) This is the end…