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.1.AUTÓMATAS FINITOS DETERMINÍSTICOS 37• F es el conjunto <strong>de</strong> estados finales <strong>de</strong> un AF.• w, x, y y z, con o sin subíndice, serán strings <strong>de</strong> símbolos <strong>de</strong> entrada.Se dice que un string x es aceptado por un autómata finito M = (Q, Σ, δ, q 0 , F ) si y sólo siδ(q 0 , x) ∈ FEl lenguaje aceptado por M, llamado L(M), es el conjunto{x/δ(q 0 , x) ∈ F }Un lenguaje es un conjunto regular o, simplemente, es regular si es el conjunto aceptado por algún AF.Debe notarse que al hablar <strong>de</strong>l conjunto aceptado por un autómata finito, se está refiriendo específicamenteal conjunto L(M) y no a cualquier conjunto <strong>de</strong> strings aceptados por M que, en general, será sólo unsubconjunto.Ejemplo 33 Consi<strong>de</strong>re el autómata finito <strong>de</strong>scrito por el diagrama <strong>de</strong> transición <strong>de</strong>l ejemplo anterior (véaseFigura 3.1). Su <strong>de</strong>scripción formal es M = (Q, Σ, δ, q 0 , F ), en queQ = {q 0 , q 1 , q 2 , q 3 }Σ = {0, 1}q 0 = q 0F = {q 0 }y δ es la función <strong>de</strong>scrita por la siguiente tabla <strong>de</strong> transición:Q \ Σ 0 1q 0 q 1 q 2q 1 q 0 q 3q 2 q 3 q 0q 3 q 2 q 1Suponga que el input a M es el string binario 110101, entoncesδ(q 0 , 11) = δ(δ(q 0 , 1), 1) = δ(q 2 , 1) = q 0es <strong>de</strong>cir, el prefijo 11 <strong>de</strong>l input pertenece a L(M), la ampolleta <strong>de</strong>l autómata se encien<strong>de</strong> al procesarlo; sinembargo interesa el string completo y así,δ(q 0 , 110) = δ(δ(q 0 , 11), 0) = δ(q 0 , 0) = q 1δ(q 0 , 1101) = δ(δ(q 0 , 110), 1) = δ(q 1 , 1) = q 3δ(q 0 , 11010) = δ(δ(q 0 , 1101), 0) = δ(q 3 , 0) = q 2δ(q 0 , 110101) = δ(δ(q 0 , 11010), 1) = δ(q 2 , 1) = q 0 ∈ Fes <strong>de</strong>cir, la secuencia <strong>de</strong> estados es:1 1 0 1 0 1q 0 q 2 q 0 q 1 q 3 q 2 q 0y el string 110101 ∈ L(M).Ejemplo 34 Un autómata finito que acepte todos los strings sobre Σ = {a, b}, que tengan un número par<strong>de</strong> b’s. (Ver Figura 3.3)Formalmente el autómata es M = (Q, Σ, δ, q 0 , F ), en que✷

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

Saved successfully!

Ooh no, something went wrong!