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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

62 CHAPTER 3.ACEPTACIÓN Y GENERACIÓN DE LENGUAJES REGULARESFinalmente, usando el caso 1, se construye el autómata para r = r 1 + r 2✗ε✔✓✏ ✓✏ ✓✏ ✓✏ ❄ ✓✏ ✓✏0 ✲ ε ✲ ε ✲ 1 ✲ εe q ✲✒✑ ✒✑ ✒✑ ✒✑ ✒✑ ✒✑✓✏ ✚ ✚✚✚❃3 q4 q7 q5 q6 q8❍ ❍❍❍❍❥ e ✛✘✻ ✓✏✲q✒✑ 9 ❳ ❳❳ ✫ ε✪ q✚✙✒✑✓✏✓✏✲ ✘ ✘✘ ✘ ✘✘✘✘ ✘ ✘✘✘ ✘✿ 10❳ ❳❳❳ e❳ e❳❳❳❳❳3 q 01 q2✒✑✒✑un autómata finito <strong>de</strong>terminístico con transiciones en vacío que acepta el lenguaje <strong>de</strong>scrito por la expresiónregular 01 ∗ + 0Ejemplo 59 Un AFND-ε equivalente a la expresión regular (ab + aab) ∗ .ε✩ε ✓✏ ❄ ✓✏ ✓✏ ✓✏ ✓✏✛✘✓✏ ✞ ❄ ε ✲ a✲ ε✲ b✲✄ ε ✓✏ ✟ ✓✏✲ ✒✑ ✒✑ ✒✑ ✒✑ ✒✑ ❄ ε✲✒✑ ✓✏ ε✚✙✒✑✒✲✒✑✓✏ ✓✏ ✓✏ ✓✏ ✓✏✦ ✻ ✻✛✝ ✒✑a ✁ ✲ε a✲ ε✲ b ε✲✒✑ ✻ ✒✑ ✒✑ ✒✑ ✒✑✫ε✪✷La <strong>de</strong>mostración <strong>de</strong>l teorema anterior contiene un algoritmo para convertir una expresión regular enun autómata finito (no <strong>de</strong>terminístico con transiciones en vacío), asumiendo que la expresión regular estétotalmente parentizada.Teorema 9 Sea L un lenguaje aceptado por un AFD. Hay una expresión regular que lo representa.Demostración : Sea L un lenguaje aceptado por un AFD M = ({q 1 , . . . , q n }, Σ, δ, q 1 , F ). Se construirá unaexpresión regular que <strong>de</strong>scribe L(M).Sea Rij k el conjunto <strong>de</strong> todos los strings x, tales queδ(q i , x) = q jy que si δ(q i , y) = q l , para cualquier y prefijo <strong>de</strong> x (que no sea x o ε), entonces l ≤ k.Esto es, R k ij es el conjunto <strong>de</strong> todos los strings que llevan al AFD <strong>de</strong> q i a q j , sin pasar por ningún estadocon número (sub-índice) mayor que k. Por pasar se entien<strong>de</strong> entrar y salir. Por lo tanto i, j o ambos pue<strong>de</strong>nser mayores que k.✷

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

Saved successfully!

Ooh no, something went wrong!