Discovering Archipelagos of Tractability for Constraint Satisfaction and Counting ∗ RobertGanian M.S.Ramanujan StefanSzeider ViennaUniversityofTechnology UniversityofBergen ViennaUniversityofTechnology Vienna,Austria Bergen,Norway Vienna,Austria [email protected] [email protected] [email protected] 5 1 0 2 l u Abstract J TheConstraintSatisfactionProblem(CSP)isacentralandgenericcomputationalproblemwhich 0 providesacommonframeworkformanytheoreticalandpracticalapplications.Acentrallineofresearchis 2 concernedwiththeidentificationofclassesofinstancesforwhichCSPcanbesolvedinpolynomialtime; ] suchclassesareoftencalled“islandsoftractability.” Aprominentwayofdefiningislandsoftractability S for CSP is to restrict the relations that may occur in the constraints to a fixed set, called a constraint D language, whereas a constraint language is conservative if it contains all unary relations. Schaefer’s . s famous Dichotomy Theorem (STOC 1978) identifies all islands of tractability in terms of tractable c constraintlanguagesoveraBooleandomainofvalues. Sincethenmanyextensionsandgeneralizationsof [ thisresulthavebeenobtained.Recently,Bulatov(TOCL2011,JACM2013)gaveafullcharacterizationof 2 allislandsoftractabilityforCSPandthecountingversion#CSPthataredefinedintermsofconservative v constraintlanguages. 9 ThispaperaddressesthegenerallimitofthementionedtractabilityresultsforCSPand#CSP,that 7 4 theyonlyapplytoinstanceswhereallconstraintsbelongtoasingletractablelanguage(ingeneral,the 2 unionoftwotractablelanguagesisn’ttractable). Weshowthatwecanovercomethislimitationaslongas 0 wekeepsomecontrolofhowconstraintsoverthevariousconsideredtractablelanguagesinteractwith . 7 eachother. ForthispurposeweutilizethenotionofastrongbackdoorofaCSPinstance,asintroduced 0 byWilliamsetal.(IJCAI2003),whichisasetofvariablesthatwheninstantiatedmovestheinstanceto 5 anislandoftractability,i.e.,toatractableclassofinstances. Weconsiderstrongbackdoorsintoscattered 1 classes,consistingofCSPinstanceswhereeachconnectedcomponentbelongsentirelytosomeclass : v from a list of tractable classes. Figuratively speaking, a scattered class constitutes an archipelago of Xi tractability. Themaindifficultyliesinfindingastrongbackdoorofgivensizek;onceitisfound,we cantryallpossibleinstantiationsofthebackdoorvariablesandapplythepolynomialtimealgorithms r a associatedwiththeislandsoftractabilityonthelistcomponentwise. Ourmainresultisanalgorithm that,givenaCSPinstancewithnvariables,findsintimef(k)nO(1)astrongbackdoorintoascattered class(associatedwithalistoffiniteconservativeconstraintlanguages)ofsizekorcorrectlydecidesthat thereisn’tsuchabackdoor. Thisalsogivestherunningtimeforsolving(#)CSP,providedthat(#)CSPis polynomial-timetractablefortheconsideredconstraintlanguages. Ourresultmakessignificantprogress towards the main goal of the backdoor-based approach to CSPs – the identification of maximal base classesforwhichsmallbackdoorscanbedetectedefficiently. ∗ResearchsupportedbytheAustrianScienceFunds(FWF),projectP26696X-TRACT. 1 Introduction TheConstraintSatisfactionProblem(CSP)isacentralandgenericcomputationalproblemwhichprovidesa common framework for many theoretical andpractical applications [24]. An instanceof CSP consists of acollectionofvariablesthatmustbeassignedvaluessubjecttoconstraints,whereeachconstraintisgiven intermsofarelationwhosetuplesspecifytheallowedcombinationsofvaluesforspecifiedvariables. The problemwasoriginallyformulatedbyMontanari[32],andhasbeenfoundequivalenttothehomomorphism problemforrelationalstructures[18]andtheproblemofevaluatingconjunctivequeriesondatabases[27]. In general CSP is NP-complete. A central line of research is concerned with the identification of classes of instances for which CSP can be solved in polynomial time. Such classes are often called “islands of tractability”[27,28]. A prominent way of defining islands of tractability for CSP is to restrict the relations that may occur in the constraints to a fixed set Γ, called a constraint language. A finite constraint language is tractable if CSP restricted to instances using only relations from Γ, denoted CSP(Γ), can be solved in polynomial time. Schaefer’sfamousDichotomyTheorem[38]identifiesallislandsoftractabilityintermsoftractable constraint languages over the two-element domain. Since then, many extensions and generalizations of thisresulthavebeenobtained[26,12,29,39]. TheDichotomyConjectureofFederandVardi[17]claims that for every finite constraint language Γ, CSP(Γ) is either NP-complete or solvable in polynomial time. Schaefer’sDichotomyTheoremshowsthattheconjectureholdsfortwo-elementdomains;morerecently, Bulatov [3] showed the conjecture to be true for three-element domains. Several papers are devoted to identifyingconstraintlanguagesΓforwhichcountingCSP,denoted#CSP(Γ),canbesolvedinpolynomial time[5,13,6],i.e.,wherethenumberofsatisfyingassignmentscanbecomputedinpolynomialtime. Such languagesΓarecalled#-tractable. Aconstraintlanguageover isconservativeifitcontainsallpossibleunaryconstraintsover ,anditis D D semi-conservativeifitcontainsallpossibleunaryconstantconstraints(i.e.,constraintsthatfixavariabletoa specificdomainelement). Thesepropertiesofconstraintlanguagesareverynatural,asonewouldexpect inpracticalsettingsthattheunaryrelationsarepresent. Indeed,someauthors(e.g.,[10])evendefineCSP sothateveryvariablecanhaveitsownsetofdomainvalues,makingconservativenessabuilt-inproperty. Recently,Bulatov[4]gaveafullcharacterizationofalltractableconservativeconstraintlanguagesoverfinite domains. Furthermore,Bulatov[5]gaveafullcharacterizationofall#-tractableconstraintlanguagesover finitedomains. Thus,Bulatov’sresultsidentifyallislandsof(#-)tractabilityoverfinitedomainswhichcanbe definedintermsofaconservativeconstraintlanguage. A general limit of tractability results for CSP and #CSP based on constraint languages, such as the mentionedresultsofSchaeferandBulatov,isthattheyonlyapplytoinstanceswhereallconstraintsbelongto asingletractablelanguage. Onecannotarbitrarilycombineconstraintsfromtwoormoretractablelanguages, as in general, the union of two tractable languages isn’t tractable (see Section 2). In this paper we show thatwecanovercomethislimitationaslongasconstraintsoverthevariousconsideredtractablelanguages interactwitheachotherinacontrolledmanner. Forthispurposeweutilizethenotionofastrongbackdoor ofaCSPinstance,asintroducedbyWilliamsetal.[40]. AsetB ofvariablesofaCSPinstanceisastrong backdoorintoatractableclass ifforallinstantiationsofthevariablesinB,thereducedinstancebelongs H to . Inthispaper,weconsiderstrongbackdoorsintoascatteredclass,denoted ,consisting 1 d H H ⊕···⊕H ofallCSPinstancesIsuchthateachconnectedcomponentofIbelongsentirelytosomeclassfromalistof tractableclasses ,..., . Figurativelyspeaking, ... constitutesanarchipelagooftractability, 1 d 1 d H H H ⊕ ⊕H consistingoftheislands ,..., . 1 d H H 2 Ourmainresultisthefollowing: Theorem1. LetΓ ,...,Γ besemi-conservativefiniteconstraintlanguagesoverdomain ,andlet ∗ be 1 d D D thelanguagecontainingallrelationsover . IfΓ ,...,Γ aretractable(or#-tractable),thenCSP( ∗)(or 1 d D D #CSP( ∗),respectively)canbesolvedintime22O(k) nO(1) forinstanceswithnvariablesthathaveastrong D · backdoorofsizek intoCSP(Γ ) ... CSP(Γ ). 1 d ⊕ ⊕ NotethattherearenaturalCSPinstanceswhichhaveasmallstrongbackdoorintothescatteredclass CSP(Γ ) ... CSP(Γ )butrequirestrongbackdoorsofarbitrarilylargesizeintoeachindividualbase 1 d ⊕ ⊕ classCSP(Γ ). Thepowerofastrongbackdoorintoascatteredclassoveroneintoasingleclassstemsfrom i thefactthattheinstantiationofvariablesinthebackdoorcanservetwopurposes. Thefirstistoseparate constraintsintocomponents,eachbelongingentirelytosomeCSP(Γ )(possiblyevendifferentCSP(Γ )’s i i fordifferentinstantiations),andthesecondistomodifyconstraintssothatoncemodified,thecomponent containingtheseconstraintsbelongstosomeCSP(Γ ). i Whenusingthebackdoor-basedapproach,themaincomputationaldifficultyisindetectingsmallbackdoor setsintothechosenbaseclass. Thistaskbecomessignificantlyharderwhenthebaseclassesaremademore general. However,weshowthatwhilescatteredclassesaresignificantlymoregeneralthansinglebaseclasses, wecanstilldetectstrongbackdoorsintosuchclassesinFPTtime. Theformalstatementofthisresult,which representsourmaintechnicalcontribution,isthefollowing. Lemma1. Thereisanalgorithmthat,givenaCSPinstanceIandaparameterk,runsintime22O(k) nO(1) · andeitherfindsastrongbackdoorofsizeatmostk inIintoCSP(Γ∗) ... CSP(Γ∗)orcorrectlydecides 1 ⊕ ⊕ d thatnoneexists. Here Γ∗ Γ is obtained from Γ by taking the closure under partial assignments and by adding a i ⊇ i i redundantrelation. Weremarkthatthefinitaryrestrictionontheconstraintlanguagesisunavoidable,sinceotherwisethe arityoftherelationsorthedomainsizewouldbeunbounded. However,forunboundedarity,smallbackdoors cannot be found efficiently as Lemma 1 would not hold already for the special case of d = 1 unless FPT = W[2][20]. Similarly,withunboundeddomain,asmallstrongbackdoorcannotbeusedefficiently. Forinstance,thenaturalencodingoftheW[1]-hardk-cliqueproblemtoCSP[34]onlyhask variables,and thereforehasasize-k strongbackdoortoanybaseclassthatcontainsthetrivialconstrainswithemptyscopes, whichisthecaseforanynaturalbaseclass;anFPTalgorithmsolvingsuchinstanceswouldonceagainimply FPT = W[1]. ThefollowingisabriefsummaryofthealgorithmofLemma1. Wewillgiveamoredetailedsummaryin Section3. 1. Webeginbyusingthetechniqueofiterativecompression[37]totransformtheproblemintoastructured subproblemwhichwecallEXTENDED SBD(CSP(Γ1) CSP(Γd)) COMPRESSION(EXT-SBD ⊕···⊕ COMP). In this technique, the idea is to start with a sub-instance and a trivial solution for this sub- instance and iteratively expand the sub-instances while compressing the solutions till we solve the problemontheoriginalinstance. Specifically,inEXT-SBD COMPwearegivenadditionalinformation aboutthedesiredsolutionintheinput: wereceivean“old”strongbackdoorwhichisslightlybigger than our target size, along with information about how this old backdoor interacts with our target solution. ThisisformalizedinSubsection3.1. 2. In Subsection 3.2, we consider only solutions for EXT-SBD COMP instances which have a certain ‘inseparabilityproperty’andgiveanFPTalgorithmtotestforthepresenceofsuchsolutions. Tobe 3 moreprecise,hereweonlylookforsolutionsofEXT-SBD COMPwhichleavetheomittedpartofthe oldstrongbackdoorinasingleconnectedcomponent. Wehandlethiscaseseparatelyatthebeginning sinceitservesasabasecaseinouralgorithmtosolvegeneralinstances. Interestingly,eventhisbase caserequirestheextensionofstateoftheartseparatortechniquestoaCSPsetting. 3. Finally,inSubsection3.3weshowhowtohandlegeneralinstancesof EXT-SBD COMP. Thispartof thealgorithmreliesonanewpatternreplacementtechnique,whichsharescertainsuperficialsimilarities withprotrusionreplacement[2]butallowsthepreservationofamuchlargersetofstructuralproperties (such as containment of disconnected forbidden structures and connectivity across the boundary). Weinterleaveourpatternreplacementprocedurewiththerecentlydevelopedapproachof‘important separatorsequences’[30]aswellasthealgorithmdesignedintheprevioussubsectionfor‘inseparable’ instancesinordertosolvetheproblemongeneralinstances. Beforeweconcludethesummary,we would like to point out an interesting feature of our algorithm. At its very core, it is a branching algorithm;inFPTtimeweidentifyaboundedsetofvariableswhichintersectssomesolutionandthen branchonthisset. NotethatthisapproachdoesnotalwaysresultinanFPT-algorithmforcomputing strongbackdoorsets. Infact,dependingonthebaseclassitmightonlyimplyanFPT-approximation algorithm (see [22]). This is because we need to explore all possible assignments for the chosen variable. However,wedevelopanotionofforbiddensetsofconstraintswhichallowsustosuccinctly describe when a particular set is not already a solution. Therefore, when we branch on a supposed strongbackdoorvariable,wesimplyaddittoapartialsolutionwhichwemaintainandthenwecan at any point easily check whether the partial solution is already a solution or not. This is a crucial componentofourFPTalgorithm. Related Work Williams et al. [40, 41] introduced the notion of backdoors for the runtime analysis of algorithmsforCSPandSAT,seealso[25]foramorerecentdiscussionofbackdoorsforSAT.Abackdooris asmallsetofvariableswhoseinstantiationputstheinstanceintoafixedtractableclass. Onedistinguishes betweenstrongandweakbackdoors,wherefortheformerallinstantiationsleadtoaninstanceinthebaseclass, andforthelatteratleastoneleadstoasatisfiableinstanceinthebaseclass. Backdoorshavebeenstudiedunder adifferentnamebyCramaetal.[11]. Thestudyoftheparameterizedcomplexityoffindingsmallbackdoors wasinitiatedbyNishimuraetal.[33]forSAT,whoconsideredbackdoorsintotheclassesofHornandKrom CNFformulas. FurtherresultscovertheclassesofrenamableHornformulas[36],q-Hornformulas[21]and classes of formulas of bounded treewidth [22, 35]. The detection of backdoors for CSP has been studied forinstancein[1,7]. Gaspersetal.[20]recentlyobtainedresultsonthedetectionofstrongbackdoorsinto heterogeneousbaseclassesoftheformCSP(Γ ) CSP(Γ )whereforeachinstantiationofthebackdoor 1 d ∪···∪ variables,thereducedinstancebelongsentirelytosomeCSP(Γ )(possiblytodifferentCSP(Γ )’sfordifferent i i instantiations). OursettingismoregeneralsinceCSP(Γ ) CSP(Γ ) CSP(Γ ) CSP(Γ ), 1 d 1 d ⊕···⊕ ⊇ ∪···∪ andthesizeofasmalleststrongbackdoorintoCSP(Γ ) CSP(Γ )canbearbitrarilylargerthanthe 1 d ∪···∪ sizeofasmalleststrongbackdoorintoCSP(Γ ) CSP(Γ ). 1 d ⊕···⊕ 2 Preliminaries 2.1 ConstraintSatisfaction Let be an infinite set of variables and a finite set of values. A constraint of arity ρ over is a pair V D D (S,R)whereS = (x ,...,x )isasequenceofvariablesfrom andR ρ isaρ-aryrelation. Theset 1 ρ V ⊆ D var(C) = x ,...,x iscalledthescopeofC. Avalueassignment(orassignment,forshort)α : X 1 ρ { } → D 4 is a mapping defined on a set X of variables. An assignment α : X satisfies a constraint ⊆ V → D C = ((x ,...,x ),R) if var(C) X and (α(x ),...,α(x )) R. For a set I of constraints we write 1 ρ 1 ρ (cid:83) ⊆ ∈ var(I) = var(C)andrel(I) = R : (S,R) C,C I . C∈I { ∈ ∈ } AfinitesetIofconstraintsissatisfiableifthereexistsanassignmentthatsimultaneouslysatisfiesallthe constraintsinI. TheConstraintSatisfactionProblem(CSP,forshort)asks,givenafinitesetIofconstraints, whetherIissatisfiable. TheCountingConstraintSatisfactionProblem(#CSP,forshort)asks,givenafinite setIofconstraints,todeterminethenumberofassignmentstovar(I)thatsatisfyI. CSPisNP-completeand #CSPis#P-complete(see,e.g.,[5]). Letα : X beanassignment. Foraρ-aryconstraintC = (S,R)withS = (x ,...,x )wedenote 1 ρ → D byC theconstraint(S(cid:48),R(cid:48))obtainedfromC asfollows. R(cid:48) isobtainedfromRby(i)deletingalltuples α | (d ,...,d )fromRforwhichthereissome1 i ρsuchthatx X andα(x ) = d ,and(ii)removing 1 ρ i i i ≤ ≤ ∈ (cid:54) fromallremainingtuplesallcoordinatesd withx X. S(cid:48) isobtainedfromS bydeletingallvariablesx i i i ∈ withx X. ForasetIofconstraintswedefineI as C : C I . i α α ∈ | { | ∈ } Aconstraintlanguage(orlanguage,forshort)Γoverafinitedomain isasetΓofrelations(ofpossibly D variousarities)over . ByCSP(Γ)wedenoteCSPrestrictedtoinstancesIwithrel(I) Γ. Aconstraint D ⊆ languageΓistractableifforeveryfinitesubsetΓ(cid:48) Γ,theproblemCSP(Γ(cid:48))canbesolvedinpolynomial ⊆ time. AconstraintlanguageΓis#-tractableifforeveryfinitesubsetΓ(cid:48) Γ,theproblem#CSP(Γ(cid:48))canbe ⊆ solvedinpolynomialtime. Inhisseminalpaper[38],SchaefershowedthatforallconstraintlanguagesΓovertheBooleandomain 0,1 , CSP(Γ) is either NP-complete or solvable in polynomial time. In fact, he showed that a Boolean { } constraintlanguageΓistractableifandonlyatleastoneofthefollowingpropertiesholdsforeachrelation R Γ: (i)(0,...,0) R,(ii)(1,...,1) R,(iii)Risequivalenttoaconjunctionofbinaryclauses,(iv)R ∈ ∈ ∈ is equivalent to a conjunction of Horn clauses, (v) R is equivalent to a conjunction of dual-Horn clauses, and (vi) R is equivalent to a conjunction of affine formulas; Γ is then called 1-valid, 0-valid, bijunctive, Horn, dual-Horn, or affine, respectively. A Boolean language that satisfies any of these six properties is calledaSchaeferlanguage. AconstraintlanguageΓoverdomain isconservativeifΓcontainsallunary D relations over . Except for the somewhat trivial 0-valid and 1-valid languages, all Schaefer languages D are conservative. Γ is semi-conservative if it contains all unary relations over that are singletons (i.e., D constraintsthatfixthevalueofavariabletosomeelementof ). D AconstraintlanguageΓisclosedunderassignmentsifforeveryC = (S,R)suchthatR Γandevery ∈ assignmentα,itholdsthatR(cid:48) ΓwhereC = (S(cid:48),R(cid:48)). ForaconstraintlanguageΓoveradomain we α ∈ | D denotebyΓ∗thesmallestconstraintlanguageover thatcontainsΓ 2 andisclosedunderassignments; D ∪{D } noticethatΓ∗isuniquelydeterminedbyΓ. Evidently,ifalanguageΓistractable(or#-tractable,respectively) andsemi-conservative,thensoisΓ∗: first,allconstraintsoftheform(S, 2 )canbedetectedinpolynomial α D | timeandremovedfromtheinstancewithoutchangingthesolution,andtheneachconstraintC(cid:48) = (S(cid:48),R(cid:48)) withR(cid:48) Γ∗ ΓcanbeexpressedintermsoftheconjunctionofaconstraintC = (S,R)withR Γand ∈ \ ∈ unaryconstraintsovervariablesinvar(C) var(C(cid:48)). \ As mentioned in the introduction, the union of two tractable constraint languages is in general not tractable. Take for instance the conservative languages Γ = 0,1 3 (1,1,1) 2{0,1} and Γ = 1 2 {{ } \ { }} ∪ 0,1 3 (0,0,0) 2{0,1}. Using the characterization of Schaefer languages in terms of closure {{ } \ { }} ∪ properties (see, e.g., [23]), it is easy to check that Γ is Horn and has none of the five other Schaefer 1 properties;similarly,Γ isdual-HornandhasnoneofthefiveotherSchaeferproperties. Hence,iffollowsby 2 Schaefer’sTheoremthatCSP(Γ )andCSP(Γ )aretractable,butCSP(Γ Γ )isNP-complete. Onecan 1 2 1 2 ∪ findsimilarexamplesforotherpairsofSchaeferlanguages. 5 2.2 ParameterizedComplexity A parameterized problem is a problem whose instances are tuples (I,k), where k N is called the P ∈ parameter. Wesaythataparameterizedproblemisfixedparametertractable(FPTinshort)ifitcanbesolved byanalgorithmwhichrunsintimef(k) I O(1) forsomecomputablefunctionf;algorithmswithrunning ·| | timeofthisformarecalledFPTalgorithms. ThenotionsofW[i]-hardness(fori N)arefrequentlyusedto ∈ showthataparameterizedproblemisnotlikelytobeFPT;anFPTalgorithmforaW[i]-hardproblemwould implythattheExponentialTimeHypothesisfails[8]. Wereferthereadertoothersources[15,16,19]foran in-depthintroductionintoparameterizedcomplexity. 2.3 Backdoors,IncidenceGraphsandScatteredClasses LetIbeaninstanceofCSPover andlet beaclassofCSPinstances. AsetB ofvariablesofIiscalleda D H strongbackdoorinto ifforeveryassignmentα : B itholdsthatI . Noticethatifwearegiven α H → D | ∈ H astrongbackdoorB ofsizek intoatractable(or#-tractable)class ,thenitispossibletosolveCSP(or H #CSP)intime k nO(1). Itisthusnaturaltoaskforwhichtractableclasseswecanfindasmallbackdoor |D| · efficiently. STRONG BACKDOOR DETECTION INTO (SBD( )) H H Setting: Aclass ofCSPinstancesoverafinitedomain . H D Instance: ACSPinstanceIover andanon-negativeintegerk. D Task: FindastrongbackdoorinIinto ofcardinalityatmostk,ordeterminethatnosuch H strongbackdoorexists. Parameter: k. We remark that for any finite constraint language Γ, the problem SBD(CSP(Γ)) is fixed parameter tractableduetoasimplefolklorebranchingalgorithm. Ontheotherhand, SBD(CSP(Γ(cid:48)))isknowntobe W[2]-hardforawiderangeofinfinitetractableconstraintlanguagesΓ(cid:48) [20]. GivenaCSPinstanceI,we use (I) = (var(I) I,E)todenotetheincidencegraphofI;specifically,Icontainsanedge x,Y for B ∪ { } x var(I),Y Iifandonlyifx var(Y). Wedenotethisgraphby whenIisclearfromthecontext. ∈ ∈ ∈ B Furthermore,forasetS ofvariablesofI,wedenoteby (I)thegraphobtainedbydeletingfrom (I)the S B B verticescorrespondingtothevariablesinS;wemayalsouse inshortifIisclearfromthecontext. We S B refertoDiestel’sbook[14]forstandardgraphterminology. TwoCSPinstancesI,I(cid:48) arevariabledisjointifvar(I) var(I(cid:48)) = . Let ,... beclassesofCSP 1 d ∩ ∅ H H instances. Thenthescatteredclass istheclassofallCSPinstancesIwhichmaybepartitioned 1 d H ⊕···⊕H into pairwise variable disjoint sub-instances I ,...I such that I for each i [d]. Notice that this 1 d i i ∈ H ∈ implies that (I) can be partitioned into pairwise disconnected subgraphs (I ),... (I ). If ,... 1 d 1 d B B B H H aretractable,then isalsotractable,sinceeachI canbesolvedindependently. Similarly,If 1 d i H ⊕···⊕H ,... are#-tractable,then isalso#-tractable,sincethenumberofsatisfyingassignments 1 d 1 d H H H ⊕···⊕H ineachI canbecomputedindependentlyandthenmultipliedtoobtainthesolution. i We conclude this section by showcasing that a strong backdoor to a scattered class can be arbitrarily smallerthanastrongbackdoortoanyofitscomponentclasses. Consideronceagainthetractablelanguages Γ = 0,1 3 (1,1,1) 2{0,1} (Horn) andΓ = 0,1 3 (0,0,0) 2{0,1} (dual-Horn). Then 1 2 {{ } \{ }}∪ {{ } \{ }}∪ foranyk NonecanfindI CSP(Γ ) CSP(Γ )suchthatIdoesnothaveastrongbackdoorofsizek to 1 2 ∈ ∈ ⊕ eitherofCSP(Γ ),CSP(Γ ). 1 2 6 3 Strong-Backdoors to Scattered Classes Thissectionisdedicatedtoprovingourmaintechnicallemma,restatedbelow. Wewouldliketopointout thattheassumptionregardingtheexistenceofthetautologicalbinaryrelation 2 inthelanguagesismade D purelyforeaseofdescriptioninthelaterstagesofthealgorithm. Lemma1. LetΓ ,...Γ befinitelanguagesoverafinitedomain whichareclosedunderpartialassign- 1 d mentsandcontain 2. ThenSBD(CSP(Γ ) CSP(Γ ))caDnbesolvedintime22O(k) I O(1). 1 d D ⊕···⊕ | | Beforeproceedingfurther,weshowhowLemma1isusedtoproveTheorem1. ProofofTheorem1. LetIbeaninstanceofCSP( ∗). RecallingthedefinitionofΓ∗,weuseLemma1to D find a strong backdoor X of size at most k into CSP(Γ∗) CSP(Γ∗) in time 22O(k) I O(1). Since 1 ⊕ ··· ⊕ d | | CSP(Γ∗) CSP(Γ∗) CSP(Γ ) CSP(Γ ),itfollowsthatanystrongbackdoorintoCSP(Γ ) 1 ⊕···⊕ d ⊇ 1 ⊕···⊕ d 1 ⊕ CSP(Γ ) is also a strong backdoor into CSP(Γ∗) CSP(Γ∗). We branch over all the at most ···⊕ d 1 ⊕···⊕ d k assignmentsα : X ,andforeachsuchαwecansolvetheinstanceI inpolynomialtimesince α |D| → D | CSP(Γ∗) CSP(Γ∗)istractable. 1 ⊕···⊕ d Forthesecondcase,letIbeaninstanceof#CSP( ∗). Asabove,wealsouseLemma1tocomputea D strongbackdoorX intoCSP(Γ∗) CSP(Γ∗)ofsizeatmostk. Wethenbranchoverallatmost k 1 ⊕···⊕ d |D| assignmentsα : X ,andforeachsuchαwecansolvethe#CSPinstanceI inpolynomialtimesince α → D | CSP(Γ∗) CSP(Γ∗)is#-tractable;letcost(α)denotethenumberofsatisfyingassignmentsofI for 1 ⊕···⊕ (cid:80)d |α eachα. Wethenoutput cost(α). α:X→D WebeginourpathtowardsaproofofLemma1bystatingthefollowingassumptionontheinputinstance, whichcanbeguaranteedbysimplepreprocessing. LetρbethemaximumarityofanyrelationinΓ ,...,Γ . 1 d Observation1. Anyinstance(I(cid:48),k)of SBD(CSP(Γ ) CSP(Γ ))eithercontainsonlyconstraints 1 d ⊕···⊕ ofarityatmostρ+k,orcanbecorrectlyrejected. Proof. AssumethatI(cid:48)containsaconstraintC = (S,R)ofarityρ(cid:48) > ρ+k. ThenforeverysetX ofatmostk variables,thereexistsanassignmentα : X suchthatC hasarityρ(cid:48) > ρ,andhenceC CSP(Γ ) α α 1 → D | | (cid:54)∈ ⊕ CSP(Γd). Henceanysuch(I(cid:48),k)isclearlya NO-instanceof SBD(CSP(Γ1) CSP(Γd)). ···⊕ ⊕···⊕ Organization of the rest of the section. The rest of this section is structured into three subsections. In Subsection3.1,weuseiterativecompressiontotransformtheSBD problemtargetedbyLemma1intoits compressed version EXT-SBD COMP. Subsection 3.2 develops an algorithm which correctly solves any instanceof EXT-SBD COMPwhichhasacertaininseparabilityproperty. Finally,inSubsection3.3wegivea generalalgorithmforEXT-SBD COMPwhichusesthealgorithmdevelopedinSubsection3.2asasubroutine. 3.1 Iterativecompression Wefirstdescribeawaytoreducetheinputinstanceof SBD(CSP(Γ ) CSP(Γ ))tomultiple(buta 1 d ⊕···⊕ bounded number of)structured instances, such that solving these instances will leadto a solution for the inputinstance. Todothis,weusethetechniqueofiterativecompression[37]. Givenaninstance(I,k)of SBD(CSP(Γ ) CSP(Γ ))whereI = C ,...,C ,fori [m]wedefineC = C ,...,C . We 1 d 1 m i 1 i ⊕···⊕ { } ∈ { } iteratethroughtheinstances(C ,k)startingfromi = 1,andforeachi-thinstanceweuseaknownsolution i 7 X ofsizeatmostk+ρtotrytofindasolutionXˆ ofsizeatmostk. Thisproblem,usuallyreferredtoasthe i i compressionproblem,isthefollowing. SBD(CSP(Γ1) CSP(Γd)) COMPRESSION ⊕···⊕ Setting: LanguagesΓ ,...,Γ ofmaximumarityρoveradomain . 1 d D Instance: ACSPinstanceI,anon-negativeintegerk andastrongbackdoorsetX var(I) ⊆ intoCSP(Γ ) CSP(Γ )ofsizeatmostk+ρ. 1 d ⊕···⊕ Task: FindastrongbackdoorinIintoCSP(Γ ) CSP(Γ )ofsizeatmostk,orcorrectly 1 d ⊕···⊕ determinethatnosuchsetexists. Parameter: k. WhenΓ ,...,Γ areclearfromthecontext,weabbreviateSBD(CSP(Γ ) CSP(Γ ))as SBD 1 d 1 d ⊕···⊕ and SBD(CSP(Γ1) CSP(Γd)) COMPRESSION as SBD COMP. Wereducethe SBD problemtom ⊕···⊕ instancesoftheSBD COMPproblemasfollows. LetI(cid:48) beaninstanceof SBD.Thesetvar(C1)isclearlya strongbackdoorofsizeatmostρfortheinstanceI1 = (C1,k, )of SBD COMP. Weconstructandsolve ∅ asequenceof SBD COMP instancesI2,...Im bylettingIi = (Ci,k,Xi−1 var(Ci)),whereXi−1 isthe ∪ solution to I . If some such I is found to have no solution, then we can correctly reject for I(cid:48), since i−1 i C I(cid:48). On the other hand, if a solution X is obtained for I , then X is also a solution for I(cid:48). Since i m m m ⊆ therearemsuchiterations,thetotaltimetakenisboundedbymtimesthetimerequiredtosolvetheSBD COMPproblem. Moving from the compression problem to the extension version. We now show how to convert an instanceofthe SBD COMPproblemintoaboundednumberofinstancesofthesameproblemwherewemay additionallyassumethesolutionwearelookingforextendspartofthegivenstrongbackdoor. Formally,an instance of the EXTENDED SBD COMP problem is a tuple (I,k,S,W) where I is a CSP instance, k is a non-negativeintegerandW S isastrongbackdoorsetofsizeatmostk+ρintoCSP(Γ ) CSP(Γ ). 1 d ∪ ⊕···⊕ TheobjectivehereistocomputeastrongbackdoorintoCSP(Γ ) CSP(Γ )ofsizeatmostk which 1 d ⊕···⊕ containsS andisdisjointfromW. EXTENDED SBD COMPRESSION(EXT-SBD COMP) Setting: LanguagesΓ ,...,Γ ofmaximumarityρoveradomain . 1 d D Instance: ACSPinstanceI,anon-negativeintegerk anddisjointvariablesetsS andW such thatW S isastrongbackdoorsetintoCSP(Γ ) CSP(Γ )ofsizeatmostk+ρ. 1 d ∪ ⊕···⊕ Task: FindastrongbackdoorinIintoCSP(Γ ) CSP(Γ )ofsizeatmostkthatextends 1 d ⊕···⊕ S andisdisjointfromW,ordeterminethatnosuchstrongbackdoorsetexists. Parameter: k. WenowreduceSBD COMPto(cid:0)|X|(cid:1)-manyinstancesof EXT-SBD COMP,asfollows. LetI(cid:48) = (I,k,X) ≤k beaninstanceof SBD COMP. Weconstruct(cid:0)|X|(cid:1)-manyinstancesof EXT-SBD COMPasfollows. Forevery ≤k S (cid:0)X(cid:1),weconstructtheinstanceI(cid:48) = (I,k,S,X S). Clearly,theoriginalinstanceI(cid:48) isa YESinstance ∈ ≤k S \ of SBD COMP if and only if for some S (cid:0)X(cid:1), the instance I(cid:48) is a YES instance of EXT-SBD COMP. ∈ ≤k S Therefore,thetimetosolvetheinstanceI(cid:48) isboundedby(cid:0)|X|(cid:1) 2k+ρ timesthetimerequiredtosolvean ≤k ≤ 8 w1 w2 w3 s1 s2 s3 w s s s w w 2 1 2 3 3 1 Figure1: Anillustrationofseparatingandnon-separatingsolutions. Inbothcases,S = s ,s ,s isthe 1 2 3 { } hypotheticalsolutionunderconsiderationwhile w ,w ,w istheoldsolution. Inthefirstfigure,S isa 1 2 3 { } non-separatingsolutionwhileinthesecond,itisaseparatingsolution. instanceofEXT-SBD COMP. Intherestofthepaper,wegiveanFPTalgorithmtosolveEXT-SBD COMP, whichfollowingourdiscussionaboveimpliesLemma1. Lemma1.1. EXT-SBD COMPcanbesolvedintime22O(k) I O(1). | | WefirstfocusonsolvingaspecialcaseofEXT-SBD COMP,andthenshowhowthishelpstosolvethe probleminitsfullgenerality. 3.2 Solvingnon-separatinginstances In this subsection, we restrict our attention to input instances with a certain promise on the structure of a solution. We refer to these special instances as non-separating instances. These instances are formally definedasfollows. Definition 1. Let (I,k,S,W) be an instance of EXT-SBD COMP and let Z S be a solution for this ⊇ instance. WecallZ aseparatingsolution(seeFigure1)forthisinstanceifW isnotcontainedinasingle connectedcomponentof andanon-separatingsolutionotherwise. Aninstanceiscalledaseparating Z B instanceifitonlyhasseparatingsolutionsanditiscalledanon-separatinginstanceotherwise. Havingformallydefinednon-separatinginstances,wenowgiveanoverviewofthealgorithmwedesign to solve such instances. We begin by developing the notion of a forbidden set of constraints. The main motivation behind the introduction of this object is that it provides us with a succinct certificate that a particularsetisnotastrongbackdooroftherequiredkind,immediatelygivingusasmallstructurewhich 9 wemustexclude. However,theexclusioninthiscontextcanoccurnotjustbyinstantiatingavariableinthe scopeofoneoftheseconstraintsinthesolutionbutalsoduetothebackdoordisconnectingtheseconstraints. Thisissignificantlydifferentfromstandardgraphproblemswhereoncewehaveasmallviolatingstructure,a straightforwardbranchingalgorithmcanbeusedtoeliminatethisstructure. However,inourcase,evenif wehaveasmallviolatingstructure, itisnotatallclearhowsuchastructurecanbeutilized. Forthis, we firstsetupappropriateseparatormachineryforCSPinstances. Wethenarguethatforanyforbiddensetof constraints,ifavariableinthescopeoftheseconstraintsisnotinthesolution,thenoneoftheseconstraints mustinfactbeseparatedfromtheoldstrongbackdoorsetbythehypotheticalsolution. Followingthis,we arguethatthenotionofimportantseparatorsintroducedbyMarx[31]canbeusedtoessentiallynarrowdown thesearchspaceofseparatorswherewemustsearchforasolutionvariable. Finally,wecanuseabranching algorithminthissignificantlyprunedsearchspaceofseparatorsinordertocomputeasolution(ifthereexists one). WereiteratethatthenotionofforbiddensetsiscriticalinobtaininganFPTalgorithmasopposedtoan FPT-approximationalgorithm. Nowthatwehavegivenaslightlymoredetailedoverviewofthissubsection, weproceedtodescribeouralgorithmforsolvingnon-separatinginstances. Webeginwiththedefinitionof forbiddenconstraintsandthensetuptheseparatormachineryrequiredinthisaswellasthenextsubsection. ForbiddenConstraints. Let(I,k,S,W)beaninstanceof EXT-SBD COMP. Definition2. LetS var(I),letC = C ,...,C beasetofatmostdconstraintsandJ beasubsetof 1 (cid:96) ⊆ { } [d]. WesaythatCisJ-forbiddenwithrespecttoS ifthereisanassignmentτ : S suchthatforevery → D i J thereisat [(cid:96)]suchthatC [τ] / Γ . IfJ = [d],thenwesimplysaythatCisforbiddenwithrespect t i ∈ ∈ ∈ to S. Furthermore, we call τ an assignment certifying that C is J-forbidden (forbidden if J = [d]) with respecttoS. Thefollowingobservationisaconsequenceofthelanguagesbeingclosedunderpartialassignments. Observation2. IfCisasetofconstraintsforbiddenwithrespecttoavariablesetS,thenCisalsoforbidden withrespecttothesetS var(C). Conversely,ifCisforbiddenwithrespecttoS andS(cid:48) isasetofvariables ∩ disjointfromvar(C),thenCisalsoforbiddenwithrespecttoS S(cid:48) andwithrespecttoS(cid:48). ∪ Theintuitionbehindthedefinitionofforbiddensetsisthatitallowsustohavesuccinctcertificatesfor non-solutions. Thisintuitionisformalizedinthefollowinglemma. Lemma2. GivenaCSPinstanceI,asetX var(I)isastrongbackdoorsetintoCSP(Γ ) CSP(Γ ) 1 d ⊆ ⊕···⊕ ifandonlyifthereisnoconnectedcomponentof containingasetofconstraintsforbiddenwithrespect X B toX. Lemma2.1. GivenaCSPinstanceIandasetS ofvariables, wecancheckintime ( |S| I O(1))if O |D| ·| | thereisasetofconstraintsforbiddenwithrespecttoS. Proof. Clearly,itissufficienttorunoverallatmostd-sizedsetsofconstraintsandallassignmentstothe variables in S and examine the reduced constraints if they belong to each of the languages Γ ,...,Γ . 1 d Sincetheselanguagesarefinite,thefinalcheckcanbedoneintime (1). Thiscompletestheproofofthe O lemma. Lemma2.2. LetIbeaCSPinstanceandletCbeasetofconstraintscontainedinacomponentofIand forbidden(withrespecttosomeset). LetZ beastrongbackdoorsettoCSP(Γ ) CSP(Γ )forthis 1 d ⊕···⊕ instance. Then,eitherZ disconnectsCorZ var(C) = . ∩ (cid:54) ∅ 10
Description: