U2-6 RE to DFA Directly.pptx - Converting a RE Directly to a DFA Construct a syntax tree for(r Traverse the tree to construct functions nullable

U2-6 RE to DFA Directly.pptx - Converting a RE Directly to...

This preview shows page 1 - 4 out of 9 pages.

Slide 1 Converting a RE Directly to a DFA Construct a syntax tree for ( r ) # Traverse the tree to construct functions nullable , firstpos , lastpos , and followpos Construct DFA D by algorithm
Image of page 1
Slide 2 Function Computed From the Syntax Tree nullable(n) The subtree at node n generates languages including the empty string firstpos(n) The set of positions that can match the first symbol of a string generated by the subtree at node n lastpos(n) The set of positions that can match the last symbol of a string generated be the subtree at node n followpos(i) The set of positions that can follow position i in the tree
Image of page 2
Slide 3 Rules for Computing the Function Node n nullable ( n ) firstpos ( n ) lastpos ( n ) A leaf labeled by true A leaf with position i false { i } { i } n = c 1 | c 2 nullable ( c 1 ) or nullable ( c 2 ) firstpos ( c 1 ) firstpos ( c 2 ) lastpos ( c 1 ) lastpos ( c 2 ) n = c 1 c 2 nullable ( c 1 ) and nullable ( c 2 ) if ( nullable ( c 1 ) ) firstpos ( c 1 ) firstpos ( c 2 ) else firstpos ( c 1 ) if (
Image of page 3
Image of page 4

You've reached the end of your free preview.

Want to read all 9 pages?

  • Winter '17
  • sathya raja shekaran

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

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors