1 / 67

EECS 20 Lecture 16 (February 26, 2001) Tom Henzinger

Determinization. EECS 20 Lecture 16 (February 26, 2001) Tom Henzinger. State machines. Deterministic   Output-deterministic   Nondeterministic. X. X. A state machine is deterministic iff there is only one initial state, and

Download Presentation

EECS 20 Lecture 16 (February 26, 2001) Tom Henzinger

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Determinization EECS 20 Lecture 16 (February 26, 2001) Tom Henzinger

  2. State machines Deterministic   Output-deterministic   Nondeterministic X X

  3. A state machine is deterministic • iff • there is only one initial state, and • for every state and every input, there is only one successor state. Hence, for every input signal there is exactly one run.

  4. A state machine is output-deterministic • iff • there is only one initial state, and • for every state and every input-output pair, there is only one successor state. Hence, for every behavior there is exactly one run.

  5. State machines Deterministic  Output-deterministic  Nondeterministic Simulations can be found easily

  6. If M2 is a deterministic state machine, then M1 is simulated by M2 iff M1 is equivalent to M2. “if and only if” M1 refines M2, and M2 refines M1

  7. If M2 is an output-deterministic state machine, then M1 is simulated by M2 iff M1 refines M2.

  8. If M2 is a nondeterministic state machine, then M1 is simulated by M2 implies M1 refines M2.

  9. Fortunately: For every nondeterministic state machine M, we can find an output-deterministic state machine det(M) that is equivalent to M. ( This is called “subset construction.” )

  10. Then, to check if M1 refines M2, check if M1 is simulated by det(M2): M1 refines M2 iff M1 refines det(M2) iff M1 is simulated by det(M2).

  11. Then, to check if M1 refines M2, check if M1 is simulated by det(M2): M1 refines M2 iff M1 refines det(M2) iff M1 is simulated by det(M2). output-deterministic

  12. The Subset Construction Given: nondeterministic state machine M Find: output-deterministic state machine det(M) that is equivalent to M

  13. The Subset Construction Given: nondeterministic state machine M Find: output-deterministic state machine det(M) that is equivalent to M Inputs [det(M)] =Inputs [M] Outputs [det(M)] =Outputs [M]

  14. The Subset Construction Let initialState [ det(M) ]=possibleInitialStates [M] ; Let States [ det(M) ]={ initialState [det(M)] } ; Repeat as long as new transitions can be added to det(M) : Choose P  States [det(M)] and (x,y)  Inputs  Outputs ; Let Q={ q  States [M] |  p  P, (q,y)  possibleUpdates [M] (p,x) } ; If Q  Ø then Let States [det(M)] = States [det(M)]  {Q} ; Let update [det(M)] (P,x) = (Q,y) .

  15. q1 x / y M p x / y q2 det(M) {p}

  16. q1 x / y M p x / y q2 x / y det(M) {q1,q2} {p}

  17. 0 / 11 / 0 0 / 01 / 1 1 / 1 M b a det(M)

  18. 0 / 11 / 0 0 / 01 / 1 1 / 1 M b a det(M) {a}

  19. 0 / 11 / 0 0 / 01 / 1 1 / 1 M b a 0 / 0 det(M) {a}

  20. 0 / 11 / 0 0 / 01 / 1 1 / 1 M b a 0 / 0 1 / 1 det(M) {a} {a,b}

  21. 0 / 11 / 0 0 / 01 / 1 1 / 1 M b a 0 / 0 1 / 1 det(M) {a} {a,b} 0 / 0

  22. 0 / 11 / 0 0 / 01 / 1 1 / 1 M b a 0 / 0 1 / 1 1 / 1 det(M) {a} {a,b} 0 / 0

  23. 0 / 11 / 0 0 / 01 / 1 1 / 1 M b a 0 / 0 1 / 1 1 / 1 0 / 1 det(M) {a} {a,b} {b} 0 / 0

  24. 0 / 11 / 0 0 / 01 / 1 1 / 1 M b a 0 / 0 1 / 1 0 / 11 / 0 1 / 1 det(M) {a} {a,b} {b} 0 / 0

  25. 0 / 11 / 0 0 / 01 / 1 1 / 1 M b a 0 / 1 0 / 0 1 / 1 0 / 11 / 0 1 / 1 det(M) {a} {a,b} {b} 0 / 0

  26. 0 / 11 / 0 0 / 01 / 1 1 / 1 M b a 0 / 11 / 0 0 / 0 1 / 1 0 / 11 / 0 1 / 1 det(M) {a} {a,b} {b} 0 / 0

  27.  / 1  / 0  / 1 a b M  / 1  / 0  / 0 c d det(M)

  28.  / 1  / 0  / 1 a b M  / 1  / 0  / 0 c d det(M) {a,c}

  29.  / 1  / 0  / 1 a b M  / 1  / 0  / 0 c d {a,d}  / 0 det(M) {a,c}

  30.  / 1  / 0  / 1 a b M  / 1  / 0  / 0 c d {a,d}  / 0 det(M) {a,c}  / 1 {b,c}

  31.  / 1  / 0  / 1 a b M  / 1  / 0  / 0 c d  / 0 {a,d}  / 0 det(M) {a,c}  / 1 {b,c}

  32.  / 1  / 0  / 1 a b M  / 1  / 0  / 0 c d  / 0  / 1 {a,d} {b}  / 0 det(M) {a,c}  / 1 {b,c}

  33.  / 1  / 0  / 1 a b M  / 1  / 0  / 0 c d  / 0  / 1  / 1 {a,d} {b}  / 0 det(M) {a,c}  / 1 {b,c}

  34.  / 1  / 0  / 1 a b M  / 1  / 0  / 0 c d  / 0  / 1  / 1 {a,d} {b}  / 0 det(M)  / 1 {a,c}  / 1 {b,c}

  35.  / 1  / 0  / 1 a b M  / 1  / 0  / 0 c d  / 0  / 1  / 1 {a,d} {b}  / 0 det(M)  / 1 {a,c}  / 1  / 0 {b,c} {d}

  36.  / 1  / 0  / 1 a b M  / 1  / 0  / 0 c d  / 0  / 1  / 1 {a,d} {b}  / 0 det(M)  / 1 {a,c}  / 0  / 1  / 0 {b,c} {d}

  37. For a given reactive system S: • If there is a nondeterministic state machine that implements S with n states, then there is an output-deterministic state machine that implements S with 2nstates. [Subset construction] • 2. There may not be an output-deterministic state machine that implements S with fewer than 2n states. [Homework 5, Problem C] • 3. There may not be a unique nondeterministic state machine that implements S with the fewest states.

  38.  /   / 0  / 1  /   / 0 equivalent but not isomorphic to  / 0  /   /   / 0  / 1  / 0

  39. So what does minimization do for nondeterministic state machines ?

  40. The Nondeterministic Minimization Algorithm Input : nondeterministic state machine M Output : minimize (M), the state machine with the fewest states that is bisimilar to M (the result is unique up to renaming of states)

  41. A binary relation B  States [M1]  States [M2] is a bisimulation between M1 and M2 iff A1.  p  possibleInitialStates [M1] ,  q  possibleInitialStates [M2], ( p, q )  B, and A2.  p  States [M1] ,  q  States [M2] , if ( p, q )  B, then  x  Inputs ,  y  Outputs ,  p’  States [M1] , if ( p’, y )  possibleUpdates [M1] ( p, x ) then  q’  States [M2] , ( q’, y )  possibleUpdates [M2] ( q, x ) and ( p’, q’ )  B , and

  42. and B1.  q  possibleInitialStates [M2] ,  p  possibleInitialStates [M1], ( p, q )  B, and B2.  p  States [M1] ,  q  States [M2] , if ( p, q )  B, then  x  Inputs ,  y  Outputs ,  q’  States [M2] , if ( q’, y )  possibleUpdates [M2] ( q, x ) then  p’  States [M1] , ( p’, y )  possibleUpdates [M1] ( q, x ) and ( p’, q’ )  B .

  43. B x / y p’ p q

  44. B x / y p’ p x / y q’ q

  45. B x / y p’ p x / y q’ q

  46. x / y B X x / y p’ p x / y q’ q x / y q’’

  47. B x / y p’ p x / y q’ q x / y q’’

  48. For deterministic state machines M1 and M2, • M1 is equivalent to M2 •  M1 and M2 are bisimilar.

  49. For nondeterministic state machines M1 and M2, • M1 is equivalent to M2 •  M1 and M2 are bisimilar. X

  50. The Nondeterministic Minimization Algorithm States

More Related