unit 4 regular properties
play

Unit-4: Regular properties B. Srivathsan Chennai Mathematical - PowerPoint PPT Presentation

Unit-4: Regular properties B. Srivathsan Chennai Mathematical Institute NPTEL-course July - November 2015 1 / 26 Module 2: A gentle introduction to automata 2 / 26 { p 1 } { p 1 , p 2 } request=1 request=1 ready busy request=0 request=0


  1. Unit-4: Regular properties B. Srivathsan Chennai Mathematical Institute NPTEL-course July - November 2015 1 / 26

  2. Module 2: A gentle introduction to automata 2 / 26

  3. { p 1 } { p 1 , p 2 } request=1 request=1 ready busy request=0 request=0 ready busy { p 2 } {} AP = set of atomic propositions AP- INF = set of infinite words over PowerSet (AP) A property over AP is a subset of AP- INF 3 / 26

  4. Goal: Need finite descriptions of properties 4 / 26

  5. Goal: Need finite descriptions of properties Here: Finite state automata to describe sets of words 4 / 26

  6. Goal: Need finite descriptions of properties Here: Finite state automata to describe sets of finite words 4 / 26

  7. Alphabet: { a , b } 5 / 26

  8. Alphabet: { a , b } L 1 = { ab , abab , ababab , ... } 5 / 26

  9. Alphabet: { a , b } L 1 = { ab , abab , ababab , ... } Design a TS with actions { a , b } and mark some states as accepting so that the set of all paths from an initial state to an accepting state equals L 1 5 / 26

  10. Alphabet: { a , b } L 1 = { ab , abab , ababab , ... } Design a TS with actions { a , b } and mark some states as accepting so that the set of all paths from an initial state to an accepting state equals L 1 q 0 q 1 q 2 q 3 q 4 5 / 26

  11. Alphabet: { a , b } L 1 = { ab , abab , ababab , ... } Design a TS with actions { a , b } and mark some states as accepting so that the set of all paths from an initial state to an accepting state equals L 1 a q 0 q 1 q 2 q 3 b q 4 5 / 26

  12. Alphabet: { a , b } L 1 = { ab , abab , ababab , ... } Design a TS with actions { a , b } and mark some states as accepting so that the set of all paths from an initial state to an accepting state equals L 1 a b q 0 q 1 q 2 q 3 a b q 4 5 / 26

  13. Alphabet: { a , b } L 1 = { ab , abab , ababab , ... } Design a TS with actions { a , b } and mark some states as accepting so that the set of all paths from an initial state to an accepting state equals L 1 a a b q 0 q 1 q 2 q 3 a b b q 4 5 / 26

  14. Alphabet: { a , b } L 1 = { ab , abab , ababab , ... } Design a TS with actions { a , b } and mark some states as accepting so that the set of all paths from an initial state to an accepting state equals L 1 a a b q 0 q 1 q 2 q 3 b a b b a q 4 5 / 26

  15. Alphabet: { a , b } L 1 = { ab , abab , ababab , ... } Design a TS with actions { a , b } and mark some states as accepting so that the set of all paths from an initial state to an accepting state equals L 1 a a b q 0 q 1 q 2 q 3 b a b b a q 4 a , b 5 / 26

  16. Alphabet: { a , b } L 2 = { a , aa , ab , aaa , aab , aba , abb , ... } L 2 is the set of all words starting with a 6 / 26

  17. Alphabet: { a , b } L 2 = { a , aa , ab , aaa , aab , aba , abb , ... } L 2 is the set of all words starting with a Design a TS with actions { a , b } and mark some states as accepting so that the set of all paths from an initial state to an accepting state equals L 2 6 / 26

  18. Alphabet: { a , b } L 2 = { a , aa , ab , aaa , aab , aba , abb , ... } L 2 is the set of all words starting with a Design a TS with actions { a , b } and mark some states as accepting so that the set of all paths from an initial state to an accepting state equals L 2 a , b a q 0 q 1 b a , b q 2 6 / 26

  19. Alphabet: { a , b } L 2 = { a , aa , ab , aaa , aab , aba , abb , ... } L 2 is the set of all words starting with a Design a TS with actions { a , b } and mark some states as accepting so that the set of all paths from an initial state to an accepting state equals L 2 a , b a q 0 q 1 Finite Automaton b a , b q 2 6 / 26

  20. Coming next: Some terminology 7 / 26

  21. = { a , b } Alphabet Σ 8 / 26

  22. = { a , b } Alphabet Σ = { a , b } · { a , b } Σ · Σ 8 / 26

  23. = { a , b } Alphabet Σ = { a , b } · { a , b } Σ · Σ = { aa , ab , ba , bb } 8 / 26

  24. = { a , b } Alphabet Σ = { a , b } · { a , b } Σ · Σ = { aa , ab , ba , bb } = words of length 1 Σ 1 Σ 2 = words of length 2 8 / 26

  25. = { a , b } Alphabet Σ = { a , b } · { a , b } Σ · Σ = { aa , ab , ba , bb } = words of length 1 Σ 1 Σ 2 = words of length 2 Σ 3 = words of length 3 8 / 26

  26. = { a , b } Alphabet Σ = { a , b } · { a , b } Σ · Σ = { aa , ab , ba , bb } = words of length 1 Σ 1 Σ 2 = words of length 2 Σ 3 = words of length 3 . . . Σ k = words of length k . . . 8 / 26

  27. = { a , b } Alphabet Σ = { a , b } · { a , b } Σ · Σ = { aa , ab , ba , bb } Σ 0 = { ε } (empty word, with length 0) aba · ε = aba = words of length 1 Σ 1 ε · bbb = bbb Σ 2 = words of length 2 w · ε = w Σ 3 = words of length 3 . ε · w = w . . Σ k = words of length k . . . 8 / 26

  28. = { a , b } Alphabet Σ = { a , b } · { a , b } Σ · Σ = { aa , ab , ba , bb } Σ 0 = { ε } (empty word, with length 0) aba · ε = aba = words of length 1 Σ 1 ε · bbb = bbb Σ 2 = words of length 2 w · ε = w Σ 3 = words of length 3 . ε · w = w . . Σ k = words of length k . . . i ≥ 0 Σ i � Σ ∗ = = set of all finite length words 8 / 26

  29. Σ ∗ = set of all words over Σ 9 / 26

  30. Σ ∗ = set of all words over Σ Any set of words is called a language 9 / 26

  31. Σ ∗ = set of all words over Σ Any set of words is called a language { ab , abab , ababab , ... } words starting with an a words starting with a b { ε , b , bb , bbb , ... } { ε , ab , abab , ababab , ... } { ε , bbb , bbbbbb , ( bbb ) 3 , ... } words starting and ending with an a { ε , ab , aabb , aaabbb , a 4 b 4 ... } 9 / 26

  32. Σ ∗ = set of all words over Σ Any set of words is called a language { ab , abab , ababab , ... } a Σ ∗ words starting with an a words starting with a b { ε , b , bb , bbb , ... } { ε , ab , abab , ababab , ... } { ε , bbb , bbbbbb , ( bbb ) 3 , ... } words starting and ending with an a { ε , ab , aabb , aaabbb , a 4 b 4 ... } 9 / 26

  33. Σ ∗ = set of all words over Σ Any set of words is called a language { ab , abab , ababab , ... } a Σ ∗ words starting with an a b Σ ∗ words starting with a b { ε , b , bb , bbb , ... } { ε , ab , abab , ababab , ... } { ε , bbb , bbbbbb , ( bbb ) 3 , ... } words starting and ending with an a { ε , ab , aabb , aaabbb , a 4 b 4 ... } 9 / 26

  34. Σ ∗ = set of all words over Σ Any set of words is called a language { ab , abab , ababab , ... } a Σ ∗ words starting with an a b Σ ∗ words starting with a b b ∗ { ε , b , bb , bbb , ... } { ε , ab , abab , ababab , ... } { ε , bbb , bbbbbb , ( bbb ) 3 , ... } words starting and ending with an a { ε , ab , aabb , aaabbb , a 4 b 4 ... } 9 / 26

  35. Σ ∗ = set of all words over Σ Any set of words is called a language { ab , abab , ababab , ... } a Σ ∗ words starting with an a b Σ ∗ words starting with a b b ∗ { ε , b , bb , bbb , ... } ( ab ) ∗ { ε , ab , abab , ababab , ... } { ε , bbb , bbbbbb , ( bbb ) 3 , ... } words starting and ending with an a { ε , ab , aabb , aaabbb , a 4 b 4 ... } 9 / 26

  36. Σ ∗ = set of all words over Σ Any set of words is called a language { ab , abab , ababab , ... } a Σ ∗ words starting with an a b Σ ∗ words starting with a b b ∗ { ε , b , bb , bbb , ... } ( ab ) ∗ { ε , ab , abab , ababab , ... } ( bbb ) ∗ { ε , bbb , bbbbbb , ( bbb ) 3 , ... } words starting and ending with an a { ε , ab , aabb , aaabbb , a 4 b 4 ... } 9 / 26

  37. Σ ∗ = set of all words over Σ Any set of words is called a language { ab , abab , ababab , ... } a Σ ∗ words starting with an a b Σ ∗ words starting with a b b ∗ { ε , b , bb , bbb , ... } ( ab ) ∗ { ε , ab , abab , ababab , ... } ( bbb ) ∗ { ε , bbb , bbbbbb , ( bbb ) 3 , ... } a Σ ∗ a words starting and ending with an a { ε , ab , aabb , aaabbb , a 4 b 4 ... } 9 / 26

  38. In this module... Task: Design Finite Automata for some languages 10 / 26

  39. Words Languages Finite Automata 11 / 26

  40. Alphabet: { a , b } L 1 = { ab , abab , ababab , ... } Design a Finite automaton for L 1 a a b q 0 q 1 q 2 q 3 b a b b a q 4 a , b 12 / 26

  41. Alphabet: { a , b } L 3 = { ε , ab , abab , ababab , ... } Design a Finite automaton for L 3 a q 0 q 1 b b a q 2 a , b 13 / 26

  42. Alphabet: { a , b } Σ ∗ = { ε , a , b , aa , ab , ba , bb ... } Design a Finite automaton for Σ ∗ a , b q 0 14 / 26

  43. Alphabet: { a , b } a ∗ = { ε , a , aa , aaa , aaaa , a 5 , ... } a ∗ is the set of all words having only a Design a Finite automaton for a ∗ 15 / 26

  44. Alphabet: { a , b } a ∗ = { ε , a , aa , aaa , aaaa , a 5 , ... } a ∗ is the set of all words having only a Design a Finite automaton for a ∗ a q 0 15 / 26

  45. Alphabet: { a , b } a ∗ = { ε , a , aa , aaa , aaaa , a 5 , ... } a ∗ is the set of all words having only a Design a Finite automaton for a ∗ a q 0 Non-deterministic automaton 15 / 26

  46. Transition Systems Deterministic Non-deterministic Single initial state Multiple initial states or and a a r 1 s r s a r 2 a . . . r m 16 / 26

  47. Transition Systems Deterministic Non-deterministic Single initial state Multiple initial states or and a a r 1 s r s a r 2 a . . . r m Same applies in the case of Finite Automata 16 / 26

  48. Alphabet: { a , b } ab ∗ = { a , ab , ab 2 , ab 3 , ab 4 , ... } Design a Finite automaton for ab ∗ 17 / 26

  49. Alphabet: { a , b } ab ∗ = { a , ab , ab 2 , ab 3 , ab 4 , ... } Design a Finite automaton for ab ∗ b a q 0 q 1 17 / 26

Recommend


More recommend