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.

5.8. EQUIVALENCIA ENTRE LLC Y AUTÓMATAS APILADORES 973. ∀q ∈ F y Z ∈ Γ ∪ {X 0 }, δ ′ (q, ε, Z) contiene (q e , ε)4. ∀Z ∈ Γ ∪ {X 0 }, δ ′ (q e , ε, Z) contiene (q e , ε)La regla (1) hace que M 1 entre la <strong>de</strong>scripción instantánea inicial <strong>de</strong> M 2 , excepto que M 1 tendrá su propiomarcador, X 0 , al fondo <strong>de</strong>l stack. La regla (2) le permite a M 1 simular las movidas <strong>de</strong> M 2 . Si M 2 entraalguna vez a un estado final, las reglas (3) y (4) le permiten a M 1 la elección <strong>de</strong> entrar al estado q e y vaciarsu stack (por lo tanto, aceptando el input) o <strong>de</strong> continuar simulando a M 2 . Se <strong>de</strong>be notar que M 2 podríavaciar su stack para algún string X que no está en L(M 2 ). Por esta razón M 1 tiene una marca propia alfondo <strong>de</strong>l stack. Si no M 1 , simulando a M 2 , podría vaciar su stack y aceptar X cuando no <strong>de</strong>biera.Sea X ∈ L(M 2 ). Entonces (q 0 , X, Z 0 ) ⊢ M 2∗(q, ε, γ) para algún q ∈ F . Consi<strong>de</strong>re M1 con el string X. Porregla (1)(q ′ 0, X, X 0 ) ⊢ M 1(q 0 , X, Z 0 X 0 )por regla (2), todas las movidas <strong>de</strong> M 2 son legales en M 1 , por lo tanto(q 0 , X, Z 0 ) ⊢ M 1∗(q, ε, γ)Si un AA pue<strong>de</strong> hacer una secuencia <strong>de</strong> movidas <strong>de</strong>s<strong>de</strong> una <strong>de</strong>scripción instantánea dada, también pue<strong>de</strong>hacer la misma secuencia <strong>de</strong> movidas <strong>de</strong>s<strong>de</strong> cualquier DI obtenida <strong>de</strong> la primera insertando un string <strong>de</strong>símbolos <strong>de</strong>l stack bajo el contenido original. Por lo tanto(q ′ 0, X, X 0 ) ⊢ M 1(q 0 , X, Z 0 X 0 ) ⊢ (q, ε, γX 0 )Por las reglas (3) y (4), porque q ∈ F ,(q, ε, γX 0 ) ⊢ M 1∗(qe , ε, ε)Por lo tanto,(q ′ 0, X, X 0 ) ⊢ M 1∗(qe , ε, ε)y así, M 1 acepta X por stack vacío, es <strong>de</strong>cir, X ∈ N(M 1 ).En el otro sentido, si M 1 acepta X por stack vacío, es fácil mostrar que la secuencia <strong>de</strong> movidas <strong>de</strong>be seruna movida por regla (1), luego una secuencia por regla (2) en que M 1 simula la aceptación <strong>de</strong> X por M 2 ,seguido <strong>de</strong>l vaciamiento <strong>de</strong>l stack <strong>de</strong> M 1 usando reglas (3) y (4). Por lo tanto X <strong>de</strong>be estar en L(M 2 ).Teorema 24 Si L es N(M 1 ) para algún AA M 1 , entonces L es L(M 2 ) para algún AA, M 2 .Demostración : Ahora se quiere que M 2 simule a M 1 y pueda <strong>de</strong>tectar cuando M 1 vacía su stack. Lamáquina M 2 entra a un estado final cuando y sólo cuando esto suce<strong>de</strong>. Sea M 1 = (Q, Σ, Γ, δ, q 0 , Z 0 , ∅) unAA tal que L = N(M 1 ). SeaM 2 = (Q ∪ {q ′ 0 , q f }, Σ, Γ ∪ {X 0 }, δ ′ , q ′ 0 , X 0, {q f })en que δ ′ se <strong>de</strong>fine como sigue1. δ ′ (q ′ 0 , ε, X 0) = {(q 0 , Z 0 X 0 )}2. ∀q ∈ Q, a ∈ Σ ∪ {ε} y Z ∈ Γ: δ ′ (q, a, Z) = δ(q, a, Z)3. ∀q ∈ Q, δ ′ (q, ε, X 0 ) contiene (q f , ε)✷

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

Saved successfully!

Ooh no, something went wrong!