1/26 Unit-4: Regulr properties B. Srivthsn Chenni Mthemticl Institute NPTEL-course July - November 2015
2/26 Module 2: A gentle introduction to utomt
3/26 { p 1 } { p 1,p 2 } request=1 redy request=1 busy request=0 redy {} request=0 busy { p 2 } AP = set of tomic propositions AP-INF = set of infinite words over PowerSet(AP) A property over AP is subset of AP-INF
Gol: Need finite descriptions of properties 4/26
4/26 Gol: Need finite descriptions of properties Here: Finite stte utomt to describe sets of words
4/26 Gol: Need finite descriptions of properties Here: Finite stte utomt to describe sets of finite words
Alphbet: {,b } 5/26
5/26 Alphbet: {,b } L 1 = { b, bb, bbb,...}
5/26 Alphbet: {,b } L 1 = { b, bb, bbb,...} Design TS with ctions {,b } nd mrk some sttes s ccepting so tht the set of ll pths from n initil stte to n ccepting stte equls L 1
5/26 Alphbet: {,b } L 1 = { b, bb, bbb,...} Design TS with ctions {,b } nd mrk some sttes s ccepting so tht the set of ll pths from n initil stte to n ccepting stte equls L 1 q 0 q 1 q 2 q 3 q 4
5/26 Alphbet: {,b } L 1 = { b, bb, bbb,...} Design TS with ctions {,b } nd mrk some sttes s ccepting so tht the set of ll pths from n initil stte to n ccepting stte equls L 1 q 0 q 1 q 2 q 3 b q 4
5/26 Alphbet: {,b } L 1 = { b, bb, bbb,...} Design TS with ctions {,b } nd mrk some sttes s ccepting so tht the set of ll pths from n initil stte to n ccepting stte equls L 1 b q 0 q 1 q 2 q 3 b q 4
5/26 Alphbet: {,b } L 1 = { b, bb, bbb,...} Design TS with ctions {,b } nd mrk some sttes s ccepting so tht the set of ll pths from n initil stte to n ccepting stte equls L 1 b q 0 q 1 q 2 q 3 b b q 4
5/26 Alphbet: {,b } L 1 = { b, bb, bbb,...} Design TS with ctions {,b } nd mrk some sttes s ccepting so tht the set of ll pths from n initil stte to n ccepting stte equls L 1 b q 0 q 1 q 2 q b 3 b b q 4
5/26 Alphbet: {,b } L 1 = { b, bb, bbb,...} Design TS with ctions {,b } nd mrk some sttes s ccepting so tht the set of ll pths from n initil stte to n ccepting stte equls L 1 b q 0 q 1 q 2 q b 3 b b q 4,b
6/26 Alphbet: {,b } L 2 = {,, b,, b, b, bb,...} L 2 is the set of ll words strting with
6/26 Alphbet: {,b } L 2 = {,, b,, b, b, bb,...} L 2 is the set of ll words strting with Design TS with ctions {,b } nd mrk some sttes s ccepting so tht the set of ll pths from n initil stte to n ccepting stte equls L 2
6/26 Alphbet: {,b } L 2 = {,, b,, b, b, bb,...} L 2 is the set of ll words strting with Design TS with ctions {,b } nd mrk some sttes s ccepting so tht the set of ll pths from n initil stte to n ccepting stte equls L 2 q 0 q 1,b b q 2,b
6/26 Alphbet: {,b } L 2 = {,, b,, b, b, bb,...} L 2 is the set of ll words strting with Design TS with ctions {,b } nd mrk some sttes s ccepting so tht the set of ll pths from n initil stte to n ccepting stte equls L 2 q 0 q 1,b b q 2,b Finite Automton
Coming next: Some terminology 7/26
Alphbet Σ = {, b } 8/26
8/26 Alphbet Σ = {, b } Σ Σ = {, b } {, b }
8/26 Alphbet Σ = {, b } Σ Σ = {, b } {, b } = {, b, b, bb }
8/26 Alphbet Σ = {, b } Σ Σ = {, b } {, b } = {, b, b, bb } Σ 1 = words of length 1 Σ 2 = words of length 2
8/26 Alphbet Σ = {, b } Σ Σ = {, b } {, b } = {, b, b, bb } Σ 1 = words of length 1 Σ 2 = words of length 2 Σ 3 = words of length 3
8/26 Alphbet Σ = {, b } Σ Σ = {, b } {, b } = {, b, b, bb } Σ 1 = words of length 1 Σ 2 = words of length 2 Σ 3 = words of length 3 Σ k. = words of length k.
8/26 Alphbet Σ = {, b } Σ Σ = {, b } {, b } = {, b, b, bb } b ε ε bbb w ε ε w = b = bbb = w = w Σ 0 = { ε } (empty word, with length 0) Σ 1 = words of length 1 Σ 2 = words of length 2 Σ 3 = words of length 3. Σ k = words of length k.
8/26 Alphbet Σ = {, b } Σ Σ = {, b } {, b } = {, b, b, bb } b ε ε bbb w ε ε w = b = bbb = w = w Σ 0 = { ε } (empty word, with length 0) Σ 1 = words of length 1 Σ 2 = words of length 2 Σ 3 = words of length 3. Σ k = words of length k. Σ = i 0 Σi = set of ll finite length words
Σ = set of ll words over Σ 9/26
9/26 Σ = set of ll words over Σ Any set of words is clled lnguge
9/26 Σ = set of ll words over Σ Any set of words is clled lnguge { b, bb, bbb,...} words strting with n words strting with b { ε, b, bb, bbb,...} { ε, b, bb, bbb,...} { ε, bbb, bbbbbb, (bbb) 3,...} words strting nd ending with n { ε, b, bb, bbb, 4 b 4...}
9/26 Σ = set of ll words over Σ Any set of words is clled lnguge { b, bb, bbb,...} Σ words strting with n words strting with b { ε, b, bb, bbb,...} { ε, b, bb, bbb,...} { ε, bbb, bbbbbb, (bbb) 3,...} words strting nd ending with n { ε, b, bb, bbb, 4 b 4...}
9/26 Σ = set of ll words over Σ Any set of words is clled lnguge { b, bb, bbb,...} Σ bσ words strting with n words strting with b { ε, b, bb, bbb,...} { ε, b, bb, bbb,...} { ε, bbb, bbbbbb, (bbb) 3,...} words strting nd ending with n { ε, b, bb, bbb, 4 b 4...}
9/26 Σ = set of ll words over Σ Any set of words is clled lnguge { b, bb, bbb,...} Σ bσ b words strting with n words strting with b { ε, b, bb, bbb,...} { ε, b, bb, bbb,...} { ε, bbb, bbbbbb, (bbb) 3,...} words strting nd ending with n { ε, b, bb, bbb, 4 b 4...}
9/26 Σ = set of ll words over Σ Any set of words is clled lnguge { b, bb, bbb,...} Σ bσ b (b) words strting with n words strting with b { ε, b, bb, bbb,...} { ε, b, bb, bbb,...} { ε, bbb, bbbbbb, (bbb) 3,...} words strting nd ending with n { ε, b, bb, bbb, 4 b 4...}
9/26 Σ = set of ll words over Σ Any set of words is clled lnguge { b, bb, bbb,...} Σ bσ b (b) (bbb) words strting with n words strting with b { ε, b, bb, bbb,...} { ε, b, bb, bbb,...} { ε, bbb, bbbbbb, (bbb) 3,...} words strting nd ending with n { ε, b, bb, bbb, 4 b 4...}
9/26 Σ = set of ll words over Σ Any set of words is clled lnguge { b, bb, bbb,...} Σ bσ b (b) (bbb) words strting with n words strting with b { ε, b, bb, bbb,...} { ε, b, bb, bbb,...} { ε, bbb, bbbbbb, (bbb) 3,...} Σ words strting nd ending with n { ε, b, bb, bbb, 4 b 4...}
10/26 In this module... Tsk: Design Finite Automt for some lnguges
11/26 Words Lnguges Finite Automt
12/26 Alphbet: {,b } L 1 = { b, bb, bbb,...} Design Finite utomton for L 1 q 0 b q 1 q 2 b q 3 b b q 4,b
13/26 Alphbet: {,b } L 3 = { ε, b, bb, bbb,...} Design Finite utomton for L 3 q 0 q b 1 b q 2,b
14/26 Alphbet: {,b } Σ = { ε,, b,, b, b, bb...} Design Finite utomton for Σ,b q 0
15/26 Alphbet: {,b } = { ε,,,,, 5,...} is the set of ll words hving only Design Finite utomton for
15/26 Alphbet: {,b } = { ε,,,,, 5,...} is the set of ll words hving only Design Finite utomton for q 0
15/26 Alphbet: {,b } = { ε,,,,, 5,...} is the set of ll words hving only Design Finite utomton for q 0 Non-deterministic utomton
16/26 Trnsition Systems Deterministic Non-deterministic Single initil stte nd Multiple initil sttes or s r s r 1 r 2. r m
16/26 Trnsition Systems Deterministic Non-deterministic Single initil stte nd Multiple initil sttes or s r s r 1 r 2. r m Sme pplies in the cse of Finite Automt
17/26 Alphbet: {,b } b = {, b, b 2, b 3, b 4,...} Design Finite utomton for b
17/26 Alphbet: {,b } b = {, b, b 2, b 3, b 4,...} Design Finite utomton for b b q 0 q 1
17/26 Alphbet: {,b } b = {, b, b 2, b 3, b 4,...} Design Finite utomton for b b q 0 q 1 Non-deterministic utomton
18/26 Alphbet: {,b } b = {, b, b 2, b 3, b 4,...} b = { b, b, b 2, b 3, b 4,...} Design Finite utomton for b b
18/26 Alphbet: {,b } b = {, b, b 2, b 3, b 4,...} b = { b, b, b 2, b 3, b 4,...} Design Finite utomton for b b b q 0 q 1 b q 2
18/26 Alphbet: {,b } b = {, b, b 2, b 3, b 4,...} b = { b, b, b 2, b 3, b 4,...} Design Finite utomton for b b b q 0 q 1 b q 2 Non-deterministic utomton
19/26 Alphbet: {,b } b = {, b, b 2, b 3, b 4,...} b = { b, b, b 2, b 3, b 4,...} Design Finite utomton for b b
19/26 Alphbet: {,b } b = {, b, b 2, b 3, b 4,...} b = { b, b, b 2, b 3, b 4,...} Design Finite utomton for b b b q 0 q 1 q 2 b q 3
19/26 Alphbet: {,b } b = {, b, b 2, b 3, b 4,...} b = { b, b, b 2, b 3, b 4,...} Design Finite utomton for b b b q 0 q 1 q 2 b q 3 Multiple initil sttes: non-deterministic utomton
20/26 Wht is the lnguge of the following utomton?,b q 0 q 1 q 2
20/26 Wht is the lnguge of the following utomton?,b q 0 q 1 q 2 Answer: Σ words strting nd ending with
21/26 Wht is the lnguge of the following utomton?,b,b b q 0 q 1 q 2
21/26 Wht is the lnguge of the following utomton?,b,b b q 0 q 1 q 2 Answer: Σ b Σ words contining b
22/26 Wht is the lnguge of the following utomton?,b,b,b b q 0 q 1 q 2
22/26 Wht is the lnguge of the following utomton?,b,b,b b q 0 q 1 q 2 Answer: Σ Σ b Σ words where there exists n followed by b fter sometime
23/26 Wht is the lnguge of the following utomton?,b,c b,b,c q 0 q 1 c q 2
23/26 Wht is the lnguge of the following utomton?,b,c b,b,c q 0 q 1 c q 2 Answer: Σ b c Σ (Σ = {, b, c }) words where there exists n followed by only b s nd fter sometime c occurs
24/26 Alphbet: {,b } L = { ε, b, bb, bbb,..., i b i,...} Cn we design Finite utomton for L?
24/26 Alphbet: {,b } L = { ε, b, bb, bbb,..., i b i,...} Cn we design Finite utomton for L? Need infinitely mny sttes to remember the number of s
24/26 Alphbet: {,b } L = { ε, b, bb, bbb,..., i b i,...} Cn we design Finite utomton for L? Need infinitely mny sttes to remember the number of s Cnnot construct finite utomton for this lnguge
25/26 Regulr lnguges Lnguges { n b n n 0} L L Regulr lnguges Σ,, b, etc. Definition A lnguge is clled regulr if it cn be ccepted by finite utomton
26/26 Words Lnguges Finite Automt Deterministic (DFA) Non-deterministic (NFA) Regulr lnguges
26/26 Words Lnguges Finite Automt Deterministic (DFA) Non-deterministic (NFA) Regulr lnguges Next module: Are DFA nd NFA equivlent?