,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu...

39
SINTAXIS Y SEMÁNTICA DEL LENGUAJE. Autómatas Finitos: Equivalencia y Minimización

Transcript of ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu...

Page 1: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

SINTAXIS Y SEMÁNTICA DEL

LENGUAJE.

Autómatas Finitos:

Equivalencia y Minimización

Page 2: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Estados accesibles: En un AFD se dice que un estado p es

accesible desde otro estado q, si existe un camino desde q hasta p,

es decir, si llega alguna flecha.

Todos los estados inaccesibles pueden ser eliminados sin que

afecten el comportamiento del AF.

a

q0

q1

q2b

a

>

b

AUTÓMATAS FINITOS. EQUIVALENCIA

q2 es inaccesible

Equivalencia de Autómatas Finitos:

Page 3: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Autómatas finitos equivalentes: Dos autómatas finitos

M y M’ son equivalentes si aceptan las mismas

palabras, es decir el mismo lenguaje.

AUTÓMATAS FINITOS. EQUIVALENCIA

Estados compatibles: Dos estados q y q’ son compatibles si

ambos son estados finales o ambos son no finales.

q1 q2 q3 q4

compatibles compatibles

Page 4: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Teorema de Moore: existe un algoritmo de comparación para

decidir si 2 AF son equivalentes o no.

Para comparar los AF se construye un árbol de comparación,

siguiendo los siguientes pasos:

0- Se eliminan estados inaccesibles.

1- La raíz del árbol es el par ordenado (S,S’) formado por los

estados iniciales de cada AF. Los estados deben ser compatibles.

2- Luego se van agregando hojas del árbol usando las transiciones

que salen desde S y S’. Cada par ordenado de estados que se

agrega debe ser compatible.

AUTÓMATAS FINITOS. EQUIVALENCIA

Page 5: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Dados dos autómatas AF1 y AF2,

¿cómo determinamos si son equivalentes?

a r1q1

b

a

>

b

r0>

b

a

q0

aq2

a

b

b

AUTÓMATAS FINITOS. EQUIVALENCIA

Ejemplo1:

AF1: AF2:

Page 6: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

q1 y r1 son compatibles porque ambos son no finales entonces seguimos

Con línea punteada se marcan las ramas que van a nodos ya existentes.

q2y r0 son compatiblesporque ambos son finales entonces seguimos

(q0, r0)

(q2,r0) (q1,r1)

q0 y r0 son compatibles porque ambos son finales, seguimos

a ba

b

a, b

AUTÓMATAS FINITOS. EQUIVALENCIA

a r1q1

b

a

>

b

r0>

b

a

q0

aq2

a

b

b

Aplicamos el teorema de Moore, siguiendo los pasos indicados anteriormente.

No hay estados inaccesibles, entonces construyo la raíz del árbol con los estados iniciales de ambos autómatas (q0,r0)

Todos los estados son compatibles. Por lo tanto, AF1, AF2 son equivalentes.

AF1: AF2:

Page 7: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 2:

No hay estados inaccesibles, entonces armo el árbol de comparación con los estados iniciales

P y A son compatibles porque ambos son no finales, seguimos

Como r y B no son estados compatibles, porque r es estado final y B no final, no seguimos.

Por lo tanto, AF1, AF2 no son equivalentes.

AF1: AF2:

1

p

q

r

1

0

1

>

0

0

0A

C

B

1 1 1

>

0

0D

1

0

0(p, A)

(r, B)

AUTÓMATAS FINITOS. EQUIVALENCIA

Si encuentro un par de estados incompatibles, entonces ya no son equivalentes.No es necesario completar el árbol si ya se encontró un par incompatible.

Page 8: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 3:

1° saco los nodos inaccesibles de AF2.

C es inaccesible, porque no llega ninguna flecha a él. Se elimina.

AF1 AF2

1

p

r2

q

2

2

1

>1

2

2A

D

B

1,2

>

2

1C

1

2

1

AUTÓMATAS FINITOS. EQUIVALENCIA

Page 9: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 3:

Armo el árbol de comparación, a partir de los estados iniciales.

AF1 AF2

1

p

r2

q

2

2

1

>1

2

2A

D

B

1,2

>

2

1

1

(p, A)

(q,A) (r2,B)

1 2

P y A son compatibles porque son ambos no finales, seguimos

q y A son compatiblesporque son ambos no finales, seguimos

r2y B son incompatiblesporque r2 es final y B es no final, entonces no se continúa

Por lo tanto, AF1, AF2 no son equivalentes.

Luego de la eliminación de nodos inaccesibles AF2 queda así:

AUTÓMATAS FINITOS. EQUIVALENCIA

Page 10: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 4:

AF1 AF2

(0, 0)

(2,0) (1,1)

0 y 0 son compatibles

2 y 0 son compatibles

Todos los estados son compatibles. Por lo tanto, AF1, AF2 son equivalentes.

y0

2

1

xy

>x x,y y

0 1>

x

x, y

1 y 1 son compatibles

x yx

y

x,y

AUTÓMATAS FINITOS. EQUIVALENCIA

No hay estados inaccesibles, entonces armo el árbol de comparación con los estados iniciales

Page 11: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 5: AF1 AF2

(a, 0)

(b,1)

a y 0 son compatibles porque ambos son estados no finales, seguimos

a y 2 son incompatibles

Por lo tanto, AF1, AF2 no son equivalentes.

b y 1 son compatibles

a cb

x

z>

z

z

x

x

z0 1>

xx, z

2z

x

c y 2 son compatibles

x z

x

z

(c,2)

(a,2)

z

AUTÓMATAS FINITOS. EQUIVALENCIA

No hay estados inaccesibles, entonces armo el árbol de comparación con los estados iniciales

Page 12: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Minimización de AFD:

Existen métodos mecánicos para simplificar un AFD para llegar a

la expresión más simple del mismo.

Se quitan estados inaccesibles y estados indistinguibles o

redundantes.

El autómata mínimo cumple su función con la menor cantidad

posible de estados.

Dos estados son distinguibles si uno es final y el otro no.

AUTÓMATAS FINITOS. MINIMIZACION

q1 q2

q1 y q2 son distinguibles

Page 13: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Método para Minimizar un AFD:

El método consiste en eliminar estados inaccesibles (inútiles) y los

redundantes o equivalentes.

Para detectar los estados redundantes hay que ver si son

distinguibles entre sí y sustituirlos por un único estado.

AUTÓMATAS FINITOS. MINIMIZACION

Proceso:

1) se buscan estados inaccesibles y se eliminan.

2) se marcan los estados distinguibles entre sí, finales con no finales.

3) se analiza cada par de estados restante,

si dos estados p y q de llegada son distinguibles entonces los estados

de partida p0 y q0 también lo son.

Para realizar el proceso se arma una tabla de estados, con cada

estado como fila y columna.

Page 14: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 1:

a

1

2

3

4

b

a,b

a,b

a,b

>

En este ejemplo no hay estados inaccesibles.

Se procede a armar la tabla, luego se siguen los siguientes pasos:

1) se descarta la mitad superior de la tabla y se marcan las celdas con una X.

2) se marcan los pares distinguibles, como 4 es estado final y 1, 2 y 3

son no finales, entonces los pares distinguibles son:

(1,4), (2,4), (3,4), se marcan en la tabla con //

AUTÓMATAS FINITOS. MINIMIZACION

1 2 3 4

1 X X X X

2 X X X

3 X X

4 // // // X

Page 15: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 1:a

1

2

3

4

b

a,b

a,b

a,b

>

1 2 3 4

1 X X X X

2 X X X

3 /// X X

4 // // // X(3,2) ? 3,a 4

2,a 4

3,b 4

2,b 4

No se marca en la tabla!!

?

?

3) Se recorre la tabla de abajo hacia arriba:

(3,1) ? 3,a 4

1,a 2

3,b 4

1,b 3

(3,1) es distinguible

distinguible

distinguible

AUTÓMATAS FINITOS. MINIMIZACION

Page 16: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 1:a

1

2

3

4

b

a,b

a,b

a,b

>

1 2 3 4

1 X X X X

2 //// X X X

3 /// X X

4 // // // X

4) (2,1) ? 2,a 4

1,a 2

2,b 4

1,b 3

(2,1) es distinguibledistinguible

distinguible

AUTÓMATAS FINITOS. MINIMIZACION

Este último no hace falta analizarlo. Con encontrar uno distinguible,es suficiente.

Page 17: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 1:a

1

2

3

4

b

a,b

a,b

a,b

>

1 2 3 4

1 X X X X

2 //// X X X

3 /// X X

4 // // // X

Luego, se agrupan los estados indistinguibles.

Se reescribe el autómata considerando a (2,3) o (3,2) como un único estado.

a1 5 4

b

a,b

a,b>

Algunos autores renombran el autómata de esta forma:

a1 2,3 4

b

a,b

a,b>

AUTÓMATAS FINITOS. MINIMIZACION

Page 18: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 2:

1°) Se eliminan los estados inaccesibles.

El estado 4 es inaccesible.

Se reescribe el autómata sin el estado 4.

a1 2 4

b a,b

a,b> 3

a b

a1 2

ba,b

a,b> 3

AUTÓMATAS FINITOS. MINIMIZACION

Page 19: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 2:

1 2 3

1 X X X

2 X X

3 // // X

Se procede a armar la tabla, luego se siguen los siguientes

pasos:

1) se descarta la mitad superior de la tabla y se marcan

las celdas con una X.

2) se marcan los pares distinguibles, como 3 es estado

final y 1, 2 no finales, entonces los pares distinguibles

son: (3,1), (3,2) se marcan en la tabla con //

a1 2

ba,b

a,b> 3

AUTÓMATAS FINITOS. MINIMIZACION

Page 20: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 2:

1 2 3

1 X X X

2 /// X X

3 // // X

a1 2

ba,b

a,b> 3

Vamos a ver que pasa con (2,1)

3) (2,1) ? 2,a 3

1,a 2

2,b 3

1,b 1

(2,1) es distinguible

distinguible

distinguible

Por lo tanto al autómata finito es mínimo.

AUTÓMATAS FINITOS. MINIMIZACION

Este último no hace falta analizarlo. Con encontrar uno distinguible,es suficiente.

Page 21: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 3:

1 2 3 4 5

1 X X X X X

2 // X X X X

3 // X X X

4 // X X

5 // X

1°) No hay estados inaccesibles.

2°) Se procede a armar la tabla, luego se siguen los siguientes pasos:

1) se descarta la mitad superior de la tabla y se marcan las celdas con

una X.

2) se marcan los pares distinguibles. Estados finales: 5, 4, 3, 2.

Estados no finales: 1

Pares distinguibles: (1,5), (1,4), (1,3), (1,2), se marcan en la tabla con //

a

b

b

a>

1

b

a,b3

4

5

2

b

a

a

AUTÓMATAS FINITOS. MINIMIZACION

Page 22: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 3:

1 2 3 4 5

1 X X X X X

2 // X X X X

3 // X X X

4 // X X

5 // /// X

Analizo el resto de la tabla:

a

b

b

a>

1

b

a,b3

4

5

2

b

a

a

Vamos a ver que pasa con (5,2)

3) (5,2) ? 5,a 4

2,a 4

5,b 3

2,b 1

(5,2) es distinguible

?

distinguibley lo marco en la tabla

AUTÓMATAS FINITOS. MINIMIZACION

Page 23: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 3:

1 2 3 4 5

1 X X X X X

2 // X X X X

3 // X X X

4 // X X

5 // /// /// X

a

b

b

a>

1

b

a,b3

4

5

2

b

a

a

Vamos a ver que pasa con (5,3)

3) (5,3) ? 5,a 4

3,a 4

5,b 3

3,b 1

(5,3) es distinguible

?

distinguibley lo marco en la tabla

AUTÓMATAS FINITOS MINIMIZACION

Page 24: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 3:

1 2 3 4 5

1 X X X X X

2 // X X X X

3 // X X X

4 // X X

5 // /// /// X

a

b

b

a>

1

b

a,b3

4

5

2

b

a

a

Vamos a ver que pasa con (5,4)

3) (5,4) ? 5,a 4

4,a 4

5,b 3

4,b 2

(5,4) es indistinguible,

?

?

no lo marco en la tabla

AUTÓMATAS FINITOS. MINIMIZACION

Page 25: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 3:

1 2 3 4 5

1 X X X X X

2 // X X X X

3 // X X X

4 // //// X X

5 // /// /// X

a

b

b

a>

1

b

a,b3

4

5

2

b

a

a

Vamos a ver que pasa con (4,2)

4) (4,2) ? 4,a 4

2,a 4

4,b 2

2,b 1

(4,2) es distinguible,

?

distinguiblelo marco en la tabla

AUTÓMATAS FINITOS. MINIMIZACION

Page 26: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 3:

1 2 3 4 5

1 X X X X X

2 // X X X X

3 // X X X

4 // //// //// X X

5 // /// /// X

a

b

b

a>

1

b

a,b3

4

5

2

b

a

a

Vamos a ver que pasa con (4,3)

4) (4,3) ? 4,a 4

3,a 4

4,b 2

3,b 1

(4,3) es distinguible,

?

distinguiblelo marco en la tabla

AUTÓMATAS FINITOS. MINIMIZACION

Page 27: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 3:

1 2 3 4 5

1 X X X X X

2 // X X X X

3 // X X X

4 // //// //// X X

5 // /// /// X

a

b

b

a>

1

b

a,b3

4

5

2

b

a

a

Vamos a ver que pasa con (3,2)

4) (3,2) ? 3,a 4

2,a 4

3,b 1

2,b 1

(3,2) es indistinguible,

?

?no lo marco en la tabla

AUTÓMATAS FINITOS. MINIMIZACION

Page 28: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 3:

1 2 3 4 5

1 X X X X X

2 // X X X X

3 // X X X

4 // //// //// X X

5 // /// /// X

a

b

b

a>

1

b

a,b3

4

5

2

b

a

a

Luego, se agrupan los estados indistinguibles. Se reescribe el autómata

considerando a (5,4) y a (3,2) como un único estado.

Por último se renombra el

autómata de esta forma:

b6 7 1

a

b a,b>

a

b5,4 3,2 1

a

b a,b>

a

AUTÓMATAS FINITOS. MINIMIZACION

Page 29: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 4:

0

1

0

1

> e0

0,1

a

c

0

b

d

f g

0,1

0,1

1

1

1°) Elimino los estados inaccesibles y reescribo el autómata.

d es inaccesible, por lo tanto elimino ese estado del autómata.

0

1

0

1

> e

0,1

a

c

0

b

f g

0,1

0,1

1

AUTÓMATAS FINITOS. MINIMIZACION

Page 30: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 4:

a b c e f g

a X X X X X X

b X X X X X

c // // X X X X

e // X X X

f // X X

g // // // // X

2°) Se arma la tabla, luego se siguen los siguientes pasos:

1) se descarta la mitad superior de la tabla y se marcan las celdas con una X.

2) se marcan los pares distinguibles, Estados finales: c y g.

Estados no finales: a,b,e,f

Pares distinguibles: (a,c), (b,c), (e,c), (f,c), (a,g), (b,g), (e,g), (f,g),

se marcan en la tabla con //

0

1

0

1

> e

0,1

a

c

0

b

f g

0,1

0,1

1

No aparece d en la tabla porque se eliminó por redundante.

AUTÓMATAS FINITOS. MINIMIZACION

Page 31: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 4:

a b c e f g

a X X X X X X

b X X X X X

c // // X X X X

e // X X X

f // X X

g // // // // X

0

1

0

1

> e

0,1

a

c

0

b

f g

0,1

0,1

1

Analizo el resto de la tabla:

Vamos a ver que pasa con (g,c)

3) (g,c) ? g,0 g

c,0 c

g,1 g

c,1 c

(g,c) es indistinguible

?

?

no lo marco en la tabla

AUTÓMATAS FINITOS. MINIMIZACION

Page 32: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 4:

a b c e f g

a X X X X X X

b X X X X X

c // // X X X X

e // X X X

f // // X X

g // // // // X

0

1

0

1

> e

0,1

a

c

0

b

f g

0,1

0,1

1

Analizo el resto de la tabla, y marco en todos los casos con //:

Vamos a ver que pasa con (f,a)

4) (f,a) ? f,0 g

a,0 b

f,1 e

a,1 f

(f,a) es distinguible,

distinguible

?lo marco en la tabla

AUTÓMATAS FINITOS. MINIMIZACION

Page 33: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 4:

a b c e f g

a X X X X X X

b X X X X X

c // // X X X X

e // X X X

f // // X X

g // // // // X

0

1

0

1

> e

0,1

a

c

0

b

f g

0,1

0,1

1

Analizo el resto de la tabla:

Vamos a ver que pasa con (f,b)

4) (f,b) ? f,0 g

b,0 c

f,1 e

b,1 e

(f,b) es indistinguible,

?

?no lo marco en la tabla

AUTÓMATAS FINITOS. MINIMIZACION

Page 34: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 4:

a b c e f g

a X X X X X X

b X X X X X

c // // X X X X

e // X X X

f // // // X X

g // // // // X

0

1

0

1

> e

0,1

a

c

0

b

f g

0,1

0,1

1

Analizo el resto de la tabla:

Vamos a ver que pasa con (f,e)

4) (f,e) ? f,0 g

e,0 e

f,1 e

e,1 e

(f,e) es distinguible,

distinguible

?lo marco en la tabla

AUTÓMATAS FINITOS. MINIMIZACION

Page 35: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 4:

a b c e f g

a X X X X X X

b X X X X X

c // // X X X X

e // // X X X

f // // // X X

g // // // // X

0

1

0

1

> e

0,1

a

c

0

b

f g

0,1

0,1

1

Analizo el resto de la tabla:

Vamos a ver que pasa con (e,a)

5) (e,a) ? e,0 e

a,0 b

e,1 e

a,1 f

(e,a) es distinguible,

?

distinguible lo marco en la tabla

AUTÓMATAS FINITOS. MINIMIZACION

porque (e,f) está marcado en la tabla como distinguible

Page 36: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 4:

a b c e f g

a X X X X X X

b X X X X X

c // // X X X X

e // // // X X X

f // // // X X

g // // // // X

0

1

0

1

> e

0,1

a

c

0

b

f g

0,1

0,1

1

Analizo el resto de la tabla:

Vamos a ver que pasa con (e,b)

5) (e,b) ? e,0 e

b,0 c

e,1 e

b,1 e

(e,b) es distinguible,

distinguible

?lo marco en la tabla

AUTÓMATAS FINITOS. MINIMIZACION

Page 37: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 4:

a b c e f g

a X X X X X X

b // X X X X X

c // // X X X X

e // // // X X X

f // // // X X

g // // // // X

0

1

0

1

> e

0,1

a

c

0

b

f g

0,1

0,1

1

Analizo el resto de la tabla:

Vamos a ver que pasa con (b,a)

6) (b,a) ? b,0 c

a,0 b

b,1 e

a,1 f

(b,a) es distinguible,

distinguible

?lo marco en la tabla

AUTÓMATAS FINITOS. MINIMIZACION

Page 38: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq

Ejemplo 4:

a b c e f g

a X X X X X X

b // X X X X X

c // // X X X X

e // // // X X X

f // // // X X

g // // // // X

0

1

0

1

> e

0,1

a

c

0

b

f g

0,1

0,1

1

Se reescribe el autómata

considerando a (c,g) y a (b,f)

como un único estado.

Por último se renombra el

autómata de esta forma:

0B C

D

0,1

0,1> A

0,11

0b,f c,g

e

0,1

0,1> a

0,11

AUTÓMATAS FINITOS. MINIMIZACION

Luego, se agrupan los estados indistinguibles.

Page 39: ,17$;,6< (0É17,&$'(/ /(1*8$-( · 7hruhpd gh 0rruh h[lvwh xq dojrulwpr gh frpsdudflyq sdud ghflglu vl $) vrq htxlydohqwhv r qr 3dud frpsdudu orv $) vh frqvwux\h xq iuero gh frpsdudflyq