11.07.2015 Views

Teor´ıa de Autómatas y Lenguajes Formales

Teor´ıa de Autómatas y Lenguajes Formales

Teor´ıa de Autómatas y Lenguajes Formales

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.7. EXPRESIONES REGULARES 61Ejemplo 58 Se construye un AFND-ε que acepta el lenguaje <strong>de</strong>scrito por la expresión regular 01 ∗ + 0. Porlas reglas <strong>de</strong> prece<strong>de</strong>ncia, ya se vio que la expresión regular es realmente:r = ((0(1 ∗ )) + 0)es <strong>de</strong>cir, es <strong>de</strong> la forma r 1 + r 2 , en que r 1 = 01 ∗ y r 2 = 0. El autómata para r 2 es simple:★✥ ✬✩★✥✲ q 0 ✲ q1 2✧✦ ✫✪✧✦La expresión regular r 1 pue<strong>de</strong> anotarse como r 3 r 4 , en que r 3 = 0 y r 4 = 1 ∗ . El autómata para r 3 estambién simple:★✥✲ q 03✧✦A su vez, r 4 es r ∗ 5 , en que r 5 = 1, cuyo autómata es✬✩★✥✲ q4✫✪✧✦★✥ ✬✩★✥✲ q 1 ✲ q5 6✧✦ ✫✪✧✦Para construir el autómata para r 4 , se usa el caso 3 <strong>de</strong>l teoerema anterior, obteniéndose:✬ ✩ε✛✘ ✛✘ ❄✛✘ ★✥✛✘✲ q ε✲ q 1 ✲ q ε✲ q 7 568✚✙ ✚✙ ✚✙ ✧✦✚✙✫ε✪✷Para r 1 = r 3 r 4 , se usa el caso 2:✗ ε ✔✓✏ ✓✏ ✓✏ ✓✏ ❄ ✓✏ ✛✘✓✏✲ q 0 ✲ ε ✲ ε ✲ 1 ✲ ε3 q4 q7 q5 q6 ✲ q8✒✑ ✒✑ ✒✑ ✒✑ ✒✑✚✙✒✑✻✫ ε✪

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!