ebook img

Graph Editing to a Given Degree Sequence PDF

0.21 MB·
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Graph Editing to a Given Degree Sequence

⋆ Graph Editing to a Given Degree Sequence Petr A. Golovach1 and George B. Mertzios2 1 Department of Informatics, University of Bergen, Norway. 2 School of Engineering and Computing Sciences, Durham University,UK. 6 1 0 Abstract. We investigate the parameterized complexity of the graph 2 editing problem called Editing to a Graph with a Given Degree n Sequence, where the aim is to obtain a graph with a given degree se- a quence σ by at most k vertex or edge deletions and edge additions. We J show that the problem is W[1]-hard when parameterized by k for any 3 combination of the allowed editing operations. From the positive side, 1 we show that the problem can be solved in time 2O(k(∆+k)2)n2logn for n-vertex graphs, where ∆ = maxσ, i.e., the problem is FPT when pa- ] S rameterized byk+∆.WealsoshowthatEditing to a Graph with a D GivenDegreeSequencehasapolynomialkernelwhenparameterized . by k+∆ if only edge additions are allowed, and there is no polynomial s kernel unless NP ⊆ coNP/poly for all other combinations of allowed c [ editing operations. 1 v 1 Introduction 4 7 The aim of graph editing (or graph modification) problems is to modify a given 1 graphbyapplyingaboundednumberofpermittedoperationsinordertosatisfy 3 0 acertainproperty.Typically,vertexdeletions,edgedeletionsandedgeadditions . are the considered as the permitted editing operations, but in some cases other 1 operations like edge contractions and vertex additions are also permitted. 0 6 We are interested in graph editing problems, where the aim is to obtain a 1 graphsatisfyingsomegivendegreeconstraints.Theseproblemsusuallyturnout v: tobeNP-hard(withrareexceptions).Hence,weareinterestedintheparameter- i ized complexity of such problems. Before we state our results we briefly discuss X the known related (parameterized) complexity results. r a Relatedwork.Theinvestigationoftheparameterizedcomplexityofsuchprob- lemswasinitiatedbyMoserandThilikosin[23]andMathiesonandSzeider[22]. In particular,Mathieson and Szeider [22] consideredthe Degree Constraint Editing problem that asks for a given graph G, nonnegative integers d and k, and a function δ: V(G)→2{0,...,d}, whether G can be modified into a graphG′ such that dG′(v) ∈ δ(v) for each v ∈ V(G′), by using at most k editing opera- tions. They classified the (parameterized) complexity of the problem depending ⋆ The research leading to these results has received funding from the European Research Council under the European Union’s Seventh Framework Programme (FP/2007-2013)/ERC Grant Agreement n. 267959 and by the EPSRC Grant EP/K022660/1. on the set of allowed editing operations. In particular, they proved that if only edge deletions and additions are permitted, then the problem can be solved in polynomial time for the case where the set of feasible degrees |δ(v)| = 1 for v ∈ V(G). Without this restriction on the size of the sets of feasible degrees, the problem is NP-hard even on subcubic planar graphs whenever only edge deletions are allowed [10] and whenever only edge additions are allowed [16]. If vertexdeletionscanbe used,thenthe problembecomesNP-completeandW[1]- hard with parameter k, even if the sets of feasible degrees have size oner [22]. MathiesonandSzeider[22]showedthatDegree Constraint EditingisFPT when parameterized by d+k. They also proved that the problem has a poly- nomial kernel in the case where only vertex and edge deletions are allowed and the sets of feasible degrees have size one. Further kernelization results were ob- tained by Froese, Nichterlein and Niedermeier [16]. In particular, they proved that the problem with the parameter d admits a polynomial kernel if only edge additions are permitted. They also complemented these results by showing that there is no polynomial kernel unless NP ⊆ coNP/poly if only vertex or edge deletions are allowed. Golovach proved in [19] that, unless NP ⊆ coNP/poly, the problem does not admit a polynomial kernel when parameterized by d+k if vertex deletion and edge addition are in the list of operations,even if the sets of feasible degrees have size one. The case where the input graph is planar was considered by Dabrowski et al. in [14]. Golovach [18] introduced a variant of Degree Constraint Editing in which, besides the degree restrictions, it is required that the graph obtained by editing should be connected. This variant for planar input graphs was also considered in [14]. Froese,NichterleinandNiedermeier[16]alsoconsideredthe Π-Degree Se- quence Completionproblemwhich,givenagraphG,anonnegativeintegerk, andapropertyΠ ofgraphdegreesequences,askswhetheritispossibletoobtain agraphG′fromGbyaddingatmostkedgessuchthatthedegreesequenceofG′ satisfiesΠ.TheygavesomeconditionswhentheproblemisFPT/admitsapoly- nomialkernelwhenparameterizedbykandthemaximumdegreeofG.Thereare numerous results (see, e.g., [4,9,12,13]) about the graph editing problem, where the aim is to obtain a (connected) graph whose vertices satisfy some parity re- strictions on their degree. In particular, if the obtained graph is required to be a connected graphwith verticesof evendegree,we obtainthe classicalEditing to Eulerian Graph problem (see. [4,13]). Another variant of graph editing with degree restrictions is the Degree Anonymization problem, motivated by some privacy and social networks ap- plications.AgraphGish-anonymous forapositiveintegerhifforanyv ∈V(G), there is at least h−1 other vertices of the same degree. Degree Anonymiza- tion asks, given a graph G, a nonnegative h, and a positive integer k, whether it is possible to obtain an h-anonymous graph by at most k editing operations. Theinvestigationoftheparameterizedcomplexityof Degree Anonymization was initiated by Hartung et al. [20] and Bredereck et al. [6] (see also [5,21]). In particular, Hartung et al. [20] considered the case where only edge additions are allowed. They proved that the problem is W[1]-hard when parameterized 2 by k, but it becomes FPT and has a polynomial kernel when parameterized by the maximum degree ∆ of an input graph. Bredereck et al. in [6] considered vertex deletions. They proved that the problem is W[1]-hard when parameter- ized by h+k, but it is FPT when parameterized by ∆+h or by ∆+k. Also the problem was investigated for the cases when vertex additions [5] and edge contractions [21] are the editing operations. Our results. Recall that the degree sequence of a graph is the nonincreasing sequenceofitsvertexdegrees.Weconsiderthegrapheditingproblem,wherethe aim is to obtain a graph with a given degree sequence by using the operations vertex deletion, edge deletion, and edge addition, denoted by vd, ed, and ea, respectively. Formally, the problem is stated as follows. Let S ⊆{vd,ed,ea}. Editing to a Graph with a Given Degree Sequence Instance: A graph G, a nondecreasing sequence of nonnegative integers σ and a nonnegative integer k. Question: Is it possible to obtain a graph G′ with the degree sequence σ from G by at most k operations from S? It is worth highlighting here the difference between this problem and the Editing to a Graph of Given Degrees problem studied in [19]. In [19] a function δ : V(G) →{1,...,d} is given along with the input and, in the target graphG′,everyvertexv isrequiredtohavethe specific degreeδ(v). Incontrast, intheEditingto a Graph with a Given Degree Sequence,onlyadegree sequenceisgivenwiththeinputandtherequirementisthatthetargetgraphG′ has this degree sequence, without specifying which specific vertex has which specific degree. To some extend, this problem can be seen as a generalization of the Degree Anonymization problem [20,6,5,21], as one can specify (as a specialcase)the targetdegreesequenceinsuchawaythateverydegreeappears at least h times in it. In practical applications with respect to privacy and social networks, we might want to appropriately “smoothen” the degree sequence of a given graph in such a way that it becomes difficult to distinguish between two vertices with (initially) similar degrees. In such a setting, it does not seem very natural to specify in advance a specific desireddegree to every specific vertex of the target graph.Furthermore,foranonymizationpurposesinthe caseofasocialnetwork, wherethedegreedistributionoftenfollowsaso-calledpowerlawdistribution[2], it seems more natural to identify a smaller number of vertices having all the same“high”degree,andagreaternumberofverticeshavingallthesame“small” degree,incontrasttothemoremodesth-anonymizationrequirementwhereevery differentdegreemustbesharedamongatleasthidentifiedverticesinthe target graph. InSection2,weobservethatforanynonemptyS ⊆{vd,ed,ea},Editingto a Graph with a Given Degree Sequence is NP-complete and W[1]-hard when parameterized by k. Therefore, we consider a stronger parameterization by k+∆, where ∆=maxσ. In Section 3, we show that Editing to a Graph 3 with a Given Degree Sequence is FPT when parameterized by k+∆. In fact, we obtain this result for the more general variant of the problem, where we ask whether we can obtain a graph G′ with the degree sequence σ from an input graph G by at most k vertex deletions, k edge deletions and k edge vd ed ea additions. We show that the problem can be solved in time 2O(k(∆+k)2)n2logn for n-vertex graphs, where k =k +k +k . The algorithm uses the random vd ed ea separationtechniquesintroducedbyCai,ChanandChan[8](seealso[1]).First, weconstructatruebiasedMonteCarloalgorithmandthenexplainhowitcanbe derandomized.InSection4,weshowthatEditingtoa Graph with a Given Degree Sequence has a polynomial kernel when parameterized by k+∆ if S = {ea}, but for all other nonempty S ⊆ {vd,ed,ea}, there is no polynomial kernel unless NP⊆coNP/poly. 2 Basic definitions and preliminaries Graphs. We consider only finite undirected graphs without loops or multiple edges. The vertex set of a graph G is denoted by V(G) and the edge set is denoted by E(G). For a set of vertices U ⊆V(G), G[U] denotes the subgraph of G induced by U,andbyG−U wedenote the graphobtainedfromGbythe removalofallthe verticesof U,i.e.,the subgraphofG induced by V(G)\U.If U ={u},we write G−u instead of G−{u}. Respectively, for a set of edges L ⊆ E(G), G[L] is a subgraph of G induced by L, i.e, the vertex set of G[L] is the set of vert ices of G incident to the edges of L, and L is the set of edges of G[L]. For a nonempty set U, U is the set of unordered pairs of elements of U. For a set of edges L, 2 by G−L we denote the graph obtained from G by the removal of all the edges of L. R(cid:0)esp(cid:1)ectively, for L ⊆ V(G) , G+L is the graph obtained from G by the 2 addition of the edges that are elements of L. If L={a}, then for simplicity, we (cid:0) (cid:1) write G−a or G+a. For a vertex v, we denote by N (v) its (open) neighborhood, that is, the G set of vertices which are adjacent to v, and for a set U ⊆ V(G), N (U) = G (∪ N (v)) \ U. The closed neighborhood N [v] = N (v) ∪ {v}, and for a v∈U G G G positive integer r, Nr[v] is the set of vertices at distance at most r from v. G For a set U ⊆ V(G) and a positive integer r, Nr[U] = ∪ Nr[v]. The degree G v∈U G of a vertex v is denoted by d (v) = |N (v)|. The maximum degree ∆(G) = G G max{d (v)|v ∈V(G)}. G ForagraphG,wedenote byσ(G) itsdegreesequence.Notice thatσ(G) can be represented by the vector δ(G) = (δ ,...,δ ), where δ = |{v ∈ V(G) | 0 ∆(G) i d (v) = i}| for i ∈ {0,...,∆(G)}. We call δ(G) the degree vector of G. For a G sequence σ =(σ ,...,σ ), δ(σ) =(δ ,...,δ ), where r =maxσ and δ =|{σ | 1 n 0 r i j σ = i}| for i ∈ {0,...,r}. Clearly, δ(G) = δ(σ(G)), and the degree vector can j be easily constructed from the degree sequence and vice versa. Slightly abusing notation, we write for two vectors of nonnegative integers, that (δ ,...,δ ) = 0 r (δ′,...,δ′ )forr ≤r′ifδ =δ′ fori∈{0,...,r}andδ′ =0fori∈{r+1,...,r′}. 0 r′ i i i 4 Parameterized Complexity. Parameterized complexity is a two dimensional framework for studying the computational complexity of a problem. One di- mension is the input size n and another one is a parameter k. It is said that a problem is fixed parameter tractable (or FPT), if it can be solved in time f(k)·nO(1) for some function f. A kernelization for a parameterized problem is a polynomial algorithm that maps each instance (x,k) with the input x and the parameter k to an instance (x′,k′) such that i) (x,k) is a YES-instance if andonly if (x′,k′) is a YES-instance of the problem,andii) |x′|+k′ is bounded by f(k) for a computable function f. The output (x′,k′) is called a kernel. The function f is saidto be a size of a kernel. Respectively,a kernelis polynomial if f is polynomial. A parameterized problem is FPT if and only if it has a kernel, but it is widely believed that not all FPT problems have polynomial kernels. In particular,Bodlaenderetal.[3]introducedtechniquesthatallowto showthata parameterized problem has no polynomial kernel unless NP ⊆ coNP/poly. We refer to the recent books of Cygan et al. [11] and Downey and Fellows [15] for detailed introductions to parameterized complexity. Solutions of Editing to a Graph with a Given Degree Sequence. Let (G,σ,k) be an instance of Editing to a Graph of Given Degrees. Let U ⊂ V(G), D ⊆ E(G − U) and A ⊆ V(G)\U . We say that (U,D,A) is a 2 solution for(G,δ,d,k),if|U|+|D|+|A|≤k,andthegraphG′ =G−U−D+A (cid:0) (cid:1) has the degree sequence σ. We also say that G′ is obtained by editing with respect to (U,D,A). If vd, ed or ea is not in S, then it is assumed that U = ∅, D = ∅ or A = ∅ respectively. If S = {ed}, then instead of (∅,∅,A) we simply write A. We conclude this section by showing that Editing to a Graph with a Given Degree Sequence is hard when parameterized by k. Theorem 1. For any nonempty S ⊆{vd,ed,ea}, Editing to a Graph with a Given Degree Sequence is NP-complete and W[1]-hard when parameter- ized by k. Proof. Suppose that ed ∈ S. We reduce the Clique problem that asks for a graphGandapositiveintegerk,whetherGhasacliqueofsizek.This problem is known to be NP-complete [17] and W[1]-hard when parameterized by k [7] even if the input graph restricted to be regular. Let (G,k) be an instance of Clique,whereGisann-vertexd-regulargraph,d≥k−1.Considerthesequence σ =(σ ,...,σ ), where 1 n d if 1≤i≤n−k, σ = i (d−(k−1) if n−k+1≤i≤n. Letk′ =k(k−1)/2.Weclaimthat(G,k)isayes-instanceof Cliqueifandonly if (G,σ,k′) is a yes-instance of Editing to a Graph with a Given Degree Sequence. If K is a clique of size k in G, then the graph G′ obtained from G by the deletion of the k′ = k(k −1)/2 edges of D = E(G[K]) has the degree sequence σ. Assume that (U,D,A) is a solutionof (G,σ,k). Clearly,U =∅ even 5 if vd ∈ R, because σ contains n elements. Since n σ = dn−k(k−1), we i=1 i have that A = ∅. It remains to notice that because in G−D k vertices have P degree d−(k−1), G[D] is a compete graph with k vertices, i.e., G contains a clique of size k. Suppose that ea ∈ S. We reduce Independent Set problem that asks for a graph G and a positive integer k, whether G has an independent set of size k. Again, Independent Set is NP-complete [17] and W[1]-hard when param- eterized by k [7] even if the input graph restricted to be regular. Let (G,k) be an instance of Independent Set, where G is an n-vertex d-regular graph and k ≤n. Consider the sequence σ =(σ ,...,σ ), where 1 n d+(k−1) if 1≤i≤k, σ = i (d if k+1≤i≤n. Let k′ = k(k −1)/2. Similarly to the case ed ∈ S, we obtain that (G,k) is a yes-instance of Independent Set if and only if (G,σ,k′) is a yes-instance of Editing to a Graph with a Given Degree Sequence. Finally, assume that S = {vd}. We again reduce the Clique problem for regular graphs. Let (G,k) be an instance of Clique, where G is an n-vertex d-regular graph with m edges. We assume without loss of generality that d− (k−1) ≥ 3. The graph G′ is constructed from G by subdividing each edge of G, i.e., for each xy ∈ E(G), we construct a new vertex u and replace xy by xu and yu. Let k′ =k(k−1)/2. Consider the sequence σ =(σ ,...,σ ), where 1 p p=n+m−k′ and d if 1≤i≤n−k, σi =d−(k−1) if n−k+1≤i≤n, 2 if n+1≤i≤p. Again similarly to the case ed ∈ S, we obtain that (G,k) is a yes-instance of Cliqueifandonlyif(G′,σ,k′)isayes-instanceof Editing to a Graph with a Given Degree Sequence. ⊓⊔ 3 FPT-algorithm for Editing to a Graph with a Given Degree Sequence In this section we show that Editing to a Graph with a Given Degree Sequence is FPT whenparameterizedby k+∆,where∆=maxσ.In fact,we obtain this result for the more general variant of the problem: Extended Editing to a Graph with a Given Degree Sequence Instance: A graph G, a nondecreasing sequence of nonnegative integers σ and a nonnegative integers k ,k ,k . vd ed ea Question: Is it possible to obtain a graph G′ with σ(G)=σ from G by at most k vertex deletions, k edge deletions and k edge vd ed ea additions? 6 Theorem 2. Extended Editing to a Graph with a Given Degree Se- quence can be solved it time 2O(k(∆+k)2)n2logn for n-vertex graphs, where ∆=maxσ and k =k +k +k . vd ed ea Proof. First,weconstructarandomizedtruebiasedMonteCarloFPT-algorithm for Extended Editing to a Graph with a Given Degree Sequence parameterized by k+d based on the random separation techniques introduced by Cai, Chan and Chan [8] (see also [1]). Then we explain how this algorithm can be derandomized. Let (G,S,k ,k ,k ) be aninstance of Extended Editing to a Graph vd ed ea with a Given Degree Sequence, n=|V(G)|. On the first stage of the algorithm we preprocess the instance to get rid of vertices of high degree or solve the problem if we have a trivial no-instance by the following reduction rule. Vertex deletion rule. If G has a vertex v with d (v) > ∆+k +k , then G vd ed delete v and set k =k −1. If k <0, then stop and return a NO-answer. vd vd vd To show that the rule is safe, i.e., by the application of the rule we ei- ther correctly solve the problem or obtain an equivalent instance, assume that (G,σ,k ,k ,k )isa yes-instanceof Extended Editing to a Graph with vd ed ea a Given Degree Sequence. Let (U,D,A) be a solution. We show that if d (v) > δ + k + k , then v ∈ U. To obtain a contradiction, assume that G vd ed dG(v)>δ+kvd+ked but v ∈/ U. ThendG′(v)≤∆, where G′ =G−U−D+A. It remains to observe that to decrease the degree of v by at least k +k +1, vd ed weneedatleastk +k +1vertexoredgedeletionoperations;acontradiction. vd ed We conclude that if (G,σ,k ,k ,k ) is a yes-instance, then the instance ob- vd ed ea tained by the application of the rule is also a yes-instance. It is straightforward to see that if (G′,σ,k′ ,k ,k ) is a yes-instance of Extended Editing to a vd ed ea Graph with a Given Degree Sequenceobtainedbythedeletionofavertex v and (U,D,A) is a solution, then (U ∪{v},D,A) is a solution for the original instance. Hence, the rule is safe. We exhaustively apply the rule until we either stop and returna NO-answer or obtain an instance of the problem such that the degree of any vertex v is at most ∆+k. To simplify notations, we assume that (G,σ,k ,k ,k ) is such vd ed ea an instance. Onthenextstageofthealgorithmweapplytherandomseparationtechnique. We color the vertices of G independently and uniformly at random by three colors. In other words, we partition V(G) into three sets R , Y and B (some v v v sets could be empty), and say that the vertices of R are red, the vertices of Y v v are yellow and the vertices of B are blue. Then the edges of G are colored by v either red or blue. We denote by R the set of red and by B the set of blue e e edges respectively. We are looking for a solution (U,D,A) of (G,S,k ,k ,k ) such that the vd ed ea vertices of U are colored red, the vertices incident to the edges of A are yellow andtheedgesofDarered.Moreover,ifX andY arethesetsofverticesincident totheedgesofD andArespectively,thentheverticesof(N2[U]∪N [X∪Y])\ G G 7 (U ∪Y) and the edges of E(G)\D incident to the vertices of N [U]∪X ∪Y G should be blue. Formally,we say that a solution(U,D,A) of (G,S,k ,k ,k ) vd ed ea is a colorful solution if there are R∗ ⊆R , Y∗ ⊆Y and R∗ ⊆R such that the v v v v e e following holds. i) |R∗|≤k , |R∗|≤k and |Y∗|≤2k . v vd e ed v ea ii) U =R∗, D =R∗, and for any uv ∈A, u,v∈Y∗ and |A|≤k . v e v ea iii) Ifu,v ∈R ∪Y anduv ∈E(G),theneitheru,v ∈R∗∪Y∗ oru,v ∈/ R∗∪Y∗. v v v v v v iv) If u ∈ R ∪Y and uv ∈ R , then either u ∈ R∗ ∪Y∗,uv ∈ R∗ or u ∈/ v v e v v e R∗∪Y∗,uv∈/ R∗. v v e v) If uv,vw ∈R , then either uv,vw ∈R∗ or uv,vw ∈/ R∗. e e e vi) If distinct u,v ∈ R and N (u) ∩ N (v) 6= ∅, then either u,v ∈ R∗ or v G G v u,v ∈/ R∗. v vii) If u ∈ R and vw ∈ R for v ∈ N (u), then either u ∈ R∗,vw ∈ R∗ or v e G v e u∈/ R∗,vw ∈/ R∗. v e We also say that (R∗,Y∗,R∗) is the base of (U,D,A). v v e Our aim is to find a colorful solution if it exists. We do is by a dynamic programming algorithm based of the following properties of colorful solutions. Let L=R ∪{e∈E(G)|e is incident to a vertex of R }∪{uv∈E(G)|u,v∈Y }, e v v and H =G[L]. Denote by H ,...,H the components of H. Let Ri =V(H )∩ 1 s v i R , Yi =V(H )∩Y and Ri =E(H )∩R for i∈{1,...,s}. e v i v e i e Claim A If (U,D,A) is a colorful solution and (R∗,Y∗,R∗) is its base, then v v e if H has a vertex of R∗ ∪Y ∗ or en edge of R∗, then Ri ⊆ R∗, Yi ⊆ Y∗ and i v v e v v v v Ri ⊆R∗ for i∈{1,...,s}. e r Proof of Claim A. Suppose that H has u∈R∗∪Y∗ or e∈R∗. i v v e Ifv ∈Ri∪Yi,thenH hasapathP =x ...x suchthatu=x ore=x x , v v i 0 ℓ 0 0 1 and x = v. By induction on ℓ, we show that v ∈ R∗ or v ∈ Y∗ respectively. If ℓ v v ℓ=1, then the statement follows from iii) and iv) of the definition of a colorful solution. Suppose that ℓ>1. We consider three cases. Case 1. x ∈R ∪Y . By iii) and iv), x ∈R∗∪Y∗ and, because the (x ,x )- 1 v v 1 v v 1 ℓ subpath of P has lengthℓ−1, we conclude that v ∈R∗ or v ∈Y∗ by induction. v v Assume from now that x ∈/ R ∪Y . 1 v v Case 2. x x ∈ R . Clearly, if for the first edge e of P, e ∈ R∗, then x x = 0 1 e e 0 1 e ∈ R∗. Suppose that for the first vertex u = x of P, u ∈ R∗ ∪Y∗. Then by e 0 v v iv), x x ∈ R∗. If x x ∈ R , then x x ∈ R∗ by v). Since x x ∈ R∗ and 0 1 e 1 2 e 1 2 e 1 2 e the (x ,x )-subpath of P has length ℓ−1, we have that v ∈ R∗ or v ∈ Y∗ by 1 ℓ v v induction. Suppose that x x ∈/ R . Then because x x ∈ L, x ∈ R and by 1 2 e 1 2 2 v vii), x ∈ R∗. If ℓ = 2, then x ∈ R∗. Otherwise, as the (x ,x )-subpath of P 2 v ℓ v 2 ℓ has length ℓ−2, we have that v ∈R∗ or v ∈Y∗ by induction. v v 8 Case 2. x x ∈/ R . Then u = x ∈ R∗ ∪Y∗. Because x x ∈ L, x ∈ R∗. If 0 1 e 0 v v 0 1 0 v x x ∈R , then x x ∈R∗ by vii). Since x x ∈R∗ andthe (x ,x )-subpath of 1 2 e 1 2 e 1 2 e 1 ℓ P has length ℓ−1, we have that v ∈ R∗ or v ∈Y∗ by induction. Suppose that v v x x ∈/ R . Then because x x ∈L, x ∈R and by vi), x ∈R∗. If ℓ=2, then 1 2 e 1 2 2 v 2 v x ∈R∗. Otherwise, as the (x ,x )-subpath of P has length ℓ−2, we have that ℓ v 2 ℓ v ∈R∗ or v ∈Y∗ by induction. v v Suppose that e′ ∈Ri. Then H has a path P =x ...x such that u=x or e i 0 ℓ 0 e = x x , and x x = e′. Using the same inductive arguments as before, we 0 1 ℓ−1 ℓ obtain that e′ ∈R∗. e By Claim A, we have that if there is a colorful solution (U,D,A), then for its base (R∗,Y∗,R∗), R∗ = ∪ Ri, Y∗ = ∪ Yi and R∗ = ∪ Ri for some v v e v i∈I v v i∈I v e i∈I e set of indices I ⊆{1,...,s}. The next property is a straightforwardcorollary of the definition H. Claim B Fordistincti,j ∈{1,...,s},ifu∈V(H )andv ∈V(H )areadjacent i j in G, then either u,v ∈B or (u∈Yi and v ∈B ) or (u∈B and v ∈Yj). v v v v v We construct a dynamic programming algorithm that consecutively for i = 0,...,s,constructsthetableT thatcontainstherecordsofvaluesofthefunction i γ: γ(t ,t ,t ,X,δ)=(U,D,A,I), vd ed ea where i) t ≤k , t ≤k and t ≤k , vd vd ed ed ea ea ii) X = {d ,...,d } is a collection (multiset) of integers, where h ∈ 1 h {1,...,2t } and d ∈{0,...,∆} for i∈{1,...,h}, ea i iii) δ = (δ ,...,δ ), where r = max{∆,∆(G)} and δ is a nonnegative integer 0 r i for i∈{0,...,r}, such that (U,D,A) is a partial solution with the base (R∗,Y∗,R∗) defined by v v e I ⊆{1,...,i} with the following properties. iv) R∗ = ∪ Ri, Y∗ = ∪ Yi and R∗ = ∪ Ri, and t = |R∗| and t = v i∈I v v i∈I v e i∈I e vd v ed |R∗|. e v) U =R∗, D =R∗, |A|=t and for any uv ∈A, u,v ∈Y∗. v e ea v vi) The multiset {dG′(y)|y ∈Yv∗}=X, where G′ =G−U −D+A. vii) δ(G′)=δ. Inotherwords,t ,t andt arethenumbersofdeletedvertices,deletededges vd ed ea and added edges respectively, X is the multiset of degrees of of yellow vertices inthebaseofapartialsolution,andδ isthedegreevectorofthegraphobtained from G by the editing with respect to a partial solution. Notice that the values of γ are defined only for some t ,t ,t ,X,δ that satisfy i)–iii), as a partial vd ed ea solution with the properties iv)–vii) not necessarily exists, and we only keep records corresponding to the arguments t ,t ,t ,X,δ for which γ is defined. vd ed ea Now we explain how we construct the tables for i∈{0,...,s}. 9 Construction of T . The table T contains the unique record (0,0,0,∅,δ) = 0 0 (∅,∅,∅,∅), where δ = δ(G) (notice that the length of δ can be bigger that the length of δ(G)). Construction of T for i ≥ 1. We assume that T is already constructed. i i−1 InitiallywesetT =T .Thenforeachrecordγ(t ,t ,t ,X,δ)=(U,D,A,I) i i−1 vd ed ea in T , we construct new records γ(t′ ,t′ ,t′ ,X′,δ′) = (U′,D′,A′) and put i−1 vd ed ea them in T unless T already contains the value γ(t′ ,t′ ,t′ ,X′,δ′). In the last i i vd ed ea case we keep the old value. Let (t ,t ,t ,X,δ)=(U,D,A,I) in T . vd ed ea i−1 – If t + |Ri| > k or t + |Ri| > k or t + 2|Yi| > k , then stop vd v vd ed e ed ea v ea considering the record. Otherwise, let t′ =t +|Ri| and t′ =t +|Ri|. vd vd v ed ed e – Let F =G−U −D+A−Ri −Ri. v e – Let ∪ Yj = {x ,...,x }, d (x ) = d for f ∈ {1,...,h}. Let Yi = j∈I v 1 h F f f v {y ,...,y }. Consider every E ⊆ Yvi \ E(F[Yi]) and E ⊆ {x y | 1 ℓ 1 2 v 2 f i 1 ≤ f ≤ h,1 ≤ j ≤ ℓ} such that |E | + |E | ≤ k − t , and set 1 2 ea ea (cid:0) (cid:1) α = |{x y | x y ∈ E ,1 ≤ j ≤ ℓ}| for f ∈ {1,...,h} and set f f j f j 2 β = |{e| e ∈E ,e is incident to y }|+|{x y | x y ∈ E ,1 ≤ f ≤ h}| for j 1 j f j f j 2 j ∈{1,...,ℓ}. • If d +α > ∆ for some f ∈ {1,...,h} or d (y )+β > ∆ for some f f F j j j ∈{1,...,ℓ}, then stop considering the pair (E ,E ). 1 2 • Set t′ = t + |E | + |E |, X′ = {d + α ,...,d + α ,d (y ) + ea ea 1 2 1 1 h h F 1 β ,...,d (y )+β }. 1 F ℓ ℓ • Let F′ =F +E +E . Construct δ′ =(δ′,...,δ′)=δ(F′). 1 2 0 r • Set U′ = U ∪Ri, D′ = D ∪Ri, A′ = A∪E ∪E , I′ = I ∪{i}, set v e 1 2 γ(t′ ,t′ ,t′ ,X′,δ′)=(U′,D′,A′,I′) and put the record in T . vd ed ea i We consecutively construct T ,...,T . The algorithmreturns a YES-answer 1 s ifT containsarecord(t ,t ,t ,X,δ)=(U,D,A,I)forδ =δ(σ)and(U,D,A) s vd ed ea isacolorfulsolutioninthiscase.Otherwise,thealgorithmreturnsaNO-answer. The correctness of the algorithm follows from the next claim. Claim C For each i ∈ {1,...,s}, the table T contains a record i γ(t ,t ,t ,X,δ)=(U,D,A,I), if and only if there are t ,t ,t ,X,δ satis- vd ed ea vd ed ea fying i)-iii) such that there is a partial solution (U∗,D∗,A∗) and I∗ ⊆{1,...,i} that satisfy iv)-vii). In particular t ,t ,t ,X,δ, (U,D,A) and I satisfy i)–vii) vd ed ea if γ(t ,t ,t ,X,δ)=(U,D,A,I) is in T . vd ed ea i Proof of Claim C. Weprovetheclaimbyinductiononi.Itisstraightforward to see that it holds for i = 0. Assume that i > 0 and the claim is fulfilled for T . i−1 Suppose that a record γ(t′ ,t′ ,t′ ,X′,δ′) = (U′,D′,A′,I′) was added in vd ed ea T . Then ether γ(t′ ,t′ ,t′ ,X′,δ′) = (U′,D′,A′,I′) was in T or it was i vd ed ea i−1 constructed for some record (t ,t ,t ,X,δ) = (U,D,A,I) from T . In vd ed ea i−1 the first case, t′ ,t′ ,t′ ,X′,Q′, (U′,D′,A′) and I′ ⊆ {1,...,i} satisfy i)- vd ed ea vii) by induction. Assume that γ(t′ ,t′ ,t′ ,X′,δ′) = (U′,D′,A′,I′) was con- vd ed ea structed for some record (t ,t ,t ,X,Q) = (U,D,A,I) from T . Notice vd ed ea i−1 10

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.