• Aucun résultat trouvé

Dominance Constraints: Algorithms and Complexity

N/A
N/A
Protected

Academic year: 2021

Partager "Dominance Constraints: Algorithms and Complexity"

Copied!
21
0
0

Texte intégral

(1)

HAL Id: inria-00536812

https://hal.inria.fr/inria-00536812

Submitted on 16 Nov 2010

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Dominance Constraints: Algorithms and Complexity

Alexander Koller, Joachim Niehren, Ralf Treinen

To cite this version:

Alexander Koller, Joachim Niehren, Ralf Treinen. Dominance Constraints: Algorithms and Complex- ity. Third International Conference on Logical Aspects of Computational Linguistics 1998 (Postpro- ceedings 2001), 1998, Grenoble, France. pp.106-125. �inria-00536812�

(2)

Algorithms and Complexity

AlexanderKoller 1

, JoahimNiehren 2

,andRalfTreinen 3

1

DepartmentofComputationalLinguistis, UniversitatdesSaarlandes,

Saarbruken,Germany,kolleroli.uni-sb.de

2

ProgrammingSystemsLab,UniversitatdesSaarlandes,Saarbruken,Germany,

niehrenps.uni-sb.de

3

LaboratoiredeReherheenInformatique,UniversiteParis-Sud,Orsay,Frane,

treinenlri.fr

Abstrat. Dominaneonstraints for nite tree struturesare widely

usedinseveral areasof omputational linguistisinluding syntax, se-

mantis, and disourse. In this paper, we investigate algorithmi and

omplexityquestionsfordominaneonstraintsandtheirrst-orderthe-

ory. Themain result ofthis paperis thatthe satisability problem of

dominaneonstraintsis NP-omplete.We present twoNP algorithms

forsolvingdominaneonstraints,whihhavebeenimplementedinthe

onurrentonstraintprogramminglanguageOz.Despitetheintratabil-

ity result,themoresophistiatedofouralgorithmsperformswellinan

appliationtosopeunderspeiation. Wealsoshowthatthe positive

existential fragment of the rst-order theory of dominane onstraints

isNP-omplete andthat the full rst-ordertheoryhasnon-elementary

omplexity.

Keywords.Dominaneonstraints,omplexity,omputationallinguis-

tis,underspeiation,onstraintprogramming.

1 Introdution

Dominaneonstraintsareapopulartoolfordesribingtreesthroughoutom-

putationallinguistis.Theyallowtoexpressbothimmediatedominane(andla-

beling)relationsandgeneral(reexive,transitive)dominane relationsbetween

thenodesofatree.Insyntax,theyprovidefor underspeiedtreedesriptions

employed in deterministiparsing[MHF83℄and to ombine TAGwith unia-

tiongrammars[VS92℄.Inunderspeiationofthesemantisofsopeambigui-

ties,dominaneonstraintsareomnipresent.Whiletheyaresomewhatimpliit

in earlier approahes[Rey93,Bos96℄, theyare used expliitlyin tworeentfor-

malisms[ENRX98,Mus98℄.Anappliationofdominaneonstraintsindisourse

semantis has reently beenproposed in [GW98℄, and they havebeenused to

model informationgrowthandpartiality[MVK98℄.

Despite their popularity, there havebeen no results about the omputational

(3)

satisabilityproblemofdominaneonstraintsisNP-omplete.Thisresultholds

foralllogialfragmentsbetweenthepurelyonjuntivefragmentandthepositive

existentialfragment.Wepresenttwoalgorithms forsolvingthem; oneinvolves

anondeterministiguessingstep,whih makesitonvenientfor aompleteness

proof,butnotforimplementation,whereastheothergivesprioritytodetermin-

istiomputationstepsandenumeratesasesonlybyneed.Finally,weshowthat

the rst-order theoryoverdominane onstraintswith asignature of bounded

arity is deidable and has non-elementary omplexity. The deidability result

is notnew {e.g.[Rog94℄ skethesaproof for adierent variantof dominane

onstraints{, but wework outthe details of atransparentproof by enoding

intoseond-ordermonadilogiforthersttime.

RelatedWork. In[RVS92℄,itwasshownhowtosolveformulaefromtheproposi-

tionallanguageover(adierentvariantof)dominaneonstraints(overadier-

enttypeoftrees).There,tableau-stylesaturationrulesforenumeratingmodels

arepresentedwhiharequitesimilartotheonesweusehere.Thissolutionpro-

edure terminates, but there are noomplexity results.Continuing this line of

work,[BRVS95℄presentasetsofrst-orderaxiomsoverdominaneonstraints

whihaptureertainlassesoftrees.

From an implementation perspetive, dominane onstraints were approahed

rstin[DG99℄,whihpresentsanimplementationbasedonnitesetonstraints.

A moreadvaned versionofthe algorithm presentedhere andan implementa-

tion thereof are given [DN99℄. This implementation is also based on nite set

onstraintprogrammingbutimprovesthatof[DG99℄.

Planofthepaper. InSetion2,westartoutbydeningthesyntaxandsemantis

of dominane onstraints.In Setion 3, we present thesolution algorithms for

dominane onstraints and prove their soundness, ompleteness, and NP run-

times. The algorithms are rst dened for the (purely onjuntive) language

of dominane onstraints and extended to the other propositional onnetives

later. In Setion 4, we omplement this result by proving NP-hardness of the

problem. Infat,wewill notreally providethe details oftheproof,but givea

thoroughexplanationoftheproofidea.InSetion5,weturntothedeidability

and omplexity ofthe rst-order theoryoverdominaneonstraints.Setion 6

summarizesandonludes thepaper.Someoftheproofsareonlyskethed;for

moredetails,wereferthereaderto[Kol99℄.

2 Syntax and Semantis of Dominane Constraints

In this setion, we dene the syntax and semantisof dominaneonstraints.

Tothis end, we rstintrodue thenotionof atree struture,the kindof rst-

order struturewewill interpretdominaneonstraintsover.After that,it will

bestraightforwardto dene the atual syntaxand semantis.Finally, we look

(4)

Throughout, wetakeINto betheset of positiveintegersandIN

0

to bethe set

of nonnegativeintegersandassumethat is arankedsignaturethat ontains

funtion symbols ortreeonstrutors f;g;a;b;:::,whihareassignedaritiesby

anarityfuntionar:!IN

0

.Wefurtherassumethat ontainsat leasttwo

onstrutors,oneofwhihisnullary,andtheotheroneofarityatleast2.

Intuitively, we want trees to be essentially the same asground terms over.

Formally,werstdeneatreedomain D tobeanonemptyprex-losedsubset

of IN

; i.e., the elementsof D are words of positive integers.These wordsan

be thought of asthe paths from the root of a tree to its nodes. We write the

onatenationoftwowords and 0

asjuxtaposition 0

.

Wedeneaonstrutortree tobeapair(D

;L

)ofatreedomain D

anda

labeling funtion

L

:D

!;

with the additional property that for every 2 D

, k 2 D

i 1 k

ar(L

()).Anite onstrutortree isaonstrutortreewhosedomainisnite.

Throughout,wewill simplysay\tree"tomean\niteonstrutortree".

Thetreestruture M

overthetree isarst-ordermodel struturewiththe

universe D

and whose interpretation funtion assigns relations overD

to a

set of xedprediate symbols. Wewill usethe samesymbolsfor theprediate

symbolsandtheirinterpretations;asthelatterareappliedtopathsandthefor-

merareappliedtovariables,thereisnodangerofonfusion.Theinterpretation

funtionisfullydeterminedby;sotospeifyatreestruture,itissuÆientto

speifytheunderlying tree.

In detail, the interpretation is as follows. If f 2 has arity n, the labeling

relation :f(

1

;:::;

n

) is true in M

i L

() = f and for all 1 i n,

i

=i.Thedominane relation

0

istruei isaprexof 0

.

2.2 Syntax and Semantis ofDominane Constraints

Withthesedenitions,itisstraightforwardtodenethesyntaxandsemantisof

dominaneonstraints.Assumingasetof(node)variablesX;Y;:::,adominane

onstraint 'hasthefollowingabstratsyntax:

'::=X:f(X

1

;:::;X

n

) f 2, n=ar(f)

j X

Y

j '^' 0

:

WeusetheformulaX =Y asanabbreviationforX

Y ^Y

X.

Wewill start byonsideringonly this(purely onjuntive) onstraint language

andsuessivelyallowmorelogialonnetives,untilwehavearrivedatthefull

rst-orderlanguagein Setion5.

Satisfation of an atomi onstraint is dened with respet to a pair (M

;)

of a tree struture M

and avariable assignment : Var! D that assigns

(5)

theusualTarskianway.

Beause dominaneonstraintsaneasily beomeunreadable,wewill useon-

straintgraphs asagraphial devie torepresentthem. Theyare essentiallyan

alternativetotheoriginalsyntaxofthelanguage.Constraintgraphsaredireted

graphs with two kinds of edges: solid and dotted. The nodes of a onstraint

graphrepresentvariablesin aonstraint.Labelingonstraintsareexpressedby

attahing theonstrutor tothe nodeand drawingsolidedges tothe hildren;

dominaneonstraintsareexpressedbydrawingadotted edgebetweenthere-

spetivenodes.Asanexample,thegraphbelowistheonstraintgraphforthe

onstraintto itsright.

g X

1

X

2

f X

3

a X

4

X

5 X

1 :g(X

2 )^X

2

X

3

^

X

3 :f(X

4

;X

5 )^X

4 :a.

3 Solving Dominane Constraints

Nowweshowthat the satisability problems of all languagesoverdominane

onstraintsbetweenthe(purelyonjuntive) onstraintlanguageitself andthe

positiveexistentialfragmentareinNP.Werstdeneanalgorithmthatdeides

satisabilityfortheonstraintlanguageandprovetherunningtime,soundness,

andompleteness.Thenwepresentanalgorithmthat doesthesamething,but

lendsitself moreeasilytoimplementation.Finally,weextendtheresultstothe

otherpropositionalonnetives.

It turnsoutthat it'satuallyeasiertodenesatisabilityalgorithms fordomi-

naneonstraintsifweadditionallyallowatomionstraintsoftheform:X

Y.

Hene, we are going to work with this extended language of dominane on-

straintsinSetions 3.1to3.3.

3.1 The Algorithm

Therstalgorithmproeedsin threesteps.First,weguessnondeterministially

for eah pair X;Y of variables in ' if X dominates Y or not, and add the

orrespondingatomi onstraintto'.This isdonebythe(Choie)rule, where

or standsfornondeterministihoie.

(Choie) true ! X

Y or:X

Y

Intheseondstep,wesaturate'aordingtothefollowingdeterministiprop-

(6)

(Re) true ! X X (X ours in')

(Trans) X

Y ^Y

Z ! X

Z

(Deomp) X=Y ^X:f(X

1

;:::;X

n

)^Y: f(Y

1

;:::;Y

n ) !

V

n

i=1 X

i

=Y

i

(Disj) X:f(:::;X

i

;:::;X

k

;:::) ! :X

i

X

k

(1i6=kn)

(Dom) X:f(:::;Y;:::) ! X

Y

(Parent) X=Y ^X 0

:f(:::;X;:::)^Y 0

:g(:::;Y;:::) ! X 0

=Y 0

(Child) X

Y ^X:f(X

1

;:::;X

n )^

V

n

i=1 (:X

i

Y) ! Y

X

IntheParentrule,f andg neednotbedierent.

Inthe third step,wedetetunsatisable onstraintsby applyingthe following

lash rules.

(Clash1) X:f(:::)^Y:g(:::)^X=Y ! false; iff 6=g

(Clash2) X

Z^Y

Z^:X

Y ^:Y

X ! false

(Clash3) X

Y ^:X

Y ! false

(Clash4) X:f(X

1

;:::;X

i

;:::;X

n )^X

i

X ! false

Aftertheinitialguessingstep,thealgorithmappliesallinstanesofallpropaga-

tionandlashrules.Weallaonstrainttowhihnolashruleanbeapplied

lash-free, the result of applying all possible rules to a onstraint for as long

as the onstraintis lash-free its saturation, and aonstraintwhih is its own

saturationsaturated.Thealgorithmoutputsthatitsinputissatisableifitan

nd alash-freesaturation(that is, anapplythe guessingstepin suh away

thatsubsequentpropagationandlashruleswon'tproduefalse);otherwise,it

outputsthattheinputisunsatisable.

An exampleforappliationoftheserulesisto provetheunsatisabilityof

X:a^X

Y ^:Y

X;

where aisanullarysymbol.Appliationofthe(Child) ruleaddsthenew on-

straint Y

X. But this makes the (Clash3) rule appliable, so the algorithm

ndsalash.Areallytrikyexampleistoprovetheunsatisabilityof

Y:f(Z)^X:g(U)^U

Z^:X

Y:

The(Dom) and(Trans)rules willgiveusY

Z, X

U,and X

Z. Nowfor

thesaturationtobelash-free,(Choie)musthaveguessedY

X;forifithad

hosen :Y

X, we would get alash with(Clash2). Similarly, (Choie) must

haveguessed:Z

X,forifithadhosenZ

X,weouldderiveU

X,whih

produesalashwith(Clash4).Butin thisase,weanderiveX

Y withthe

(Child) rule,whihausesalashwith(Clash3).

It'seasytoseethatthealgorithmterminatesinNPtime.Aswehaveguessedthe

dominanerelationsbetweenallvariablesin therststep, theseondstepan

neveronsistentlyaddanewonstraint;eithertheonstraintisalreadyknown,

oritlashes,bytheClash3rule.Sowewillonlyspenddeterministipolynomial

time withthe appliationof propagation andlashrules. Notethat onemajor

hange oftheseond algorithmbelowwill beto allowthepropagationrules to

(7)

free saturation.

Proof. Assume thattheonstraint'issatisable. Clearly,theguessingstepof

thealgorithmanaddahoieof(possiblynegated)dominaneonstraintssuh

that theironjuntion ' 0

with 'is satisableaswell;weonlyhaveto read o

whetherthedenotationsoftwovariablesdominateeahotherinaxedsolution

of'.Nowallpropagationrulesmaintainsatisability,andthepreonditions of

alllashrulesareunsatisable.Hene,' 0

is saturatedandlash-free. ut

3.2 Completeness

Asusual,provingompletenessisslightlymoreinvolvedthanprovingsoundness.

Here,weproeed in twosteps: First weshowthat aspeial lass ofsaturated,

lash-free onstraintsis satisable; then we show that every saturated, lash-

free onstraint an be extended by some additional onjunts to a saturated,

lash-freeonstraintoftherestritedlass.Together,thisshowsompleteness:

Proposition2 (Completeness).Asaturatedandlash-freeonstraintissat-

isable.

Inidentally, the proof also showshowto obtain amodel for alash-free on-

straint. Butrst, someterminology. WeallV V(') anequality setfor 'if

Y

1

Y

2

in'forallY

1

;Y

2

2V.Allvariablesinanequalitysetmustbemapped

to thesamenode in asolutionof'. AvariableX is labeledin ' ifthere isan

X 0

suh that fX;X 0

g is an equality set for ' and X 0

:f(X 0

1

;:::;X 0

n

)in' for

sometermf(X 0

1

;:::;X 0

n

). Weallaonstraint'simple ifallitsvariables are

labeled, and if there is aso-alled root variable Y for ' suh that Y

Z in'

forallZ2V(').

Lemma1 (SatisabilityofSimpleConstraints). Asimple,saturated,and

lash-freeonstraintissatisable.

Proof. It is not diÆult to show that for any Z 2 V('), there is a unique

sequene ofmaximal equality sets E

1

;:::;E

n

that onnet theroot of' to Z

vialabelingonstraints.Fromthis, weanreadothesatisfyingtreestruture

andvariableassignmentin astraightforwardway. ut

It remainstoshowthat weanrestritourattentiontosimpleonstraints.An

extension of aonstraint 'is aonstraint ofthe form'^' 0

forsome' 0

. We

willshowhowtoextendasaturated,lash-freeonstrainttoasimple,saturated,

andlashfreeonstraint.

Wedenetheseton

'

(X)ofvariablesonnetedtoX in'asfollows:

on

' (X)=

Y X

Y in';Y

X notin'; notexistsZ s.t.

X

Z ;Z

Y in';Z

X;Y

Z notin'

(8)

Note that for this algorithm, X Y notin' is the same as :X Y in'; it

does, however,makeadierene forthe seondalgorithm below.Intuitively,a

variable is onneted to X if it is a \minimal dominane hild" of X. So for

example,in

'

1 :=X

X ^X

Y ^:Y

X^X

Z^:Z

X ^Y

Z^:Z

Y;

on

'

1

(X)=fYgand on

'

1

(Y)=fZg.

We all V V(') a disjointness set for ' if for any two distint variables

Y

1

;Y

2 2V,Y

1

Y

2

not in'.Theideaisthat allvariablesin adisjointnessset

ansafelybeplaedatdisjointpositionsofatree.

Lemma2. If ' issaturatedand X 2V(') then for all Y

1

;Y

2 2on

'

(X), the

setfY

1

;Y

2

giseither anequality ordisjointnessset for '.

Foraonstraint'andavariableX of',Lemma2impliestheexisteneofmax-

imaldisjointnesssetsV on

'

(X)for'.Suhasetisonstrutedbyhoosing

onerepresentativefromeverymaximalequalityset ontainedin on

' (X).

Nowweanstateandprovethekeylemmaoftheompletenessproof.

Lemma3 (Extensionby Labeling). Let'beaonstraintandX avariable

that is unlabeled in '. Let fX

1

;:::;X

n

g on

'

(X) be a disjointness set for

'that is maximalamong alldisjointness sets thatare subsets ofon

'

(X), and

let f be a funtion symbol of arity n. If ' is saturated and lash-free, then

'^X:f(X

1

;:::;X

n

)isalso saturatedandlash-free.

Proof. Let' 0

='^X:f(X

1

;:::;X

n

).Sine wehavenotintroduednewvari-

ablesordominanerelations, ' 0

inherits saturationwithrespet to thenonde-

terministiguessingrule,(Re),and(Trans)andlash-freenesswithrespet to

(Clash2)and(Clash3)from ' 0

.Therule(Deomp) isnotappliableto' 0

;oth-

erwise, X would havebeenlabeledin '.By thesame argument, the(Clash1)

ruleisnotappliableto' 0

.Theonlynewwaytoapplythe(Dom)ruleistothe

new labelingonstraint; but the dominanes (Dom) an derive are already in

'.The(Clash4)ruleis notappliable,either:NoX

i

X anbein' 0

beause

X

i 2on

'

(X).Theargumentsfortheremainingrulesaremoreinteresting:

(Disj) Theonlynewwayin whihthe(Disj) mightapplyisasfollows:

X:f(X

1

;:::;X

n

)!:X

i

X

j

(i6=j)

By assumption, fX

1

;:::;X

n

g is a disjointness set for '. Hene

:X

i

X

j

in',i.e.' 0

issaturatedunder(Disj).

(Child) The only possible ase in whih the (Child) rule might newly apply

looksasfollows:

X

Y ^X:f(X

1

;::: ;X

n )^

n

^

(:X

i

Y)!Y

X

Références

Documents relatifs

In this article we extend the model in di ff erent directions to render it more realistic : First, we consider time-varying cost parameters, including start-up costs but also non

In a simplified model without communication cost, we have exhibited polynomial time algorithms for latency and period optimization problems on homo- geneous platforms, and we

a solver for dominane onstraints with set operators, whih is based on.. propagation and distribution rules, and prove its soundness

Satisfiability of normal domi- nance constraints is O((k+1) 3 n 2 log n), where n is the number of variables in the constraint, and k is the maximum number of dominance edges into

Unit´e de recherche INRIA Rennes, Irisa, Campus universitaire de Beaulieu, 35042 RENNES Cedex Unit´e de recherche INRIA Rh ˆone-Alpes, 46 avenue F´elix Viallet, 38031 GRENOBLE Cedex

For instance the constraint G CC , which channels the number of occurrences of values in a set of variables X to another set of variables Y is NP-complete for discrete domains

We notice that the Branch-and-Cut-and-Price algorithm of the isolating-separator formulation could not solve one DIMACS instance of 500 nodes while it solved all random instances.

The behavior of supercritical models is dominated by the study of finite infected sets with infinite closure (a single infected site in the East model), while subcritical ones are