Iterated Type Partitions
aa r X i v : . [ c s . CC ] J a n Iterated Type Partitions
G. Cordasco
University of Campania “L.Vanvitelli”, Italy
L. Gargano
University of Salerno, Italy
A. A. Rescigno
University of Salerno, Italy
Abstract
This paper deals with the complexity of some natural graph problems whenparametrized by measures that are restrictions of clique-width, such as modular-width and neighborhood diversity. The main contribution of this paper is tointroduce a novel parameter, called iterated type partition, that can be com-puted in polynomial time and nicely places between modular-width and neigh-borhood diversity. We prove that the Equitable Coloring problem is W[1]-hardwhen parametrized by the iterated type partition. This result extends to modular-width, answering an open question about the possibility to have FPT algorithmsfor Equitable Coloring when parametrized by modular-width. On the contrary,we show that the Equitable Coloring problem is instead FPT when parameterizedby neighborhood diversity. Furthermore, we present simple and fast FPT algo-rithms parameterized by iterated type partition that provide optimal solutions forseveral graph problems; in particular this paper presents algorithms for the Dom-inating Set, the Vertex Coloring and the Vertex Cover problems. While the aboveproblems are already known to be FPT with respect to modular-width, the novelalgorithms are both simpler and more efficient: For the Dominating set and VertexCover problems, our algorithms output an optimal set in time O (2 t + poly ( n )),while for the Vertex Coloring problem, our algorithm outputs an optimal set intime O ( t . t + o ( t ) log n + poly ( n )), where n and t are the size and the iterated typepartition of the input graph, respectively. keywords: Parameterized Complexity, Fixed-parameter tractable algorithms, W[1]-hardness, Neighborhood Diversity, Modular-width.
Some NP-hard problems can be solved by algorithms that are exponential only in thesize of a fixed parameter while they are polynomial in the size of the input. Such prob-lems are called fixed-parameter tractable, because the problem can be solved efficientlyfor small values of the parameter [9, 32]. Formally, a parameterized problem with inputsize n and parameter t is called fixed parameter tractable (FPT) if it can be solved intime f ( t ) · n c , where f is a function only depending on t and c is a constant.An important quality of a parameter is that is is easy to compute. Unfortunatelythere are several parameters whose computation is an NP-hard problem. As an examplecomputing treewidth, rankwidth, and vertex cover are all NP-hard problems but theyare computable in FPT time when their respective parameters are bounded; moreover,1he parameterized complexity of computing the clique-width of a graph exactly is stillan open problem [10].We start from two recently introduced parameters: modular-width [20] and neigh-borhood diversity [30]. Both parameters received much attention [1, 2, 5, 6, 11, 17, 19,22, 23, 25] also due to their property of being computable in polynomial time [20, 30].As the main contribution of this paper we introduce a novel parameter called Iter-ated Type Partition, which nicely places between the two above parameters and allowsto obtain new algorithms and hardness results. The notion of modular decomposition of graphs was introduced by Gallai in [21], as atool to define hierarchical decompositions of graphs. It has been recently considered in[20] to define the modular-width parameter in the area of parameterized computation.Consider graphs obtainable by an algebraic expression that uses the operations:1) Creation of an isolated vertex.2) Disjoint union of 2 graphs, i.e., the graph with vertex set V ( G ) ∪ V ( G ) andedge set E ( G ) ∪ E ( G ).3) Complete join of 2 graphs, i.e., the graph with vertex set V ( G ) ∪ V ( G ) andedge set E ( G ) ∪ E ( G ) ∪ { ( v, w ) : v ∈ V ( G ) , w ∈ V ( G ) } .4) Substitution operation G ( G , . . . , G m ) of the vertices v , . . . , v m of G by the mod-ules G , . . . , G m , i.e., the graph with vertex set S ≤ ℓ ≤ m V ( G ℓ ) and edge set S ≤ ℓ ≤ m E ( G ℓ ) ∪ { ( u, v ) : u ∈ V ( G i ) , v ∈ V ( G j ) , ( v i , v j ) ∈ E ( G ) } . As defined in [20], the modular-width of a graph G , denoted mw ( G ), is the least integer m such that G can be obtained by using only the operations 1)–4) (in any number andorder) and where each operation 4) has at most m modules. Given a graph G = ( V, E ), two nodes u, v ∈ V have the same type iff N ( v ) \ { u } = N ( u ) \ { v } . The neighborhood diversity of a graph G , introduced by Lampis in [30] anddenoted by nd ( G ), is the minimum number t of sets in a partition V , V , . . . , V t , of thenode set V , such that all the nodes in V i have the same type, for i ∈ [ t ] .The family V = { V , V , . . . , V t } is called the type partition of G .Let G = ( V, E ) be a graph with type partition V = { V , V , . . . , V t } . By definition,each V i induces either a clique or an independent set in G . We treat singleton sets inthe type partition as cliques. For each V i , V j ∈ V , we get that either each node in V i isa neighbor of each node in V j or no node in V i has a neighbor in V j . Hence, betweeneach pair V i , V j ∈ V , there is either a complete bipartite graph or no edges at all.Starting from a graph G and its type partition V = { V , . . . , V t } , we can see eachelement of V as a metavertex of a new graph H , called the type graph of G , with- V ( H ) = { , , · · · , t } - E ( H ) = { ( x, y ) | x = y and for each u ∈ V x , v ∈ V y it holds that ( u, v ) ∈ E ( G ) } . For a positive integer n , we use [ n ] to denote the set of the first n integers, that is [ n ] = { , , . . . , n } . = H (0) H (1) H (2) Figure 1: A graph G with iterated type partition 5 and its corresponding type graphsequence: G = H (0) , H (1) , H (2) . Dashed circles group nodes having the same type.We say that G is a base graph if it matches its type graph, that is, the type partitionof G consists of singletons, each representing a node in V ( G ), and nd ( G ) = | V ( G ) | .We introduce a new graph parameter, which generalizes neighborhood diversity.Given a graph G , the Iterated Type Partition of G is defined by iteratively constructingtype graphs until a base graph is obtained. Definition 1.
Given a graph G = ( V, E ) , let H (0) = G and H ( i ) denote the type graphof H ( i − , for i ≥ . Let d be the smallest integer such that H ( d ) is a base graph. The iterated type partition of G , denoted by itp ( G ) , is the number of nodes of H ( d ) . Thesequence of graphs H (0) = G, H (1) , · · · , H ( d ) is called the type graph sequence of G and H ( d ) is denoted as the base graph of G . An example of a graph and its type graph sequence is given in Fig. 1. It is well-known that determining nd ( G ) and the corresponding type partition, can be done inpolynomial time [30]. As an immediate consequence, we have that Theorem 1.
There exists a polynomial time algorithm, which given a graph G =( V, E ) , finds the type graphs sequence of G and consequently the value itp ( G ) . In this section we analyze the relations between the iterated type partition parameterand some other well known parameters.We notice that, as an iteration of neighborhood diversity, the new parameter satisfies itp ( G ) ≤ nd ( G ) . (1)Actually itp ( G ) can be much smaller than nd ( G ) . Indeed consider the following: • Choose a positive integer d and a connected base graph H ( d ) having k nodes; • For i = d, d − , . . . ,
1, a new graph H ( i − is obtained as follows: – replace each node of H ( i ) , with an independent set of at least two nodes (if d − i is even) or a clique of size at least two (if d − i is odd).3 w ( G ) tw ( G ) itp ( G ) nd ( G ) vc ( G ) mw ( G ) Figure 2: A summary of the relations holding among some popular parameters. Inaddition to the previously defined parameters, we use tw ( G ), cw ( G ) and vc ( G ) to de-note treewidth, clique-width and minimum vertex cover of a graph G , respectively.Solid arrows denote generalization, e.g., modular-width generalizes iterated type par-tition. Dashed arrows denote that the generalization may exponentially increase theparameter. – for each edge of H ( i ) , put a complete bipartite graph between the nodes ofthe graphs that replace the endpoints of the edge.The value nd ( H (0) ) is the number of nodes in H (1) , that is at least k d − , while itp ( H (0) )is the size k of H ( d ) .We stress that iterated type partition is a “special case” of modular-width in whichthe modules in operation 4) can only be independent sets or cliques. Hence, it is notdifficult to see that for every graph Gmw ( G ) ≤ itp ( G ) . (2)We know from [30] that nd ( G ) ≤ vc ( G ) + vc ( G ). Hence, by (1), we have itp ( G ) ≤ vc ( G ) + vc ( G ). Moreover, using the same arguments of [30] is it possible to show that cw ( G ) ≤ itp ( G ) + 1 . Finally, as for the neighborhood diversity we can easily show thatthe iterated type partition is incomparable to the treewidth by comparing the valuesof such parameters on a complete graph K n and a path on n nodes. A summary of therelations holding between some popular parameters is given in Fig. 2. We refer to[16] for the formal definitions of treewidth and clique-width parameters. We give both tractability and hardness results for the new parameter.
The
Equitable Coloring (EQC) problem.
If the nodes of a graph G are coloredwith k colors such that no adjacent nodes receive the same color (i.e., properly colored)and the sizes of any two color classes differ by at most one, then G is said to be equitably k -colorable and the coloring is said an equitable k -coloring . The goal is to minimize thenumber of used colors. The EQC problem is a well-studied problem, which has beenanalyzed in terms of parameterized positive or negative results with respect to manydifferent parameters [24].In particular, Fellows et al. [13] have shown that EQC problem parameterizedby treewidth and number of colors is W [1]-hard. A series of reductions proving thatEquitable Coloring is W [1]-hard for different subclasses of chordal graphs are given in[26]: The problem is shown to be W[1]-hard if parameterized by the number of colors for4S, VC Coloring EQC cw FPT[8] W[1]-hard [16] W[1]-hard [18] mw FPT[33] FPT[20] W[1]-hard [*] itp
FPT( O (2 t + poly ( n )))[*] FPT( O ( t . t + o ( t ) log n + poly ( n )))[*] W[1]-hard [*] nd FPT[30] FPT[30] FPT[*] vc FPT[30] FPT[30] FPT [15]Table 1: The table summarizes the results known in literature for several problemsparametrized by iterated type partition and related parameters. t denotes the value ofthe considered parameter and [*] denotes the result obtained in this paper.block graphs and for the disjoint union of split graphs; moreover, it remains W[1]-hardfor K , -free interval graphs even when parameterized by treewidth, number of colorsand maximum degree. In [3] an XP algorithm parameterized by treewidth is given.We notice that an XP algorithm for Equitable Coloring parametrized by iterated typepartition can be obtained by using Theorem 17 in [28]. On the other side, Fiala et al. show that the Equitable Coloring problem is FPT when parameterized by the vertexcover number [15]. However, it was an open problem to establish the parameterizedcomplexity of the Equitable Coloring problem parameterized by neigborhood diversityor modular-width. In section 2 we answer to these questions by proving the followingresults. Theorem 2.
The Equitable Coloring problem is W [1] -hard parametrized by itp . Recalling (2), Theorem 2 immediately gives that the Equitable Coloring Problemis W [1]-hard w.r.t. modular-width. Theorem 3.
The EQC problem is W [1] -hard parametrized by modular-width. We also show that Equitable Coloring W [1]-hardness drops when parameterized bythe neighborhood diversity. Theorem 4.
The EQC problem is FPT when parameterized by neighborhood diversity.
FPT algorithms w.r.t. itp.
In the last section we deal with FPT algorithms withrespect to iterated type partition. Some of the considered problems are already knownto be FPT w.r.t modular-width. Nonetheless, we think that the new algorithms, pa-rameterized by iterated type partition, are worthy to be considered, since they are muchsimpler, faster, and allow to easily determine not only the value, but also the optimalsolution. As an example we consider here the dominating set (DS), the vertex coloring(Coloring), and the vertex cover (VC) problems.Table 1 summarizes the contribution of this paper, in relation to known results.
In this section we prove Theorems 2 and 4.5 a) (b)
Figure 3: (a) (4 , , , Equitable ColoringInstance:
A graph G = ( V, E ) and an integer k . Question:
Is it possible to color the nodes of G with exactly k colors insuch a way that nodes connected by an edge receive different colors andeach color class has either size ⌊| V | /k ⌋ or ⌈| V | /k ⌉ ? In order to prove that Equitable Coloring problem is W [1]-hard if parameterized byiterated type partition, we present a reduction from the following Bin packing problem,which has been shown to be W[1]-hard when parameterized by the number of bins [27]. Bin-PackingInstance:
A collection of items A = { a , a , · · · , a ℓ } , a number k of bins, and abin capacity B . Question: ∃ a k -partition P , · · · , P k of A such that P a j ∈ P i a j = B , ∀ i ∈ [ k ]?In general the Bin-Packing problem asks for the sum of the items of each bin to be at most B ; however, the above version is equivalent to the general one (even from theparameterized point of view) as it is sufficient to add kB − P ℓj =1 a j unitary items [26].In order to describe our reduction, we introduce two useful gadgets. The first one isthe flower gadget also used in [26]. Let a and k be positive integers. An ( a, k ) –flower F a,k is a graph obtained by joining a + 1 cliques of size k to a central node y . Fig.3(a) shows the (4 , K ik be a copy of a cliques of size k , for each i ∈ [ a + 1],– V ( F a,k ) = { y } ∪ S i ∈ [ a +1] V ( K ik ), and– E ( F a,k ) = { ( y, x ) | x ∈ S i ∈ [ a +1] V ( K ik ) } ∪ S i ∈ [ a +1] E ( K ik ) . The second gadget is defined starting from three positive integers: k, ℓ and B . It is asequence of sets of independent nodes S , · · · , S k , S k +1 with | S i | = B , for i ∈ [ k ], and | S k +1 | = ℓ + 1 where between each pair of consecutive sets in the sequence S i , S i +1 there is a complete bipartite graph. We call such a gadget a ( k, ℓ, B )– chain Q . Fig.3(b) shows the (3 , , V ( Q ) = S i ∈ [ k +1] S i , and– E ( Q ) = S i ∈ [ k ] { ( u, v ) | u ∈ S i , v ∈ S i +1 } .
6e can now describe our reduction. Let h A = { a , · · · , a ℓ } , k, B i be an instance ofBin-Packing. Define a graph G as follows: Consider the disjoint union of two ( k, ℓ, B )-chains, Q ′ and Q ′′ , and the flowers F a ,k , · · · , F a ℓ ,k , F B,k , then join each node in theflowers to each node in the chains. In the following, whenever the number of bin k isclear by the context, we use F a instead of F a,k . Formally,– V ( G ) = V ( Q ′ ) ∪ V ( Q ′′ ) ∪ V ( F B ) ∪ (cid:16)S j ∈ [ ℓ ] V ( F a j ) (cid:17) , and– E ( G ) = E ( Q ′ ) ∪ E ( Q ′′ ) ∪ E ( F B ) ∪ (cid:16)S j ∈ [ ℓ ] E ( F a j ) (cid:17) ∪∪ n ( x, u ) (cid:12)(cid:12) x ∈ V ( F B ) ∪ (cid:16)S j ∈ [ ℓ ] V ( F a j ) (cid:17) , u ∈ V ( Q ′ ) ∪ V ( Q ′′ ) o . Fig. 4 shows the graph G when A = { , , , } , B = 4 and k = 3. Call S ′ i (resp. S ′′ i )is the i -th set of independent nodes in Q ′ (resp. Q ′′ ). The number of nodes in theresulting graph G is | V ( G ) | = | V ( Q ′ ) | + | V ( Q ′′ ) | + | V ( F B ) | + X j ∈ [ ℓ ] | V ( F a j ) | = X i ∈ [ k +1] | S ′ i | + X i ∈ [ k +1] | S ′′ i | + (1 + ( B + 1) k ) + X j ∈ [ ℓ ] (1 + ( a j + 1) k )= 2( Bk + ℓ + 1) + (1 + ( B + 1) k ) + ℓ + k X j ∈ [ ℓ ] ( a j + 1)= 2( Bk + ℓ + 1) + (1 + ( B + 1) k ) + ℓ + kℓ + k B = ( k + 3)( Bk + ℓ + 1) . (3) Lemma 1. h A = { a , · · · , a ℓ } , k, B i is a YES instance of Bin-Packing if and only if G is equitably ( k + 3) –colorable.Proof. Given a k -partition P , · · · , P k of A that solves our instance of Bin-Packing, i.e., P a j ∈ P i a j = B for each i ∈ [ k ], we construct a coloring c of the nodes of G and provethat it is an equitable (k+3)-coloring of G . • Coloring of the nodes in Q ′ : For each i ∈ [ k + 1] and u ∈ S ′ i , assign c ( u ) = ( k + 3 if i is odd, k + 2 if i is even. (4) • Coloring of the nodes in Q ′′ : For each i ∈ [ k + 1] and u ∈ S ′′ i , assign c ( u ) = ( k + 3 if i is even, k + 2 if i is odd. (5) • Coloring of the nodes in F B : Let z be the central node in F B . Assign c ( z ) = k +1.Then, assign to each of the k nodes of the B +1 cliques joined to z the remaining k colors, i.e., the colors in { , , · · · k } , so that each node of the clique has a differentcolor. • Coloring of the nodes in F a j , for j ∈ [ ℓ ]: Let y j be the central node in F a j . Assign c ( y j ) = i if a j ∈ P i . Then, as before assign to each of the k nodes of the a j + 1cliques joined to y j the remaining k colors, i.e., the colors in { , , · · · k, k +1 }−{ i } ,so that each node of the clique has a different color.7 = H (0) H (1) H (2) H (3) H (4) Figure 4: The type graph sequence of G when A = { , , , } , B = 4, and k = 3. Theline connecting dashed circles indicates a complete bipartite graph between the nodesin the circles.It is immediate to see that the above coloring c is proper. Now we prove that is alsoequitable. Since | V ( G ) | = ( Bk + ℓ + 1)( k + 3) (recall (3)), we have only to prove thateach class of colors contains Bk + ℓ + 1 nodes. Denote by C i the class of color i , with i ∈ [ k + 3]. • Colors k + 3 and k + 2 are used only to color the nodes of the two k -chains Q ′ and Q ′′ and by (4) and (5) we have | C k +3 | = ( | S ′ | + | S ′′ | + · · · + | S ′ k | + | S ′′ k +1 | = kB + ℓ + 1 if k is odd | S ′ | + | S ′′ | + · · · + | S ′′ k | + | S ′ k +1 | = kB + ℓ + 1 if k is even. | C k +2 | = ( | S ′′ | + | S ′ | + · · · + | S ′′ k | + | S ′ k +1 | = kB + ℓ + 1 if k is odd | S ′′ | + | S ′ | + · · · + | S ′ k | + | S ′′ k +1 | = kB + ℓ + 1 if k is even. • Color k + 1 is used to color node z and exactly one node in each of the a j + 1 cliquesin the flower F a j for j ∈ [ ℓ ]; hence, | C k +1 | = 1 + X j ∈ [ ℓ ] ( a j + 1) = 1 + ℓ + kB. • Let i ∈ [ k ]. Colors i is used to color the following nodes: The central node y j of the8ower F a j where a j ∈ P i (no other node in F a j is colored with i ), exactly one node ineach of the a h + 1 cliques in the flower F a h for a h P i , and exactly one node in eachof the B + 1 cliques in the flower F B . Hence, | C i | = X a j ∈ P i X a h P i ( a h + 1) + ( B + 1)= X a j ∈ A X a h P i a h + ( B + 1)= ℓ + ( k − B + ( B + 1) = 1 + ℓ + kB. Now, let c be an equitable ( k + 3)-coloring of G . First we claim some features ofthe coloring c and then we use them to build a k -partition of A . Claim 1.
The coloring c assigns two colors to the nodes in Q ′ and Q ′′ , and these colorsare not assigned to any node of the flowers F B and F a j for j ∈ [ ℓ ] .Proof. Since the central node y j (resp. z ) of the flower F a j (resp. F B ) is connected toeach node in any clique K k in F a j (resp. F B ), we have that the nodes of F a j (resp. F B )need at least k + 1 colors. Furthermore, the nodes of F a j and of F B are connected toall the nodes of the k -chains Q ′ and Q ′′ . Hence, the colors that c assigns to the nodesin Q ′ and Q ′′ have to be at most two (recall that c is a ( k + 3)-coloring). On the otherhand, between each pair of consecutive sets S ′ i , S ′ i +1 in Q ′ (resp. S ′′ i , S ′′ i +1 in Q ′′ ) thereis a complete bipartite graph; hence, the coloring c has to assign to the nodes in Q ′ and Q ′′ at least two colors.By Claim 1, w.l.o.g. we assume that c assigns colors k + 2 and k + 3 to the nodes in Q ′ and Q ′′ , and colors in [ k + 1] to the nodes of the flowers F B and F a j for j ∈ [ ℓ ]. Inthe following we denote by C i be the class of nodes whose color is i , where i ∈ [ k + 1]. Claim 2. c ( z ) = c ( y j ) for each j ∈ [ ℓ ] .Proof. Let c ( z ) = i with i ∈ [ k + 1]. By contradiction assume that there exists a node y j for some j ∈ [ ℓ ], such that c ( z ) = c ( y j ) = i , that is y j ∈ C i . Since z is connected toeach other node in the flower F B and y j is connected to each other node in the flower F a j , we have that color i is not used by any other node in F B and F a j . On the otherhand, color i is used by exactly one node in each of the a h + 1 cliques in flower F a h where y h C i (recall that c assigns colors in [ k + 1] to the nodes of F a h ). Hence, | C i | = 2 + X h : y h C i ( a h + 1) = 2 + X h : y h C i ( a h + 1) + X j : y j ∈ C i ( a j + 1) − X j : y j ∈ C i ( a j + 1)= 2 + X h ∈ [ ℓ ] ( a h + 1) − X j : y j ∈ C i ( a j + 1)= 2 + ℓ + kB − X j : y j ∈ C i ( a j + 1) ≤ ℓ + kB (by the hypothesis there exists y j ∈ C i and P j : y j ∈ C i ( a j + 1) ≥ . The above inequality is not possible since c is an equitable ( k + 3)–coloring and by (3)we have | C i | = 1 + ℓ + kB . 9y Claim 2, w.l.o.g. we assume that c ( z ) = k + 1 and then c ( y j ) ∈ [ k ] for each j ∈ [ ℓ ]. In the following we will prove that the partition P i = { a j | c ( y j ) = i } with i ∈ [ k ] is a k -partition of A . In particular, we will prove that X j : y j ∈ C i a j = B. (6)Consider a flower F a j , with j ∈ [ ℓ ]: If the color i is assigned to the center y j then itis not assigned to any other vertex in F a j ; if, otherwise, the color i is not assigned tothe center y j then it is assigned to exactly one vertex in each of the a j + 1 cliques K k connected to y j .Furthermore, the center z of the flower F B has color k + 1; hence, color i is assigned toexactly one vertex in each of the B + 1 cliques K k connected to z . Summarizing, | C i | = X j : y j ∈ C i B + 1) + X h : y h C i ( a h + 1)= X j : y j ∈ C i (1 + a j − a j ) + ( B + 1) + X h : y h C i ( a h + 1)= X j ∈ [ ℓ ] (1 + a j ) + ( B + 1) − X j : y j ∈ C i a j = kB + ℓ + ( B + 1) − X j : y j ∈ C i a j (7)Since the coloring c is an equitable (k+3)-coloring and by (3) it holds | V ( G ) | = ( Bk + ℓ + 1)( k + 3), we have that | C i | = Bk + ℓ + 1. By using this fact and (7) we have (6). Lemma 2.
The iterated type partition itp ( G ) of G is k + 3 .Proof. The type graph H (1) of G is obtained as follows:– Compress the cliques in the flower F B into one node each. Call f , . . . , f B +1) theresulting nodes.– Compress each of the a j + 1 cliques K k in the flower F a j , for j ∈ [ ℓ ], into one node.Call them f j , . . . , f j ( a j +1) .– Compress each set S ′ i of independent nodes in Q ′ into one node. Call them s ′ , · · · s ′ k +1 .– Compress each set S ′′ i of independent nodes in Q ′′ into one node. Call them s ′′ , · · · s ′′ k +1 .As a consequence we have: V ( H (1) ) = { z, f , . . . , f B +1) }∪ S j ∈ [ ℓ ] { y j , f j , . . . , f j ( a j +1) }∪{ s ′ , · · · s ′ k +1 }∪{ s ′′ , · · · s ′′ k +1 } E ( H (1) ) = { ( z, f i ) | i ∈ [ B + 1] } ∪ [ j ∈ [ ℓ ] { ( y j , f ji ) | i ∈ [ a j + 1] } ∪ { ( s ′ i , s ′ i +1 ) , ( s ′′ i , s ′′ i +1 ) | i ∈ [ k ] } ∪{ ( x, v ) | x ∈ { z, f i | i ∈ [ B + 1] } ∪ { y j , f ji | j ∈ [ ℓ ] , i ∈ [ a j + 1] } , v ∈ { s ′ i , s ′′ i | i ∈ [ k + 1] }} The type graph H (2) of H (1) is obtained as follows:– Compress the set of independent nodes { f , . . . , f B +1) } into a node. Call it f .– Compress the set of independent nodes { f j , . . . , f j ( a j +1) } into a node. Call it f j .Hence, V ( H (2) ) = { z, f } ∪ S j ∈ [ ℓ ] { y j , f j } ∪ { s ′ , · · · s ′ k +1 } ∪ { s ′′ , · · · s ′′ k +1 } and E ( H (2) ) = { ( z, f ) } ∪ [ j ∈ [ ℓ ] { ( y j , f j ) } ∪ { ( s ′ i , s ′ i +1 ) , ( s ′′ i , s ′′ i +1 ) | i ∈ [ k ] } ∪{ ( x, v ) | x ∈ { z, f } ∪ { y j , f j | j ∈ [ ℓ ] } , v ∈ { s ′ i , s ′′ i | i ∈ [ k + 1] }} H (3) of H (2) is obtained as follows:– Compress the clique consisting of one edge { ( z, f ) } into a node. Call it z ′ .– Compress the cliques each consisting of one edge { ( y j , f j ) } into a node, for j ∈ [ ℓ ].Call it y ′ j .Hence, V ( H (3) ) = { z ′ , y ′ j | j ∈ [ ℓ ] } ∪ { s ′ , · · · s ′ k +1 } ∪ { s ′′ , · · · s ′′ k +1 } and E ( H (3) ) = { ( s ′ i , s ′ i +1 ) , ( s ′′ i , s ′′ i +1 ) | i ∈ [ k ] } ∪{ ( x, v ) | x ∈ { z ′ , y ′ j | j ∈ [ ℓ ] } , v ∈ { s ′ i , s ′′ i | i ∈ [ k + 1] }} The type graph H (4) of H (3) is obtained as follows:– Compress the set of independent nodes { z ′ , y ′ j | j ∈ [ ℓ ] } into a node. Call it y ′′ .Hence, V ( H (4) ) = { y ′′ } ∪ { s ′ , · · · s ′ k +1 } ∪ { s ′′ , · · · s ′′ k +1 } and E ( H (4) ) = { ( s ′ i , s ′ i +1 ) , ( s ′′ i , s ′′ i +1 ) | i ∈ [ k ] } ∪ { ( y ′′ , v ) | v ∈ { s ′ i , s ′′ i | i ∈ [ k + 1] }} It is immediate to see that H (4) is a base graph and that | V ( H (4) ) | = 2 k + 3. Proof. of Theorem 2.
Given an instance h A = { a , · · · , a ℓ } , k, B i of Bin-Packing, weuse the above construction to create an instance h G = ( V, E ) , itp ( G ) i of EquitableColoringparameterized by iterated type partition. Lemma 1 show the correctness of ourreduction and Lemma 2 provides the iterated type partition of the constructed graph,showing that our new parameter itp ( G ) is linear in the original parameter k . We prove here that the Equitable Coloring problem admits a FPT algorithm withrespect to neighborhood diversity. W.l.o.g. we assume that the number of nodes in theinput graph G = ( V, E ) is a multiple of the number of colors k (this can be attainedby adding a clique of | V | − ( ⌊| V | /k ⌋ · k ) nodes connected to a node in G in such a waythe answer to the equitable k -coloring question remains unchanged).Let then r = | V | /k . Any equitable k -coloring of G partitions V into k classes of colors,say C , . . . , C k , s.t. C ℓ is an independent set of G of size | C ℓ | = r , for ℓ = 1 , . . . , k .If we consider now the type partition { V , . . . , V t } of G and the corresponding typegraph H = ( V ( H ) = { , . . . , t } , E ( H )), we trivially have that: Two nodes u, v ∈ V are independent in G iff v ∈ V i and u ∈ V j , with i, j ∈ V ( H ) , such that either i and j are independent nodes of H or i = j and V i induces an independent set in G . Thisimmediately implies that for each color class C ℓ of the equitable coloring of G thereexists an independent set I ℓ = { ℓ , . . . , ℓ ρ } of H such that P ρs =1 | C ℓ ∩ V ℓ s | = r and | C ℓ ∩ V ℓ s | = 1 for each s = 1 , . . . , ρ such that V ℓ s induces a clique.Let now I denote the family of all independent sets in H . From the above reasoningwe have that, given any equitable k -coloring of G , we can associate to each I ∈ I aseparate set of z I ≥ P I ∈I z I = k ,2. for each i ∈ V ( H ) it holds that the sum over all I ∈ I such that i ∈ I of thenumber of nodes in V i that (in the coloring of G ) are colored with one of the z I colors associated to I (this number is at most z I if V i induces a clique in G , butcan be larger if V i induces an independent set) is exactly | V i | .11. for each I ∈ I it holds that the sum over all i ∈ V ( H ) of the number of nodes of V i that that are colored in G with one of the z I colors associated to I is r · z I .The above conditions can be expressed by the following linear program on the variables z I for each I ∈ I and z I,i for each I ∈ I and for each i ∈ I .1. P I ∈I z I = k ;2. P I : i ∈ I z I,i = | V i | , for each i ∈ V ( H );3. P i ∈ I z I,i − r · z I = 0, for each I ∈ I ;4. z I − z I,i ≥ I ∈ I and i ∈ I such that V i is a clique;5. z I,i ≥ I ∈ I and i ∈ V ( H ).From the above reasoning, it is clear that if the graph G admits an equitable k -coloring,then there exists an assignation of values to the variables z I and z I,i , for each I ∈ I and i ∈ I , that satisfies the above system.We show now that from any assignation of values to the variables z I and z I,i thatsatisfies the above system, we can obtain an equitable k -coloring of G . • For each independent set I ∈ I , such that z I >
0, repeat the following procedure: • Select a set of z I new colors, say c I , . . . , c Iz I (to be used only for nodes in I );We notice that (by 3.) the total number of nodes to be colored is r · z I ; • Consider the list of colors c I , c I , . . . , c Iz I , c I , c I , . . . , c Iz I . . . , c I , c I , . . . , c Iz I (obtainedcycling for r times on c I , . . . , c Iz I ); assign the colors starting from the beginningof the list as follows: For each i ∈ V ( H ), select z I,i uncolored nodes in V i (it canbe done by 2.) and assign to them the next unassigned z I,i colors in the list.In this way each color is used exactly r times. Moreover, since each independent setuses a separate set of colors, the total number of colors is P I ∈I z I = k (crf. 1.).Furthermore, in each V i that induces a clique in G , we color z I,i ≤ z I nodes (this holdsby 4.). Such nodes get colors which are consecutive in the list, hence they are different.Summarizing, the desired equitable k -coloring of G has been obtained.Finally, we evaluate the time to solve the above system. We use the well-knownresult that Integer Linear Programming is FPT parameterized by the number of vari-ables. ℓ -Variable Integer Linear Programming FeasibilityInstance: A matrix A ∈ Z m × ℓ and a vector b ∈ Z m . Question:
Is there a vector x ∈ Z ℓ such that Ax ≥ b ? Proposition 1. [12] ℓ -Variable Integer Linear Programming Feasibility can be solvedin time O ( ℓ . t + o ( ℓ ) · L ) where L is the number of bits in the input. Since | V ( H ) | = nd ( G ), our system uses at most O ( nd ( G )2 nd ( G ) ) variables: z I for I ∈ I and z I,i for I ∈ I and i ∈ I . We have O ( nd ( G )2 nd ( G ) ) constraints and the coefficientsare upper bounded by r = | V | /k . Therefore, Theorem 4 holds.12 Algorithms
In this section, we provide some FPT algorithms with respect to iterated type partition.In order to solve a problem P on an input graph G , the general algorithm scheme is:1) Iterate by generating the whole type graph sequence of G .2) On each graph G ′ in the type graph sequence, a generalized version P ′ of theoriginal problem is defined (with P ′ in G ′ being equivalent to P in G ).3) Optimally solve P ′ on the base graph and reconstruct the solution on the reversetype graph sequence (hence solving P in G ).If the construction of the solution for P ′ (at step 2), can be done in polynomial timeand the time to solve P ′ on the base graph is f , then the whole algorithm needs O ( f + poly ( n )) time. We stress that this is indeed the case for the algorithms below. In order to present our FPT algorithm for the minimum dominating set problem in G with parameter itp ( G ), we consider the following generalized dominating set problem. Definition 2.
Given a graph G = ( V, E ) and a set of nodes Q ⊆ V , a semi-totaldominating set of G with respect to Q , called Q - stds of G , is a set D ⊆ V such thatevery node in Q is adjacent to a node in D , and every other node is either a node in D or it is dominated by a node in D . The set D is said an optimal Q - stds of G , if itssize is minimum among all the Q - stds of G . Clearly, when Q = V the semi-total dominating set problem is the total dominationproblem [4]. If Q = ∅ , the semi-total dominating set problem becomes the dominatingset problem. Lemma 3.
Let G = ( V, E ) be a connected graph and let V = { V , · · · , V t } be the typepartition of G . Let Q ⊆ V . There exists an optimal Q -stds D of G such that | V x ∩ D | ≤ for each x ∈ [ t ] . (8) Proof.
Let D be an optimal Q -stds of G . Assume there exists x ∈ [ t ] such that | V x ∩ D | ≥
2. We distinguish two cases according to V x being a clique or an independent set.Let V x be a clique. Let u and v be two nodes in V x ∩ D . Let u Q . Since u isa neighbor of v and since u and v share the same neighborhood, we have that the set D ′ = D − { v } is a Q -stds of G . Furthermore, | D ′ | < | D | and this is not possible since D is optimal. Assume now that u ∈ Q . If there exists a neighbor w of u with w ∈ V y ∩ D ,for some y = x , then as above D ′ = D − { v } is a Q -stds of G and | D ′ | < | D | . If,otherwise, node u has no neighbor in D except for those in V x , then we can choose anyneighbor w of u with w ∈ V y ∩ D , for some y = x , and D ′ = D − { v } ∪ { w } is a Q -stdsof G and | D ′ | = | D | .Let V x be an independent set. Let u be any node in V x ∩ D . If there exists aneighbor w of u with w ∈ V y ∩ D , for some y = x , then the set D ′ obtained from D removing all the nodes in V x except for u is again a Q -stds since the neighbors ofnodes in V x are dominated by u and all the nodes in V x are dominated by w ∈ V y .13 lgorithm 1: Algorithm Dom ( H, Q ) Input:
A graph H = ( V ( H ) , E ( H )), a set Q ⊆ V ( H ). if H is a base graph then D = V ( H ) for each S ⊆ V ( H ) do if (( S is Q -stds of H ) and ( | S | < | D | )) then D = S else Let V , · · · , V t be the type partition of H and let H ′ be the type graph of H . Q ′ = { x ∈ V ( H ′ ) | ( V x ∩ Q = ∅ or V x is an independent set) } D ′ = Dom ( H ′ , Q ′ ) D = S x ∈ D ′ { u x } , where u x is an arbitrarily chosen node in V x return D Furthermore, | D ′ | < | D | . Otherwise, we have that V x ⊂ D and for each neighbor w of u it holds w ∈ V y , for y = x , and w D . Hence, the set D ′ obtained from D removingall the nodes in V x except for u and adding to it a node w ∈ V y , where y is such that V y ∩ D = ∅ , is a Q -stds of G . Furthermore, | D ′ | ≤ | D | .Repeating the above argument for each x ∈ [ t ] such that | V x ∩ D | ≥
2, we obtainan optimal solution satisfying (8).The FPT algorithm
Dom recursively constructs the graphs in the type graph se-quence of G , until the base graph is obtained. It is initially called with Dom ( G, ∅ ). Ateach recursive step, the algorithm Dom ( H, Q ), on a graph H and a set Q ⊆ V ( H ) ofnodes that need to have a neighbor in the solution set, checks if H is a base graph ornot. In case H is a base graph, then the algorithm searches by brute force the Q -stdsof H and returns it. If H is not a base graph then the algorithm first constructs thetype graph H ′ and conveniently selects nodes in V ( H ′ ) to assemble a set Q ′ of nodesthat need to have a neighbor in the solution set, then it uses the set D ′ of nodes in V ( H ′ ) returned by Dom ( H ′ , Q ′ ) to construct the output set D ⊆ V ( H ). The nodesof the returned set D are chosen selecting exactly one node from each metavertex V x having x ∈ D ′ .Figure 5 gives an example of the execution of Algorithm 1 on the graph G in Fig.1. Lemma 4.
Let H be not a base graph and let Q ⊆ V ( H ) . Let V , · · · , V t be thetype partition of H and let H ′ be its type graph. If Q ′ = { x ∈ V ( H ′ ) | V x ∩ Q = ∅ or V x is an independent set } and D ′ is an optimal Q ′ -stds of H ′ then the set D re-turned by Dom ( H, Q ) is an optimal Q -stds of H .Proof. We first prove that the set D returned by Dom ( H, Q ) is a Q -stds of H , thenwe prove its optimality. We distinguish two cases according to the fact that a node v ∈ V ( H ) is a node in Q or not. W.l.o.g. assume that v ∈ V x , for some x ∈ [ t ].- If v ∈ Q then V x ∩ Q = ∅ and by the definition of Q ′ we have that x ∈ Q ′ . Hence,since D ′ is a Q ′ -stds of H ′ , there exists y ∈ D ′ that is a neighbor of x in H ′ . ByAlgorithm 1 (see line 8) there exists a node u y ∈ V y ∩ D . Considering that each node in V y is a neighbor of each node in V x (since ( x, y ) ∈ E ( H ′ )), we have that v is dominatedby u ∈ D .- Let v ∈ V − Q . We know that D ′ is a Q ′ -stds of H ′ . Hence, if either x ∈ Q ′ = GQ = ∅ H ′ = H (1) Q ′ = { v (1)2 , v (1)5 } H = H (1) Q = { v (1)2 , v (1)5 } H ′ = H (2) Q ′ = { v (2)2 , v (2)3 } H = H (2) Q = { v (2)2 , v (2)3 } D = { v (2)1 , v (2)4 } H = H (1) Q = { v (1)2 , v (1)5 } H ′ = H (2) Q ′ = { v (2)2 , v (2)3 } D ′ = { v (2)1 , v (2)4 } D = { v (1)1 , v (1)6 } H = GQ = ∅ H ′ = H (1) Q ′ = { v (1)2 , v (1)5 } D ′ = { v (1)1 , v (1)6 } D = { v , v } ( r ) ( r ) ( r ) ( r ) ( r )( r ) ( r ) ( r )( r )(a) (b) (c) (d) (e) Figure 5: The recursive execution of the algorithm 1 on the graph G depicted in Fig. 1:((a) and (b)), since the input graph is not a base graph, their type partition as well asthe set Q ′ are computed and passed to the next recursive level; (c), H is a base graphand then an optimal solution is computed exploiting a brute force approach; ((d) and(e)), an optimal solution D = { v , v } is reconstructed using the solution D ′ obtainedon the reverse type graph sequence.or x Q ′ ∪ D ′ we can prove, as in the previous case, that there exists u ∈ D thatdominates v . Assume now that x Q ′ and x ∈ D ′ (i.e., x can be not dominated in H ′ ).By the definition of Q ′ we have that V x ∩ Q = ∅ and V x is a clique. Hence, since byAlgorithm 1 (see line 8) there exists a node u x ∈ V x ∩ D , we have that v is a neighborof u x ∈ D in the clique V x .Now, we prove that D is an optimal Q -stds of H whenever D ′ is an optimal Q ′ -stdsof H ′ . By contradiction, assume that D is not optimal and let ˜ D be an optimal Q -stdsof H . By Lemma 3 we can assume that, for each x ∈ [ t ], at most one node in V x is anode in ˜ D . Let ˜ D ′ = { x | V x ∩ ˜ D = ∅} . We claim that ˜ D ′ is a Q ′ -stds of H ′ . Indeed:– If x ∈ ˜ D ′ then there is a node u ∈ V x ∩ ˜ D . Since ˜ D is a Q -stds of H , we have thatthere exists a node v ∈ V y ∩ ˜ D that is a neighbor of u in H , for some y ∈ [ t ] − { x } .Hence, y ∈ ˜ D ′ and y is a neighbor of x in H ′ .– If x ˜ D ′ then V x ∩ ˜ D = ∅ . Hence, any node u ∈ V x is dominated by some node v ∈ ˜ D . Since v ∈ V y , for some y ∈ [ t ] − { x } , we have that x is a neighbor of y in H ′ ;furthermore, ˜ D ∩ V y = ∅ and so y ∈ ˜ D ′ .Finally, we prove that | ˜ D ′ | < | D ′ | thus obtaining a contradiction since D ′ is optimal.By Lemma 3 and the construction of ˜ D ′ , there is a one-to-one correspondence between˜ D ′ and ˜ D . Furthermore, by Algorithm 1 there is a correspondence one-to-one between D ′ and D . Hence, | ˜ D ′ | = | ˜ D | < | D | = | D ′ | . Theorem 5.
Dom ( G, ∅ ) returns a minimum dominating set in time O (2 itp ( G ) + poly ( n )) .Proof. Let H (0) = G, H (1) , · · · , H ( d ) be the type graph sequence of G . When Dom ( G, ∅ )is called, Algorithm 1 proceeds recursively, and at the i -th recursive step, for i =0 , · · · , d , the algorithm is called with input graph H ( i ) and input node set Q i ⊆ V ( H ( i ) ),where Q i is constructed at line 3 of the previous step i −
1, for i = 1 , · · · , d , and it isthe empty set when i = 0, i.e., Q = ∅ .At step d the algorithm establishes by brute force the optimal Q d -stds of the basegraph H ( d ) .By Lemma 4, the set returned at the end of each recursive step i , for i = d − , · · · , Q i -stds of H ( i ) . Hence, at the end (when i = 0) the returned set is theoptimal ∅ -stds of H (0) , that by the definition is the minimum dominating set of G .15onsidering that | V ( H ( d ) ) | = itp ( G ), the brute search of the solution set at step d requires time O (2 itp ( G ) ). Furthermore, since the construction of the type partitionof H ( i ) and of its type graph can be done in polynomial time, and that both theconstruction of Q i and the selection of the nodes in the solution set are easily obtainedin linear time, we have O (2 itp ( G ) + poly ( n )) time. In the following we deal with a generalization of the vertex coloring known as multi-coloring.
Definition 3.
Given a graph G = ( V, E ) and a weight function w : V ( G ) → N , the w - multicoloring of G is a function C that assigns to each node v ∈ V ( G ) a set of w ( v ) distinct colors such that if ( u, v ) ∈ E ( G ) then C ( u ) ∩ C ( v ) = ∅ . The objective of w -multicoloring problem is to minimize the total number of colors used by the assignment C . In case of unitary weights, the multicoloring problem becomes the vertex coloringproblem.In the following we say that a set of colors C ( v ) assigned to a node v ∈ V ( G ) is safe for v if C ( u ) ∩ C ( v ) = ∅ whenever ( u, v ) ∈ E ( G ). Lemma 5.
Let G be a graph and let w : V ( G ) → N be a weight function. Let V , · · · , V t be the type partition of G . There exists an optimal w -multicoloring C of G such thatfor each independent set V x in the type partition of G it holds C ( u ) ⊆ C ( v ) for u ∈ V x and v = arg max u ∈ V x | C ( u ) | .Proof. Let V x be any independent set and let v x = arg max u ∈ V x | C ( u ) | . Since v x shareswith any other node u ∈ V x the neighborhood, we have that the set of colors C ( v x ) issafe for each node u ∈ V x . Hence, C ( u ) ⊆ C ( v x ) with | C ( u ) | = w ( u ) is safe for u . Thisallows to define a new optimal w -multicoloring C ′ as follows: C ′ ( u ) = C ( u ) if u ∈ V x and V x is a clique C ( v x ) if u = v x and V x is an independent set C ( u ) ⊆ C ( v x ) with | C ( u ) | = w ( u ) if u ∈ V x − { v x } and V x is an independent set.The proposed FPT algorithm Color is given as Algorithm 2. Let w u be a unitaryweight function, that is, w u : V ( G ) → { } . Initially the algorithm is called with Color ( G, w u ). The algorithm recursively constructs the graphs in the type graph se-quence of G , until the base graph is obtained. At each recursive step, the algorithm hasas input a graph H and the weight function w that, for each node u ∈ V ( H ), gives thenumber w ( u ) of colors that must be assigned to u . The weight function w is obtainedfrom the one at the previous step. In case H is the base graph, then the algorithmsolves the ILP shown at the lines 4-5 and, by following [30], obtains the minimum w -multicoloring C of H . If, otherwise, H is not the base graph then the algorithm firstconstructs the type graph H ′ of H and opportunely evaluates the weight w ′ ( x ) to beassigned to each node x in V ( H ′ ), then it uses the w ′ -multicoloring C ′ of H ′ returned16y Color ( H ′ , w ′ ) to build and return the w -multicoloring C of H . In particular, thealgorithm considers each set V x in the type partition of H and distributes the w ′ ( x )colors assigned to x to the nodes in V x taking account of the fact whether V x is a cliqueor an independent set. Algorithm 2: Algorithm
Color ( H, w ) Input:
A graph H = ( V ( H ) , E ( H )), a weighted function w : V ( H ) → N of if H a base graph then Let I be the set of all independent sets of nodes in H . Solve the following ILP: min P I ∈I z I P I : u ∈ I z I = w ( u ) for each u ∈ V ( H ) for each I such that z I > do Choose z I new colors and give to each u ∈ I a set C ( u ) of w ( u ) suchcolors, else Let V , · · · , V t be the type partition of H and H ′ be the type graph of H . for each x ∈ V ( H ′ ) do w ′ ( x ) = (P u ∈ V x w ( u ) if V x is a cliquemax u ∈ V x w ( u ) if V x is an independent set C ′ = Color ( H ′ , w ′ ) for each x ∈ V ( H ′ ) do if V x is a clique then Let u , u , · · · , u | V x | be the nodes in V x Partition C ′ ( x ) in | V x | subsets, C ( u ) , C ( u ) , · · · , C ( u | V x | ), s.t. | C ( u i ) | = w ( u i ) for i = 1 , , · · · , | V x | else Assign to each node u ∈ V x a set C ( u ) ⊆ C ′ ( x ), with | C ( u ) | = w ( u ) return C Lemma 6.
Let H be not a base graph and let w : V ( G ) → N be a weight function. Let V , · · · , V t be the type partition of H and let H ′ be its type graph. If w ′ ( x ) = (P u ∈ V x w ( u ) if V x is a clique max u ∈ V x w ( u ) if V x is an independent setand C ′ is an optimal w ′ -multicoloring of H ′ then the coloring C returned by Color ( H, w ) is an optimal w –multicoloring of H .Proof. We first prove that the coloring C returned by Color ( H, w ) is a w -multicoloringof H , then we will prove that it is also optimal. Let v be any node in V ( H ). W.l.o.g.assume that v ∈ V x , for some x ∈ [ t ]. We distinguish two cases according to the factthat V x is a clique or an independent set.- Let V x be a clique. Since by the hypothesis w ′ ( x ) = P u ∈ V x w ( u ) then the partitioningof the colors in C ′ ( x ) in the | V x | sets given at line 15 correctly assigns a set C ( u ) of w ( u )colors to u ∈ V x . Now we claim that C ( u ) is safe for u , i.e., C ( u ) ∩ C ( v ) = ∅ whenever( u, v ) ∈ E ( H ). If u, v ∈ V x then the claim follows since C ( u ) and C ( v ) are two sets in17he partition of C ′ ( x ). If u ∈ V x and v ∈ V y , for y = x , then by the construction ofthe type graph H ′ we have ( x, y ) ∈ E ( H ′ ) and, by the hypothesis, C ′ ( x ) ∩ C ′ ( y ) = ∅ .Considering that C ( v ) ⊆ C ′ ( y ), we have the claim also in this case.- Let V x be an independent set. Let u ∈ V x . Since w ′ ( x ) = max u ∈ V x w ( u ) then thealgorithm (at line 16) correctly assigns a set C ( u ) ⊆ C ′ ( x ) of w ( u ) colors to u . Since V x is an independent set we have that each neighbor v of u in H is a node of some V y with y = x and ( x, y ) ∈ E ( H ′ ). As in the above case, it is easy to see that since C ′ ( x ) ∩ C ′ ( y ) = ∅ and C ( v ) ⊆ C ′ ( y ) we have C ( u ) ∩ C ( v ) = ∅ ; then, C ( u ) is safe for u .Now, we prove that C is an optimal w -multicoloring of H whenever C ′ is an optimal w ′ -multicoloring of H ′ . By contradiction, assume that C is not optimal and let ˜ C be anoptimal w -multicoloring of H , that is | S u ∈ V ( H ) ˜ C ( u ) | < | S u ∈ V ( H ) C ( u ) | . We assumethat ˜ C is the optimal multicoloring pinpointed by Lemma 5. By using ˜ C we define a w ′ -multicoloring ˜ C ′ of H ′ as follows:˜ C ′ ( x ) = [ u ∈ V x ˜ C ( u ) for x ∈ V ( H ′ ) . (9)We first prove that | ˜ C ′ ( x ) | = w ′ ( x ), then we prove that ˜ C ′ ( x ) is safe for x . Finally, weprove that the number of colors used by ˜ C ′ is less than the number of colors used by C ′ , thus obtaining a contradiction.If V x is a clique then ˜ C ( u ) ∩ ˜ C ( v ) = ∅ for each pair of nodes u, v ∈ V x . Hence | ˜ C ′ ( x ) | = P u ∈ V x | ˜ C ( u ) | = P u ∈ V x w ( u ) = w ′ ( x ). If V x is an independent set then byusing Lemma 5 we have that if v = arg max u ∈ V x | ˜ C ( u ) | then ˜ C ( u ) ⊆ ˜ C ( v ) for u ∈ V x .Hence, | ˜ C ′ ( x ) | = | S u ∈ V x ˜ C ( u ) | = | ˜ C ( v ) | = w ( v ) = max u ∈ V x w ( u ) = w ′ ( x ).To prove that ˜ C ′ ( x ) is safe for x , consider that for each y ∈ V ( H ′ ) with ( x, y ) ∈ E ( H ′ )we have that ( u, v ) ∈ E ( H ) for each u ∈ V x and v ∈ V y . Hence, since ˜ C ( u ) ∩ ˜ C ( v ) = ∅ ,we have ˜ C ′ ( x ) ∩ ˜ C ′ ( y ) = ∅ and then ˜ C ′ ( x ) is safe for x .To complete the proof, we recall that the construction of C by C ′ in Algorithm 2 assuresthat S u ∈ V ( H ) C ( u ) = S x ∈ V ( H ′ ) C ′ ( x ). Hence, by (9) we have (cid:12)(cid:12) [ x ∈ V ( H ′ ) ˜ C ′ ( x ) (cid:12)(cid:12) = (cid:12)(cid:12) [ x ∈ V ( H ′ ) [ u ∈ V x ˜ C ( u ) (cid:12)(cid:12) = (cid:12)(cid:12) [ u ∈ V ( H ) ˜ C ( u ) (cid:12)(cid:12) < (cid:12)(cid:12) [ u ∈ V ( H ) C ( u ) (cid:12)(cid:12) = (cid:12)(cid:12) [ x ∈ V ( H ′ ) C ′ ( x ) (cid:12)(cid:12) Theorem 6.
Color ( G, w u ) returns a minimum coloring of G in time O ( t , t + o ( t ) log n + poly ( n )) , where t = itp ( G ) .Proof. Let H (0) = G, H (1) , · · · , H ( d ) be the type graph sequence of G . When Color ( G, w u )is called, Algorithm 2 proceeds recursively, and at the i -th recursive step, for i =0 , · · · , d , the algorithm is called with input graph H ( i ) and input weighted function w i ,where w i is constructed at line 10 of the previous step i −
1, for i = 1 , · · · , d , and it isthe unitary weighted function when i = 0, i.e., w = w u .At step d the algorithm solves an ILP that generalizes the ILP introduced by Lampisin [30] to obtain an FPT algorithm for proper coloring the nodes of a graph. Indeed,considering that to guarantee the safety of a multicoloring, each color class consistsof an independent set of nodes in H ( d ) , the ILP at lines 4-5 uses the set I of all theindependent sets of nodes in H ( d ) and determines the number z I , for I ∈ I , of colors18o be assigned to the nodes in I . The target is to minimize the total number of usedcolors, i.e. P I ∈I z I , subject to the following constraints: For each node u ∈ V ( H ( d ) ),the sum of the number of colors z I assigned to each independent set I who u belongs tois exactly equal to the number of colors that u needs, i.e., w d ( u ). Hence, the assignment C ( u ) to node u ∈ I (see line 7) of w d ( u ) colors chosen among the z I colors assigned to I , is an optimal w d -multicoloring of the base graph H ( d ) .By Lemma 6, the multicoloring returned at the end of each recursive step i , for i = d − , · · · ,
0, is the optimal w i -multicoloring of H ( i ) . Hence, at the end (when i = 0) the returned multicoloring is the optimal w u -multicoloring of H (0) , that by thedefinition is the minimum coloring of G .To evaluate the time of our algorithm we use the well-known result that IntegerLinear Programming is fixed parameter tractable parameterized by the number of vari-ables. t -Variable Opt Integer Linear ProgrammingInstance: A matrix A ∈ Z m × t and vector b ∈ Z m and c ∈ Z t . Question:
Find a vector x ∈ Z t that minimize c ⊤ x and satisfies Ax ≥ b ? Theorem 7. [12] t -Variable Opt Integer Linear Programming can be solved in time O ( t . t + o ( t ) · L · log( M N )) where L is the number of bits in the input N is the maximumabsolute values any variable can take, and M is an upper bound on the absolute valueof the minimum taken by the objective function. Since | V ( H ( d ) ) | = itp ( G ), the ILP at lines 4-5 uses 2 itp ( G ) variables and itp ( G )constraints. As highlighted by Lenstra (see section 4 in [31]), such ILP can be reducedto an ILP with only min { itp ( G ) , itp ( G ) } = itp ( G ) variables. By Proposition 7 we havethat it can be solved in time O ( t . t + o ( t ) log n ) where t = itp ( G ). Furthermore, sincethe construction of the type partition of H ( i ) and of its type graph can be done inpolynomial time, and that both the construction of w i and the selection of the colorsfor each node u ∈ V ( H ( i ) ) are easily obtained in linear time, we have O ( t . t + o ( t ) log n + poly ( n )) time.An algorithm parameterized by modular-width, which obtains the minimum numberof colors to color properly a graph G was presented in [20]. We stress that, a partsimplicity and efficiency questions, such an algorithm does not provide the coloring ofthe vertices. We consider the following generalization of the weighted vertex cover.
Definition 4.
Given a graph G = ( V, E ) and two weight functions w : V → N and s : V → N s.t. w ( v ) ≤ s ( v ) for each v ∈ V , the of G respect to s ( · ) and w ( · ) is a set C ⊆ V s.t. C is a vertex cover for G , whichminimizes the value Cost ( C ) = P v ∈ C s ( v ) + P v / ∈ C w ( v ) . When w ( v ) = 0 and s ( v ) = 1 for each v ∈ V , a 2-WVC of G is a vertex cover of G .Algorithm 3 shows the FPT algorithm Vertex Cover . The algorithm recursivelyconstructs graphs in the type graph sequence of G , until the base graph is obtained.It is initially called with Vertex Cover ( G, w, s ), where for each v ∈ V we have w ( v ) = 019 lgorithm 3: Vertex Cover ( H, w, s ) Input:
A graph H = ( V ( H ) , E ( H )), two weighted functions w : V ( H ) → N , s : V ( H ) → N if H is a base graph then C = V ( H ) for each S ⊆ V ( H ) do if ( S is a vertex cover of H ) and( P v ∈ S s ( v ) + P v / ∈ S w ( v ) < P v ∈ C s ( v ) + P v / ∈ C w ( v ) ) then C = S else Let V , · · · , V t be the type partition of H and H ′ the type graph of H . for x ∈ V ( H ′ ) do w ′ ( x ) = min v ∈ V x (cid:18) w ( v ) + P u ∈ Vxu = v s ( u ) (cid:19) if V x is a clique P u ∈ V x w ( u ) otherwise for x ∈ V ( H ′ ) do s ′ ( x ) = P u ∈ V x s ( u ) C ′ = Vertex Cover ( H ′ , w ′ , s ′ ) C = ∅ for each x ∈ V ( H ′ ) do if x ∈ C ′ then C = C ∪ V x else if V x is a clique then v x = arg max u ∈ V x ( s ( u ) − w ( u )); C = C ∪ ( V x − { v x } ) return C and s ( v ) = 1. Intuitively the function s ( · ) recursively counts the number of nodes of G that are represented by a metavertex, while the function w ( · ) computes the minimumnumber of nodes of G needed to cover the internal edges of a metavertex. At eachrecursive step, the algorithm takes as input a graph H and the two functions s ( · ) and w ( · ) computed in the previous step. The goal of the algorithm is to compute for each H in the type graph sequence, a subset C ⊆ V ( H ) of nodes that is a 2-WVC of H . Hence,in order to show that the algorithm is correct, we need to prove that given C ′ ⊆ V ( H ′ )that is a 2-WVC of H ′ , where H ′ is the type graph of H , the solution C ⊆ V ( H ) –computed by the algorithm for H – is a 2-WVC of H . The result will follow since, inthe initial graph G , for each v ∈ V we have w ( v ) = 0 and s ( v ) = 1 and consequentlythe 2-WVC problem corresponds to the minimum vertex cover problem. Lemma 7.
Let ( H, w, s ) be an instance of the 2-WVC problem, where H is not a basegraph. Let H ′ be the type graph of H and let w ′ and s ′ be the weight functions of V ( H ′ ) computed by Algorithm 3. If C ′ ⊆ V ( H ′ ) is an optimal solution for ( H ′ , w ′ , s ′ ) , thenthe solution C ⊆ V computed by the Algorithm 3 is an optimal solution for 2-WVC of ( H, w, s ) .Proof. Let K ′ , I ′ be a partition of V ( H ′ ) such that for each x ∈ K ′ it holds V x is aclique, and for each x ∈ I ′ it holds V x is an independent set. It is worth to observethat, by construction (see lines 12-13), if C ′ is a vertex cover of H ′ then C is a vertex20over of H and that Cost ( C ) = X v ∈ C s ( v ) + X v / ∈ C w ( v )= X x ∈ C ′ X v ∈ V x s ( v ) + X x ∈ K ′ − C ′ X v ∈ V x −{ v x } s ( v ) + X x ∈ I ′ − C ′ X v ∈ V x w ( v ) (by lines 12-13)= X x ∈ C ′ s ′ ( x ) + X x ∈ K ′ − C ′ X v ∈ V x s ( v ) − s ( v x ) ! + X x ∈ I ′ − C ′ w ′ ( v ) (by lines 7-8)= X x ∈ C ′ s ′ ( x ) + X x ∈ K ′ − C ′ X v ∈ V x s ( v ) − max u ∈ V x ( s ( u ) − w ( u )) ! + X x ∈ I ′ − C ′ w ′ ( v ) (by line 13)= X x ∈ C ′ s ′ ( x ) + X x ∈ K ′ − C ′ w ′ ( x ) + X x ∈ I ′ − C ′ w ′ ( v ) (by line 7)= X v ∈ C ′ s ( v ) + X v / ∈ C ′ w ( v ) = Cost ( C ′ ) . By contradiction, let C ′ ⊆ V ( H ′ ) be an optimal solution for ( H ′ , w ′ , s ′ ) while thesolution C computed by Algorithm 2 (lines 11-13) is not optimal. Then there exists C ∗ ⊆ V ( H ) such that C ∗ is a vertex cover of H and Cost ( C ∗ ) < Cost ( C ) = Cost ( C ′ ) . Let C ′′ = { x | x ∈ V ( H ′ ) and V x ⊆ C ∗ } . Now, we first prove that C ′′ is a vertex cover of H ′ , then we show that Cost ( C ′′ ) Vertex Cover ( G, w, s ) where for each v ∈ V ( G ) , w ( v ) = 0 and s ( v ) = 1 returns the minimum vertex cover of G in time O (2 itp ( G ) + poly ( n )) .Proof. The algorithm recursively constructs graphs in the type graph sequence of G ,until a base graph is obtained. When H is a base graph then Vertex Cover ( H, w, s )searches by brute force the set C that is the 2-WVC respect to s ( · ) and w ( · ), ascomputed by the algorithm, and returns it. We introduced a novel parameter, named iterated type partition and examined someof its properties. We show that the Equitable Coloring problem is W[1]-hard whenparametrized by the iterated type partition. This result extends also to the modular-width parameter. We also prove that the hardness drops for the neighborhood diversity22arameter, when the problem becomes FPT. Moreover, we presented a general strat-egy that enables to find FPT algorithms for several problems when parameterized byiterated type partition. Algorithms for Dominating set, Vertex coloring and Vertexcover problems have been presented, while the algorithms for Clique and Independentset problems will appear in the extended version of the work. It would be interesting toinvestigate if the proposed strategy can be applied on other problems. As a directionfor future research, it would be interesting to analyze the Edge dominating set problem,which has been shown to be FPT with the neighborhood diversity parameter [30]. References [1] F.N. Abu-Khzam, S. Li, C. Markarian, F. Meyer auf der Heide, P. Podlipyan.Modular-Width: An Auxiliary Parameter for Parameterized Parallel Complexity.In: Xiao M., Rosamond F. (eds) Frontiers in Algorithmics. FAW 2017. LectureNotes in Computer Science, vol 10336. Springer, (2017).[2] R. Belmonte, F.V. Fomin, P.A. Golovach, M.S. Ramanujan. Metric Dimension ofBounded Width Graphs. In: Italiano G., Pighizzini G., Sannella D. (eds) Math-ematical Foundations of Computer Science (MFCS ’15),LNCS vol 923, Springer,(2015).[3] H.L. Bodlaender and F.V. Fomin. Equitable colorings of boundedtreewidth graphs. In Theoretical Computer Science, 349, 22–30, doi:https://doi.org/10.1016/j.tcs.2005.09.027, (2005).[4] E.J. Cockayne, R.M. Dawes, S.T. Hedetniemi. Total domination in graphs. InNetworks 10(3), 211–219, (1980).[5] G. Cordasco, L. Gargano, A. A. Rescigno, U. Vaccaro. Evangelism in social net-works: Algorithms and complexity. In Networks 71(4): 346–357, (2018).[6] D. Coudert, G. Ducoffe, A. Popa. Fully polynomial FPT algorithms for someclasses of bounded clique-width graphs. In Proceedings of the Twenty-Ninth An-nual ACM-SIAM Symposium on Discrete Algorithms (SODA ’18), 2765–2784,(2018).[7] B. Courcelle. The monadic second-order logic of graphs. I. Recognizable sets offinite graphs, Inf. Comput., 85(1), 12–75, (1990).[8] B. Courcelle, J.A. Makowsky, U. Rotics. Linear Time Solvable Optimization Prob-lems on Graphs of Bounded Clique-Width. In Theory of Computing Systems,33(2), 125–150, (2000).[9] R.G. Downey and M.R. Fellows. Parameterized Complexity, Springer, (2012).[10] M. Doucha, J. Kratochv´ıl. Cluster Vertex Deletion: A Parameterization betweenVertex Cover and Clique-Width. MFCS 2012, 348–359, (2012).[11] P. Dvor´ak, D. Knop, and T. Toufar. Target Set Selection in Dense Graph Classes. arXiv:1610.07530 , (2016). 2312] M.R. Fellows, D. Lokshtanov, N. Misra, F. A. Rosamond, and S. Saurabh. Graphlayout problems parameterized by vertex cover. In Proceedings of ISAAC 2008,vol. 5369 LNCS, pp. 294305, (2008).[13] M.R. Fellows, F.V. Fomin, D.Lokshtanov, F.Rosamond, S.Saurabh, S.Szeider,and C.Thomassen. On the complexity of some colorful problems parameterizedby treewidth. Information and Computation, 209(2), 143–153, (2011).[14] M.R. Fellows, F.A. Rosamond, U. Rotics, S. Szeider. Clique-width is NP- com-plete. SIAM J. Discr. Math. 23(2), 909–939, (2009).[15] J. Fiala, P.A. Golovach, J. Kratochvil. Parameterized Complexity of ColoringProblems: Treewidth versus Vertex Cover, Theor. Comp. Sc. 412, 2513–2523,(2011).[16] F.V. Fomin, P.A. Golovach, D.Lokshtanov and S. Saurabh. Clique-width: on theprice of generality. In proceedings of SODA, (2009).[17] J. Fiala, T. Gavenciak, D. Knop, M. Koutecky, J. Kratochv´ıl. Fixed parame-ter complexity of distance constrained labeling and uniform channel assignmentproblems. arXiv:1507.00640 , (2015).[18] F.V. Fomin, P. Golovach, D. Lokshtanov, S. Saurabh. Intractability of clique-width parameterizations. SIAM J. Comput., 39 (5), 1941–1956, (2010).[19] F.V. Fomin, M. Liedloff, P. Montealegre, I. Todinca. Algorithms Parameterized byVertex Cover and Modular Width, through Potential Maximal Cliques. In: RaviR., Grtz I.L. (eds) Algorithm Theory SWAT 2014. LNCS vol 8503, Springer,(2014).[20] J. Gajarsk´y, M. Lampis, S. Ordyniak. Parameterized Algorithms for Modular-Width. In: Gutin G., Szeider S. (eds) Parameterized and Exact Computation.IPEC 2013. LNCS vol 8246, Springer, (2013).[21] T. Gallai. Transitiv orientierbare Graphen, Acta Math. Acad. Sci. Hung. 18, 26–66, (1967).[22] R. Ganian. Using neighborhood diversity to solve hard problems. arXiv:1201.3091arXiv:1201.3091