• Aucun résultat trouvé

Topological Sorting under Regular Constraints

N/A
N/A
Protected

Academic year: 2022

Partager "Topological Sorting under Regular Constraints"

Copied!
104
0
0

Texte intégral

(1)

Topological Sorting under Regular Constraints

Antoine Amarilli1, Charles Paperman2 July 12th, 2018

1Télécom ParisTech

(2)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b a b ... inL!

(3)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b a b ... inL!

(4)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b a b ... inL!

(5)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b a b ... inL!

(6)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b a b ... inL!

(7)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a

b a b b a ... not inL!

(8)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b

a b b a ... not inL!

(9)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a

b b a ... not inL!

(10)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b

b a ... not inL!

(11)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b b

a ... not inL!

(12)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b b a

... not inL!

(13)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b b a ... not inL!

(14)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b a b ... inL!

(15)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a

b a b a b ... inL!

(16)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b

a b a b ... inL!

(17)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a

b a b ... inL!

(18)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b

a b ... inL!

(19)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b a

b ... inL!

(20)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b a b

... inL!

(21)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b a b ... inL!

(22)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b a b ... inL!

(23)

Constrained Topological Sorting

Fix analphabet: e.g.,Σ ={a,b}

Fix alanguage: e.g.,L= (ab)

We studyconstrained topological sorting:

Input:directed acyclic graph(DAG) with vertices labeled withΣ

Output: is there atopological sort that falls inL?

Question:when is this problemtractable?

a

b a b

b a

a b a b a b ... inL!

(24)

Motivation

How wereally ended upstudying this problem:

2011 2012 2013 2014 2015 2016 2017 2018

Probabilistic XML XML versioning

Whicha-posteriori motivationdid we invent for the problem?

→Schedulingwith constraints! →Verification forconcurrent code!

→Computational biology! →Blockchain! (joke)

But why do weactually care?

→ Naturalproblem and apparentlynothingwas known about it!

(25)

Motivation

How wereally ended upstudying this problem:

2011 2012 2013 2014 2015 2016 2017 2018

Probabilistic XML XML versioning

Whicha-posteriori motivationdid we invent for the problem?

→Schedulingwith constraints! →Verification forconcurrent code!

→Computational biology! →Blockchain! (joke)

But why do weactually care?

→ Naturalproblem and apparentlynothingwas known about it!

(26)

Motivation

How wereally ended upstudying this problem:

2011 2012 2013 2014 2015 2016 2017 2018

Probabilistic XML XML versioning

Order-uncertain databases Top-k Aggregate queries

Whicha-posteriori motivationdid we invent for the problem?

→Schedulingwith constraints! →Verification forconcurrent code!

→Computational biology! →Blockchain! (joke)

But why do weactually care?

→ Naturalproblem and apparentlynothingwas known about it!

(27)

Motivation

How wereally ended upstudying this problem:

2011 2012 2013 2014 2015 2016 2017 2018

Probabilistic XML XML versioning

Order-uncertain databases Top-k Aggregate queries Possible answers

Whicha-posteriori motivationdid we invent for the problem?

→Schedulingwith constraints! →Verification forconcurrent code!

→Computational biology! →Blockchain! (joke)

But why do weactually care?

→ Naturalproblem and apparentlynothingwas known about it!

(28)

Motivation

How wereally ended upstudying this problem:

2011 2012 2013 2014 2015 2016 2017 2018

Probabilistic XML XML versioning

Order-uncertain databases Top-k Aggregate queries Possible answers

DAGs Algebraic language theory?!

Whicha-posteriori motivationdid we invent for the problem?

→Schedulingwith constraints! →Verification forconcurrent code!

→Computational biology! →Blockchain! (joke)

But why do weactually care?

→ Naturalproblem and apparentlynothingwas known about it!

(29)

Motivation

How wereally ended upstudying this problem:

2011 2012 2013 2014 2015 2016 2017 2018

Probabilistic XML XML versioning

Order-uncertain databases Top-k Aggregate queries Possible answers

DAGs Algebraic language theory?!

Whicha-posteriori motivationdid we invent for the problem?

→Schedulingwith constraints! →Verification forconcurrent code!

→Computational biology! →Blockchain! (joke)

But why do weactually care?

→ Naturalproblem and apparentlynothingwas known about it!

(30)

Motivation

How wereally ended upstudying this problem:

2011 2012 2013 2014 2015 2016 2017 2018

Probabilistic XML XML versioning

Order-uncertain databases Top-k Aggregate queries Possible answers

DAGs Algebraic language theory?!

Whicha-posteriori motivationdid we invent for the problem?

→Schedulingwith constraints! →Verification forconcurrent code!

→Computational biology! →Blockchain! (joke)

But why do weactually care?

→ Naturalproblem and apparentlynothingwas known about it!

(31)

Motivation

How wereally ended upstudying this problem:

2011 2012 2013 2014 2015 2016 2017 2018

Probabilistic XML XML versioning

Order-uncertain databases Top-k Aggregate queries Possible answers

DAGs Algebraic language theory?!

Whicha-posteriori motivationdid we invent for the problem?

→Schedulingwith constraints! →Verification forconcurrent code!

→Computational biology! →Blockchain!

(joke)

But why do weactually care?

→ Naturalproblem and apparentlynothingwas known about it!

(32)

Motivation

How wereally ended upstudying this problem:

2011 2012 2013 2014 2015 2016 2017 2018

Probabilistic XML XML versioning

Order-uncertain databases Top-k Aggregate queries Possible answers

DAGs Algebraic language theory?!

Whicha-posteriori motivationdid we invent for the problem?

→Schedulingwith constraints! →Verification forconcurrent code!

→Computational biology! →Blockchain! (joke)

But why do weactually care?

→ Naturalproblem and apparentlynothingwas known about it!

(33)

Motivation

How wereally ended upstudying this problem:

2011 2012 2013 2014 2015 2016 2017 2018

Probabilistic XML XML versioning

Order-uncertain databases Top-k Aggregate queries Possible answers

DAGs Algebraic language theory?!

Whicha-posteriori motivationdid we invent for the problem?

→Schedulingwith constraints! →Verification forconcurrent code!

→Computational biology! →Blockchain! (joke)

→ Naturalproblem and apparentlynothingwas known about it!

(34)

Motivation

How wereally ended upstudying this problem:

2011 2012 2013 2014 2015 2016 2017 2018

Probabilistic XML XML versioning

Order-uncertain databases Top-k Aggregate queries Possible answers

DAGs Algebraic language theory?!

Whicha-posteriori motivationdid we invent for the problem?

→Schedulingwith constraints! →Verification forconcurrent code!

→Computational biology! →Blockchain! (joke)

(35)

Formal problem statement

Fix aregular languageLon anfinite alphabetΣ

Constrained topological sortproblemCTS(L):

Input:aDAGGwith vertices labeled by letters ofΣ

Output:is there atopological sortofGsuch that the sequence of vertex labels is awordofL

Special case: theconstrained shuffle problemCSh(L):

Input:a set ofwordsw1, . . . ,wnofΣ

Output:is there ashuffleofw1, . . . ,wnwhich is inL

This is likeCTSbut the input DAG is anunion of paths

→ Question:What is thecomplexityofCTS(L)andCSh(L), depending on the fixed languageL?

(36)

Formal problem statement

Fix aregular languageLon anfinite alphabetΣ

Constrained topological sortproblemCTS(L):

Input:aDAGGwith vertices labeled by letters ofΣ

Output:is there atopological sortofGsuch that the sequence of vertex labels is awordofL

a

b a b

b a

Special case: theconstrained shuffle problemCSh(L):

Input:a set ofwordsw1, . . . ,wnofΣ

Output:is there ashuffleofw1, . . . ,wnwhich is inL

This is likeCTSbut the input DAG is anunion of paths

→ Question:What is thecomplexityofCTS(L)andCSh(L), depending on the fixed languageL?

(37)

Formal problem statement

Fix aregular languageLon anfinite alphabetΣ

Constrained topological sortproblemCTS(L):

Input:aDAGGwith vertices labeled by letters ofΣ

Output:is there atopological sortofGsuch that the sequence of vertex labels is awordofL

a

b a b

b a

Special case: theconstrained shuffle problemCSh(L):

Input:a set ofwordsw1, . . . ,wnofΣ

Output:is there ashuffleofw1, . . . ,wnwhich is inL

This is likeCTSbut the input DAG is anunion of paths

→ Question:What is thecomplexityofCTS(L)andCSh(L), depending on the fixed languageL?

(38)

Formal problem statement

Fix aregular languageLon anfinite alphabetΣ

Constrained topological sortproblemCTS(L):

Input:aDAGGwith vertices labeled by letters ofΣ

Output:is there atopological sortofGsuch that the sequence of vertex labels is awordofL

a

b a b

b a

Special case: theconstrained shuffle problemCSh(L):

Input:a set ofwordsw1, . . . ,wnofΣ

Output:is there ashuffleofw1, . . . ,wnwhich is inL

This is likeCTSbut the input DAG is anunion of paths

a a b

b b a

→ Question:What is thecomplexityofCTS(L)andCSh(L), depending on the fixed languageL?

(39)

Formal problem statement

Fix aregular languageLon anfinite alphabetΣ

Constrained topological sortproblemCTS(L):

Input:aDAGGwith vertices labeled by letters ofΣ

Output:is there atopological sortofGsuch that the sequence of vertex labels is awordofL

a

b a b

b a

Special case: theconstrained shuffle problemCSh(L):

Input:a set ofwordsw1, . . . ,wnofΣ

Output:is there ashuffleofw1, . . . ,wnwhich is inL

This is likeCTSbut the input DAG is anunion of paths

a a b

b b a

(40)

Dichotomy

Conjecture

Conjecture

For everyregular language L, exactly one of the following holds:

Lhas [some nice property] andCTS(L)isin NL

Lhas [some nasty property] andCTS(L)isNP-hard

Here’s what we actually know:

CTSandCShareNP-hardfor some languages, including(ab)

They arein NLforsome language families(monomials, groups)

Some languages are tractable forseemingly unrelatedreasons

→ Very mysterious landscape!(to us)

(41)

Dichotomy Conjecture

Conjecture

For everyregular language L, exactly one of the following holds:

Lhas [some nice property] andCTS(L)isin NL

Lhas [some nasty property] andCTS(L)isNP-hard

Here’s what we actually know:

CTSandCShareNP-hardfor some languages, including(ab)

They arein NLforsome language families(monomials, groups)

Some languages are tractable forseemingly unrelatedreasons

→ Very mysterious landscape!(to us)

(42)

Dichotomy Conjecture

Conjecture

For everyregular language L, exactly one of the following holds:

Lhas [some nice property] andCTS(L)isin NL

Lhas [some nasty property] andCTS(L)isNP-hard Here’s what we actually know:

CTSandCShareNP-hardfor some languages, including(ab)

They arein NLforsome language families(monomials, groups)

Some languages are tractable forseemingly unrelatedreasons

→ Very mysterious landscape!(to us)

(43)

Dichotomy Conjecture

Conjecture

For everyregular language L, exactly one of the following holds:

Lhas [some nice property] andCTS(L)isin NL

Lhas [some nasty property] andCTS(L)isNP-hard Here’s what we actually know:

CTSandCShareNP-hardfor some languages, including(ab)

They arein NLforsome language families(monomials, groups)

Some languages are tractable forseemingly unrelatedreasons

→ Very mysterious landscape!(to us)

(44)

Dichotomy Conjecture

Conjecture

For everyregular language L, exactly one of the following holds:

Lhas [some nice property] andCTS(L)isin NL

Lhas [some nasty property] andCTS(L)isNP-hard Here’s what we actually know:

CTSandCShareNP-hardfor some languages, including(ab)

They arein NLforsome language families(monomials, groups)

→ Very mysterious landscape!(to us)

(45)

Dichotomy Conjecture

Conjecture

For everyregular language L, exactly one of the following holds:

Lhas [some nice property] andCTS(L)isin NL

Lhas [some nasty property] andCTS(L)isNP-hard Here’s what we actually know:

CTSandCShareNP-hardfor some languages, including(ab)

They arein NLforsome language families(monomials, groups)

Some languages are tractable forseemingly unrelatedreasons

(46)

Hardness Results

(47)

Existing Hardness Result

... but the target is awordwhich isprovided as input!

→ Does not directly apply for us, because wefixthe target language

(48)

Existing Hardness Result

→ Does not directly apply for us, because wefixthe target language

(49)

Existing Hardness Result

... but the target is awordwhich isprovided as input!

(50)

Hardness for CTS

We can reduce their problem toCShfor thelanguage(aA+bB)

To determine if the shuffle of aab and bbcontains ababb ...

solve theCSh-problem for aab and bband ABABB

→ CSh((aA+bB))isNP-hardand the same holds forCTS

Similar technique:CSh((ab))isNP-hard

Customreduction techniqueto show NP-hardness for:

(ab+b)

(aa+bb)

uifucontains two different letters

Conjecture:ifFis finite thenCTS(F)isNP-hard unless it contains a power of each of its letters

(51)

Hardness for CTS

We can reduce their problem toCShfor thelanguage(aA+bB)

To determine if the shuffle of aab and bbcontains ababb ...

solve theCSh-problem for aab and bband ABABB

→ CSh((aA+bB))isNP-hardand the same holds forCTS

Similar technique:CSh((ab))isNP-hard

Customreduction techniqueto show NP-hardness for:

(ab+b)

(aa+bb)

uifucontains two different letters

Conjecture:ifFis finite thenCTS(F)isNP-hard unless it contains a power of each of its letters

(52)

Hardness for CTS

We can reduce their problem toCShfor thelanguage(aA+bB)

To determine if the shuffle of aab and bbcontains ababb ...

solve theCSh-problem for aab and bband ABABB

→ CSh((aA+bB))isNP-hardand the same holds forCTS

Similar technique:CSh((ab))isNP-hard

Customreduction techniqueto show NP-hardness for:

(ab+b)

(aa+bb)

uifucontains two different letters

Conjecture:ifFis finite thenCTS(F)isNP-hard unless it contains a power of each of its letters

(53)

Hardness for CTS

We can reduce their problem toCShfor thelanguage(aA+bB)

To determine if the shuffle of aab and bbcontains ababb ...

solve theCSh-problem for aab and bband ABABB

→ CSh((aA+bB))isNP-hardand the same holds forCTS

Similar technique:CSh((ab))isNP-hard

Customreduction techniqueto show NP-hardness for:

(ab+b)

(aa+bb)

uifucontains two different letters

Conjecture:ifFis finite thenCTS(F)isNP-hard unless it contains a power of each of its letters

(54)

Hardness for CTS

We can reduce their problem toCShfor thelanguage(aA+bB)

To determine if the shuffle of aab and bbcontains ababb ...

solve theCSh-problem for aab and bband ABABB

→ CSh((aA+bB))isNP-hardand the same holds forCTS

Similar technique:CSh((ab))isNP-hard

Customreduction techniqueto show NP-hardness for:

(ab+b)

(aa+bb)

uifucontains two different letters

Conjecture:ifFis finite thenCTS(F)isNP-hard unless it contains a power of each of its letters

(55)

Hardness for CTS

We can reduce their problem toCShfor thelanguage(aA+bB)

To determine if the shuffle of aab and bbcontains ababb ...

solve theCSh-problem for aab and bband ABABB

→ CSh((aA+bB))isNP-hardand the same holds forCTS

Similar technique:CSh((ab))isNP-hard

Customreduction techniqueto show NP-hardness for:

(ab+b)

(aa+bb)

uifucontains two different letters

(56)

Hardness for CTS

We can reduce their problem toCShfor thelanguage(aA+bB)

To determine if the shuffle of aab and bbcontains ababb ...

solve theCSh-problem for aab and bband ABABB

→ CSh((aA+bB))isNP-hardand the same holds forCTS

Similar technique:CSh((ab))isNP-hard

Customreduction techniqueto show NP-hardness for:

(ab+b)

(aa+bb)

uifucontains two different letters

(57)

Tractability Results

(58)

Tractability for Monomials

Monomial:language of the formA1 a1A2 a2 · · · AnanAn+1 wherea1, . . . ,an∈ΣandA1, . . . ,An+1 ⊆Σ

Union of monomials:union of finitely many such languages

Example:pattern matchingΣword1Σ+ Σword2Σ

Logical interpretation:languages definable inΣ2[<]

Theorem

For any union of monomialsL, the problemCTS(L)isin NL Proof idea:

Tractable languages are clearlyclosed under union

We canguessthe positions of the individualai

Check that the other verticescan fitin theAi (uses NL = co-NL)

(59)

Tractability for Monomials

Monomial:language of the formA1 a1A2 a2 · · · AnanAn+1 wherea1, . . . ,an∈ΣandA1, . . . ,An+1 ⊆Σ

Union of monomials:union of finitely many such languages

Example:pattern matchingΣword1Σ+ Σword2Σ

Logical interpretation:languages definable inΣ2[<]

Theorem

For any union of monomialsL, the problemCTS(L)isin NL Proof idea:

Tractable languages are clearlyclosed under union

We canguessthe positions of the individualai

Check that the other verticescan fitin theAi (uses NL = co-NL)

(60)

Tractability for Monomials

Monomial:language of the formA1 a1A2 a2 · · · AnanAn+1 wherea1, . . . ,an∈ΣandA1, . . . ,An+1 ⊆Σ

Union of monomials:union of finitely many such languages

Example:pattern matchingΣword1Σ+ Σword2Σ

Logical interpretation:languages definable inΣ2[<]

Theorem

For any union of monomialsL, the problemCTS(L)isin NL Proof idea:

Tractable languages are clearlyclosed under union

We canguessthe positions of the individualai

Check that the other verticescan fitin theAi (uses NL = co-NL)

(61)

Tractability for Monomials

Monomial:language of the formA1 a1A2 a2 · · · AnanAn+1 wherea1, . . . ,an∈ΣandA1, . . . ,An+1 ⊆Σ

Union of monomials:union of finitely many such languages

Example:pattern matchingΣword1Σ+ Σword2Σ

Logical interpretation:languages definable inΣ2[<]

Theorem

For any union of monomialsL, the problemCTS(L)isin NL

Proof idea:

Tractable languages are clearlyclosed under union

We canguessthe positions of the individualai

Check that the other verticescan fitin theAi (uses NL = co-NL)

(62)

Tractability for Monomials

Monomial:language of the formA1 a1A2 a2 · · · AnanAn+1 wherea1, . . . ,an∈ΣandA1, . . . ,An+1 ⊆Σ

Union of monomials:union of finitely many such languages

Example:pattern matchingΣword1Σ+ Σword2Σ

Logical interpretation:languages definable inΣ2[<]

Theorem

For any union of monomialsL, the problemCTS(L)isin NL Proof idea:

Tractable languages are clearly

We canguessthe positions of the individualai

Check that the other verticescan fitin theAi (uses NL = co-NL)

(63)

Tractability for Monomials

Monomial:language of the formA1 a1A2 a2 · · · AnanAn+1 wherea1, . . . ,an∈ΣandA1, . . . ,An+1 ⊆Σ

Union of monomials:union of finitely many such languages

Example:pattern matchingΣword1Σ+ Σword2Σ

Logical interpretation:languages definable inΣ2[<]

Theorem

For any union of monomialsL, the problemCTS(L)isin NL Proof idea:

Tractable languages are clearlyclosed under union

Check that the other verticescan fitin theAi (uses NL = co-NL)

(64)

Tractability for Monomials

Monomial:language of the formA1 a1A2 a2 · · · AnanAn+1 wherea1, . . . ,an∈ΣandA1, . . . ,An+1 ⊆Σ

Union of monomials:union of finitely many such languages

Example:pattern matchingΣword1Σ+ Σword2Σ

Logical interpretation:languages definable inΣ2[<]

Theorem

For any union of monomialsL, the problemCTS(L)isin NL Proof idea:

Tractable languages are clearly

(65)

The Algebraic Approach

Fails

Can we just studyalgebraicallythe tractable languages?

Not really...

Not closed underintersection

Not closed undercomplement

Not closed underinverse morphism

Not closed underconcatenation (not in paper, only known forCTS)

ForCSh: not closed underquotient

Remark:For the languageL=+aaΣ+ (ab)

CTS(L)isNP-hardbecause(ab)−1L= (ab)

CSh(L)isin NL: trivial if there is more than one word

(66)

The Algebraic Approach Fails

Can we just studyalgebraicallythe tractable languages?Not really...

Not closed underintersection

Not closed undercomplement

Not closed underinverse morphism

Not closed underconcatenation (not in paper, only known forCTS)

ForCSh: not closed underquotient

Remark:For the languageL=+aaΣ+ (ab)

CTS(L)isNP-hardbecause(ab)−1L= (ab)

CSh(L)isin NL: trivial if there is more than one word

(67)

The Algebraic Approach Fails

Can we just studyalgebraicallythe tractable languages?Not really...

Not closed underintersection

Not closed undercomplement

Not closed underinverse morphism

Not closed underconcatenation (not in paper, only known forCTS)

ForCSh: not closed underquotient

Remark:For the languageL=+aaΣ+ (ab)

CTS(L)isNP-hardbecause(ab)−1L= (ab)

CSh(L)isin NL: trivial if there is more than one word

(68)

The Algebraic Approach Fails

Can we just studyalgebraicallythe tractable languages?Not really...

Not closed underintersection

Not closed undercomplement

Not closed underinverse morphism

Not closed underconcatenation (not in paper, only known forCTS)

ForCSh: not closed underquotient

Remark:For the languageL=+aaΣ+ (ab)

(69)

Tractability Based on Width

CSh(L)isin NLforany regular languageLif we assume that there areat mostkinput wordsw1, . . . ,wkfor a constantk∈N

Needkcountersto remember the current position in each word, plusautomaton state

CTS(L)is inin NLforany regular languageLif the input DAGGhaswidth≤kfor constantk∈N

Width: size of the largestantichain (subset of pairwise incomparable vertices)

PartitionGinkchains(Dilworth’s theorem), and conclude by NL algorithm

a

b a b

b a

→ These results are making anadditional assumption, but...

(70)

Tractability Based on Width

CSh(L)isin NLforany regular languageLif we assume that there areat mostkinput wordsw1, . . . ,wkfor a constantk∈N

Needkcountersto remember the current position in each word, plusautomaton state

CTS(L)is inin NLforany regular languageLif the input DAGGhaswidth≤kfor constantk∈N

Width: size of the largestantichain (subset of pairwise incomparable vertices)

PartitionGinkchains(Dilworth’s theorem), and conclude by NL algorithm

a

b a b

b a

→ These results are making anadditional assumption, but...

(71)

Tractability Based on Width

CSh(L)isin NLforany regular languageLif we assume that there areat mostkinput wordsw1, . . . ,wkfor a constantk∈N

Needkcountersto remember the current position in each word, plusautomaton state

CTS(L)is inin NLforany regular languageLif the input DAGGhaswidth≤kfor constantk∈N

Width: size of the largestantichain (subset of pairwise incomparable vertices)

PartitionGinkchains(Dilworth’s theorem), and conclude by NL algorithm

a

b a b

b a

→ These results are making anadditional assumption, but...

(72)

Tractability Based on Width

CSh(L)isin NLforany regular languageLif we assume that there areat mostkinput wordsw1, . . . ,wkfor a constantk∈N

Needkcountersto remember the current position in each word, plusautomaton state

CTS(L)is inin NLforany regular languageLif the input DAGGhaswidth≤kfor constantk∈N

Width: size of the largestantichain (subset of pairwise incomparable vertices)

PartitionGinkchains(Dilworth’s theorem), and conclude by NL algorithm

a

b a b

b a

→ These results are making anadditional assumption, but...

(73)

Tractability Based on Width

CSh(L)isin NLforany regular languageLif we assume that there areat mostkinput wordsw1, . . . ,wkfor a constantk∈N

Needkcountersto remember the current position in each word, plusautomaton state

CTS(L)is inin NLforany regular languageLif the input DAGGhaswidth≤kfor constantk∈N

Width: size of the largestantichain (subset of pairwise incomparable vertices)

PartitionGinkchains(Dilworth’s theorem), and conclude by NL algorithm

a

b a b

b a

→ These results are making anadditional assumption, but...

(74)

Tractability Based on Width

CSh(L)isin NLforany regular languageLif we assume that there areat mostkinput wordsw1, . . . ,wkfor a constantk∈N

Needkcountersto remember the current position in each word, plusautomaton state

CTS(L)is inin NLforany regular languageLif the input DAGGhaswidth≤kfor constantk∈N

Width: size of the largestantichain (subset of pairwise incomparable vertices)

PartitionGinkchains(Dilworth’s theorem), and conclude by NL algorithm

a

b a b

b a

→ These results are making anadditional assumption, but...

(75)

Tractability Based on Width

CSh(L)isin NLforany regular languageLif we assume that there areat mostkinput wordsw1, . . . ,wkfor a constantk∈N

Needkcountersto remember the current position in each word, plusautomaton state

CTS(L)is inin NLforany regular languageLif the input DAGGhaswidth≤kfor constantk∈N

Width: size of the largestantichain (subset of pairwise incomparable vertices)

PartitionGinkchains(Dilworth’s theorem), and conclude by NL algorithm

a

b a b

b a

→ These results are making anadditional assumption, but...

(76)

Tractability Based on Width

CSh(L)isin NLforany regular languageLif we assume that there areat mostkinput wordsw1, . . . ,wkfor a constantk∈N

Needkcountersto remember the current position in each word, plusautomaton state

CTS(L)is inin NLforany regular languageLif the input DAGGhaswidth≤kfor constantk∈N

Width: size of the largestantichain (subset of pairwise incomparable vertices)

PartitionGinkchains(Dilworth’s theorem),

a

b a b

b a

→ These results are making anadditional assumption, but...

(77)

Tractability Based on Width

CSh(L)isin NLforany regular languageLif we assume that there areat mostkinput wordsw1, . . . ,wkfor a constantk∈N

Needkcountersto remember the current position in each word, plusautomaton state

CTS(L)is inin NLforany regular languageLif the input DAGGhaswidth≤kfor constantk∈N

Width: size of the largestantichain (subset of pairwise incomparable vertices)

PartitionGinkchains(Dilworth’s theorem), and conclude by NL algorithm

a

b a b

b a

Références

Documents relatifs

Updating probabilistic XML documents highlights the following issue in mod- els different from ProTDB and PrXML { fie } : the model may lack the property of being a

 Processes the lineage formula to get the probability of the query (and of each matching

Since the tree merging operations we use for obtaining a probabilis- tic document can be seen as a succession of updates, we focus here on global distributional nodes, and, more

Talel Abdessalem Mouhamadou Lamine BA Pierre Senellart T´ el´ ecom ParisTech Universit´ e Cheikh Anta DIOP T´ el´ ecom ParisTech. Paris, France Dakar, Senegal

(i) We first show how recursive Markov chains can be turned into a representation system for probabilistic XML that allows arbitrarily deep and wide documents, and that most

A hierarchical Markov chain A is tree-like if no two boxes are mapped to the same component.. It follows from the definition that there is

The contributions of this paper are as follows: (i) a general picture of update tractability for various query languages and probabilistic XML models, with complexity results; (ii)

• For every professor, insert a bonus of 5 only if her team is in some EU project!. • For every professor, insert a bonus of X for all EU projects with a duration of