automata-3_fix - Automata Chapter3 Grammars...

Info icon This preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Automata Chapter 3  Regular Languages and Regular  Grammars
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
3.1 Regular Expressions Definition 3.1 Let   be a given alphabet. Then 1. ∅ , λ , and a ∈∑  are all regular expressions.  These are called primitive regular expressions. 1. If r 1  and r 2  are regular expressions, so are r 1 + r 2 r 1 r 2 , r 1 *, and (r 1 ). 2. A string is a regular expression iff it can be  derived from the primitive regular expressions  by a finite number of applications of the rules in  (2).
Image of page 2
3.1 Regular Expressions Definition 3.2 The Language L( r ) denoted by any  regular expression  r  is defined: 1. ∅  is a r.e. denoting the empty set. 2. λ  is a r.e. denoting { λ }. 1. For every a ∈∑ , a is a r.e. denoting {a}.  If  r 1  and  r 2  are regular expressions, then 4. L( r 1 r 2 ) = L( r 1 ) L( r 2 ), 5. L( r 1     r 2 ) = L( r 1 )L( r 2 ),  6. L(( r 1 )) = L( r 1 ), 7. L( r 1   *) = (L( r 1 ))*.
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
3.1 Regular Expressions Ex. 3.1           (a+b    c)* (c +  ) Ex. 3.2        L(a    (a+b)) = L(a*) L(a+b)                           = (L(a))*(L(a) L(b))                           = { ,a,aa,aaa, …}{a,b} λ                           = {a,aa,aaa, …. ,b, ab, aab, …} 
Image of page 4
3.1 Regular Expressions Ex. 3.3           r = (a+b)* (a + bb) Ex. 3.4        r = (aa)   * (bb)*b                           
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
3.1 Regular Expressions Ex. 3.5       L(r) = { w in {0,1}*| w has at least one pair of                         consecutive zeros} Ex. 3.6       L(r) = { w in {0,1}*| w has no pair of                         consecutive zeros}
Image of page 6
3.2 Connection Between Regular  Expressions and Regular Language Theorem 3.1 Let r be a r.e. Then  5  some NFA that  accepts L( r ).   (L( r ) is a regular language.) Proof:  q 0 q 1 q 0 q 1 λ q 0 q 1 a NFA accepts ,          { λ },                   {a}
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
3.2 Connection Between Regular  Expressions and Regular Language Assume we have M 1  and M 2  for L( r 1 ) and L( r 2 ).
Image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern