An integer program and new lower bounds for computing the strong rainbow connection numbers of graphs
aa r X i v : . [ m a t h . C O ] J un An integer program and new lower bounds for computing thestrong rainbow connection numbers of graphs
Logan A. Smith, David T. Mildebrath, and Illya V. Hicks
Department of Computational and Applied MathematicsRice UniversityHouston, TX 77005
June 5, 2020
Abstract
We present an integer programming model to compute the strong rainbow connection number src ( G ) of any simple graph G . We introduce several enhancements to the proposed model,including a fast heuristic, a novel class of valid inequalities, and a variable elimination scheme.Moreover, we present a novel lower bound for src ( G ) which may be of independent researchinterest. We evaluate our model with a traditional branch and cut approach as well as analternative scheme based on iterative lower bound improvement, which we show to be highlyeffective in practice. To our knowledge, these are the first computational methods for the strongrainbow connection problem. We demonstrate the efficacy of our methods by computing thestrong rainbow connection numbers of graphs with up to 167 vertices.
1. Background and Motivation
Let G be a non-empty simple connected graph, and let c : E ( G ) → { , . . . , k } for k ∈ N be a k -coloring of the edges of G . Note that c is not necessarily proper, so adjacent edges may be thesame color. A path P contained in G is rainbow if c maps each edge in E ( P ) to a distinct color(i.e., for e , e ∈ E ( P ), e = e implies c ( e ) = c ( e )). The graph G is (strongly) rainbow connectedwith respect to c if, for every pair of vertices u, v ∈ V ( G ), there exists a (shortest) u, v path P contained in G which is rainbow. The (strong) rainbow connection number rc ( G ) ( src ( G )) is theminimum number of colors k for which there exists a (strong) rainbow k -coloring of G . It is knownthat in general, diam( G ) ≤ rc ( G ) ≤ src ( G ) ≤ m , where m = | E ( G ) | and diam( G ) is the diameterof G .The concept of (strong) rainbow connection was first introduced by Chartrand et al. [8], and wasoriginally intended to model the flow of classified information between government agencies in theaftermath of the terrorist attacks of September 11, 2001 [9]. It has since been applied in otherareas, including the routing of information over secure computer networks (i.e. “onion routing”[32]). In addition to these applications, rainbow connection is of theoretical interest, and hasrecently garnered significant attention (see Li et al. [22] for a broad survey of rainbow connectionand its many variants). 1n spite of this growing attention, there does not currently exist a method for computing src ( G )in general graphs G . Previous work on variants of the rainbow connection problem have proposedheuristic methods to produce rainbow colorings [5, 10, 36]. However, even in the event that thesemethods find an optimal solution, they are unable to provide certificates of optimality. In thiswork, we present the first exact method for computing src ( G ) for general graphs. Our methodrelies on integer programming, which has a long history of solving difficult combinatorial problems(see, e.g., [25]). The critical component of our method is a practical technique for computing astrong lower bound for src ( G ). In addition to its computational value, we believe this lower boundis also of theoretical interest.The problem of computing src ( G ) is known to be theoretically challenging. For certain classesof graphs—including trees, cycles, wheels, complete multipartite graphs [8], fan and sun graphs[34], stellar graphs [33] and block clique graphs [17]— src ( G ) may be computed in polynomialtime. However, in general, determining whether src ( G ) ≤ k for k ≥ N P -hard, even when G is bipartite [1] (the same is true of rc ( G ) [6]). Moreover, simply determining whether or nota given edge coloring strongly rainbow connects a graph is known to be N P -complete in generalgraphs [35].In this paper we make the following contributions: • We present the first approach for computing src ( G ) for general graphs G . • We derive a novel lower bound for src ( G ) for general graphs G . In addition to its valuefor computing the strong rainbow connection number, we believe that this bound may be ofindependent research interest. • We introduce a series of computational enhancements, including a fast combinatorial heuristic,a class of strong valid inequalities, and a variable elimination scheme which significantlyimprove the performance of our method. • We demonstrate the efficacy of our method by applying it to a collection graphs containingup to 167 vertices.The remainder of this paper is organized as follows. Section 2 presents notation and preliminariesused throughout the paper. Section 3 introduces a novel lower bound for the strong rainbowconnection number of general graphs G . Section 4 proposes an integer programming model tocompute src ( G ) for general graphs G . Subsequently, Section 5 includes a series of computationalenhancements to improve the tractability of the integer programming model. Section 6 containsthe results of several computational experiments, and concluding remarks are given in Section 7.
2. Notation and Preliminaries
Let G be a graph with vertex set V ( G ) and edge set E ( G ). A graph G is connected if there existsa path between every pair of vertices in G , and simple if no vertex is adjacent to itself, and notwo distinct edges are incident upon the same pair of vertices. For the remainder of the paper, weassume that all graphs G are simple, connected, and have at least one edge. If every pair of verticesare adjacent in G , then G is called complete . The complete graph on n vertices is denoted K n .Additionally, a set of vertices which induces a complete graph is called a clique . The cardinality ofthe largest clique contained in a graph G is called the clique number of G , and is denoted ω ( G ). A2unction f : V ( G ) → N is called a proper coloring of the vertices of G , or simply a proper coloringof G , if for every pair of adjacent vertices u, v ∈ V ( G ), f ( u ) = f ( v ). The smallest k ∈ N for whichthere exists a proper coloring such that f : V ( G ) → { , . . . , k } is called the chromatic number of G and is denoted χ ( G ). It is well known that χ ( G ) ≥ ω ( G ) holds in general graphs.A graph G with χ ( G ) ≤ bipartite , and a complete bipartite graph is a graph whosevertices can be partitioned into two vertex sets V , V such that no edge is incident upon twovertices within the same partition and no edge can be added to G that is incident upon vertices indifferent partitions. The graph K n ,n denotes the complete bipartite graph for which | V | = n and | V | = n . A graph is called geodetic if every pair of distinct vertices in that graph are connected by aunique shortest length path. The union of two graphs G , G is the graph whose vertex set and edgeset are V ( G ) ∪ V ( G ) and E ( G ) ∪ E ( G ), respectively. Unless otherwise stated, the vertex andedge sets of G , G are not necessarily assumed to be disjoint. Similarly, we define the intersectionof G , G as the graph with the vertex set V ( G ) ∩ V ( G ) and the edge set E ( G ) ∩ E ( G ).Additional notation and well known results in graph theory are provided by Bondy and Murty [4].
3. New Lower Bounds for Strong Rainbow Connection
By definition, a strong rainbow coloring connects each pair of vertices in G with a rainbow shortestpath. Consequently, we begin by studying the set P of shortest paths in G . For each pair of vertices u = v ∈ V ( G ), let P uv denote the set of u, v shortest paths in G . To analyze the structure of theset P , it is useful to consider a set of directed graphs, D ( G ) = { D uv : u = v ∈ V ( G ) } where D uv isobtained by taking the graph union of each directed u, v shortest path in G .Additionally, we introduce a notion of separation to indicate edges and vertices which are al-ways present in certain shortest paths. Vertices u , u ∈ V ( G ) are separated by a vertex v ∈ V ( G ) \{ u , u } if v ∈ V ( P ) for all P ∈ P u u . Vertices u , u ∈ V ( G ) are separated by an edge e ∈ E ( G ) if e ∈ E ( P ) for all P ∈ P u u . Equivalently, an edge v v separates vertices u , u in G if and only if there there is a directed edge e between v , v in D u u and no directed u , u pathin D u u \ e . Similarly, a vertex v separates vertices u , u in G if and only if there is no directed u , u path in D u u − v . Proposition 1.
Let G be a graph and f be an edge coloring of E ( G ) . Let v , v , u ∈ V ( G ) suchthat u separates v and v . If there exists a rainbow shortest path from v to v in G with respectto f , then there exist rainbow shortest paths in G from v to u and from u to v with respect to f .Proof. Let P ∈ P v v be rainbow with respect to f . Because u separates v , v , by definition u ∈ V ( P ). Let P ′ be the v , u subpath contained in P , and let P ′′ be the u, v subpath containedin P . Because P ′ , P ′′ are each subpaths of a shortest path, they must themselves be shortest pathsbetween their respective ends. Additionally, because P is rainbow with respect to f , f maps eachof the edges in E ( P ′ ) and E ( P ′′ ) to distinct colors. Thus, there exist rainbow shortest paths in G from v to u and u to v .We now define an auxiliary graph H ( G ) which encodes information about the set of separatingedges in G . Let H ( G ) = ( V H , E H ), where V H = E ( G ) and E H = { e e ∈ E ( G ) : there exists apair of vertices v , v ∈ V ( G ) which e and e both separate } . An example of a graph G and itsauxiliary graph H ( G ) is shown is Figure 1. 3raph G Auxiliary graph H ( G ) a b cd ef g h i kj lm no abbecddfhi jk kl mn no D fi f d c h i D ai a b gc h i Figure 1: Sample graph G (top left) and its auxiliary graph H = H ( G ) (right). The bold edges ab , be , cd , df and hi in E ( G ) correspond to the highlighted clique in H , and thus must be differentcolors in any edge coloring that strongly rainbow connects G (Corollary 1). Two example directedgraphs from D ( G ) for the vertex pairs ( f, i ) and ( a, i ) are shown at bottom left. From the directedgraph D ai we see that the edges ab and hi each separate vertices a and i , and thus ab and hi areadjacent in H . Note that the four edges jk, kl, mn, and no each fail to separate any pairs of verticesin G . Their corresponding vertices in H are thus each isolated.To ease notation we will often denote H ( G ) as simply H . Additionally, define ω ′ ( G ) := ω ( H )and χ ′ ( G ) := χ ( H ). Theorem 1 shows how H can be used to provide lower bounds on the strongrainbow connection number of the graph G . Theorem 1.
For any graph G , src ( G ) ≥ χ ′ ( G ) ≥ ω ′ ( G ) . Additionally, if an edge coloring f strongly rainbow connects G , then f is a proper coloring of the vertices of H .Proof. We first verify that the second statement of the theorem holds via its contrapositive. Let G be a graph with edge coloring f and assume that f is not a proper coloring of the vertices ofthe auxiliary graph H . Since f is not a proper coloring of the vertices of H , there must exist e , e ∈ V ( H ) such that e , e are adjacent in H and f ( e ) = f ( e ). Since e and e are adjacentin H , there must exist a pair of vertices v , v ∈ V ( G ) such that e and e each separate v and v in G . As each v , v shortest path in G must include edges both e , e , and f ( e ) = f ( e ), weconclude that no shortest v , v path in G is rainbow. Thus, the edge coloring f cannot stronglyrainbow connect G . 4aving established that any strong rainbow edge coloring f of a graph G must also be a propercoloring of the vertices of H , it follows that no edge coloring f ′ of G that uses fewer than χ ′ ( G )colors can strongly rainbow connect G as then f ′ would also be a proper coloring of the vertices of H despite having fewer than χ ′ ( G ) colors. We conclude then that src ( G ) ≥ χ ′ ( G ). Additionally as χ ( G ′ ) ≥ ω ( G ′ ), the full statement src ( G ) ≥ χ ′ ( G ) ≥ ω ′ ( G ) holds.Corollary 1 shows that if U ⊆ V ( H ) = E ( G ) is a clique in H , then all of the edges in U must bedifferent colors in any valid strong rainbow coloring of G . An illustration of this phenomenon isshown in Figure 1. Corollary 1.
Let G be a graph and f be a strong rainbow edge coloring of G . If U ⊆ V ( H ) = E ( G ) is a clique in H , then f ( e ) = f ( e ) for any e , e ∈ U .Proof. By Theorem 1, if f strongly rainbow connects G then f must also be a proper coloring of V ( H ). Let U ⊆ V ( H ) = E ( G ) be a clique in H . Then every any pair of edges e , e ∈ U areadjacent in H , and so f ( e ) = f ( e ). Theorem 2.
For any geodetic graph G , src ( G ) = χ ′ ( G ) . Additionally, an edge coloring f stronglyrainbow connects G if and only if f is a proper coloring of the vertices of H .Proof. From Theorem 1, if f strongly rainbow connects G then f must be a proper coloring of thevertices of H and src ( G ) ≥ χ ′ ( G ). To verify the other direction of the theorem, we now assumethat f is a proper coloring of the vertices of H . Consider any pair of distinct vertices u, v in V ( G ).Because G is geodetic, there exists a unique u, v shortest path in G —call it P uv . Because P uv isunique, it follows that each edge e ∈ E ( P uv ) separates u from v , and thus every pair of edges in E ( P uv ) are adjacent in H . Since f is a proper coloring of V ( H ), f must map each pair of edgesin E ( P uv ) to different colors, thus the unique u, v path in G must be rainbow with respect to f .Because u, v were chosen arbitrarily in V ( G ) it follows that every pair of vertices in G are connectedby a rainbow shortest path, and thus that f strongly rainbow connects G .Because every proper coloring of the vertices of H must strongly rainbow connect G , there mustexist a proper vertex coloring f ′ which colors the vertices of H using exactly χ ( H ) colors. Sincethe function f ′ is also a strong rainbow coloring of G we conclude that src ( G ) ≤ χ ′ ( G ). Combiningthis with the earlier inequality given in Theorem 1, we have src ( G ) = χ ′ ( G ).Despite the fact that χ ′ ( G ) is a theoretically tighter bound than ω ′ ( G ), in Section 6, we computeonly ω ′ ( G ), not χ ′ ( G ). The reason for this choice is two-fold. First, for many of the graphswe consider—particularly those describing social and infrastructure networks—the clique boundsatisfies ω ′ ( G ) = src ( G ). In such situations, Theorem 1 implies that χ ′ ( G ) = ω ′ ( G ), and thuscomputing χ ′ ( G ) is not necessary. Second, computing χ ′ ( G ) requires computing the chromaticnumber of H , while computing ω ′ ( G ) requires computing the clique number of H . Althoughcomputing both of these values is N P -hard in general, in practice clique numbers can be computedmuch more quickly than chromatic numbers [37]. In all, we find that computing ω ′ ( G ) greatlyimproves runtimes, while sacrificing very little in terms of bound quality.Because of this observation, we devote the remainder of this section to studying the lower bound ω ′ ( G ). Specifically, we show that the lower bounds diam( G ) and ω ′ ( G ) for src ( G ) are incomparable5 = 1 k = 2 k = 3Figure 2: Sequence of graphs for which diam( G ) − ω ′ ( G ) = k , shown for k = 1 , ,
3. Note that the k th graph has diameter k + 1.(Proposition 2) and may be simultaneously arbitrarily far from src ( G ) (Proposition 3). In spite ofthese results, we demonstrate in Section 6 that the bound provided by ω ′ ( G ) is stronger than thatof diam( G ) in many random graphs distributed by the Erd˝os-R´enyi random graph model [11], aswell as many graphs commonly used to describe infrastructure networks or social networks. Proposition 2.
For any k ∈ N , there exist graphs G and G ′ such that diam( G ) − ω ′ ( G ) = k and ω ′ ( G ′ ) − diam( G ′ ) = k .Proof. We first show that for any k ∈ N there exists a graph G such that diam( G ) − ω ′ ( G ) = k .Fix k ∈ N , and let G be the graph obtained by taking the union of k + 1 K graphs, where thevertices the i th K are labeled v i − j for j = 1 , , ,
4. The first few graphs in this sequenceare illustrated in Figure 2. It can be observed that diam( G ) = k + 1. Additionally, each pair ofnon-adjacent vertices in V ( G ) are connected by at least two edge disjoint shortest paths, thus nopair of non-adjacent vertices in V ( G ) are separated by an edge. Since a pair of vertices in V ( G ) canonly be separated by an edge which is incident upon both of them, no pair of edges can separatethe same pair of vertices. E ( H ( G )) = ∅ , so ω ′ ( G ) = 1 and diam( G ) − ω ′ ( G ) = k as desired.To see that for any k ∈ N there also exists a graph G ′ such that ω ′ ( G ′ ) − diam( G ′ ) = k , fix some k and let G ′ = K ,k +2 . Additionally, let H ′ = H ( G ′ ) and m ′ be the size of G ′ . Since each pair ofedges in E ( G ′ ) form the unique shortest path between the leaves those edges are incident upon, H ′ = K m ′ so ω ′ ( G ′ ) = m ′ = k + 2. Since diam( G ′ ) = 2, we have that ω ′ ( G ′ ) − diam( G ′ ) = k .In the following proposition we make use of a formula shown by Chardtrand et al. [8]: for integers s, t such that 1 ≤ s ≤ t , src ( K s,t ) = ⌈ s √ t ⌉ . Proposition 3.
For any k ∈ N , there exist a graph G such that src ( G ) − max(diam( G ) , ω ′ ( G )) ≥ k .Proof. Fix k ∈ N , and let G = K , ( k +2) . Then diam( G ) = 2, and since there are at least twoedge disjoint shortest paths between each pair of vertices in V ( G ), no pair of vertices in H ( G ) areadjacent and so ω ′ ( G ) = 1. Thus src ( G ) − max(diam( G ) , ω ′ ( G )) = (cid:6) p ( k + 2) (cid:7) − k.
4. An Integer Program for Strong Rainbow Connection
In this section, we introduce an integer program for computing src ( G ) in general graphs G . Wethen present a series of modifications allowing the integer program to solve several related rainbowcoloring problems. In Section 5, we also explore several enhancements to improve the model’sperformance in practice. 6 .1. The Model Let K = { , . . . , K } be a set of colors for some K ≤ m . We introduce the following binaryvariables: • x ek = 1 if and only if edge e ∈ E ( G ) is color k ∈ K . • y P = 1 if and only if path P ∈ P is rainbow (i.e. all edges e ∈ E ( P ) are different colors). • z k = 1 if and only if there exists an edge e ∈ E ( G ) of color k ∈ K .The following integer program computes the strong rainbow connection number of G , and a corre-sponding strong rainbow coloring. z ∗ ( G ) = min X k ∈ K z k (IP-1a)s . t . X k ∈ K x ek = 1 ∀ e ∈ E ( G ) (IP-1b) X e ∈ E ( P ) x ek + ( | P | − y P ≤ | P | ∀ P ∈ P , ∀ k ∈ K (IP-1c) X P ∈P uv y P ≥ ∀ u = v ∈ V ( G ) (IP-1d) x ek ≤ z k ∀ e ∈ E ( G ) , ∀ k ∈ K (IP-1e) z k ≥ z k +1 ∀ k ∈ K \ { K } (IP-1f)All variables binary (IP-1g)The objective (IP-1a) minimizes the total number of colors used in the strong rainbow coloring.The constraints (IP-1b) through (IP-1f) can be summarized as follows: • The constraints (IP-1b) require that each edge e ∈ E ( G ) be assigned exactly one color. • The constraints (IP-1c) enforce the logical requirement that if y P = 1 for some path P ∈ P ,then at most one edge in path P is assigned color k ∈ K . • The constraints (IP-1d) require that, for each pair of distinct vertices u, v ∈ V ( G ), thereexists a shortest path between u and v which is rainbow colored. • The constraints (IP-1e) enforce that if there exists an edge e ∈ E ( G ) of color k ∈ K , then z k = 1 (i.e. color k ∈ K is counted in the objective value (IP-1a)). • Constraints (IP-1f) are symmetry breaking constraints which require the number of colors usedin the strong rainbow coloring to be consecutive starting at k = 1. While these constraintsare not necessary to ensure a correct model, we find that they have significant computationalbenefits.The following proposition certifies the correctness of the model (IP-1).7 roposition 4. For any graph G , z ∗ ( G ) = src ( G ) . Moreover, if ( x, y, z ) is a feasible solution to(IP-1), then the coloring f : E → K with f ( e ) = P k ∈ K kx ek (i.e., which maps an edge e to theunique k with x ek = 1 ) strongly rainbow connects G . We note two relevant features of the integer program (IP-1). First, (IP-1) utilizes a total of |P| + ( m + 1) | K | binary variables and ( |P| + m + 1) | K | + (cid:0) n (cid:1) + m − O (2 n ) is a tight upper bound for |P| in general graphs. Thus at worst, the integer program (IP-1)may have an exponential number of rows and columns. In spite of the potentially large size of (IP-1),we demonstrate in Section 6 that for graphs appearing in several applications, the cardinality of theset P is sufficiently small as to render (IP-1) computationally tractable. Second, (IP-1) is feasibleif and only if K ≥ src ( G ). Consequently, building a feasible model requires a valid upper boundon the strong rainbow connection number src ( G ). While the na¨ıve choice of K = m is valid forany graph G , we introduce a heuristic in Section 5.3 which computes a much tighter upper bound,thus reducing the size of integer program (IP-1) and improving its computational performance.In addition, by replacing P with the set of all paths in G (rather than the set of shortest paths),(IP-1) can be used to compute the rainbow connection number rc ( G ). In general, the total numberof paths in a graph G is much larger than the number of shortest paths in G . Additionally, as wediscuss throughout the paper, the set P of shortest paths contains structure which can be exploitedfor computation. Consequently, we do not consider the computation of rc ( G ) any further. For any U ⊆ V ( H ) = E ( G ) that is a clique in H and any color k ∈ K , it follows directly fromCorollary 1 that X e ∈ U x ek ≤ ≤ , and werelax the linking constraint (IP-1e) (thereby uncoupling the x and y variables from the z variables),to obtain the following set: X := x ek ∈ { , } ∀ e ∈ E ( G ) , ∀ k ∈ Ky P ∈ { , } ∀ P ∈ P (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) X k ∈ K x ek ≤ ∀ e ∈ E ( G ) X e ∈ E ( P ) x ek + ( | P | − y P ≤ | P | ∀ P ∈ P , ∀ k ∈ K X P ∈P uv y P ≥ ∀ u = v ∈ V ( G ) . Our main result is the following:
Theorem 3.
For any U ⊆ V ( H ) = E ( G ) that is a clique in H and any color k ∈ K , the inequality(1) is facet-defining for conv( X ) . To prove Theorem 3, we first derive a set-packing polytope closely related to the feasible region of(IP-1), and prove that the inequalities (1) are facet-defining for the associated set-packing polytope.We now provide a very brief summary of the set-packing polytope and some of its properties—wedirect the reader to [2] for a comprehensive review.8iven a matrix A ∈ { , } m × n without a zero row, the set-packing polytope is the set conv { x ∈{ , } n : Ax ≤ } , where ∈ R m is the vector of all 1s. For any such 0-1 matrix A , define theassociated graph G ( A ) with vertex set V ( G ( A )) = { v , . . . , v n } corresponding to the columns of A . Two vertices v i , v j ∈ V ( G ( A )) are adjacent in G ( A ) if and only if the corresponding columns a i and a j of A are not orthogonal (i.e. a T i a j ≥ Lemma 1.
The inequality P { j : v j ∈ L } x j ≤ is facet-defining for the set-packing polytope with matrix A if and only if L ⊆ V ( G ( A )) is a clique in the graph G ( A ) . In the sequel, we will require the concept of a path fixing. A set
F ⊆ P is a path fixing of G if |F ∩ P uv | = 1 for all u = v ∈ V ( G ). Let F denote the set of all path fixings of G .Given an instance of (IP-1), and a path fixing F ∈ F , we define the associated set-packing polytope S ( F ) := conv( X ( F )) where X ( F ) := x ek ∈ { , } ∀ e ∈ E ( G ) , ∀ k ∈ K (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) X k ∈ K x ek ≤ ∀ e ∈ E ( G ) X e ∈ E ( P uv ) x ek ≤ ∀ P uv ∈ F , ∀ k ∈ K . By stacking the matrix variables ( x ek ) e ∈ E ( G ) ,k ∈ K columnwise, we can express the constraints of theset-packing polytope S ( F ) in matrix form as B F x ≤ where B F := I m I m . . . I m A F A F . . . A F . Here, I m is the m × m identity matrix, and A F is the matrix whose rows correspond to theelements of F (i.e. paths P uv for u = v ∈ V ( G )), and whose columns are edges of G . The entry of A F corresponding to path P and edge e equals 1 if and only if edge e is contained in path P . Weemphasize that each column of B F is indexed by a pair ( e, k ) ∈ E ( G ) × K . The graph G ( A F ) isclosely related to the auxiliary graph H introduced in Section 3, as detailed by Proposition 5. Proposition 5. H = T F∈ F G ( A F ) .Proof. Since V ( H ) = E ( G ), let the vertices of H be labelled e , . . . , e m . We assume without lossof generality that for any F ∈ F the columns of A F are ordered so that the column a i correspondsto edge e i in E ( G ) and that the vertices of G ( A F ) are also labeled e , . . . e m so that e i correspondsto column a i for any e i ∈ E ( G ( A F )). Thus, H and G ( A F ) have the same set of vertex labels forany F ∈ F and so V ( H ) = V ( T F∈ F G ( A F )). To show that in fact H = T F∈ F G ( A F ), we nextshow that E ( H ) = E ( T F∈ F G ( A F )) by inclusions.To first prove E ( H ) ⊆ E ( T F∈ F G ( A F )), let e i e j be an edge in E ( H ). By construction then, theremust exist a pair of vertices u = v ∈ V ( G ) such that e i , e j ∈ E ( G ) both separate u and v in G . Fixsome F ∈ F . Let k be the row of A F corresponding to the u, v path P uv which is fixed in F . Since9 i and e j each separate u, v in G , both e i and e j must be in E ( P uv ) and so elements a k,i = a k,j = 1in A F . Since a Ti a j ≥ a k,i a k,j = 1, we see that e i and e j are also adjacent in G ( A F ). Additionally,since F was chosen arbitrarily in F , e i and e j must be adjacent in G ( A F ) for every F in F . Thus, e i e j is in E ( T F∈ F G ( A F )) so E ( H ) ⊆ E ( T F∈ F G ( A F )).Next we show E ( H ) ⊇ E ( T F∈ F G ( A F )) by its contrapositive statement; that is, for any e i = e j ∈ E ( G ) such that e i e j E ( H ), it must be that e i e j E ( T F∈ F G ( A F )). Let e i = e j ∈ E ( G ) suchthat e i e j E ( H ). Since there does not exist a pair of vertices in G which are separated by both e i and e j in E ( G ), for each pair of vertices u, v there exists a path P uv such that at most oneof e i , e j are contained in E ( P uv ). Let F be a path fixing in F composed entirely of these paths.Consider the k th row of A F and let P be the path in F corresponding to that row. Since P waschosen so that E ( P ) does not contain both e i , e j , at least one of a k,i , a k,j is 0. Since the index k was chosen arbitrarily within the (cid:0) m (cid:1) rows of A F , this holds for each index k in { , . . . , (cid:0) m (cid:1) } . Thus a Ti a j = P ( m ) k =1 a k,i a k,j = 0. Since there exists at least one F ∈ F such that e , e are not adjacent in G ( A F ) then, the edge e i e j is not in E ( T F∈ F G ( A F )). Having now shown that both inclusions hold,we conclude that E ( H ) = E ( T F∈ F G ( A F )) and thus have shown that H = T F∈ F G ( A F ). Proposition 6.
For any path fixing
F ∈ F , the inequalities (1) are facet-defining for S ( F ) .Proof. By Lemma 1, it suffices to show that for any U ⊆ V ( H ) = E ( G ) that is a clique in H and for any k ∈ K , the set U k := { ( e, k ) ∈ V ( G ( B F )) : e ∈ U } is a clique in G ( B F ). To thatend, fix ( e , k ) , ( e , k ) ∈ U k with e = e . By Proposition 5, we have that E ( H ) ⊆ E ( G ( A F ))and thus ( e , e ) ∈ E ( G ( A F )). By inspecting the block structure of the matrix B F , we see that( e , e ) ∈ E ( G ( A F )) implies (cid:0) ( e , k ) , ( e , k ) (cid:1) ∈ E ( G ( B F )), and thus U k is a clique in G ( B F ).Next, we use Proposition 6 to prove Theorem 3. We first prove that that the convex hull of therelaxation X is full-dimensional. For brevity in the remainder of the section, we let E = E ( G ). Proposition 7. dim(conv( X )) = m | K | + |P| , i.e., conv( X ) is full-dimensional.Proof. We construct m | K | + |P| + 1 points in X which are affinely independent. For e ∈ E and k ∈ K , define a point with x ek = 1, x e ′ k ′ = 0 for all ( e ′ , k ′ ) ∈ E × K \ { ( e, k ) } , and y P = 1 forall P ∈ P . For all P ∈ P , define a point with x ek = 0 for all ( e, k ) ∈ E × K , y P ′ = 1 for all P ∈ P \ { P } , and y P = 0. Finally, define the single point with x ek = 0 for all ( e, k ) ∈ E × K and y P = 1 for all P ∈ P . The resulting set of m | K | + |P| + 1 points lie in X and are affinelyindependent. Proof of Theorem 3.
Fix a color ˆ k ∈ K , a clique in U in H , and a path fixing F ∈ F . Becauseconv( X ) is full-dimensional, it suffices to construct m | K | + |P| points in X which satisfy (1) forclique U and color ˆ k with equality. We define these points in three sets: • Set 1 ( m | K | points): By Proposition 6, there exist m | K | points { ˆ x ( e,k ) : e ∈ E, k ∈ K } in X ( F ) which are affinely independent and satisfy (1) with equality. For each e ∈ E and k ∈ K ,define the point z ( e,k ) = (ˆ x ( e,k ) , ˆ y ( e,k ) ) where ˆ y ( e,k ) P ∈ { , } equals 1 if and only P ∈ F . These m | K | points lie in X and satisfy (1) with equality.10 Set 2 ( |F | points): Fix an edge ˆ e ∈ U . For each path P ∈ F define the point z P = (ˆ x P , ˆ y P )where ˆ x Pek ∈ { , } equals 1 if and only if ( e, k ) = (ˆ e, ˆ k ), andˆ y PP ′ = ( , P ′ ∈ F \ P uv or P ′ ∈ P uv \ F , , otherwise,where u = v ∈ V ( G ) is the set of vertices such that P ∈ P uv . These |F | points lie in X andsatisfy (1) with equality. • Set 3 ( |P \ F | points): Fix an edge ˆ e ∈ U . For each path P ∈ P \ F , define the point z P = (ˆ x P , ˆ y P ) where ˆ x Pek ∈ { , } equals 1 if and only if ( e, k ) = (ˆ e, ˆ k ), andˆ y PP ′ = ( , P ′ ∈ F or P = P ′ , , otherwise.The m | K | + |P| points z ( e,k ) for ( e, k ) ∈ E × K and z P for P ∈ P all lie in X , and satisfy (1) withequality. We conclude the proof by demonstrating that they are affinely independent. With thepoints in set 1 we associate the multipliers µ ( e,k ) for e ∈ E and k ∈ K . With the points in sets 2and 3 we associate the multipliers λ P for P ∈ P . Suppose that X e ∈ E X k ∈ K µ ( e,k ) z ( e,k ) + X P ∈P λ P z P = 0 and X e ∈ E X k ∈ K µ ( e,k ) + X P ∈P λ P = 0 . ( ⋆ )These conditions are equivalent to the linear system X e ∈ E X k ∈ K µ ( e,k ) ˆ x ( e,k )ˆ e, ˆ k + X P ∈P λ P = 0 (2a) X e ∈ E X k ∈ K µ ( e,k ) ˆ x ( e,k ) e ′ ,k ′ = 0 ∀ ( e ′ , k ′ ) ∈ E × K \ { (ˆ e, ˆ k ) } (2b) X e ∈ E X k ∈ K µ ( e,k ) + X P ∈P λ P = λ P ′ ∀ P ′ ∈ F (2c) λ P + λ P ′ = 0 ∀ u = v ∈ V ( G ) , P ∈ F , P ′ ∈ P uv \ { P } (2d) X e ∈ E X k ∈ K µ ( e,k ) + X P ∈P λ P = 0 (2e)Combining (2c) and (2e), we see immediately that λ P = 0 for all P ∈ F . Plugging this into (2d),we see that λ P = 0 for all P ∈ P \ F , and thus λ P = 0 for all P ∈ P . Hence the system (2) reducesto X e ∈ E X k ∈ K µ ( e,k ) ˆ x ( e,k ) = 0 and X e ∈ E X k ∈ K µ ( e,k ) = 0 . Because the points { ˆ x ( e,k ) } e ∈ E,k ∈ K are affinely independent, it follows that µ ( e,k ) = 0 for all e ∈ E , k ∈ K . We have shown that ( ⋆ ) implies µ = 0 and λ = 0. We conclude that the points in sets 1, 2and 3 are affinely independent. 11 .3. Model Extensions for Related Problems In addition to strong rainbow connection, many other variants of the rainbow connection problemhave been introduced and studied in the literature. Several popular variants include the rainbow k -connection problem [9], rainbow vertex connection problem [19], the strong rainbow vertex con-nection problem [21], and even the very strong rainbow connection problem [7]. See Li et al. [22]for a review of several of these variants and many of their known results. In this section we brieflydiscuss several of these variants and how (IP-1) can be modified to solve these problems as well.Among these variants, perhaps most similar to the strong rainbow connection problem is the verystrong rainbow connection problem. In this problem we also consider an edge coloring f : E ( G ) →{ , . . . , k ′ } with k ′ ∈ N , but for each pair of distinct vertices u, v , rather then ensuring that leastone shortest u, v path is rainbow with respect to f , we now require that every u, v shortest path israinbow with respect to f . The smallest k ′ ∈ N for which there exists an f that strongly rainbowconnects G is known as the very strong rainbow connection number of G . (IP-1) can be extendedto this problem simply requiring that y P = 1 for all P in P . Thus all but a polynomial numberof variables ( x e,k , z k , ∀ e ∈ E ( G ) , k ∈ K ) can be eliminated, constraints (IP-1d) are necessarilysatisfied and can therefore be eliminated, and constraints (IP-1c) reduce to set packing constraints.The rainbow k -connection problem extends the standard rainbow connection problem by requiringthat each pair of vertices are connected by at least k internally vertex disjoint rainbow paths, withrespect to an edge coloring f : E ( G ) → { , . . . , k ′ } . The rainbow k -connectivity number of G is thenthe smallest k ′ for which there exists an edge coloring f that rainbow k -connects G . As previouslyindicated, (IP-1) exactly solves the rainbow connection problem when the set P is extended tothe set of all paths in G . (IP-1) can be further extended to the rainbow k -connection problem byexpanding each P uv to be the set of all u, v paths in G , replacing the right hand side of constraints(IP-1d) with k , and adding additional constraints of the form: y P + y P ′ ≤ , ∀ u = v ∈ V ( G ) , ∀ P = P ′ ∈ P uv : V ( P ) ∩ V ( P ′ ) \{ u, v } 6 = ∅ . Finally, the rainbow vertex connection problem and the strong rainbow vertex connection problemsexplore notion of rainbow coloring in the case that vertices are colored rather than edges. In thesesettings we consider a vertex coloring f : V ( G ) → { , . . . , k ′ } with k ′ ∈ N . A pair of vertices v = v ∈ V ( G ) are said to be rainbow vertex connected if there exists a v , v path P such that forany u = u ∈ V ( P ), f ( v ) = f ( v ). If every pair of vertices in G is rainbow vertex connected, then f is said to rainbow vertex connect G . If every pair of vertices in G is rainbow vertex connected viaa shortest path, then f is also said to strongly rainbow vertex connect G . (IP-1) can be modified forthe strong rainbow vertex connection problem by replacing the x e,k variables with x v,k variablesto indicate a vertex coloring rather than an edge coloring. The constraints (IP-1b), (IP-1c), and(IP-1e) can all be adjusted analogously to apply to vertex colorings rather than edge colorings.While this formulation solves the strong rainbow vertex connection problem, the standard rainbowvertex connection problem can also be solved by extending the set P to be the set of all paths in G , as in the case of the standard rainbow connection problem.
5. Model Enhancements
In this section, we introduce a series of enhancements to improve the performance of the integerprogram (IP-1) in practice. In Section 5.1 we describe a series of preprocessing steps used by all ofthe subsequent enhancements, which are explained in Section 5.2 through Section 5.4.12 v v u v v u v v Figure 3: An example of a graph G (left), the directed graphs D u (center and right), D uv (center,bold), and D uv (right, bold). Each vertex v ∈ V ( D u ) corresponds to a vertex in V ( G ), and islabeled with r uv , the number of shortest u, v paths in G . In this section, we explain how to construct the auxiliary graph H introduced in Section 3. Theconstruction of H proceeds in three steps. First, we construct a directed graph D u for each u ∈ V ( G )which is related to the directed graphs D uv introduced in Section 3. Second, we use the directedgraphs D u to compute the set of separating edges in G . Third, we use the set of separating edgesto construct the auxiliary graph H . We will show how this construction also allows us to computethe set of separating vertices in G , as well as r uv := |P uv | , the number distinct shortest u, v pathsin G . These objects will be used in the enhancements introduced in Section 5.2 and Section 5.3,respectively.Although they play a helpful role in the analysis of Section 3, it is not necessary to explicitlycompute the directed graphs D uv . Instead, we compute a single auxiliary directed graph D u for each u ∈ V ( G ), defined as follows. Let D u = ( V ( G ) , E D ) where the set of directed edges E D = { ( v , v ) : v v ∈ E ( G ) and d ( u, v ) + 1 = d ( u, v ) } . For fixed u , the directed D u can beconstructed in O ( n + m ) time by modifying the breadth first search algorithm to allow a vertex tobe discovered by multiple vertices of the previous depth. An example of the directed graphs D u and their relation to the directed graphs D uv is shown in Figure 3.Given a pair v = v ∈ V ( G ), we can compute the set of vertices and edges which separate v and v in G using the directed graph D v . While the set of separating vertices is not required toconstruct H , we explain how they can be used to reduce the size of the model (IP-1) in Section 5.2.Begin by setting L = { v } , and N = N + ( v ), where N + ( w ) denotes the in-neighbors of vertex w in the directed graph D v . If | L | = | N | = 1, the directed edge connecting the unique element of N to the unique element of L separates vertices v and v in G . Similarly, if | N | = 1, then the uniqueelement of N separates v and v in G . We then set L = N and proceed until N = { v } . For afixed pair v = v ∈ V ( G ), this process can be completed in O ( n + m ) time.Finally, we construct the graph H . For all v = v ∈ V ( G ), let E ′ v v denote the set edges whichseparate v , v in G (computed above in O ( n + m ) time). For each pair e , e of distinct elementsof E ′ v v , we add the undirected edge e e to H . For a fixed pair of vertices v , v , | E ′ v v | = O ( m ),and thus H can be constructed in O ( n ( n + m )) time.13iven a directed graph D u for some u ∈ V ( G ), it is simple to compute the number r uv := |P uv | of distinct shortest u, v paths in G , for all v ∈ V ( G ) \ { u } . This number will be useful for therandomized heuristic of Section 5.3. The values r uv for all v ∈ V ( G ) \ { u } are calculated recursivelyby setting r uu = 1 and r uv = P j ∈ N + ( v ) r uj for all v ∈ V ( G ) \ { u } . This calculation requires runningbreadth first search in D u beginning at vertex u , which can be completed in time O ( n + m ). Hence, r uv for all u = v ∈ V ( G ) can be computed in O ( n + nm ) time. The results introduced in Section 3 suggest two methods by which we can eliminate variables andconstraints from the model (IP-1). First, by Corollary 1, for any U ⊆ V ( H ) = E ( G ) that is a cliquein H , we may enforce a priori that each edge in U is a different color—i.e., we fix the variables x ek for all e ∈ U and k ∈ K . Naturally, this technique eliminates the largest number of variables when U is a maximum clique in H , corresponding to the bound ω ′ ( G ). In addition, this choice also helpsto break symmetry inherent to the model.Second, per Proposition 1, if a vertex u separates a pair of vertices v , v and at least one v , v shortest path is rainbow with respect to an edge coloring f , then there must exist shortest pathsconnecting both v , u and u, v which are rainbow with respect to f . Thus as long as it is enforcedthat the edge coloring indicated by the x e,k variables strongly rainbow connects vertices v , v ,it is not necessary to explicitly enforce that v , u and u, v are connected by rainbow shortestpaths. Hence, we may eliminate the variables y P and constraints (IP-1c) corresponding to paths P ∈ P v u ∪ P uv , as well as the constraints (IP-1d) corresponding to the vertex pairs v , u and u, v . In Section 6 we provide empirical evidence that this step substantially reduces the size of theformulation (IP-1) for some classes of graphs. To the best knowledge of the authors, no heuristic method has been proposed for strong rainbowconnection in general graphs. Polynomial heuristic methods have been proposed for several relatedproblems however, including the rainbow vertex connection problem [36] and the rainbow connec-tion problem, both in general graphs [5] and in the special case of maximal outer planer graphs [10].Since the upper bounds provided by heuristic methods can often be used to significantly assist withthe computational methods, it is desirable to also have a heuristic method for strong rainbow con-nection. Unfortunately, since the previously mentioned heuristics either solve related problems ordetermine upper bounds on rc ( G ), which is a lower bound on src ( G ), they are not immediatelyapplicable to our study. We now propose a new fast random heuristic method for computing thestrong rainbow connection numbers of general graphs.The heuristic, presented in Algorithm 1, functions as follows. We initialize a counter k to count thenumber of colors used so far in the coloring, and select a fixing F ∈ F . For each edge e ∈ E ( G ),we check to see if there exists a color in { , . . . , k } which has not already been used to color anedge in any of the paths in F which contain edge e . If any such colors exist we randomly chooseone and color edge e with it, recording choices in the edge coloring f . Otherwise, we introduce anew color to color edge e , and increase k by one. Throughout this process, edges which have beenassigned colors and those which have not are tracked with the sets f ixed and f ree , respectively.The process repeats until every edge e ∈ E ( G ) is colored.This heuristic requires the selection of a fixing F ∈ F , i.e., the selection of a single v , v path foreach pair of vertices v = v ∈ V ( G ). We now describe a method to uniformly sample elements from14 v v . Let r v v = |P v v | equal the number of distinct shortest v , v paths in G —in Section 5.1,we explained how these values can be quickly in O ( n + nm ) time. To sample a shortest v , v path, we begin at vertex v in the directed graph D v , and move back to vertex v as follows. Set u = v to be the initial vertex in the path. For each i = 1 , . . . , d ( v , v ), the i th vertex u i in thepath is sampled from the set N + ( u i − ), where vertex u ∈ N + ( u i − ) is chosen with probability r v u / P u ′ ∈ N + ( u i − ) r v u ′ . An example of the labels r uv is shown in Figure 3.Though not included in the provided pseudocode for readability, it is possible to improve theperformance of Algorithm 1 by initially coloring an edge set U ⊆ V ( H ) = E ( G ) which is a clique in H with distinct colors and adjusting the initial values of f ixed, f ree, k, and f accordingly. Doingso creates a larger initial set of colors, providing additional flexibility in color choice and modestlyimproving the quality of solutions. Since the maximum cardinality clique in H is already computedin model proprocessing (as outlined in Section 5.1) it can easily be reused here. Alternativelyif worst case polynomial time algorithm is desired, the heuristic could similarly be improved byinitially coloring one of the fixed diam( G ) length paths chosen in line 4 instead.It is also possible to extend the proposed heuristic to the standard rainbow connection problem.While any coloring generated by this heuristic must strongly rainbow connect G , and thus also bea valid rainbow coloring of G , additional rainbow connecting edge colorings may be generated byfixing randomly chosen u, v paths for each u = v ∈ V ( G ) rather than fixing randomly chosen u, v shortest paths. Algorithm 1
Fast Random Strong Rainbow Coloring Heuristic k ← best ← m + 13: for each i = 1 , . . . , maxIter
4: fix a random shortest u, v path P uv for all u = v ∈ V ( G )5: free ← E ( G )6: fixed ← ∅ while free = ∅
8: randomly select an edge e in free free ← free \{ e } K ′ ← { , . . . , k } for each u = v ∈ V ( G )12: if K ′ = ∅ goto line 1714: if e ∈ E ( P uv )15: for each e ′ ∈ E ( P uv ) ∩ fixed K ′ ← K ′ \{ f ( e ′ ) } if K ′ = ∅ f ( e ) ← randomly chosen element of K ′ else k ← k + 121: if k ≥ best goto line 2523: f ( e ) = k fixed ← fixed ∪ { e } best = min( best, k ) return best .4. The “Bottom Up” Approach We now introduce a technique for computing src ( G ) which takes advantage of the fact that thelower bound ω ′ ( G ) presented in Section 3 is often very strong in practice and can be computedquite quickly despite its theoretical hardness. We refer to this method as the bottom-up approach.The method proceeds as follows: we first compute the lower bound ℓb = max { diam( G ) , ω ′ ( G ) } for src ( G ). Next, we solve (IP-1) with | K | = ℓb (i.e. with ℓb available colors). If the resulting modelis infeasible, we increase | K | by 1, and repeat this process until we obtain a feasible instance. Thefirst value of | K | for which (IP-1) is feasible equals src ( G ). This method clearly converges in finitetime.The success of this method in practice relies on two factors. First, because (IP-1) has O ( |P| +( m + 1) | K | ) variables, O (( |P| + m + 1) | K | ) constraints, and |P| is relatively large, model size scalesquickly with | K | . To ensure feasibility of (IP-1), a standard branch-and-cut method must initialize K = | K | ≥ src ( G ), at best choosing K to be equal to the best known upper bound on src ( G ). Incontrast, the bottom-up approach initializes K to be equal to the best known lower bound, oftenformulating and solving a considerably smaller model. Second, the bound max { diam( G ) , ω ′ ( G ) } isoften very close to src ( G ), so the bottom-up approach requires very few iterations to converge. InSection 6 we demonstrate that this method is very effective in practice.We note that the above technique does not require the exact computation of ω ′ ( G )—a lower boundon ω ′ ( G ) is sufficient. That is, instead of computing the maximum clique of the auxiliary graph H , a clique of any size will suffice (though naturally larger cliques produces tighter bounds). Inaddition, our implementation of this method is intended as a proof of concept, demonstratingthe computational effectiveness of such an approach. As such, it could likely be easily improvedthrough the use of additional standard techniques like a cut pool, preserving cuts generated betweeniterations. The time needed to generate the inequalities (1) is relatively small compared to overallsolve times and more than a single iteration is rarely needed to solve instances to optimality however,so we chose not to implement this improvement.
6. Computational Results
To assess the effectiveness of the proposed methods, we now consider several computational ex-periments comparing runtime performance of these algorithms for standard IEEE graphs used torepresent infrastructure networks , and a collection of commonly used graphs which represent socialand communication networks [12, 14, 18, 23, 26, 27, 30, 39]. We also provide the results of severalcomputational experiments on graphs distributed by the Erd˝os-R´enyi random graph model [11]and Watts-Strogatz random graph model [38], the latter of which may be particularly relevant tothe strong rainbow connection problem as these graphs exhibit the so called ‘small world’ propertyoften observed in social graphs – shortest paths are often quite short in length despite potentiallylarge graph orders. We compare the following methods: • Naive IP model solved via branch and cut (i.e., direct solution of (IP-1), without the compu-tational enhancements introduced in Section 4 and Section 5) • IP model solved via branch and cut Publicly available at the Power Systems Test Case Achieve: https://labs.ece.uw.edu/pstca/ . Publicly available in the Koblenz Network Collection [20]. IP model solved via branch and cut with lazily added inequalities (1) • IP model solved via bottom up strategy • IP model solved via bottom up strategy with lazily added inequalities (1)In all but the naive IP method, the variable and constraint elimination improvements introducedin Section 5.2 were applied. For each of the branch and cut methods, the heuristic detailed inSection 5.3 was applied to both reduce the number of variables and constraints needed to definethe model, as well as provide the model with an initial upper bound to assist with pruning.
Each test was executed on the same hardware, a laptop with 32 GB of RAM running Ubuntuversion 19.10 with a 2.60 GHz i7 processor. All tests were completed with a 1 hour timeout limit.Several reported runtimes are just over the one hour time limit; in these cases a solution was found(just prior to the time limit), but was reported slightly after the time limit. We used Python 3.7.4and the Networkx package [16] to implement the heuristic method and various pre-processing graphalgorithms described in Section 4. Gurobi [15], version 9.0, was used to solve IPs and the Gurobicallback interface was used to lazily add violated inequalities. Our code is publicly available at https://github.com/dtmildebrath/rainbow .To generate the violated inequalities proposed in Section 4.2, we considered the publicly availablemax (weight) clique solver Cliquer [28] as well as a max weight independent set hybrid iterated localsearch heuristic (ILS-VND) proposed by Nogueira et al. [29] as callback subroutines. At each nodeof the branch and bound tree and for each color k , the fractional weights of x e,k variables can beused to define vertex weights for the pre-computed auxiliary graph H . As identifying max weightcliques is N P -hard in general, we expected that exactly computing max weight cliques would beless computationally effective than using a heuristic method such as ILS-VND. In our experimentshowever, we found that due to the sizes of the subproblems which we encounter in our tests and thelow edge densities of the corresponding auxiliary graphs, very little time is needed to solve thesesubproblems exactly. As such, the reported results use Cliquer to generate violated inequalitiesand note that in the vast majority of our test instances less than 1% of the total runtime was spentgenerating violated inequalities.Some of the social network graphs we considered as test cases included directed edges, loops, orparallel edges. Since these were often used to indicate repeated communications, such as emailssent from one party and received by another party or messages sent from a party to back to thatsame party, these graphs were modified so that loops were removed, parallel edges were reduced to asingle edge, and directed edges were made undirected. Additionally, we used the G n,p Erd˝os-R´enyirandom graph model, where the generated G has order n and each pair of vertices are adjacentwith probability p . Test instance labeled ‘ER n p i ’ is then the i th random graph generated with n = n and p = p / n , k , p , and the test instance labeled ‘WS n k p i ’ is the i th random graph generated with n = n , k = k , and p = p / maxIter , the number of iterations for which the randomheuristic introduced in Section 5.3 is run. Despite its simplicity, we found that when combined17ith the lower bound ω ′ ( G ) the random heuristic often provides a surprisingly tight optimalitygap with maxIter = ⌈ n/ ⌉ . As expected, runtime performance benefits diminish as maxIter isincreased and more search time needed for small improvements in solutions. In Table 1 we providethe solutions returned by the heuristic with maxIter = ⌈ n/ ⌉ and its total run time. Because theruntime performance of the Naive IP Model and B&C methods are somewhat sensitive to | K | (asdetermined by the heuristic upper bound), for each test instance the heuristic was run once; theresulting solution was then used to initialize each of these methods and the time needed for theheuristic was added to the overall runtimes reported in Table 1. Runtimes for the various computational methods we propose are given in Table 1, and additionaldetails for each of the test instances are provided in Table 2.We note that in all but one instance, excepting those for which all methods timed out, both bottomup strategies outperformed the traditional branch and cut approaches. This is likely due to thecombination of strong, and often tight, lower bounds given by ω ′ ( G ) and a robust heuristic solutionsearch provided by Gurobi. Because the initial lower bound max { diam( G ) , ω ′ ( G ) } is so often equalto src ( G ), in most cases optimality can be verified as soon as a single solution is found. There area few cases however, in which the bottom up methods prove the bound max { diam( G ) , ω ′ ( G ) } tobe slack. Because proving infeasiblity is often computationally expensive, we expected the bottomup methods to be outperformed by the branch and cut methods on these instances. However, noneof the proposed methods are able to solve these instances within the hour timeout period, and thebranch and cut methods often still terminate with fairly large optimality gaps.As shown in Table 1, we see that the variable and constraint elimination strategy outlined inSection 5.2 is effective, particularly in the sparse test cases. Besides encoding the lower boundposed by ω ′ ( G ), the variable elimination strategy greatly reduces the search space both for bothheuristic solutions and the subsequent branching process, reducing the number of shortest pathsby as much as 70% in some instances.We also observe that despite the theoretical strength of the valid inequalities (1), they do notconsistently improve model performance, at times resulting in significant improvement and otherssignificant detriment. In Table 1, the test cases in which generation was not performed are indicatedwith a ‘-’ rather than a ‘0’. Surprisingly, we see that in some cases no cuts were generated butthe otherwise identical methods consistently perform differently on the same test instances. Thisis an effect of the Gurobi LazyConstraint feature, which alters the solver’s presolve routines in thepresence of lazily generated constraints.Another surprising observation is that despite its large number of shortest paths, and thus modelsizes, the n = 150 Watts-Strogatz instances can often be evaluated quite quickly. In comparison,the n = 100 , p = 0 .
04 Erd˝os-R´enyi instances are much more difficult to compute despite havingapproximately 20 times fewer shortest paths. We believe this to indicate that instance difficulty ismore closely tied to graph features other than |P| , and partially justifies the exponential formulationof (IP-1). We also note that the edge density of H is often quite low, and thus the max cliquesubproblems used to compute ω ′ ( G ) and to generate the valid inequalities (1) are both small areparticularly easy to solve in practice. 18 eur. Heur. B&C B&C B&C Bott. up Bott. up Bott. upInstance n src ( G ) Bound Time Naive (no cuts) (cuts) .
521 [14, 21] 8 .
621 7 .
126 - 6 . . .
525 1512 .
083 25 .
884 218 .
782 217 . .
500 260ER 80 3.2 2 80 21 26 0 .
510 [16, 21] 3 .
306 3 .
207 - . .
023 -ER 80 3.2 3 80 24 30 0 .
474 [20, 24] 3 .
180 3 .
058 - . .
828 -ER 80 3.2 4 80 25 29 0 .
489 [24, 25] 2 .
587 2 .
628 - . .
792 -ER 80 6 0 80 8 18 1 .
310 2319 .
224 1887 .
042 2231 .
781 114 . .
325 513ER 80 6 1 80 10 21 1 .
013 1287 .
704 888 .
659 1337 .
727 230 . .
128 464ER 80 6 2 80 8 18 1 .
444 1688 .
089 636 .
261 1469 .
220 226 . .
031 330ER 80 6 3 80 9 19 1 .
361 871 .
583 141 .
416 1034 .
426 189 . .
725 37ER 80 6 4 80 8 17 1 .
689 670 .
346 510 .
330 1015 .
274 53 69 . . -ER 100 4 0 100 13 26 2 .
520 [13, 14] 2986 .
063 3560 .
648 577 . .
541 963ER 100 4 1 100 11 24 3 .
004 [11, 13] 3295 .
713 [11, 12] 0 [11, -] . .
186 [10, 16] [10, 16] [10, 17] 1175 [10, -] [10, -] 1355ER 100 4 3 100 - 24 2 .
689 [10, 14] [10, 16] [10, 16] 789 [11, -] [11, -] 355ER 100 4 4 100 - 24 2 .
959 [10, 12] [10, 12] [10, 12] 0 [10, -] [10, -] -ER 100 8 0 100 7 16 6 .
905 1827 .
875 [7, 8] [7, 8] - . .
913 103ER 100 8 1 100 7 16 8 .
003 747 .
139 663 .
521 1399 .
056 - 4 . . -ER 100 8 2 100 6 17 6 .
647 [6, 7] [6, 7] [6, 9] 346 . .
803 397ER 100 8 3 100 6 15 7 .
576 3108 .
940 3361 .
426 [6, 7] 17 . .
621 -ER 100 8 4 100 6 16 7 .
530 3160 .
943 [6, 8] [6, 8] 378 4 . . -WS 100 10 1 0 100 8 22 10 .
090 [8, 10] [8, 10] 1827 .
962 21 . .
288 83WS 100 10 1 1 100 9 24 14 .
139 [8, 17] [8, 24] [8, 10] 11 1612 . . -WS 100 10 1 2 100 - 25 13 .
031 [8, 13] [8, 25] [8, 25] - [8, -] [8, -] -WS 100 10 1 3 100 9 24 12 .
147 [9, 19] [9, 10] 1967 .
472 17 34 . . -WS 100 10 1 4 100 - 22 9 .
911 [7, 11] [7, 11] [7, 8] 35 [7, -] [7, -] 39WS 100 20 1 0 100 4 13 16 .
986 673 .
842 475 .
729 242 .
447 0 9 . . -WS 100 20 1 1 100 4 14 19 .
463 3068 .
778 879 .
595 399 .
833 0 11 . . -WS 100 20 1 2 100 5 14 18 .
251 [3, 5] [4, 5] [4, 5] 7 13 . . -WS 100 20 1 3 100 5 14 16 .
293 [4, 5] 1773 .
939 1870 .
877 0 12 . . -WS 100 20 1 4 100 5 14 17 .
357 [4, 6] [4, 5] [4, 5] 2 14 . . -WS 150 30 1 0 150 4 14 123 .
940 [3, 9] [3, 5] [3, 14] - 43 . . -WS 150 30 1 1 150 4 15 129 .
283 [3, 7] [4, 15] [4, 5] 0 49 . . -WS 150 30 1 2 150 4 14 120 .
381 [3, 9] [4, 14] 3266 .
089 0 35 . . -WS 150 30 1 3 150 4 15 122 .
179 [3, 8] [4, 15] 2855 .
833 3 46 . . -WS 150 30 1 4 150 4 15 132 .
295 [4, 12] [4, 15] 1900 .
900 2 37 . . -ieee30 30 10 12 0 .
019 0 .
252 0 .
106 0 .
108 - 0 . . -ieee57 57 14 22 0 .
115 54 .
571 4 .
893 10 .
750 128 . .
192 124ieee118 118 25 42 2 .
705 [25, 32] 269 .
386 86 .
467 50 225 . . .
574 [-, 125] [106, 108] [107, 108] 1 [107, -] [107, -] 629karate 34 6 11 0 .
069 3 .
001 0 .
798 0 .
606 - 0 . . -surfers 43 3 6 0 .
401 1 .
470 1 .
145 1 .
066 - 0 . . -dolphins 62 10 17 0 .
524 [9, 10] 6 .
444 5 .
334 - 1 . . -lesmis 77 21 27 1 .
741 138 .
235 5 .
694 6 .
031 - 3 . . -adjnoun 112 11 25 8 .
723 [11, 12] 1000 .
355 698 .
574 33 . .
660 116football 115 5 16 14 .
334 [5, 8] [5, 8] [5, 8] 31 [5, -] . -rado-emails 167 24 24 214 .
839 [4, 24] 309 .
058 286 .
474 - 58 . . -jazz-musicians 198 - 22 416 .
739 [5, 22] [6, 22] [6, 11] 0 [6, -] [6, -] 0
Table 1: Performance comparison of proposed methods. Method solve times and total number ofgenerated inequalities of the form (1) are given. A 1 hour time limit was used, and for each testinstance the fastest method is indicated in bold. If a method was unable to solve an instance, thebest bounds obtained by the method are indicated. In many small instances, Gurobi’s automaticheuristics were able to identify a provably optimal solution prior to cut generation. To distinguishthese instances from those in which cut generation was performed but no inequalities of the form(1) were generated, we use a dash ‘-’ rather than ‘0’.19 nstance n m src ( G ) ω ′ ( G ) diam( G ) dens ( H ) |P| |P| rem. % rem.ER 80 3.2 0 80 124 19 19 9 3.92 5655 2384 42.2ER 80 3.2 1 80 121 16 16 10 3.83 5276 2175 41.2ER 80 3.2 2 80 124 21 21 10 3.92 5708 2308 40.4ER 80 3.2 3 80 115 24 24 9 3.64 4906 1910 38.9ER 80 3.2 4 80 115 25 25 11 3.64 4621 1901 41.1ER 80 6 0 80 189 8 8 6 5.98 6670 5180 77.7ER 80 6 1 80 163 10 10 7 5.16 6327 4132 65.3ER 80 6 2 80 199 8 8 6 6.30 6990 5717 81.8ER 80 6 3 80 191 9 9 5 6.04 6524 5175 79.3ER 80 6 4 80 211 8 8 5 6.68 5848 5848 100.0ER 100 4 0 100 185 13 13 7 3.74 9221 5725 62.1ER 100 4 1 100 206 11 11 7 4.16 9571 6500 67.9ER 100 4 2 100 208 - 10 8 4.20 10293 6844 66.5ER 100 4 3 100 200 - 10 6 4.04 9730 6005 61.7ER 100 4 4 100 218 - 10 6 4.40 10580 7580 71.6ER 100 8 0 100 378 7 7 4 7.64 13795 13102 95.0ER 100 8 1 100 402 7 7 4 8.12 14879 14270 95.9ER 100 8 2 100 378 6 6 4 7.64 13503 12711 94.1ER 100 8 3 100 409 6 6 4 8.26 15511 14896 96.0ER 100 8 4 100 408 6 6 4 8.24 15119 14531 96.1WS 100 10 1 0 100 500 8 8 8 10.10 51208 47253 92.3WS 100 10 1 1 100 500 9 9 8 10.10 97045 93088 95.9WS 100 10 1 2 100 500 - 8 8 10.10 92757 88095 95.0WS 100 10 1 3 100 500 9 9 8 10.10 80985 77201 95.3WS 100 10 1 4 100 500 - 7 7 10.10 40077 37174 92.8WS 100 20 1 0 100 1000 4 4 4 20.20 45194 44518 98.5WS 100 20 1 1 100 1000 4 4 4 20.20 52548 51895 98.8WS 100 20 1 2 100 1000 5 3 5 20.20 59160 58435 98.8WS 100 20 1 3 100 1000 5 4 5 20.20 57989 57291 98.8WS 100 20 1 4 100 1000 5 4 5 20.20 67365 66527 98.8WS 150 30 1 0 150 2250 4 3 4 20.13 179275 178655 99.7WS 150 30 1 1 150 2250 4 4 4 20.13 197491 196563 99.5WS 150 30 1 2 150 2250 4 4 4 20.13 147746 147186 99.6WS 150 30 1 3 150 2250 4 4 4 20.13 186169 185445 99.6WS 150 30 1 4 150 2250 4 4 4 20.13 154201 153663 99.7ieee30 30 41 10 10 6 9.43 484 201 41.5ieee57 57 78 14 14 12 4.89 2147 699 32.6ieee118 118 179 25 25 14 2.59 15600 6237 40.0ieee300 300 409 107 106 24 0.91 125782 36954 29.4karate 34 78 6 6 5 13.90 1478 1315 89.0surfers 43 336 3 3 3 37.21 3470 3470 100.0dolphins 62 159 10 10 8 8.41 5513 3339 60.6lesmis 77 254 21 21 5 8.68 6581 5381 81.8adjnoun 112 425 11 11 5 6.84 23535 19083 81.1football 115 613 5 5 4 9.35 22150 21114 95.3rado-emails 167 3251 24 24 5 23.45 137009 108349 79.1jazz-musicians 198 2742 - 6 6 14.06 186618 172595 92.5 Table 2: Additional information for each of the test instances considered in Table 1. For each testinstance G , and from left to right, the order, size, src ( G ), lower bound ω ′ ( G ), diam( G ), edge densityof H ( G ) ( dens ( H ) := | E ( H ) | / (cid:0) | V ( H ) | (cid:1) ), number of shortest paths in G , number of shortest paths in G remaining after variable elimination, and the percentage of shortest paths in G remaining aftervariable elimination are indicated. 20 . Conclusions In this paper we propose the first exact computational methods for strong rainbow connection ingraphs as well as a novel lower bound on the strong rainbow connection numbers of general graphs.We demonstrate that the bound we provide, when combined with the graph diameter lower bound,is often equal to the strong rainbow connection number. We illustrate this phenomenon and com-pare the effectiveness of our proposed methods in computational experiments which consider severalrandom graph models and real world social and infrastructure networks. Our proposed computa-tional methods are based on the integer program (IP-1), which we show can be extended to exactlysolve several other popular rainbow coloring problems. We provide several computational enhance-ments for this integer program, including a random heuristic, variable and constraint eliminationstrategies, and a set of strong valid clique inequalities.This work leaves several interesting avenues of future study. In particular, in Theorem 1 we showthat for any edge coloring f which strongly rainbow connects a graph G , f must also be a propervertex coloring for our auxiliary graph construction H ( G ). While computing optimal proper vertexcolorings of graphs is known to be N P -hard in general, they can be computed in worst casepolynomial time for perfect graphs. Thus, it may be of both theoretical and computation interest todetermine for which graphs this auxiliary construction is a perfect graph. Additionally, Theorem 2shows that in geodetic graphs proper colorings of the vertices of H ( G ) are equivalent to edgecolorings which strongly rainbow connect G . However, geodeticity is a strong property and it ispossible that this equivalence holds in a larger class of graphs.This work also establishes the connection between the well studied graph coloring problem and thestrong rainbow connection problem, proving that for an edge coloring to strongly rainbow connecta graph it must also give a proper vertex coloring of a special auxiliary graph. Since the graphcoloring problem has been studied extensively in computational settings, it may be possible toextend facet defining inequalities [3, 24] and other improvements for that problem to aid in thecomputation strong rainbow connection numbers.As a computational curiosity, in the vast majority of the instances we considered we found thatmax { diam( G ) , ω ′ ( G ) } = src ( G ), regardless of whether the instances came from random graphmodels or real world networks. Additionally, as of yet the only graphs which we have found sofar with large src ( G ) − max { diam( G ) , ω ′ ( G ) } are a set of complete bipartite graphs. It may beinteresting to find a set of graphs arising from other applications or random graph models in which src ( G ) − max { diam( G ) , ω ′ ( G ) } is also large. Acknowledgements
This work was supported by National Science Foundation grant number DMS-1720225. Addi-tionally, D. Mildebrath was supported by the United States Department of Defense through theNational Defense Science and Engineering Graduate Fellowship program. The authors would liketo thank Zachary Kingston of Rice University for helpful comments and conversations.
References [1] P. Ananth and M. Nasre. New hardness results in rainbow connectivity. arXiv e-prints , art.arXiv:1104.2074, Apr 2011.[2] E. Balas and M. W. Padberg. Set partitioning: A survey.
SIAM Review , 18(4):710–760, 1976.213] D. Bergman and J. N. Hooker. Graph coloring facets from all-different systems. In
Interna-tional Conference on Integration of Artificial Intelligence (AI) and Operations Research (OR)Techniques in Constraint Programming , pages 50–65. Springer, 2012.[4] J. A. Bondy and U. S. R. Murty.
Graph Theory with Applications , volume 290. MacmillanLondon, 1976.[5] J. Cervantes-Ojeda, M. G´omez-Fuentes, D. Gonz´alez-Moreno, and M. Olsen. Rainbow con-nectivity using a rank genetic algorithm: Moore cages with girth six.
Journal of AppliedMathematics , 2019, 2019.[6] S. Chakraborty, E. Fischer, A. Matsliah, and R. Yuster. Hardness and algorithms for rainbowconnectivity.
Journal of Combinatorial Optimization , 21:330–347, 2011.[7] L. S. Chandran, A. Das, D. Issac, and E. J. van Leeuwen. Algorithms and bounds for verystrong rainbow coloring. In
Latin American Symposium on Theoretical Informatics , pages625–639. Springer, 2018.[8] G. Chartrand, G. L. Johns, K. A. McKeon, and P. Zhang. Rainbow connection in graphs.
Mathematica Bohemica , 133(1):85–98, 2008.[9] G. Chartrand, G. L. Johns, K. A. McKeon, and P. Zhang. The rainbow connectivity of agraph.
Networks , 54(2):75–81, 2009.[10] X. C. Deng, K. N. Xiang, and B. Wu. Polynomial algorithm for sharp upper bound of rainbowconnection number of maximal outerplanar graphs.
Applied Mathematics Letters , 25(3):237–244, 2012.[11] P. Erd˝os and A. R´enyi. On the evolution of random graphs.
Publications of the MathematicalInstitute of the Hungarian Academy of Sciences , 5(1):17–60, 1960.[12] L. C. Freeman, S. C. Freeman, and A. G. Michaelson. On human social intelligence.
Journalof Social and Biological Structures , 11(4):415–425, 1988.[13] D. R. Fulkerson. Blocking and anti-blocking pairs of polyhedra.
Mathematical Programming ,1:168–194, 1971.[14] P. M. Gleiser and L. Danon. Community structure in jazz.
Advances in Complex Systems , 6(04):565–573, 2003.[15] LLC Gurobi Optimization. Gurobi optimizer reference manual, 2020. URL .[16] A. Hagberg, P. Swart, and D. A. Chult. Exploring network structure, dynamics, and functionusing networkx. Technical report, Los Alamos National Lab.(LANL), Los Alamos, NM (UnitedStates), 2008.[17] M. Keranen and J. Lauri. Computing minimum rainbow and strong rainbow colorings of blockgraphs.
Discrete Mathematics and Theoretical Computer Science , 20(1), 2018.2218] D. E. Knuth.
The Stanford GraphBase: A platform for combinatorial computing . ACM PressNew York, 1993.[19] M. Krivelevich and R. Yuster. The rainbow connection of a graph is (at most) reciprocal toits minimum degree.
Journal of Graph Theory , 63(3):185–191, 2010.[20] J. Kunegis. Konect: The koblenz network collection. In
Proceedings of the 22nd InternationalConference on World Wide Web , pages 1343–1350, 2013.[21] S. Li, Y. Mao, and Y. Shi. The strong rainbow vertex-connection of graphs. arXiv preprintarXiv:1201.1541 , 2012.[22] X. Li, Y. Shi, and Y. Sun. Rainbow connection of graphs: A survey.
Graphs and Combinatorics ,29:1–38, 2013.[23] D. Lusseau, K. Schneider, O. J. Boisseau, P. Haase, E. Slooten, and S. M. Dawson. Thebottlenose dolphin community of Doubtful Sound features a large proportion of long-lastingassociations.
Behavioral Ecology and Sociobiology , 54(4):396–405, 2003.[24] I. M´endez-D´ıaz and P. Zabala. A cutting plane algorithm for graph coloring.
Discrete AppliedMathematics , 156(2):159–179, 2008.[25] G. L. Nemhauser and L. A. Wolsey.
Integer and Combinatorial Optimization . InterscienceSeries in Discrete Mathematics and Optimization. Wiley, 1988.[26] M. E. J. Newman. Clustering and preferential attachment in growing networks.
PhysicalReview E , 64(2):025102, 2001.[27] M. E. J. Newman. Finding community structure in networks using the eigenvectors of matrices.
Physical Review E , 74(3):036104, 2006.[28] S. Niskanen and P. R. J. ¨Osterg˚ard. Cliquer user’s guide.
Helsinki University of Technology ,2003.[29] B. Nogueira, R. G. S. Pinheiro, and A. Subramanian. A hybrid iterated local search heuristicfor the maximum weight independent set problem.
Optimization Letters , 12(3):567–583, 2018.[30] M. Nurek and R. Michalski. Combining machine learning and social network analysis to revealthe organizational structures.
Applied Sciences , 10(5):1699, 2020.[31] M. W. Padberg. On the facial structure of set packing polyhedra.
Mathematical Programming ,5:199–215, 1973.[32] M. G. Reed, P. F. Syverson, and D.M. Goldschlag. Anonymous connections and onion routing.
IEEE Journal on Selected Areas in Communications , 16(4):482–494, 1998.[33] M. A. Shulhany and A. N. M. Salman. The (strong) rainbow connection number of stellargraphs. In
AIP Conference Proceedings , volume 1708, 2016.[34] S. Sy, G. H. Medika, and L. Yulianti. The rainbow connection number of fan and sun.
AppliedMathematical Sciences , 7:3155–3160, 2013. 2335] K. Uchizawa, T. Aoki, T. Ito, A. Suzuki, and X. Zhou. On the rainbow connectivity of graphs:Complexity and FPT algorithms.
Algorithmica , 67:161–179, 2013.[36] O. Ugurlu and F. Nuriyeva. A new heuristic algorithm for rainbow vertex connection. In
Theoretical and Applied Aspects of Cybernetics. Proceedings of the 2nd International ScientificConference of Students and Young Scientists—Kyiv: Bukrek, 2012.—204 p. ISBN 978-966-399-447-5 , page 101. Citeseer, 2012.[37] A. Verma, A. Buchanan, and S. Butenko. Solving the maximum clique and vertex coloringproblems on very large sparse networks.
INFORMS Journal on Computing , 27(1):164–177,2015.[38] D. J. Watts and S. H. Strogatz. Collective dynamics of “small-world” networks.
Nature , 393(6684):440, 1998.[39] W. W. Zachary. An information flow model for conflict and fission in small groups.