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{.p fy;KbK (QlwN܏6wQV۲ C@&*;Bne .Pz/D1٘rgZ) "w?w=5*\1>gr퓪l6M7X'k TC('4n A=G,n=D xTMkA~v7d5FjkwQZRj*ŏ[ŋT-b"B!A? ͳ=Mg&5-Lx3<;kېq{LBp@,=y|[rjTQGy(LK3菲|¢i[DȾsc>KZCqjcB TqΠ\\La=p)B߅,&?6p ɪXbi'I'1OVsZ]u sG0J!;Dq_(WjKDİT["s?6~j_D6~އ&斍$JF82i{Q@qJNuv8NKC]Eh$u Rj-{ڰyyis6q:Q֩oKq''a6i,Eg fABA7T/-@AO([=ʅg:SI3 "B`{I?@ABCDEF/4_B$o(.x]tOTϐYshB$4 rW)|^YshB$[cV1$ ;OshB$htpp|cshB$Xڡa"Qo<> shB$,ulMc,AzzshB$Mr ʍ%~shB$V`6\z\lshB$;uZpqU $shB$ ħ_r(a >kshB$[(*"shB$ ^n?εy&shB$ó+Zye*shB$bn\nMy}-shB$GJeoN D,=1shB$Z[6j5shB$d:KrK¡cs{:shB$rNN✦io=shB$Oq3#&GNkrBshB$3=aWufCshB$C('4n ApGsh `1?0 @ g4dd@X4pp<4!d!dgxiti Characters and StringsLanguage Operations !LThe  Language of Regular Expressions"Regular Expression Syntax#Regular Expression Semantics$Regular Languages%&' ( Language Transformations) * + ,Finite State Automata-State Diagrams.Finite State Recognizers/012Non-deterministic Automata3456789e-move Automata:;<=> ?!@"A#B$The Pumping LemmaC%D&Proof StrategieseFLanguage quotientsE'F(G)Nerode equivalence fGM/N0Structured Programming Analysis  O1P2gHSequential machinesR4S5T6U7V8State MinimizationW9X:Y;Z<[=Isomorphic DGSMs \>]?^@_AMulti-tape Automata`BaCbDcEPsx,,  y be(,,(d'`U  ` ̙33` ` ff3333f` 333MMM` f` f` 3>?" dd?lKd  d`"   c n?" dd@   @@``PR     c` p>  >   me (  8      T2 @1? ~  N @1?45 ~  N2 @1?oo ~  N @1?z f  61?J:    `ԏmm1 ?)H6 " T Click to edit Master title style! !@   Z4mm1 ?H  " RClick to edit Master text styles Second Level Third Level Fourth Level Fifth Level!     S   Zwawa1? s`  A*    TTwawa1? 18  T 22C:135  Part I B  s *%jQ ? 2blueboxc.ppt - Blue Boxes  ZR@(  p  01 ?* *  "@  Z:wawa1 ? @ " RClick to edit Master text styles Second level Third level Fourth level Fifth level!     SB  s *޽h ? a( P 0(   B  s *޽h ? a(  ʈ ^ V 0( DO77Oss   # ld7mm1 ?)H6  "   T7pp1? fS  a finite set of (abstract) symbols, the alphabet whose elements are called letters (or characters)`g 2+t::tt  T7pp1?,Af FS*  (infinite) set of all finite sequences over S, called words (or strings)pO 2 / t::tt  T$8pp1?,} za word w S* has length, len(w) = the number of letters in the sequence w (0, 1, 2, & )pX 2  A<t::tt  T8pp1?K N  @he denotes the empty (or null) string with len(e) = 0|5 2 )t::ttXB  08c?6eE 6H  0%jQ ?     \ T `( xg) @   # l$;mm1 ?)H6  "   T;wawa1?0 m LA language L is a subset of S*, L S*' 2      TD<wawa1?00I :The empty set is written as , and e, , and {e} are all distinct entitiesK 2   Z<wawa1?0Z) `Languages can be combined with the familiar set operations: union, intersection, and complementa 2an  Z=wawa1?0!  JLanguages can also be concatenated by forming all the possible combinations of concatenations of their member strings. For L1,L2 S*, L1" L2 = {xy | xL1 and yL2}\ 2 [           H  0%jQ ? U. p}(  ^  Twawa1?0 .Language concatenation behaves as a  multiplicative operator  is a  zero and {e} is an  identity . In this sense we define powers of a language.n 2@-%e<  Twawa1?0; For L S* define L0 = {e}, and inductively for ne"0 Ln+1 = Ln" L. Language powers satisify the usual laws of exponents  Ln" Lm = Ln+m.$ 2     <   b4 6  Twawa1?10 In terms of these powers we define two other language operations. The Kleene closure (or star) of L S* isn 2G F!  ZD wawa1?} VL* =6   Z wawa1?i 4  Z!wawa1? R 9n = 0   Zd!wawa1?M XLn(     Z!wawa1?! 6    T"wawa1? 0  And the positive closure isR 2   Z"wawa1? V ]  VL+ =6    ZD#wawa1?I 0 o  4   T#wawa1?  9n = 1   Z$wawa1? `   6  Zd$wawa1?a  %  XLn(  H  0%jQ ? 6 e ^(    # l$mm1 ?)H6  " XB  08c?5   T$%wawa1?a:] 8The regular expressions over an alphabet S comprise a collection of formal notations. There are strict rules for the formation of these notations, and each is understood to describe a language L S*.%  :  T%wawa1?Cj  ^Since regular expressions have both a  syntax (rules of formation), and a  semantics (the associated language), we often speak of the (meta) language of regular expressions. 2#H  0%jQ ?  A RJ ( |wPj    # l%mm1 ?)H6  " XB  08c?66  TD&wawa1?: (Regular expressions involve the symbols from S plus several auxiliary symbols, and are defined inductively.6l 2->F  T&wawa1?:C Basis case(s): (a) is a regular expression (b) e is a regular expression (c) each l S is a regular expressiony 2 $    T'wawa1?s:o  Inductive case(s): If a and b are regular expressions, then so are: (a) (a + b) (b) (a " b) (c) (a *) l 2.   H  0%jQ ? @  j<   $h (  $ $ # ld'mm1 ?)H6  " XB $ 08c?ffj $ T'wawa1?#: The meaning of each regular expression a is a language m(a) S* whose definition parallels the inductive definition of the syntax. 2  DB $ T$(wawa1?:n ~Basis case(s): (a) m() = (b) m(e) = {e} (c) m(l) = {l}$@ 2 L $ T(wawa1?:  Inductive case(s): If a and b are regular expressions, then: (a) m(a + b) = m(a) m(b) (b) m(a " b) = m(a) " m(b) (c) m(a*) = (m(a))* 2&  H $ 0%jQ ? t  w8   ((  ( ( # l(mm1 ?)H6  " XB ( 08c?6E 6( ( TD)wawa1?#js L S* is a regular language if there exists a regular expression a so that L = m(a)U 2    P ( T)wawa1?:P[ Regular expressions a and b are equivalent, a b , provided that m(a) = m(b)N 2  ( T*wawa1?:  0To avoid excessive parentheses in regular expressions, we assign precedence to the operations: * highest, " intermediate, and + lowest; also, " may be omitted. For instance, the regular expression (0" (1*)) is written 01*.V 2  H ( 0%jQ ?  < ,H( m , , Td*wawa1?e   Example 1.1.3 (h)  0*(10*10*)* The language described by this regular expression contains the strings: e , 0, 00, 000 , & 11, 110, 101, 1100, 1001, 1010, 11000, & 011. 0110, 0101, 01100. 01001, & Briefly, and informally, all strings with an even number of '1's.    Iu&d , T*wawa1?cj Example 1.1.3(g)  00+11+101 This regular expression describes {00, 11, 101}.(O 2@ , T$+wawa1?j Example 1.1.3(i)  0*1* The meaning in this case is the language {e, 0, 1, 00, 01, 11, 000, 001, 011, 111, & } = {0p1q | p,q e" 0}. Briefly, and informally, all strings where '1' is followed by '1' or nothing 2  ,0  &2H , 0%jQ ?     0 (  0  0 TXwawa1?Q0Q  d &Theorem 1.1.1: For any regular expressions a, b and g, (i) a + b b + a , (ii) (a + b) + g a + (b + g), (iii) + a a + a , (iv) (a b) g a (b g ), (v) a(b + g) a b + a g , (vi) (a + b) g a g + b g , (vii) e a a e a , (viii) a a , (ix) * e , (x) (a + e)* a*, (xi) a(b a)* (a b )* a , (xii) (a*)* a*, (xiii) (a* b*)* (a + b)*, (xiv) (a b*)* e + a(a + b)*.          P*H 0 0%jQ ?   x4(  4^ 4 TTYwawa1?:s Assertion: the regular languages are the smallest family of languages containing the finite languages and closed under union, concatenation, and star.( 2  4 TYwawa1?C > each finite language is regular regular languages are  closed under union, concatenation, and star any family of languages that contains the finite languages and is closed under union, concatenation and star also contains all the regular languages 2 4 TZwawa1? j  $Assertion: a regular expression denotes an infinite language only if it includes *, and m(a*) is infinite unless a or a e. 2 OH 4 0%jQ ? H  e   8p (  8 8 # ltZmm1 ?)H6  " XB 8 08c?6u 6 8 TZwawa1?j  zBLet S and D be alphabets. A function h: S D* is a homomorphism. A homomorphism is also tacitly understood to serve as a function h: S* D* as determined by letter-by-letter extension inductively defined by h(e) = e, and h(x l) = h(x) h(l) for all x S * and l S . Finally, homomorphisms may be applied to languages, h: p(S*) p(D*) , by the element-wise extension h(L) = {h(x) | x L} for each L S*. 2  H  G      ;  5   >3  y  8 T4[wawa1? `  4Note: p(S) is the collection of all subsets of set S65 2.H 8 0%jQ ? 0 n   <X ( | <2 < T[wawa1?:  &Let S and D be alphabets. A function s: S p(D*) is a substitution (i.e., each letter of S is associated with a language over D). A substitution is called regular if each of the languages s(l) is regular. A substitution is also tacitly understood to serve as a function s: S* p(D*) as determined by letter-by-letter extension inductively defined by s(e) = {e}, and s(x l) =s(x) s(l) for all x S * and l S . Finally, substitutions may be applied to languages, s: p(S*) p(D*), by element-wise extension s(L) = s(x).l 2  $S  G      :  & < Z[wawa1? P  \ x L6 2 H < 0%jQ ?  2*@(  @ @ TT\wawa1?? LNote that every homomorphism h can be regarded as a substitution h' where if h(l) = w, h'(l) = {w}. While homomorphisms map each letter to a unique string, a general substitution provides numerous optional strings for transforming each letter. For this reason substitutions may be regarded as  non-deterministic homomorphisms.RM 2P > N @ T\wawa1?J  .Every homomorphism has a finite description, but a substitution need not have a finite description. If the languages associated with letters are infinite, a finite description of the substitution may be impossible. 2 H @ 0%jQ ? h  D(  DX D T]wawa1?5  Theorem 1.1.3: For each regular language R S* and each regular substitution s, s(R) is regular. Corollary 1.1.4: For each regular language R S* and each homomorphism h, h(R) is regular. So far we know that the regular language family is closed under union, (set) concatenation, Kleene closure (star), regular substitution, and homomorphism.^ 2   5  > r* H D 0%jQ ?    h ` 0H (  H H # lt]mm1 ?)H6  " XB H 08c?; ; H T]wawa1?c5 Definition 1.2.1: A deterministic transition system (DTS) is a triple, T = (S, S, d), where S, the states, and S, the input alphabet, are finite non-empty sets, and d is a function, d : S S S, the next-state function. 2 6  6 H T4^wawa1?x5t  ~Definition 1.2.2: If T = (S, S, d) is a deterministic transition system, then the transition function, d* is the function, d* : S S * S, defined inductively for all s S by: d*(s, e) = s, and for all x S * and l S, d*(s, xl) = d(d*(s, x), l).f 22   !    H H 0%jQ ?   h`@L( | L L TA ?1?(}  X $ L TA ?1?% X $ L T^wawa1?0; R RTable of a next-state function L T_wawa1?1   X$State diagram of next-state function%% L # l`mm1 ?)H6  " XB L 08c?F@e F L Tt`wawa1?? TState transitions may be presented either in tabular or diagram form. Example 1.2.1.U 2UH L 0%jQ ?   PP6(  P P # l`mm1 ?)H6  "  P T4awawa1?U  RDefinition 1.2.3: A deterministic finite acceptor (DFA) A is a 5-tuple A = (S, S, d, s0, R), where (S, S, d) is a deterministic transition system, s0 S is the start state, and R S is the set of recognizing (or accepting) states. The language recognized (or accepted) by A is L(A) = {x S* | d(s0, x) R}. A language L S* is DFA-recognizable if there exists a DFA A so that L = L(A). 2 * ;  ,BGXB P 08c?F0 FH P 0%jQ ? A  `X`T(  T T TA ?1? iX $ T Tawawa1?c / DExample 1.2.2. 2 T Tbwawa1?le 8 The language accepted is 0*11*F  H T 0%jQ ? C\ ZRpX(  X X TA ?1?w X $  X Tcwawa1?f 1Example 1.2.3 L(A3) = all words ending with '101'82 2   X Ttcwawa1?+[ `,I. Only words ending with 101 are recognized--  X Tcwawa1?[@   to reach s3 last letter is 1, prior state s2 to reach s2 last letter is 0, prior state s1 or s3 to reach s1 or s3 must use 1 2              X T4dwawa1?V "  `,II. All words ending with 101 are recognized-- X Tdwawa1? pd  LFor input x101, after processing x, A3 is in some state t, but d(t, 101) = s3 for all states t.pa%   H X 0%jQ ? Pw \x(  \ \ Tdwawa1?YU TTheorem 1.2.1: the complement of each DFA-recognizable language is DFA-recognizable.(U 2 H \ TĎwawa1?Xu< The DFA model admits an obvious table driven algorithm to automate testing membership of candidate strings  for w S* , is w L(A)?n 2t H \ 0%jQ ?      `< (  ` ` # l$mm1 ?)H6  " XB ` 08c?FF ` Twawa1?? Definition 1.2.4: A non-deterministic transition system (NTS) is a triple, T = (S, S, d), where S, the states, and S, the input alphabet, are finite non- empty sets, and d is a function, d : S S p(S), the next-state function. 26, ` Twawa1?F?  Definition 1.2.5: If T = (S, S, d) is a non-deterministic transition system, then the transition function, d*, is the function, d*: S S* p(S), defined inductively for all s S by: d*(s, e) = {s}, and for all x S* and l S, d*(s, xl) = d(t,l).~ 26    "    ` Twawa1?6   t d*(s, x)b 2 H ` 0%jQ ?     d ( $j# dB d Twawa1?J 0Definition 1.2.6: A non-deterministic finite acceptor (NFA) A is a 5-tuple, A = (S, S, d, s0, R), where (S, S , d) is a non-deterministic transition system, s0 S is the start state, and R S is the set of recognizing (or accepting) states. The language recognized (or accepted) by A is L(A) = {x S* | d(s0, x) R`"}. A language L S* is NFA-recognizable if there exists a NFA A so that L = L(A).P 2" . : ! ,FN* d Tdwawa1?  For an NFA A as in Definition 1.2.6 and x S*, say x=l1l2 & lk (ke"0) with li S (1d"id"k), we say x has a run s0, s1, & , sk in A if s1 d(s0, l1), s2 d(s1, l2), ... , sk d(sk-1, lk). A run is recognizing (or accepting) if sk R.Z 2)                       P},0H d 0%jQ ? Դ h!(  h h TA  ?1? X  $ h T$wawa1? BExample 1.2.4.n h Twawa1?0?   inputs ending in '1' have one run ending at s0 inputs ending in '10' have two runs, one ending at s0 and one at s1 inputs ending in '00' have three runs, one ending at s0, one at s1, and one at s2 \ recognizes words ending in '00' 21 8   :    ! h Zwawa1?Fm 7NFAH h 0%jQ ? + skl(  l l TDwawa1?U vj A state t of a transition system is said to be reachable from state s if there is x S* so that d(s, x)=t (or t d(s, x) in the non-deterministic case). A state is called a generator if every state is reachable from it. A transition system is called strongly connected if every state is a generator.6 21   > G  l Twawa1?% EDefinition 1.2.7.H l 0%jQ ? 8 G?p(  p p TA  ?1?sX  $ p TA ?1?8K X $ p TĔwawa1?_ BExamples 2 3 p T$wawa1?0H )s2 reachable from s0, but not vice- versaj* 2 p Twawa1?[ b JStrongly connectedH p 0%jQ ? -a| tU(  t  t TDwawa1?5 PNote that each DFA is (effectively) an NFA  just one where there is always exactly one possible next state. Hence every DFA-recognizable language is NFA-recognizable. 2  t Twawa1?XU CTheorem 1.2.2: Each NFA-recognizable language is DFA-recognizable.(D 2 7H t 0%jQ ? 6#p  ""$$xd"(  x x Tdwawa1? MExample 1.2.4 revisited 2 x Zėwawa1? 7NFA x TA ?1?zz 8X $ x Twawa1?  Taccepts words ending with '00' 22 x Zwawa1?<w Hs0* 2 x ZDwawa1?ra hs0s1H  ^2 x 61?  2  x Zwawa1?  s0s1 s2f   ^B  x 61?u^B  x 61?n^B  x 61?F5 F^B  x 61?^B x@ 61?Z^B x@ 61? ! ^B x 61?5b x c :BC!DEF1?55   xph`XLD<4 , xph\PH@ 8,    kl@ x c rBC-DEF1?<<  $((0(<(H(T,\,d,l,t,|,,,,,,,,,,,,,(($ $$ $ , 4 <DLT\hpx       y|@v x c BC]DEF1?&& $,4<D LPT$X,X4X@\L\TX\XdXlXtX|XXXTTPLH@<4( MP@~XB x 01?Fe5 F: x c B}CDEF1?00:?EKTY b hnsv%|)|2|:|B|J|W|_ygvpvxssspnkhb_\WTNKE?:4.(# ad@~ n { x c B]CDEF1?LLHH$H0D@DH@P@X@d<p8|888,,,,,(($    ( 4 @ H X d lt    ( 8 D X l|  $,4@HPX`ht|   , 4 <$H(P,\0h0t4<@DDPPT\`dhhppxx (48@HPT\@  x Zwawa1?  51 x Z4wawa1?Ai 50 x Zwawa1?uG  51 x Zwawa1?A[  50 x ZTwawa1?V0   50 x Zwawa1?% R 51 x Zwawa1?6; 7DFA x Ttwawa1? e  @the subset construction yields 4 more states unreachable from s0(A? ^2 x 61?3  2  x ZԈwawa1?E   hs0s2H  ^B !x 61?v{  "x Z4wawa1?| PB  51^B #x 61?q1  $x Zwawa1?a I'  50B x s *%jQ ? ,  v   |T ( eht ams sellaf t | | # lmm1 ?)H6  " XB | 08c?1 1R | TTwawa1?*%  Definition 1.2.8: A null-move (or e-move) non- deterministic transition system (e -NTS) is a triple, T = (S, S, d), where S, the states, and S, the input alphabet, are finite non-empty sets, and d is a function, d: S (S {e}) p(S), the next-state function.  2 $6 | Twawa1?E5) When d(s, e) is defined (i.e., not empty) it is called a spontaneous transition  the state changes without input being read.n~ 2.. | Twawa1?m?  |The e -moves significantly complicate the ways in which transitions cascade. So before we define how an e -NTS responds to a sequence of inputs, we must address the cascading of e -moves.n 2eJ H | 0%jQ ? V ~(  f  Ttwawa1?   Definition 1.2.9: for state s of an e -NTS, e-closure(s) is a set of states defined inductively: (i) s e-closure(s), (ii) if t e-closure(s) and u d(t, e), then u e-closure(s), (iii) nothing belongs to the e-closure(s) unless it follows from finitely many applications of (i) and (ii). Also, for a set of states T, e-closure(T) = s T e-closure(s).m 2  / *r      Tԋwawa1? %| TThe behavior produced by multiple consecutive e-moves of an e -NTS is the first thing we capture in our analysis.Rt 2/ 6H  0%jQ ? 9 ,   a ( b_   T4wawa1?N2 vThe basic idea of a run in an e-NTS is that any number of e-moves may precede and follow reading each letter from the input stream.R 2I  TA ?1? cX $|  Twawa1?N |e-closure(a) = {a,b} e-closure(b) = {b} e-closure(c) = {a,b,c}`? 2  TTwawa1?,0 A Example 1.2.7  Twawa1?5  (Definition 1.2.10: For e-NTS T = (S, S, d), the transition function d*: S S* p(S) is defined inductively for each s S by: (i) d*(s, e) = e-closure(s), (ii) for x S* and l S, d*(s, x l) = e-closure( d(t, l)), where T = d*(s,x). 2    &         Twawa1? `  Zt T6 2XB  01?H  0%jQ ?  "0(  N  Ttwawa1?* Definition 1.2.11: e-NFA and e-NFA recognizability  just like NFA, except underlying transition system is e-NTS.{ 2B"I  TԎwawa1?J; Note that any NFA is an e-NFA so each NFA- recognizable language is e-NFA-recognizable.RX 2+|  T4wawa1?x?\  Theorem 1.2.4: Each e-NFA-recognizable language is NFA-recognizable. PF 2 1H  0%jQ ? [ @(    TA ?1?vE X $  Twawa1?+{ DExample 1.2.8. 2  TTwawa1? n  N e-NFA( 2  Twawa1? F  9NFA 2H  0%jQ ? x f^P(  4  Twawa1? } FTheorem 1.3.1: every DFA-recognizable language is regular. Hence by Theorems 1.2.4 and 1.2.1 each NFA-recognizable and e-NFA-recognizable language is also regular.Nb 2B j,  Ttwawa1?  Theorem 1.3.2: each regular language is e-NFA- recognizable (and a single accepting state is sufficient). Hence by Theorems 1.2.4 and 1.2.1 each regular language is also NFA-recognizable and DFA-recognizable.B H  0%jQ ? b< `(    TA ?1?[X $  Twawa1?? HExample 1.3.1. 2  Twawa1?x D L0 = e+0h 2  T$wawa1?  ~ L0 = V 2  Zwawa1?E 7  :11   Zwawa1?gE 7  :13   Twawa1? l,L1 = L0 L0 (L0)* L0 $  Zwawa1?H :13   Zdwawa1?QeW :13   Zwawa1?MPB :13   Z$wawa1?^pb :11   Zwawa1?S :11   TDwawa1?  B.= + (e+0)(e+0)*  2  Twawa1? '  XSee Dfa2regex in our class directory for a Prolog program to perform these computations.Y 2YH  0%jQ ?  p44C( Td'wa ^  68c?xuE   Twawa1? o a01*+1 2d  <8c?*% ~ ^  68c?ei  Zdwawa1?6P 701*  Zwawa1?;S :1*X2  01?F^2  68c?$t$X2  01?J^2  68c?.EX2  01?*iX2  01?t^2  68c?n P  X2  01? I X2  01? t^2  68c?X eX2  01?@I^2  68c?=X2  01?frX2  01? Sg^2  68c?s EXB  01?{6^{XB  01?^B  61?^B  61?\^^B  61?^B @ 61?MX^B  61?Q^B  61?-&^B  61?  ^B  61?X ^B ! 61?1 | { XB " 01?1\ 1^B # 61? [ ^B $ 61?< Q^B % 61? & Z$wawa1?0X 91 ' Zwawa1?e 3 M 91 ( Zwawa1?S 90 ) ZDwawa1?A7 :e * Zwawa1?AC :e + Zwawa1?vM< :e , Zdwawa1?L :e - Zwawa1?B :e . Z$wawa1?V[  :e / Zwawa1? E  :e 0 Zwawa1?a '  :e 1 ZDwawa1? :eXB 2 01?_<XB 3 01?{XB 4 01?[ B  s *%jQ ? OUI< }(  X  Twawa1?{ Definition 1.3.1: the reversal of l1l2 & lk S* is (l1l2 & lk)R = lklk-1 & l1. The reversal of L S* is LR = {xR | x L}.} 2              p   Twawa1?\  0Theorem 1.3.4: for each regular language L S*, LR is also regular.E   )  Twawa1?  c YCorollary 1.3.3: the regular languages are closed under complementation and intersection.0Z 2KH  0%jQ ? d qd (  <(   # lDmm1 ?)H6  " XB  08c?FJe F,  Twawa1?x% .Theorem 2.1.1(Pumping Lemma): Let L S* be a regular language. Then there exists an integer N (depending on L) with the property that for each z L with len(z)e"N there exist u,v,wS* so that i) z=uvw, ii) len(uv)d"N and len(v)e"1, and iii