Formal Methods for XML: Algorithms & Complexity
|
|
- Emil Cannon
- 5 years ago
- Views:
Transcription
1 Forml Methods for XML: Algorithms & Complexity S. Mrgherit di Pul August 2004 Thoms Shwentik
2 Shwentik XML: Algorithms & Complexity Introdution 1 XML Exmple Doument Composer Nme Clude Debussy /Nme Vit Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer...
3 Shwentik XML: Algorithms & Complexity Introdution 1 XML Exmple Tree Nme Clude Debussy Born When 1862 Where Pris Composer Vit Mrried Mrried When 1899 Whom Roslie When 1908 Whom Emm Died When 1918 Where Pris PTitle L Mer Piee PYer 1905 Instruments Lrge orhestr Movements 3
4 Shwentik XML: Algorithms & Complexity Introdution 2 XML Proessing Four importnt kinds of XML proessing Vlidtion Chek whether n XML doument is of given type Nvigtion Selet set of positions in n XML doument Querying Extrt informtion from n XML doument Trnsformtion Construt new XML doument from given one
5 Shwentik XML: Algorithms & Complexity Introdution 2 XML Proessing Four importnt kinds of XML proessing nd their lnguges Vlidtion DTD, XML Shem Chek whether n XML doument is of given type Nvigtion XPth Selet set of positions in n XML doument Querying XQuery Extrt informtion from n XML doument Trnsformtion XSLT Construt new XML doument from given one
6 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 3 Vlidtion: DTD Exmple doument Composer Nme Clude Debussy /Nme Vit Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer...
7 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 3 Vlidtion: DTD Exmple doument DTD DTDs desribe types of XML douments Composer Nme Clude Debussy /Nme Vit Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer...
8 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 3 Vlidtion: DTD Exmple doument Composer Nme Clude Debussy /Nme Vit Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer... DTD DTDs desribe types of XML douments Exmple <!DOCTYPE Composers [ <!ELEMENT Composers (Composer*)> <!ELEMENT Composer (Nme, Vit, Piee*)> <!ELEMENT Vit (Born, Mrried*, Died?)> <!ELEMENT Born (When, Where)> <!ELEMENT Mrried (When, Whom)> <!ELEMENT Died (When, Where)> <!ELEMENT Piee (PTitle, PYer, Instruments, Movements)> ]>
9 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 4 Nvigtion: XPth Exmple doument Composer Nme Clude Debussy /Nme Vit Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer...
10 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 4 Composer Nme Clude Debussy /Nme Vit Nvigtion: XPth XPth XPth expressions selet sets of nodes of Exmple doument XML douments by speifying nvigtionl ptterns Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer...
11 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 4 Composer Nme Clude Debussy /Nme Vit Nvigtion: XPth Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer... XPth XPth expressions selet sets of nodes of Exmple doument XML douments by speifying nvigtionl ptterns Exmple query //Vit/Died/*
12 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 4 Composer Nme Clude Debussy /Nme Vit Nvigtion: XPth Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer... XPth XPth expressions selet sets of nodes of Exmple doument XML douments by speifying nvigtionl ptterns /Died Exmple query //Vit/Died/*
13 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 5 Querying: XQuery Exmple doument Composer Nme Clude Debussy /Nme Vit Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer...
14 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 5 Querying: XQuery Exmple doument XQuery XQuery is full-fledged XML query lnguge Composer Nme Clude Debussy /Nme Vit Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer...
15 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 5 Querying: XQuery Exmple doument Composer Nme Clude Debussy /Nme Vit Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer... XQuery XQuery is full-fledged XML query lnguge Exmple query for $x in do( omposers.xml )/Composer where $x/vit/died/where = Pris return $x/nme
16 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 5 Querying: XQuery Exmple doument Composer Nme Hetor Berlioz /Nme Nme Clude Debussy /Nme Nme Cmille Sint-Sëns /Nme Vit Nme Born Frédéri When August Chopin 22, /Nme 1862 /When Where Pris /Where /Born Nme Mrried When Murie Rvel Otober /Nme 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Nme Jim Morrison /Nme Died When Mrh 25, 1918 /When Where Pris /Where /Died Nme /Vit Césr Frnk /Nme Nme Piee Gbriel Furé /Nme Nme PTitle George L Mer Bizet /PTitle /Nme PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer... Result Nme Clude Debussy /Nme Nme Eri Stie /Nme... XQuery XQuery is full-fledged XML query lnguge Exmple query for $x in do( omposers.xml )/Composer where $x/vit/died/where = Pris return $x/nme
17 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 6 Trnsformtion: XSLT Exmple doument Composer Nme Clude Debussy /Nme Vit Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer...
18 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 6 Trnsformtion: XSLT XSLT XSLT trnsforms douments by Exmple doument mens of templtes Composer Nme Clude Debussy /Nme Vit Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer...
19 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 6 Trnsformtion: XSLT XSLT XSLT trnsforms douments by Exmple doument mens of templtes Composer Nme Clude Debussy /Nme Vit Born When August 22, 1862 /When Where Pris /Where /Born Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Died When Mrh 25, 1918 /When Where Pris /Where /Died /Vit Piee PTitle L Mer /PTitle PYer 1905 /PYer Instruments Lrge orhestr /Instruments Movements 3 /Movements... /Piee... /Composer... Exmple xsl:templte mth= Composer[Vit//Where= Pris ] PrisComposer xsl:opy-of selet= Nme / xsl:opy-of selet= Vit/Born / /PrisComposer /xsl:templte
20 Result Trnsformtion: XSLT XSLT XSLT trnsforms douments by Exmple doument mens of templtes PrisComposer Nme Clude Debussy /Nme Composer Born Nme When Clude August Debussy 22, 1862 /Nme /When Vit Where Pris /Where /Born Born When August 22, 1862 /When Where Pris /Where /Born /PrisComposer Mrried When Otober 1899 /When Whom Roslie /Whom /Mrried PrisComposer Mrried When Jnury 1908 /When Whom Emm /Whom /Mrried Nme Died When FrédériMrh Chopin 25, /Nme 1918 /When Where Pris /Where /Died /Vit Born Piee When Mrh 1, 1810 /When PTitle Where LŽelzow Mer /PTitle /Where /Born PYer 1905 /PYer Exmple /PrisComposer Instruments Lrge orhestr /Instruments PrisComposer Movements 3 /Movements Nme... Cmille Sint-Sëns /Nme PrisComposer /Piee Born xsl:opy-of selet= Nme /... When Otober 9, 1835 /When xsl:opy-of selet= Vit/Born / /Composer Where Pris /Where /PrisComposer... /Born /xsl:templte /PrisComposer xsl:templte mth= Composer[Vit//Where= Pris ] Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 6
21 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 7 A Shemti View DTD/ XML Shem XPth yes/no XQuery XSLT
22 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 8 Fous of this Tlk Topis Expressive power of XML lnguges Complexity of lgorithmi tsks relted to XML proessing Trdeoff between expressiveness nd omplexity Gols of this Reserh Understnd expressive power nd omplexity of XML lnguges Identify interesting frgments with good trdeoff
23 Algorithmi Tsks Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 9
24 Evlution Evlution (Combined) I: Tree t, Query q O: q(t) Algorithmi Tsks Stti Anlysis Stisfibility I: Query q Q: Is q(t) for some t? Evlution (Dt(q)) I: Tree t O: q(t) Inrementl Evl. (q) I: Tree t, Chnges of t O: q(t) Continment I: Queries q 1, q 2 Q: Is lwys q 1 (t) q 2 (t)? Type Cheking I: Types d 1, d 2, Trnsformtion T Q: Does t = d 1 imply T (t) = d 2? Equivlene I: Queries q 1, q 2 Q: Is lwys q 1 (t) = q 2 (t)? Type Inferene Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 10
25 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 11 Expressive power Question: How do we mesure expressive power? Remrks Clsses of logil formuls re good yrdstik They provide methods to prove tht query n not be expressed
26 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 11 Expressive power Question: How do we mesure expressive power? Remrks Clsses of logil formuls re good yrdstik They provide methods to prove tht query n not be expressed Rell Reltionl Dtbses Core of SQL First-order Logi Most frequently sked queries Conjuntive queries
27 Contents Introdution Bkground on Tree Automt nd Logi Shem Lnguges XPth nd Node-seleting Queries XSLT XQuery Conlusion
28 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 13 Deidble Bkground: Complexity Clsses Overview of Complexity Clsses EXPSPACE EXPTIME PSPACE Equivlene of reg. expressions with squring Plyer Corridor Tiling Quntified Boolen Formuls onp NP Stisfibility of prop. formuls P NC LOGCFL NL LOGSPACE Boolen iruit evlution Effiiently prllelizble problems Ayli onjuntive queries Rehbility in direted grphs Rehbility in direted forests
29 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 14 XML, Trees nd Automt Question: Why is XML ppeling for Theory people?
30 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 14 XML, Trees nd Automt Question: Why is XML ppeling for Theory people? Yers go... Theoretil Computer Siene for Dtbse Theorists: Logis, Complexity, Algorithms,... Dtbse Theory for Theoretil Computer Sientists:
31 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 14 XML, Trees nd Automt Question: Why is XML ppeling for Theory people? Yers go... Theoretil Computer Siene for Dtbse Theorists: Logis, Complexity, Algorithms,... Dtbse Theory for Theoretil Computer Sientists: terr inognit
32 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 14 XML, Trees nd Automt Question: Why is XML ppeling for Theory people? Yers go... Theoretil Computer Siene for Dtbse Theorists: Logis, Complexity, Algorithms,... Dtbse Theory for Theoretil Computer Sientists: terr inognit After the dvent of XML Mny onnetions between Forml Lnguges & Automt Theory nd XML & Dtbse Theory
33 XML, Trees nd Automt Question: Why trees? Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 15
34 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 15 XML, Trees nd Automt Question: Why trees? A Nturl Answer Trees reflet the hierrhil struture of XML Underlying dt model of XML is tree bsed
35 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 15 XML, Trees nd Automt Question: Why trees? A Nturl Answer Trees reflet the hierrhil struture of XML Underlying dt model of XML is tree bsed Limittions But trees n not model ll spets of XML (e.g., IDREFs, dt vlues) Sometimes extensions re needed E.g., direted grphs insted of trees
36 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 15 XML, Trees nd Automt Question: Why trees? A Nturl Answer Trees reflet the hierrhil struture of XML Underlying dt model of XML is tree bsed Limittions But trees n not model ll spets of XML (e.g., IDREFs, dt vlues) Sometimes extensions re needed E.g., direted grphs insted of trees Exmple
37 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 15 XML, Trees nd Automt Question: Why trees? A Nturl Answer Trees reflet the hierrhil struture of XML Underlying dt model of XML is tree bsed Limittions But trees n not model ll spets of XML (e.g., IDREFs, dt vlues) Sometimes extensions re needed E.g., direted grphs insted of trees Exmple
38 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 15 XML, Trees nd Automt Question: Why trees? A Nturl Answer Trees reflet the hierrhil struture of XML Underlying dt model of XML is tree bsed Limittions But trees n not model ll spets of XML (e.g., IDREFs, dt vlues) Sometimes extensions re needed E.g., direted grphs insted of trees Exmple Nevertheless In this tutoril we will onentrte on the tree view t XML
39 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 16 XML, Trees nd Automt Question: Why utomt? Ingredients of XML Conepts from forml lnguges re obviously present round XML: Lbelled trees DTD: ontext-free grmmrs DTD: regulr expressions XPth: regulr pth expressions We will see Automt turn out to be useful s: mens to define robust lsses with ler semntis tool for proofs n lgorithmi tool for stti nlysis tool for query evlution
40 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 16 XML, Trees nd Automt Question: Why utomt? Ingredients of XML Conepts from forml lnguges re obviously present round XML: Lbelled trees DTD: ontext-free grmmrs DTD: regulr expressions XPth: regulr pth expressions We will see Automt turn out to be useful s: mens to define robust lsses with ler semntis tool for proofs n lgorithmi tool for stti nlysis tool for query evlution
41 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 16 XML, Trees nd Automt Question: Why utomt? Ingredients of XML Conepts from forml lnguges re obviously present round XML: Lbelled trees DTD: ontext-free grmmrs DTD: regulr expressions XPth: regulr pth expressions We will see Automt turn out to be useful s: mens to define robust lsses with ler semntis tool for proofs n lgorithmi tool for stti nlysis tool for query evlution
42 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 16 XML, Trees nd Automt Question: Why utomt? Ingredients of XML Conepts from forml lnguges re obviously present round XML: Lbelled trees DTD: ontext-free grmmrs DTD: regulr expressions XPth: regulr pth expressions We will see Automt turn out to be useful s: mens to define robust lsses with ler semntis tool for proofs n lgorithmi tool for stti nlysis tool for query evlution
43 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 16 XML, Trees nd Automt Question: Why utomt? Ingredients of XML Conepts from forml lnguges re obviously present round XML: Lbelled trees DTD: ontext-free grmmrs DTD: regulr expressions XPth: regulr pth expressions We will see Automt turn out to be useful s: mens to define robust lsses with ler semntis tool for proofs n lgorithmi tool for stti nlysis tool for query evlution
44 Introdution Contents Bkground on Tree Automt nd Logi Prllel Rnked Tree Automt Sequentil Rnked Tree Automt Deision Problems for Rnked Tree Automt Prllel Unrnked Tree Automt Sequentil Unrnked Tree Automt Sequentil Doument Automt Shem Lnguges XPth nd Node-seleting Queries XSLT XQuery Conlusion
45 From Strings to Trees A String bb Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 18
46 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 18 String s Tree From Strings to Trees A String bb b b
47 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 18 String s Tree b From Strings to Trees A String bb A Rnked Tree b b b b b
48 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 18 String s Tree From Strings to Trees A String bb A Rnked Tree An Unrnked Tree b b e e e e b e e e e b b b e e e
49 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 19 From Strings to Trees (ont.) XML nd Trees XML trees re unrnked : the number of hildren of node is not restrited Automt hve first been onsidered on rnked trees, where eh symbol hs fixed number of hildren (rnk) Most importnt ides were lredy developed for rnked trees Let us tke look t this first
50 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 20 Trees s Terms Remrk Sometimes trees re viewed s terms b Exmple b Exmple Tree s Term 1 (b 2 ( 1 ( 2 (b, )), b 2 ( 2 (b, ), ))) b b
51 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
52 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21
53 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
54 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
55 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
56 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
57 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
58 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
59 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
60 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
61 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
62 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21
63 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
64 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
65 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
66 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
67 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 21 From String Automt to Tree Automt Question How do utomt generlize to trees? Sequentil e Prllel e e e e e e e
68 Bottom-Up Automt Exmple: Tree-strutured Boolen Ciruits Ide Tree-strutured Boolen iruits Two sttes: q 0, q 1 Aepting t the root: q 1 Trnsitions δ(, q 1 ) = {(q 1, q 1 )} δ(, q 0 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 0, q 0 )} δ(, q 1 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 1, q 1 )} δ(, q 0 ) = {(q 0, q 0 )} δ(0, q 0 ) = {ɛ}; δ(0, q 1 ) = δ(1, q 1 ) = {ɛ}; δ(1, q 0 ) = Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 22
69 Bottom-Up Automt Exmple: Tree-strutured Boolen Ciruits 0 q 0 1 q 1 1 q 1 0 q 0 0 q 0 1 q 1 1 q 1 1 q 1 Ide Tree-strutured Boolen iruits Two sttes: q 0, q 1 Aepting t the root: q 1 Trnsitions δ(, q 1 ) = {(q 1, q 1 )} δ(, q 0 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 0, q 0 )} δ(, q 1 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 1, q 1 )} δ(, q 0 ) = {(q 0, q 0 )} δ(0, q 0 ) = {ɛ}; δ(0, q 1 ) = δ(1, q 1 ) = {ɛ}; δ(1, q 0 ) = Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 22
70 Bottom-Up Automt Exmple: Tree-strutured Boolen Ciruits q 0 q 1 q 1 q 1 0 q 0 1 q 1 1 q 1 0 q 0 0 q 0 1 q 1 1 q 1 1 q 1 Ide Tree-strutured Boolen iruits Two sttes: q 0, q 1 Aepting t the root: q 1 Trnsitions δ(, q 1 ) = {(q 1, q 1 )} δ(, q 0 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 0, q 0 )} δ(, q 1 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 1, q 1 )} δ(, q 0 ) = {(q 0, q 0 )} δ(0, q 0 ) = {ɛ}; δ(0, q 1 ) = δ(1, q 1 ) = {ɛ}; δ(1, q 0 ) = Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 22
71 Bottom-Up Automt Exmple: Tree-strutured Boolen Ciruits q 1 q 1 q 0 q 1 q 1 q 1 0 q 0 1 q 1 1 q 1 0 q 0 0 q 0 1 q 1 1 q 1 1 q 1 Ide Tree-strutured Boolen iruits Two sttes: q 0, q 1 Aepting t the root: q 1 Trnsitions δ(, q 1 ) = {(q 1, q 1 )} δ(, q 0 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 0, q 0 )} δ(, q 1 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 1, q 1 )} δ(, q 0 ) = {(q 0, q 0 )} δ(0, q 0 ) = {ɛ}; δ(0, q 1 ) = δ(1, q 1 ) = {ɛ}; δ(1, q 0 ) = Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 22
72 Bottom-Up Automt Exmple: Tree-strutured Boolen Ciruits q 1 q 1 q 1 q 0 q 1 q 1 q 1 0 q 0 1 q 1 1 q 1 0 q 0 0 q 0 1 q 1 1 q 1 1 q 1 Ide Tree-strutured Boolen iruits Two sttes: q 0, q 1 Aepting t the root: q 1 Trnsitions δ(, q 1 ) = {(q 1, q 1 )} δ(, q 0 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 0, q 0 )} δ(, q 1 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 1, q 1 )} δ(, q 0 ) = {(q 0, q 0 )} δ(0, q 0 ) = {ɛ}; δ(0, q 1 ) = δ(1, q 1 ) = {ɛ}; δ(1, q 0 ) = Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 22
73 Non-det. Top-Down Automt Exmple Ide Guess the orret vlues strting from the root Chek t the leves Three sttes: q 0, q 1, Initil stte q 1 t the root Aepting if ll leves end in Trnsitions δ(, q 1 ) = {(q 1, q 1 )} δ(, q 0 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 0, q 0 )} δ(, q 1 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 1, q 1 )} δ(, q 0 ) = {(q 0, q 0 )} δ(0, q 0 ) = {}; δ(0, q 1 ) = δ(1, q 1 ) = {}; δ(1, q 0 ) = Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 23
74 Non-det. Top-Down Automt Exmple q Ide Guess the orret vlues strting from the root Chek t the leves Three sttes: q 0, q 1, Initil stte q 1 t the root Aepting if ll leves end in Trnsitions δ(, q 1 ) = {(q 1, q 1 )} δ(, q 0 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 0, q 0 )} δ(, q 1 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 1, q 1 )} δ(, q 0 ) = {(q 0, q 0 )} δ(0, q 0 ) = {}; δ(0, q 1 ) = δ(1, q 1 ) = {}; δ(1, q 0 ) = Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 23
75 Non-det. Top-Down Automt Exmple q 1 q 1 q Ide Guess the orret vlues strting from the root Chek t the leves Three sttes: q 0, q 1, Initil stte q 1 t the root Aepting if ll leves end in Trnsitions δ(, q 1 ) = {(q 1, q 1 )} δ(, q 0 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 0, q 0 )} δ(, q 1 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 1, q 1 )} δ(, q 0 ) = {(q 0, q 0 )} δ(0, q 0 ) = {}; δ(0, q 1 ) = δ(1, q 1 ) = {}; δ(1, q 0 ) = Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 23
76 Non-det. Top-Down Automt Exmple q 1 q 1 q 1 q 0 q 1 q 1 q Ide Guess the orret vlues strting from the root Chek t the leves Three sttes: q 0, q 1, Initil stte q 1 t the root Aepting if ll leves end in Trnsitions δ(, q 1 ) = {(q 1, q 1 )} δ(, q 0 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 0, q 0 )} δ(, q 1 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 1, q 1 )} δ(, q 0 ) = {(q 0, q 0 )} δ(0, q 0 ) = {}; δ(0, q 1 ) = δ(1, q 1 ) = {}; δ(1, q 0 ) = Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 23
77 Non-det. Top-Down Automt Exmple q 1 q 1 q 1 q 0 q 1 q 1 q 1 0 q 0 1 q 1 1 q 1 0 q 0 0 q 0 1 q 1 1 q 1 1 q 1 Ide Guess the orret vlues strting from the root Chek t the leves Three sttes: q 0, q 1, Initil stte q 1 t the root Aepting if ll leves end in Trnsitions δ(, q 1 ) = {(q 1, q 1 )} δ(, q 0 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 0, q 0 )} δ(, q 1 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 1, q 1 )} δ(, q 0 ) = {(q 0, q 0 )} δ(0, q 0 ) = {}; δ(0, q 1 ) = δ(1, q 1 ) = {}; δ(1, q 0 ) = Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 23
78 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 23 Non-det. Top-Down Automt Exmple q 1 q 1 q 1 q 0 q 1 q 1 q 1 0 q 0 1 q 1 1 q 1 0 q 0 0 q 0 1 q 1 1 q 1 1 q 1 Ide Guess the orret vlues strting from the root Chek t the leves Three sttes: q 0, q 1, Initil stte q 1 t the root Aepting if ll leves end in Trnsitions δ(, q 1 ) = {(q 1, q 1 )} δ(, q 0 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 0, q 0 )} δ(, q 1 ) = {(q 0, q 1 ), (q 1, q 0 ), (q 1, q 1 )} δ(, q 0 ) = {(q 0, q 0 )} δ(0, q 0 ) = {}; δ(0, q 1 ) = δ(1, q 1 ) = {}; δ(1, q 0 ) =
79 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 24 Regulr Tree Lnguges Definition A bottom-up utomton is deterministi if for eh nd p q: δ(, p) δ(, q) = Theorem The following re equivlent for tree lnguge L: () L is epted by nondeterministi bottom-up utomton (b) L is epted by deterministi bottom-up utomton () L is epted by nondeterministi top-down utomton Proof ide () = (b): Powerset onstrution () (): Just the sme thing, viewed in two different wys
80 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 25 Automt s Tiling Systems Observtion (q 0, q 1 ) δ(, q 1 ) n be interpreted s n llowed pttern:, q 1 q 0 q 1 A tree is epted, iff there is lbelling with sttes suh tht ll lol ptterns re llowed the root is lbelled with q 1
81 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 25 Automt s Tiling Systems Observtion (q 0, q 1 ) δ(, q 1 ) n be interpreted s n llowed pttern:, q 1 q 0 q 1 A tree is epted, iff there is lbelling with sttes suh tht ll lol ptterns re llowed the root is lbelled with q 1 Exmple
82 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 25 Automt s Tiling Systems Observtion (q 0, q 1 ) δ(, q 1 ) n be interpreted s n llowed pttern:, q 1 q 0 q 1 A tree is epted, iff there is lbelling with sttes suh tht ll lol ptterns re llowed the root is lbelled with q 1 Exmple q 1 q 1 q 1 q 0 q 1 q 1 q 1 0 q 0 1 q 1 1 q 1 0 q 0 0 q 0 1 q 1 1 q 1 1 q 1
83 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 26 Formuls tlk bout Regulr tree lnguges nd logi edges of the tree (E) node lbels (Q 0, Q 1, Q, Q ) the root of the tree (root) Definition: (MSO logi) First-order-vribles represent nodes Mondi seond-order (MSO) vribles represent sets of nodes Exmple: Boolen Ciruits Boolen iruit true X X(root) x (Q 0 (x) X(x)) ((Q (x) X(x)) ( y[e(x, y) X(y)])) ((Q (x) X(x)) ( y[e(x, y) X(y)])) Theorem [Doner 70; Thther, Wright 68] MSO Regulr Tree Lnguges
84 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 27 Regulr tree lnguges nd logi (ont.) Theorem MSO Regulr Tree Lnguges Proof ide Automt MSO: Formul expresses tht there exists orret tiling MSO Automt: more involved Bsi ide: Automton omputes for eh node v the set of formuls whih hold in the subtree rooted t v
85 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 28 Regulr tree lnguges nd logi (ont.) Formul utomton Let ϕ be n MSO-formul, k := quntifier-depth of ϕ k-type of tree t := (essentilly) set of MSO-formuls ψ of quntifier-depth k whih hold in t t 1 k t 2 : k-type(t 1 ) = k-type(t 2 ) Automton omputes k-type of tree nd onludes whether ϕ holds Cruil ft l l t 1 k t 1 = t 1 t 2 k t 1 t 2 t 2 k t 2
86 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 29 Det. Top-Down Automt Question Wht is the right notion for deterministi top-down utomt? 3 Possibilities Stte t node v might depend on stte nd symbol of prent q stte nd symbol of prent nd symbol of v v q stte nd symbol of prent nd symbols t v nd its sibling v q v e
87 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 30 Det. Top-Down Automt: Aeptne Question Wht is good eptne mehnism for deterministi top-down utomt? Severl possibilitites (1) At ll leves sttes hve to be epting (2) There is leve with n epting stte (2) is problemti for omplement nd intersetion (1) is problemti for omplement nd union
88 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 31 Det. Top-Down Automt: Aeptne (ont.) Definition: (Root-to-frontier utomt with regulr eptne ondition) Tree utomt A re equipped with n dditionl regulr string lnguge L over Q Σ A epts t if the (stte,symbol)-string t the leves (from left to right) is in L [Jurvnen, Potthoff, Thoms 93] Illustrtion (q 1, 1 ) (q n, n ) A robust lss The resulting lss is losed under Boolen opertions Good lgorithmi properties Does not pture ll regulr tree lnguges
89 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 32 Summry Regulr tree lnguges Regulr tree lnguges re robust lss Chrterized by prllel tree utomt MSO logi severl other models They re the nturl nlog of regulr string lnguges Deterministi top-down utomt with regulr eptne onditions define weker but nevertheless robust lss
90 Introdution Contents Bkground on Tree Automt nd Logi Prllel Rnked Tree Automt Sequentil Rnked Tree Automt Deision Problems for Rnked Tree Automt Prllel Unrnked Tree Automt Sequentil Unrnked Tree Automt Sequentil Doument Automt Shem Lnguges XPth nd Node-seleting Queries XSLT XQuery Conlusion
91 Tree-Wlk Automt Definition: (Tree-wlk utomt) Depending on urrent stte symbol of urrent node r TWA T e position of urrent node wrt its siblings e A u t the utomton moves to neighbor nd tkes new stte o s Question Wht is the expressive power of tree-wlk utomt? Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 34
92 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple Ide q q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
93 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
94 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
95 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
96 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
97 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
98 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
99 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
100 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
101 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 1 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
102 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 1 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
103 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 1 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
104 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
105 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
106 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
107 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
108 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
109 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 1 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
110 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 1 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
111 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
112 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
113 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 1 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
114 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
115 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 1 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
116 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 1 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
117 Tree-Wlk Automt (ont.) Ft Tree-wlk utomt n evlute Boolen iruit trees 5 sttes Exmple q 1 0 Ide q 0 1 q Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 35
118 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 36 A Reent Result nd n Even More Reent Result Theorem [Bojnzyk, Colombet 04] Deterministi TWAs re weker thn nondeterministi TWAs Corollry Deterministi TWAs do not pture ll regulr tree lnguges Theorem [Bojnzyk, Colombet 04] Nondeterministi TWAs do not pture ll regulr tree lnguges
119 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 37 Overview of Models Non-det. top-down tree utomt Non-det. bottom-up tree utomt Det. bottom-up tree utomt Non-det. tree wlk utomt Det. top-down tree utomt Det. tree wlk utomt
120 Introdution Contents Bkground on Tree Automt nd Logi Prllel Rnked Tree Automt Sequentil Rnked Tree Automt Deision Problems for Rnked Tree Automt Prllel Unrnked Tree Automt Sequentil Unrnked Tree Automt Sequentil Doument Automt Shem Lnguges XPth nd Node-seleting Queries XSLT XQuery Conlusion
121 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 39 Given: Deision Problems Algorithmi problems We onsider the following lgorithmi problems All of them will be useful in the XML ontext Membership test for A Question: Tree t Is t L(A)? Given: Given: Membership test (ombined) Question: Non-emptiness Automton A Question: Is L(A)? Automton A, tree t Is t L(A)? Continment Given: Automt A 1, A 2 Question: Is L(A 1 ) L(A 2 )? Equivlene Given: Automt A 1, A 2 Question: Is L(A 1 ) = L(A 2 )?
122 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 40 Membership Test Fts Time Bounds for the ombined omplexity of membership test for tree utomt: Deterministi (prllel) tree utomt: O( A t ) Nondeterministi (prllel) tree utomt: O( A 2 t ) (Compute, for eh node, the set of rehble sttes) Deterministi TWAs: O( A 2 t ) (Compute, for eh node v, the ggregted behvior of A on its subtree: Behvior funtion ) Nondeterministi TWAs: O( A 3 t ) (Compute, for eh node v, the ggregted behvior of A on its subtree: Behvior reltion )
123 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 40 Membership Test Fts Time Bounds for the ombined omplexity of membership test for tree utomt: Deterministi (prllel) tree utomt: O( A t ) Nondeterministi (prllel) tree utomt: O( A 2 t ) (Compute, for eh node, the set of rehble sttes) Deterministi TWAs: O( A 2 t ) (Compute, for eh node v, the ggregted behvior of A on its subtree: Behvior funtion ) Nondeterministi TWAs: O( A 3 t ) (Compute, for eh node v, the ggregted behvior of A on its subtree: Behvior reltion )
124 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 40 Membership Test Fts Time Bounds for the ombined omplexity of membership test for tree utomt: Deterministi (prllel) tree utomt: O( A t ) Nondeterministi (prllel) tree utomt: O( A 2 t ) (Compute, for eh node, the set of rehble sttes) Deterministi TWAs: O( A 2 t ) (Compute, for eh node v, the ggregted behvior of A on its subtree: Behvior funtion ) Nondeterministi TWAs: O( A 3 t ) (Compute, for eh node v, the ggregted behvior of A on its subtree: Behvior reltion )
125 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 40 Membership Test Fts Time Bounds for the ombined omplexity of membership test for tree utomt: Deterministi (prllel) tree utomt: O( A t ) Behvior Funtion Nondeterministi (prllel) tree utomt: O( A 2 t ) v (Compute, for eh node, the set of rehble sttes) f : Q Q Deterministi TWAs: O( A 2 t ) (Compute, for eh node v, the ggregted behvior of A on its subtree: Behvior funtion ) Nondeterministi TWAs: O( A 3 t ) (Compute, for eh node v, the ggregted behvior of A on its subtree: Behvior reltion )
126 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 40 Membership Test Fts Time Bounds for the ombined omplexity of membership test for tree utomt: Deterministi (prllel) tree utomt: O( A t ) Nondeterministi (prllel) tree utomt: O( A 2 t ) (Compute, for eh node, the set of rehble sttes) Deterministi TWAs: O( A 2 t ) (Compute, for eh node v, the ggregted behvior of A on its subtree: Behvior funtion ) Nondeterministi TWAs: O( A 3 t ) (Compute, for eh node v, the ggregted behvior of A on its subtree: Behvior reltion )
127 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 41 Membership Test (ont.) Question: Wht is the struturl omplexity for the vrious models? [Lohrey 01, Segoufin 03] Model Time Complexity Struturl Complexity Det. top-down TA O( A t ) LOGSPACE Det. bottom-up TA O( A t ) LOGDCFL Nondet. bottom-up TA O( A 2 t ) LOGCFL Nondet. top-down TA O( A 2 t ) LOGCFL Det. TWA O( A 2 t ) LOGSPACE Nondet. TWA O( A 3 t ) NLOGSPACE
128 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 42 Non-emptiness Fts Non-emptiness for string utomt orresponds to Grph Rehbility (omplete for NLOGSPACE) Non-emptiness for tree utomt : orresponds to Pth Systems p 1 p 2 q
129 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 42 Non-emptiness Fts Non-emptiness for string utomt orresponds to Grph Rehbility (omplete for NLOGSPACE) Non-emptiness for tree utomt : orresponds to Pth Systems p 1 p 2 q
130 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 42 Non-emptiness Fts Non-emptiness for string utomt orresponds to Grph Rehbility (omplete for NLOGSPACE) Non-emptiness for tree utomt : orresponds to Pth Systems p 1 p 2 q
131 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 42 Non-emptiness Fts Non-emptiness for string utomt orresponds to Grph Rehbility (omplete for NLOGSPACE) Non-emptiness for tree utomt : orresponds to Pth Systems p 1 p 2 q
132 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 42 Non-emptiness Fts Non-emptiness for string utomt orresponds to Grph Rehbility (omplete for NLOGSPACE) Non-emptiness for tree utomt : orresponds to Pth Systems p 1 p 2 q Result Non-emptiness for bottom-up tree utomt n be heked in liner time It is omplete for PTIME
133 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 43 Continment/Equivlene Of ourse: Observtions L(A 1 ) = L(A 2 ) [L(A 1 ) L(A 2 ) nd L(A 2 ) L(A 1 )] Complexity of ontinment problem is very different for deterministi nd non-deterministi utomt Deterministi utomt: onstrut produt utomton
134 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring , d e f b
135 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring , d e 1 f 0 0 b
136 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring ,1 0 d 1 e 1 f 0 0 b
137 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring ,1 0 d e 0 1 f 0 0 b
138 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring , d e 1 f 0 0 b
139 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring ,1 0 d 1 e 1 f 0 0 b
140 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring ,1 0 d e 0 1 f 0 0 b
141 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring , d e 1 f 0 0 b
142 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring , d e 1 f 0 0 b
143 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring , d e f b d e f b 0 bd 1 be 0 bf
144 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring , d e f b d e f b 0 bd 1 be 0 bf
145 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring ,1 0 d 1 e 0 f b d e f b 0 bd 1 be 0 bf
146 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring ,1 0 d 1 e 0 f b d e f b 0 bd 1 be 0 bf
147 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring , d e f b d e f b 0 bd 1 be 0 bf
148 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring ,1 0 d 1 e 0 f b d e f b 0 bd 1 be 0 bf
149 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring ,1 0 d 1 e 0 f b d e f b 0 bd 1 be 0 bf
150 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring , d e f b d e f b 0 bd 1 be 0 bf
151 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 44 Reminder: Produt utomton Produt of 2 string utomt even number of zeros ontins substring , d e f b d e f b 0 bd 1 be 0 bf
152 Continment: Complexity Deterministi bottom-up tree utomt Produt utomton nlogous s for string utomt Set of sttes: Q 1 Q 2 Trnsitions omponent-wise To hek L(A 1 ) L(A 2 ): Compute B = A 1 A 2 Aepting sttes: F 1 (Q 2 F 2 ) Chek whether L(B) = If so, L(A 1 ) L(A 2 ) holds Theorem Complexity of Continment for deterministi bottom-up tree utomt: O( A 1 A 2 ) Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 45
153 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 46 Continment: Complexity (ont.) Non-deterministi utomt Nive pproh: Mke A 2 deterministi (size: O(2 A 2 )) Construt produt utomton Exponentil time
154 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 46 Continment: Complexity (ont.) Non-deterministi utomt Nive pproh: Mke A 2 deterministi (size: O(2 A 2 )) Construt produt utomton Exponentil time Unfortuntely... There is essentilly no better wy
155 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 46 Continment: Complexity (ont.) Non-deterministi utomt Nive pproh: Mke A 2 deterministi (size: O(2 A 2 )) Construt produt utomton Exponentil time Unfortuntely... There is essentilly no better wy Theorem [Seidl 1990] Continment for non-deterministi tree utomt is omplete for EXPTIME
156 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 47 Det. Top-Down Automt: Non-Emptiness Theorem Nonemptiness for deterministi top-down utomt A n be heked in polynomil time Proof ide Chek for eh stte p of A nd eh pir (q, q ) of the leves utomton B: Is there tree t suh tht A strts from stte p nd obtins leve string whih brings B from q to q? Illustrtion p q q
157 Shwentik XML: Algorithms & Complexity Introdution - XML Proessing 48 Det. Top-Down Automt: Continment Theorem Continment for deterministi top-down utomt A n be heked in polynomil time Proof ide Tree utomt A 1, A 2 with leves utomt B 1, B 2 Chek for eh pir (p 1, p 2 ) of sttes of A 1 nd A 2 nd for eh two pirs (q 1, q 1 ) nd (q 2, q 2 ) of B 1 nd B 2, resp.: Is there tree t suh tht for both i = 1, i = 2: T i strts from stte p i nd obtins leve string whih brings B i from q i to q i?
Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering
Petri Nets Ree Alreht Seminr: Automt Theory Chir of Softwre Engeneering Overview 1. Motivtion: Why not just using finite utomt for everything? Wht re Petri Nets nd when do we use them? 2. Introdution:
More informationFinite State Automata and Determinisation
Finite Stte Automt nd Deterministion Tim Dworn Jnury, 2016 Lnguges fs nf re df Deterministion 2 Outline 1 Lnguges 2 Finite Stte Automt (fs) 3 Non-deterministi Finite Stte Automt (nf) 4 Regulr Expressions
More informationBisimulation, Games & Hennessy Milner logic
Bisimultion, Gmes & Hennessy Milner logi Leture 1 of Modelli Mtemtii dei Proessi Conorrenti Pweł Soboiński Univeristy of Southmpton, UK Bisimultion, Gmes & Hennessy Milner logi p.1/32 Clssil lnguge theory
More informationRegular languages refresher
Regulr lnguges refresher 1 Regulr lnguges refresher Forml lnguges Alphet = finite set of letters Word = sequene of letter Lnguge = set of words Regulr lnguges defined equivlently y Regulr expressions Finite-stte
More informationTechnische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution
Tehnishe Universität Münhen Winter term 29/ I7 Prof. J. Esprz / J. Křetínský / M. Luttenerger. Ferur 2 Solution Automt nd Forml Lnguges Homework 2 Due 5..29. Exerise 2. Let A e the following finite utomton:
More informationFoundations of XML Types: Tree Automata
1 / 43 Foundtions of XML Types: Tree Automt Pierre Genevès CNRS (slides mostly sed on slides y W. Mrtens nd T. Schwentick) University of Grenole Alpes, 2017 2018 2 / 43 Why Tree Automt? Foundtions of XML
More informationCS 573 Automata Theory and Formal Languages
Non-determinism Automt Theory nd Forml Lnguges Professor Leslie Lnder Leture # 3 Septemer 6, 2 To hieve our gol, we need the onept of Non-deterministi Finite Automton with -moves (NFA) An NFA is tuple
More informationNondeterministic Automata vs Deterministic Automata
Nondeterministi Automt vs Deterministi Automt We lerned tht NFA is onvenient model for showing the reltionships mong regulr grmmrs, FA, nd regulr expressions, nd designing them. However, we know tht n
More informationNondeterministic Finite Automata
Nondeterministi Finite utomt The Power of Guessing Tuesdy, Otoer 4, 2 Reding: Sipser.2 (first prt); Stoughton 3.3 3.5 S235 Lnguges nd utomt eprtment of omputer Siene Wellesley ollege Finite utomton (F)
More informationAbstraction of Nondeterministic Automata Rong Su
Astrtion of Nondeterministi Automt Rong Su My 6, 2010 TU/e Mehnil Engineering, Systems Engineering Group 1 Outline Motivtion Automton Astrtion Relevnt Properties Conlusions My 6, 2010 TU/e Mehnil Engineering,
More informationAUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton
25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q
More informationCS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6
CS311 Computtionl Strutures Regulr Lnguges nd Regulr Grmmrs Leture 6 1 Wht we know so fr: RLs re losed under produt, union nd * Every RL n e written s RE, nd every RE represents RL Every RL n e reognized
More informationPrefix-Free Regular-Expression Matching
Prefix-Free Regulr-Expression Mthing Yo-Su Hn, Yjun Wng nd Derik Wood Deprtment of Computer Siene HKUST Prefix-Free Regulr-Expression Mthing p.1/15 Pttern Mthing Given pttern P nd text T, find ll sustrings
More informationThe University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS
The University of ottinghm SCHOOL OF COMPUTR SCIC A LVL 2 MODUL, SPRIG SMSTR 2015 2016 MACHIS AD THIR LAGUAGS ASWRS Time llowed TWO hours Cndidtes my omplete the front over of their nswer ook nd sign their
More informationCS 275 Automata and Formal Language Theory
CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) Anton Setzer (Bsed on book drft by J. V. Tucker nd K. Stephenson)
More informationNondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA
Nondeterminism Nondeterministic Finite Automt Nondeterminism Subset Construction A nondeterministic finite utomton hs the bility to be in severl sttes t once. Trnsitions from stte on n input symbol cn
More informationJava II Finite Automata I
Jv II Finite Automt I Bernd Kiefer Bernd.Kiefer@dfki.de Deutsches Forschungszentrum für künstliche Intelligenz Finite Automt I p.1/13 Processing Regulr Expressions We lredy lerned out Jv s regulr expression
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018
Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More
More informationState Complexity of Union and Intersection of Binary Suffix-Free Languages
Stte Complexity of Union nd Intersetion of Binry Suffix-Free Lnguges Glin Jirásková nd Pvol Olejár Slovk Ademy of Sienes nd Šfárik University, Košie 0000 1111 0000 1111 Glin Jirásková nd Pvol Olejár Binry
More informationFinite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh
Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is
More informationNon-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1
Non-Deterministic Finite Automt Fll 2018 Costs Busch - RPI 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q q2 1 q 0 q 3 Fll 2018 Costs Busch - RPI 2 Nondeterministic Finite Automton (NFA) Alphbet
More informationGood-for-Games Automata versus Deterministic Automata.
Good-for-Gmes Automt versus Deterministic Automt. Denis Kuperberg 1,2 Mich l Skrzypczk 1 1 University of Wrsw 2 IRIT/ONERA (Toulouse) Séminire MoVe 12/02/2015 LIF, Luminy Introduction Deterministic utomt
More informationNON-DETERMINISTIC FSA
Tw o types of non-determinism: NON-DETERMINISTIC FS () Multiple strt-sttes; strt-sttes S Q. The lnguge L(M) ={x:x tkes M from some strt-stte to some finl-stte nd ll of x is proessed}. The string x = is
More informationCS 275 Automata and Formal Language Theory
CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.6.: Push Down Automt Remrk: This mteril is no longer tught nd not directly exm relevnt Anton Setzer (Bsed
More informationSupervisory Control under Partial Observation
Supervisory Control under Prtil Observtion Dr Rong Su S1-B1b-59, Shool of EEE Nnyng Tehnologil University Tel: +65 6790-6042, Emil: rsu@ntu.edu.sg EE6226 Disrete Event Dynmi Systems 1 Outline Motivtion
More informationNon Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51
Non Deterministic Automt Linz: Nondeterministic Finite Accepters, pge 51 1 Nondeterministic Finite Accepter (NFA) Alphbet ={} q 1 q2 q 0 q 3 2 Nondeterministic Finite Accepter (NFA) Alphbet ={} Two choices
More informationCoalgebra, Lecture 15: Equations for Deterministic Automata
Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined
More informationAlpha Algorithm: A Process Discovery Algorithm
Proess Mining: Dt Siene in Ation Alph Algorithm: A Proess Disovery Algorithm prof.dr.ir. Wil vn der Alst www.proessmining.org Proess disovery = Ply-In Ply-In event log proess model Ply-Out Reply proess
More informationTheory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38
Theory of Computtion Regulr Lnguges (NTU EE) Regulr Lnguges Fll 2017 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of Finite Automt A finite utomton hs finite set of control
More informationHybrid Systems Modeling, Analysis and Control
Hyrid Systems Modeling, Anlysis nd Control Rdu Grosu Vienn University of Tehnology Leture 5 Finite Automt s Liner Systems Oservility, Rehility nd More Miniml DFA re Not Miniml NFA (Arnold, Diky nd Nivt
More informationCounting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs
Isomorphism of Grphs Definition The simple grphs G 1 = (V 1, E 1 ) n G = (V, E ) re isomorphi if there is ijetion (n oneto-one n onto funtion) f from V 1 to V with the property tht n re jent in G 1 if
More informationNon-deterministic Finite Automata
Non-deterministic Finite Automt Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd T. vn Lrhoven Institute for Computing nd Informtion Sciences Intelligent
More informationAnatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute
Victor Admchik Dnny Sletor Gret Theoreticl Ides In Computer Science CS 5-25 Spring 2 Lecture 2 Mr 3, 2 Crnegie Mellon University Deterministic Finite Automt Finite Automt A mchine so simple tht you cn
More informationCompression of Palindromes and Regularity.
Compression of Plinromes n Regulrity. Kyoko Shikishim-Tsuji Center for Lierl Arts Eution n Reserh Tenri University 1 Introution In [1], property of likstrem t t view of tse is isusse n it is shown tht
More informationTheory of Computation Regular Languages
Theory of Computtion Regulr Lnguges Bow-Yw Wng Acdemi Sinic Spring 2012 Bow-Yw Wng (Acdemi Sinic) Regulr Lnguges Spring 2012 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of
More information1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.
1 PYTHAGORAS THEOREM 1 1 Pythgors Theorem In this setion we will present geometri proof of the fmous theorem of Pythgors. Given right ngled tringle, the squre of the hypotenuse is equl to the sum of the
More informationStreamed Validation of XML Documents
Preliminries DTD Document Type Definition References Jnury 29, 2009 Preliminries DTD Document Type Definition References Structure Preliminries Unrnked Trees Recognizble Lnguges DTD Document Type Definition
More informationSystem Validation (IN4387) November 2, 2012, 14:00-17:00
System Vlidtion (IN4387) Novemer 2, 2012, 14:00-17:00 Importnt Notes. The exmintion omprises 5 question in 4 pges. Give omplete explntion nd do not onfine yourself to giving the finl nswer. Good luk! Exerise
More informationMinimal DFA. minimal DFA for L starting from any other
Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA
More informationXPath Node Selection over Grammar-Compressed Trees
XPth Node Selection over Grmmr-Compressed Trees Sebstin Mneth University of Edinburgh with Tom Sebstin (INRIA Lille) XPth Node Selection Given: XPth query Q nd tree T Question: wc-time to evlute Q over
More informationFinite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh
Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions
More informationwhere the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b
CS 294-2 9/11/04 Quntum Ciruit Model, Solovy-Kitev Theorem, BQP Fll 2004 Leture 4 1 Quntum Ciruit Model 1.1 Clssil Ciruits - Universl Gte Sets A lssil iruit implements multi-output oolen funtion f : {0,1}
More informationNon Deterministic Automata. Formal Languages and Automata - Yonsei CS 1
Non Deterministic Automt Forml Lnguges nd Automt - Yonsei CS 1 Nondeterministic Finite Accepter (NFA) We llow set of possible moves insted of A unique move. Alphbet = {} Two choices q 1 q2 Forml Lnguges
More informationLaboratory for Foundations of Computer Science. An Unfolding Approach. University of Edinburgh. Model Checking. Javier Esparza
An Unfoling Approh to Moel Cheking Jvier Esprz Lbortory for Fountions of Computer Siene University of Einburgh Conurrent progrms Progrm: tuple P T 1 T n of finite lbelle trnsition systems T i A i S i i
More informationOn Determinisation of History-Deterministic Automata.
On Deterministion of History-Deterministic Automt. Denis Kupererg Mich l Skrzypczk University of Wrsw YR-ICALP 2014 Copenhgen Introduction Deterministic utomt re centrl tool in utomt theory: Polynomil
More informationMore on automata. Michael George. March 24 April 7, 2014
More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose
More informationSpeech Recognition Lecture 2: Finite Automata and Finite-State Transducers
Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Eugene Weinstein Google, NYU Cournt Institute eugenew@cs.nyu.edu Slide Credit: Mehryr Mohri Preliminries Finite lphet, empty string.
More informationTypes of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2
CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt
More informationXML and Databases. Outline. 1. Top-Down Evaluation of Simple Paths. 1. Top-Down Evaluation of Simple Paths. 1. Top-Down Evaluation of Simple Paths
Outline Leture Effiient XPth Evlution XML n Dtses. Top-Down Evlution of simple pths. Noe Sets only: Core XPth. Bottom-Up Evlution of Core XPth. Polynomil Time Evlution of Full XPth Sestin Mneth NICTA n
More information= state, a = reading and q j
4 Finite Automt CHAPTER 2 Finite Automt (FA) (i) Derterministi Finite Automt (DFA) A DFA, M Q, q,, F, Where, Q = set of sttes (finite) q Q = the strt/initil stte = input lphet (finite) (use only those
More informationIntermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4
Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one
More informationProject 6: Minigoals Towards Simplifying and Rewriting Expressions
MAT 51 Wldis Projet 6: Minigols Towrds Simplifying nd Rewriting Expressions The distriutive property nd like terms You hve proly lerned in previous lsses out dding like terms ut one prolem with the wy
More informationSEMANTIC ANALYSIS PRINCIPLES OF PROGRAMMING LANGUAGES. Norbert Zeh Winter Dalhousie University 1/28
SEMNTI NLYSIS PRINIPLES OF PROGRMMING LNGUGES Norbert Zeh Winter 2018 Dlhousie University 1/28 PROGRM TRNSLTION FLOW HRT Soure progrm (hrter strem) Snner (lexil nlysis) Front end Prse tree Prser (syntti
More information1.4 Nonregular Languages
74 1.4 Nonregulr Lnguges The number of forml lnguges over ny lphbet (= decision/recognition problems) is uncountble On the other hnd, the number of regulr expressions (= strings) is countble Hence, ll
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic
More informationNon-Deterministic Finite Automata
Non-Deterministic Finite Automt http://users.comlb.ox.c.uk/luke. ong/teching/moc/nf2up.pdf 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q1 q2 2 Alphbet ={} Two choices q1 q2 3 Alphbet ={} Two choices
More informationCS 275 Automata and Formal Language Theory
CS 275 utomt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Prolem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) nton Setzer (Bsed on ook drft y J. V. Tucker nd K. Stephenson)
More informationRegular expressions, Finite Automata, transition graphs are all the same!!
CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1
More informationTypes of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.
CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt
More informationStrong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation
Strong Bisimultion Overview Actions Lbeled trnsition system Trnsition semntics Simultion Bisimultion References Robin Milner, Communiction nd Concurrency Robin Milner, Communicting nd Mobil Systems 32
More informationChapter 2 Finite Automata
Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht
More information11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?
CS125 Lecture 11 Fll 2016 11.1 Finite Automt Motivtion: TMs without tpe: mybe we cn t lest fully understnd such simple model? Algorithms (e.g. string mtching) Computing with very limited memory Forml verifiction
More informationFormal Languages and Automata
Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University
More information@#? Text Search ] { "!" Nondeterministic Finite Automata. Transformation NFA to DFA and Simulation of NFA. Text Search Using Automata
g Text Serh @#? ~ Mrko Berezovský Rdek Mřík PAL 0 Nondeterministi Finite Automt n Trnsformtion NFA to DFA nd Simultion of NFA f Text Serh Using Automt A B R Power of Nondeterministi Approh u j Regulr Expression
More informationAutomatic Synthesis of New Behaviors from a Library of Available Behaviors
Automti Synthesis of New Behviors from Lirry of Aville Behviors Giuseppe De Giomo Università di Rom L Spienz, Rom, Itly degiomo@dis.unirom1.it Sestin Srdin RMIT University, Melourne, Austrli ssrdin@s.rmit.edu.u
More informationComplementing Büchi Automata
Complementing Bühi Automt Guillume Sdegh Tehnil Report n o 090, My 009 revision 07 Model heking is field of forml verifition whih ims to utomtilly hek the ehvior of system with the help of logi formulæ.
More informationChapter 3. Vector Spaces. 3.1 Images and Image Arithmetic
Chpter 3 Vetor Spes In Chpter 2, we sw tht the set of imges possessed numer of onvenient properties. It turns out tht ny set tht possesses similr onvenient properties n e nlyzed in similr wy. In liner
More informationPropositional models. Historical models of computation. Application: binary addition. Boolean functions. Implementation using switches.
Propositionl models Historil models of omputtion Steven Lindell Hverford College USA 1/22/2010 ISLA 2010 1 Strt with fixed numer of oolen vriles lled the voulry: e.g.,,. Eh oolen vrile represents proposition,
More informationCMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)
CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All
More informationLogic Synthesis and Verification
Logi Synthesis nd Verifition SOPs nd Inompletely Speified Funtions Jie-Hong Rolnd Jing 江介宏 Deprtment of Eletril Engineering Ntionl Tiwn University Fll 2010 Reding: Logi Synthesis in Nutshell Setion 2 most
More information2.4 Theoretical Foundations
2 Progrmming Lnguge Syntx 2.4 Theoretil Fountions As note in the min text, snners n prsers re se on the finite utomt n pushown utomt tht form the ottom two levels of the Chomsky lnguge hierrhy. At eh level
More informationGraph States EPIT Mehdi Mhalla (Calgary, Canada) Simon Perdrix (Grenoble, France)
Grph Sttes EPIT 2005 Mehdi Mhll (Clgry, Cnd) Simon Perdrix (Grenole, Frne) simon.perdrix@img.fr Grph Stte: Introdution A grph-sed representtion of the entnglement of some (lrge) quntum stte. Verties: quits
More informationFundamentals of Computer Science
Fundmentls of Computer Science Chpter 3: NFA nd DFA equivlence Regulr expressions Henrik Björklund Umeå University Jnury 23, 2014 NFA nd DFA equivlence As we shll see, it turns out tht NFA nd DFA re equivlent,
More informationChapter 4 State-Space Planning
Leture slides for Automted Plnning: Theory nd Prtie Chpter 4 Stte-Spe Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Motivtion Nerly ll plnning proedures re serh proedures Different
More informationLecture 6 Regular Grammars
Lecture 6 Regulr Grmmrs COT 4420 Theory of Computtion Section 3.3 Grmmr A grmmr G is defined s qudruple G = (V, T, S, P) V is finite set of vribles T is finite set of terminl symbols S V is specil vrible
More informationFinite-State Automata: Recap
Finite-Stte Automt: Recp Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 09 August 2016 Outline 1 Introduction 2 Forml Definitions nd Nottion 3 Closure under
More informationCS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014
S 224 DIGITAL LOGI & STATE MAHINE DESIGN SPRING 214 DUE : Mrh 27, 214 HOMEWORK III READ : Relte portions of hpters VII n VIII ASSIGNMENT : There re three questions. Solve ll homework n exm prolems s shown
More informationChapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1
Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more
More informationDiscrete Structures, Test 2 Monday, March 28, 2016 SOLUTIONS, VERSION α
Disrete Strutures, Test 2 Mondy, Mrh 28, 2016 SOLUTIONS, VERSION α α 1. (18 pts) Short nswer. Put your nswer in the ox. No prtil redit. () Consider the reltion R on {,,, d with mtrix digrph of R.. Drw
More informationLearning Moore Machines from Input-Output Traces
Lerning Moore Mchines from Input-Output Trces Georgios Gintmidis 1 nd Stvros Tripkis 1,2 1 Alto University, Finlnd 2 UC Berkeley, USA Motivtion: lerning models from blck boxes Inputs? Lerner Forml Model
More informationCHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)
Finite Automt (FA or DFA) CHAPTER Regulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, equivlence of NFAs DFAs, closure under regulr
More informationGlobal alignment. Genome Rearrangements Finding preserved genes. Lecture 18
Computt onl Biology Leture 18 Genome Rerrngements Finding preserved genes We hve seen before how to rerrnge genome to obtin nother one bsed on: Reversls Knowledge of preserved bloks (or genes) Now we re
More informationMetodologie di progetto HW Technology Mapping. Last update: 19/03/09
Metodologie di progetto HW Tehnology Mpping Lst updte: 19/03/09 Tehnology Mpping 2 Tehnology Mpping Exmple: t 1 = + b; t 2 = d + e; t 3 = b + d; t 4 = t 1 t 2 + fg; t 5 = t 4 h + t 2 t 3 ; F = t 5 ; t
More informationMath 32B Discussion Session Week 8 Notes February 28 and March 2, f(b) f(a) = f (t)dt (1)
Green s Theorem Mth 3B isussion Session Week 8 Notes Februry 8 nd Mrh, 7 Very shortly fter you lerned how to integrte single-vrible funtions, you lerned the Fundmentl Theorem of lulus the wy most integrtion
More informationNon-deterministic Finite Automata
Non-deterministic Finite Automt From Regulr Expressions to NFA- Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion
More informationNFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:
CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce
More informationUnit 4. Combinational Circuits
Unit 4. Comintionl Ciruits Digitl Eletroni Ciruits (Ciruitos Eletrónios Digitles) E.T.S.I. Informáti Universidd de Sevill 5/10/2012 Jorge Jun 2010, 2011, 2012 You re free to opy, distriute
More informationAutomata and Languages
Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering Lb. The University of Aizu Jpn Grmmr Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Regulr Lnguges Context Free Lnguges Context Sensitive
More informationa,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1
CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother
More informationAlgorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points:
Eidgenössishe Tehnishe Hohshule Zürih Eole polytehnique fédérle de Zurih Politenio federle di Zurigo Federl Institute of Tehnology t Zurih Deprtement of Computer Siene. Novemer 0 Mrkus Püshel, Dvid Steurer
More informationBehavior Composition in the Presence of Failure
Behvior Composition in the Presene of Filure Sestin Srdin RMIT University, Melourne, Austrli Fio Ptrizi & Giuseppe De Giomo Spienz Univ. Rom, Itly KR 08, Sept. 2008, Sydney Austrli Introdution There re
More informationAutomata and Regular Languages
Chpter 9 Automt n Regulr Lnguges 9. Introution This hpter looks t mthemtil moels of omputtion n lnguges tht esrie them. The moel-lnguge reltionship hs multiple levels. We shll explore the simplest level,
More informationHardware Verification 2IMF20
Hrdwre Verifition 2IMF20 Julien Shmltz Leture 02: Boolen Funtions, ST, CEC Course ontent - Forml tools Temporl Logis (LTL, CTL) Domin Properties System Verilog ssertions demi & Industrils Proessors Networks
More informationAlpha Algorithm: Limitations
Proess Mining: Dt Siene in Ation Alph Algorithm: Limittions prof.dr.ir. Wil vn der Alst www.proessmining.org Let L e n event log over T. α(l) is defined s follows. 1. T L = { t T σ L t σ}, 2. T I = { t
More informationCS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)
CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts
More informationCMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014
CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA
More informationDesigning finite automata II
Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of
More informationCS 188 Introduction to Artificial Intelligence Fall 2018 Note 7
CS 188 Introduction to Artificil Intelligence Fll 2018 Note 7 These lecture notes re hevily bsed on notes originlly written by Nikhil Shrm. Decision Networks In the third note, we lerned bout gme trees
More informationXML and Databases. Lecture 5 XML Validation using Automata. Sebastian Maneth NICTA and UNSW
XML nd Dtbses Lecture 5 XML Vlidtion using Automt Sebstin Mneth NICTA nd UNSW CSE@UNSW -- Semester 1, 2009 Outline 2 1. Recp: deterministic Reg Expr s / Glushkov Automton 2. Complexity of DTD vlidtion
More informationCS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa
CS:4330 Theory of Computtion Spring 208 Regulr Lnguges Equivlences between Finite utomt nd REs Hniel Brbos Redings for this lecture Chpter of [Sipser 996], 3rd edition. Section.3. Finite utomt nd regulr
More information