CMPSCI601: Introduction Lecture 1 In-depth introduction to min models, concepts of theory of computtion: Computility: wht cn e computed in principle Logic: how cn we express our requirements Complexity: wht cn e computed in prctice Concrete Prolem Mthemticl Model Forml Models of Computtion: Finite-stte Stcks = CFL Turing Mchine Logicl Formul 1
CMSPSCI 601: Requirements Lecture 1 Texts: ville t Jeffery Amherst College Store [P]: Christos Ppdimitriou, Computtionl Complexity [BE:] Jon Brwise nd John Etchemendy, Lnguge, Proof, nd Logic Prerequisites: Mthemticl mturity: reson strctly, understnd nd write proofs. CMPSCI 250 needed; CMPSCI 311, 401 helpful. Tody s mteril is good tste of the sort of stuff we will do. Work: eight prolem sets (35% of grde midterm (30% of grde finl (35% of grde Coopertion: Students should tlk to ech other nd help ech other; ut write up solutions on your own, in your own words. Shring or copying solution could result in filure. If significnt prt of one of your solutions is due to someone else, or something you ve red then you must cknowledge your source 2
CMSPCI 601: On Reserve in Duois Lirry Lecture 1 Mthemticl Sophistiction How to Red nd Do Proofs, Second Edition y Dniel Solow, 1990, John Wiley nd Sons. Review of Regulr nd Context-Free Lnguges Hopcroft, Motwni, nd Jeffrey D. Ullmn, Introduction to Automt Theory, Lnguges, nd Computtion, 2001: Chpters 1 6. Lewis nd Ppdimitriou, Elements of the Theory of Computtion, 1998: Chpters 1 3. Sipser, Introduction to the Theory of Computtion, 1997: Chpters 1 2. NP Completeness Grey nd Johnson, Computers nd Intrctility, 1979. Descriptive Complexity Immermn, Descriptive Complexity, 1999. 3
Syllus will e up soon on the course we site: http://www.cs.umss.edu/ rring/cs601 There is pointer there to the Spring 2002 we site, nd the syllus there will e close to wht we do here. Rough guide: Forml Lnguges nd Computility (9 lectures Propositionl nd First-Order Logic (7 lectures Complexity Theory (11 lectures 4
CMPSCI 601: Review of Regulr Sets Lecture 1 Definition:, An lphet is non-empty finite set, e.g.,, etc. Definition: A string over n lphet is finite sequence of zero or more symols from. The unique string with zero symols is clled. The set of ll strings over is clled. Definition: A lnguge over is ny suset of. The decision prolem for lnguge is to input string nd determine whether. Definition: The set of regulr expressions lphet is the smllest set of strings such tht: 1. if then 2. R 3. R 4. if ( "$# % ( &(' % (c " then so re the following: over 5
# # ' # Exmples: Menings: N Recll the mening of Kleene str, for ny set,, " +$ $ # # %$'& # # $-, # ## # ($ & (. N/ # #*# # $ $-, 6
' # Mening of Regulr Expression: 1. if then 2. R 3. R 4. if ; " ; ; then so re " # %, "(' %, " : % "(# % " " " " & % " Definition 1.1 is regulr iff & In other words, set,, is regulr iff there exists regulr expression tht denotes it. 7
Definition: is tuple, A deterministic finite utomton (DFA is finite set of sttes, is finite lphet, is the trnsition function, is the strt stte, nd is the set of finl or ccept sttes. 8
s q 9
Definition: A nondeterministic finite utomton (NFA is tuple, is finite set of sttes, is finite lphet, # is the strt stte, nd is the trnsition function, is the set of finl or ccept sttes. power set of 10
,,,,,,, 1 0,1 0,1 0,1 0 1 2 3 0,1 n+1 0,1 [You will show in HW 1 tht to ccept, would need sttes.],, DFA 11
Proposition 1.2 Every NFA NFA wo -trnsitions s.t. Proof: Given where cn e trnslted into n, let F 1 2 1 2 ε 0 0 ε 3 4 3 4 12
Nottion: For DFA,, let e the stte tht will e in fter reding string, when strted in, For n NFA without trnsitions, let e the set of sttes tht reding string, when strted in,, cn e in fter 13
, Proposition 1.3 For every NFA,, with. sttes, there is DFA,, with t most sttes s.t.. Proof: Let. By Proposition 1.2 my ssume tht hs no trnsitions. Let N 0 1 c 0, 1 0 0 D 0 1 {} {,} {,c} 1 1 14
Clim: For ll, By induction on : : Inductively, :. % Therefore,. 15
Theorem 1.4 (Kleene s Th Let e ny lnguge. Then the following re equivlent: 1. 2. 3. 4. " 5. is regulr. Proof: Ovious tht y Prop. 1.2., for some DFA., for some NFA wo trnsitions, for some NFA., for some regulr expression. y Prop. 1.3 (suset construction. y def of regulr : We show y induction on the numer of symols in the regulr expression, tht there is n NFA with " :. e = e = ε e = 0/ 16
Union L(N = L(N + L(N 1 2 Conctention L(N = L(N 1 L(N 2 ε N 1 N 1 ε ε N 2 N 2 Kleene Str ε L(N = (L(N 1 * N 1 ε 17
,, # : Let., / no intermedite stte ( # & # # ## # " i L k i j j L k i k+1 k+1 L k k+1 j L k k+1 k+1 18