Deteministic simultion of NFA with k symbol lookhed SOFSEM 7 Bl Rvikum, Clifoni Stte Univesity (joint wok with Nic Snten, Univesity of Wteloo)
Oveview Definitions: DFA, NFA nd lookhed DFA Motivtion: utomted e sevice composition nd delegtion The NFA delegtion model, exmples, popeties Chcteiztion of existence of delegto Complexityof finding delegto fo unmbiguous nd genel NFA An lgoithm fo genel NFA delegtion Conclusion, futhe wok
DFA Deteministic Finite Automton A = Q,, δ, s, F δ : Q ( ) ~ Q s s { } ( ) ( ) ( ) L A w w = Σ is odd = +
NFA Nondeteministic Finite Automton δ : Q (,, δ,, ) P( Q) M = Q s F,, s s s s 3 ( ) = ( + ) ( ) ( + ) L A
k symbols Lookhed DFA D= Q,, δ, s, F δ : Q ( ) k ~ Q 3 symbol lookhed 3 4 5
k symbols Lookhed DFA D= Q,, δ, s, F δ : Q ( ) k ~ Q 3 4 5
k symbols Lookhed DFA D= Q,, δ, s, F δ : Q ( ) k ~ Q 3 4 5
k symbols Lookhed DFA D= Q,, δ, s, F δ : Q ( ) k ~ Q 3 4 5
k symbols Lookhed DFA D= Q,, δ, s, F δ : Q ( ) k ~ Q 3 4 5
k symbols Lookhed DFA D= Q,, δ, s, F δ : Q ( ) k ~ Q 3 4 5
k symbols Lookhed DFA D= Q,, δ, s, F δ : Q ( ) k ~ Q 3 4 5
k symbols Lookhed DFA D= Q,, δ, s, F δ : Q ( ) k ~ Q 3 4 5
E Sevices Composition nd Delegtion tsk tsk tsk tsk... i i+ i+ i+ 3 e-sevice... seve Bsed on the "sttus" of evey e-sevice, the seve disptches the next tsk i to e-sevice j. Ech e-sevice i my be modeled by n ctivity utomton A, nd evey tsk by symbol fom finite lphbet. i... e-sevice e-sevice j
E Sevices Composition nd Delegtion tsk tsk tsk tsk... i i+ i+ i+ 3 e-sevice... seve Bsed on the "sttus" of evey e-sevice, the seve disptches the next tsk i to e-sevice j. Ech e-sevice i my be modeled by n ctivity utomton A, nd evey tsk by symbol fom finite lphbet. i... e-sevice e-sevice j
Composition nd Delegtion Models A: epesents vlid sequences of tomic tsks (e.g. web session) A: ctivity utomton fo specific e-sevice i i A; A,..., A is composble if ( ) ( )# ( )#...# ( ) L A L A L A L A (e.g. xyby b # xyy ) This is necessy condition to ensue tht the web ppliction is fesible. Question: is it sufficient?
Composition nd Delegtion Models A: epesents vlid sequences of tomic tsks (e.g. web session) A: ctivity utomton fo specific e-sevice i i A; A,..., A is composble if ( ) ( )# ( )#...# ( ) L A L A L A L A (e.g. xyby b # xyy ) This is necessy condition to ensue tht the web ppliction is fesible. Question: is it sufficient?
Composition nd Delegtion A : q q q q q 3 4 5 A : p p p 3 4 A... : p p A ( A #...# A ) A : p p ( q, p, p,..., ) ( q, p, p,..., p) ( q3, p, p,..., p) p ( q, p, p,..., p ) ( q p, p,..., p ) 4 5,
Composbility nd Delegtion 3 4 A : q q q q q 5 : A p p p 3 4 A... : p p A ( A #...# A ) A : p p.., ) (,,,..., ) 3 ( q, p, p,. p q p p p ( q, p, p,..., p ) ( q, p, p,..., p ) ( q p, p,..., p ) 4 5,
Composbility nd Delegtion 3 A : q q q q 4 q 5 : p A p p 3 4 A... : p p A ( A #...# A ) A : p p ( q, p, p,..., p ) (, p, p,..., p ) ( q,,,..., p ) q 3 p p ( q, p, p,..., p ) ( q p, p,..., p ) 4 5,
Composbility nd Delegtion A : q q 3 q3 q4 q 5 : A p p p 3 4 A... : p p A ( A #...# A ) A : p 3 p.., ) (, p, p,..., p ) 3 ( q4, p p,..., p ) ( q, p, p,. p q ( q, p, p,..., p ) 3, ( q p, p,..., p ) 5, 3
Nondeteministic Delegto 3 4 3 4 5 A : q q q q q A : p p A : p p... 4 p 3 4 A ( A #...# A ) A : p 3 p ( q, p, p,..., p ) ( q, p, p,..., p ) (, p, p,..., p ) q 3 3 q4 p p p 4 q5, p p (,,,..., ) (,,..., p ) 3
k Lookhed Delegtion Model M ( Q,, δ, s, F) : the composite NFA A ( A #...# A ) = How cn we use M deteministiclly? k delegto fo M is n equivlent k-symbol lookhed ( Q δ s F) Σ k ~ DFA,,,,, with δ : Q Q veify k ( ) δ ( ) δ ( ) i i ing: q,... Q Σ : q,... q,, i k
k Lookhed Delegtion Model ( Q,, δ, s, F) : the composite NFA ( #...# ) M = A A A How cn we use M deteministiclly? k delegto fo M is n equivlent k-symbol lookhed ( Q δ s F) DFA,,,, Σ k ~, with δ : Q Q ve i k ( ) δ ( ) δ ( ) i i fying: q,... Q Σ : q,... q,, i k
k Lookhed Delegtion Model Intepettion: n NFA M k delegto fo M q q... q j... q t δ ( q, ) q... i q j (,... ) q = δ q q t i k ( q,... ) Q : δ ( q,... ) δ ( q, ) Σ i i
Exmple: n unmbiguous NFA 3 b ( ( ) + ( ) ) b b 4 5
Exmple: delegto b 3 b b, b ( ( ) + ( ) ) b b,, 4 5 This unmbiguous NFA hs delegto.
Exmple: n unmbiguous NFA 3 ( + ) 4 5 this unmbigous NFA hs no k-delegto, k >.
Exmple: no delegtos 3 ( + ) 4 5 This unmbigous NFA hs no k-delegto, k >.
Exmple: n mbiguous NFA... p pk p k p q... qk q k ( + ) k
Exmple: k delegto, no (<k) delegto k, k p,,... k k k pk... p k k k,,..., p k... q k, k qk... q k k k,,..., ( + ) k This NFA hs k-delegto but no ( k ) - delegtos. Note: k-delegtion ( k ) + -delegtion
Exmple: n mbiguous NFA,, s s s s 3 ( + ) ( ) ( + )
Exmple: no delegtos,, s s s s 3 ( + ) ( ) ( + ) This NFA hs no k-delegto, fo ny k >. ide: tke nd k- k k- k+
Why Study NFA Delegtion E Sevice Composition given some specifictions nd set of e sevices, implement n ppliction which follows the specifictions. Deteministic simultion of NFA: ltentive to clssicl subset constuction to simulte n NFA by DFA. Line blow up vs. exponentil blow up. A theoeticl metic fo nondeteminism: if n NFA M hs 3 delegto nd M does not hve k delegto fo, sy k <, then M is moe nondeteministic thn M.
Lnguge vs. Mchine Popety 'st Question: Is delegtion lnguge popety o mchine popety? (thee exist infinitely mny NFA fo given egul lnguge)
Delegtion s Lnguge Popety L - egul lnguge. L is wekly delegble if ( M )( k )( M hs k delegto) NFA fo L k >. L is stongly delegble if ( k )( M )( M hs k delegto) k> NFA fo L
Delegtion s Lnguge Popety Theoem. L is stongly deleg. L is wekly deleg. L is finite Consequence. It is moe inteesting to see delegbility s mchine popety.
Complexity of Finding k Delegto Poblems: ( ) P k is n intege not pt of the input. ( P ) ( P ) 3 input : n NFA M output : YES if M hs k delegto, NO othewise input : n NFA M nd n intege k output : YES if M hs k delegto, NO othewise input : n NFA M output : YES if M hs delegto, NO othewise
Stte Blindness [ ]... k q p...... kv p... kv q is... -blind if k (, ) δ (, ), : δ (,... ), δ (,... ) p δ q p q v p v F p v F k k stte is k-blind if thee exists... such tht it is... -blind k k
Stte Blindness [ ]... k q p...... kv p... kv q is... -blind if k (, ) δ (, ), : (,... ), (,... ) p δ q p q v δ p v F= φ δ p v F φ k k stte is k-blind if thee exists... such tht it is... -blind k k
Stte blindness is computble Recll tht sting w is q blind if it is not possible in stte q to find deteministic choice given w s the look hed. Define B q = { w w is q blind } Theoem: Let M be DFA with n sttes, nd ove n lphbet of size m, nd let q be stte of M. The lnguge B q is egul, nd thee is DFA with t most (4 n + ) m tht ccepts B q.
A Chcteiztion fo Unmbiguous NFA Theoem. An unmbiguous NFA hs k-delegto iff none of its sttes e k-blind. Consequently, n unmbiguous NFA hs delegto iff ll its sttes hve finite blindness.
Poblem fo unmbiguous NFA s Theoem: Let k be fixed intege. Thee is polynomil time lgoithm tht given n unmbiguous NFA M detemines if M hs k delegto. Poof (sketch) The poblem cn be educed to the poblem of continment poblem fo unmbiguous NFA s. Fom esult of Hunt nd Stens, this poblem is known to be solvble in polynomil time.
Delegtion fo Unmbiguous NFA Theoem(). s ( P) ( P ) ( P ) 3 unmbiguous NFA P co-np PSPACE The poof of co NP nd PSPACE uppe bounds fo P nd P3 e simil to tht of Poblem.
Abity NFA All 3 poblems e significntly hde fo genel NFA: - delegto fo (tim) unmbiguous NFA must use ll its sttes: locl popeties (blindness) hve globl impct; - continment nd equivlence poblems e decidble in polynomil time fo unmb. NFA.
Abity NFA: Fobidden Wods [ ]... k q p...... kbp... kb q is... -fobidden if one of the following two conditions k is stisfied ecusively (intuitive def.) :. q is... -blind; k ( ). fo evey stte p δ q, thee exists b such tht p is... b -fobidden. k p p
Abity NFA: Fobidden Wods [ ]... k q p...... kbp... kb q is... -fobidden k is stisfied ecusively (intuitive def.) : if one of the following two conditions. q is... - blind; k ( q ). fo evey stte p δ, thee exists b such tht p is... b - fobidden. k p p
Abity NFA: Delegtion Chcteiztion Nottion: F is the set of ll fobidden wods fo q. q Theoem. ( δ ) ( ) An NFA M = Q, Σ,, q, F hs k-delegto iff F pef L = φ. q k M Consequently, n NFA hs delegto iff F is finite. q
Delegtion fo Unmbiguous NFA Theoem(). s ( P ) ( P ) ( P ) 3 genel NFA PSPACE-complete PSPACE-hd?
Wp up NFA delegtion is finite stte model used in web sevice pplictions, tsk scheduling, NFA simultion, mesue of nondeteminism, etc. NFA delegtion is mchine popety nd its computtionl complexity is mchine dependent: ( P) ( P ) ( P ) 3 unmbiguous P co-np PSPACE genel PSPACE-complete PSPACE-hd? (pevious wok: fo k =, P in the genel cse : EXPTIME)
Min open poblem: Diection fo futue wok Investigte complexity mttes fo othe fmilies of NFA. Fo exmple, study NFA tht e shuffle poduct of DFA. Is delegtion decidble fo bity NFA? Study the ntue of. F q Othe Questions: The complexity esult fo Poblem (genel cse) ws poven fo 4 lette lphbet. Cn the PSPACE completeness poof be extended to smlle lphbets? Is poblem complete fo co NP fo unmbiguous NFA? Is poblem 3 complete fo PSPACE fo unmbiguous NFA?
Refeences Sevice oiented computing: R. Hull nd J. Su. Tools fo Design of Composite Web Sevices. In SIGMOD 4, pp. 958 96 (4) M. Mecell nd G. D. Gicomo. Sevice Composition: Technologies, Methods nd Tools fo Synthesis nd Ochesttion of Composite Sevices nd Pocesses. Tutoil in ICSOC 4. D. Bedi, D. Clvnese, G. D. Gicomo, M. Lenzeini, nd M. Mecell. Automtic Composition of e Sevices tht Expot thei Behviou. In ICSOC 3, LNCS 9, pp. 43 58, 3. Finite stte models fo e sevices: C. E. Geede, O. H. Ib, B. Rvikum, nd J. Su. On line nd Ad hoc Minimum Cost Delegtion in e Sevice Composition. In IEEE SCC, pp. 3, 5. Z. Dng, O. H. Ib, nd J. Su. Composbility of Infinite Stte Activity Automt. In ISAAC 4, LNCS 334, pp. 377 388. C. E. Geede, R. Hull, O. H. Ib, nd J. Su. Automted Composition of e Sevices: Lookheds. In ISOC 4, pp. 5 6.
Design Methodology Exmple p d d 3 es d : downlods nd pocesses files sequentilly P es : downlods files t time nd pocesses them in pllel S - ppliction specifiction: p p downlod nd pocess, hving no moe thn files in the system t ny time d P d 3
Design Methodology Step constuct es # es : p d [,] P [,] d [, ] p d [, ] d [,3] P d [, 3] d p it epesents the shuffle behvio of es nd es
Design Methodology Step constuct S es # es : p [,,] d [,,] p [ 3,, ] d [,, ] d d P [ 3,,3] it epesents the nondeteministic behvio of the ppliction ( S)
Design Methodology Step 3 find delegto : pd, p es dp dd pd dp ddpdpd p es P, Pd dp it epesents the design of S