# Maximum Disjoint Paths on Edge-Colored Graphs: Approximability and Tractability

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Definitions

_{p}.

**Problem 1.**MAXIMUM COLORED DISJOINT PATHS (MAX CDP).

**Problem 2.**COLORED DISJOINT PATHS (CDP).

## 3. Approximation and Parameterized Complexity of

**Description of the gadget.**Let ${G}_{I}=({V}_{I},{E}_{I})$ be an undirected graph, with $V=\{{v}_{1},\dots ,{v}_{n}\}$ and ${E}_{I}=\{{e}_{1},\dots ,{e}_{m}\}$. Without loss of generality, we assume that ${G}_{I}$ is connected, since a maximum independent set of a non-connected graph is the union of the maximum independent sets of its connected components. Let ${\Pi}_{{E}_{I}}$ be an ordered list of the edges of ${G}_{I}$, based on some ordering. We construct an edge-colored graph ${G}_{C}=({V}_{C},{E}_{1},\dots ,{E}_{n})$ associated with ${G}_{I}$ as follows. Informally, the vertex set ${V}_{C}$ is composed by two distinguished vertices s and t and a vertex for each edge of ${G}_{I}$, while each set ${E}_{i}$, $1\le i\le c$, is composed connecting the vertices associated with edges of ${G}_{I}$ incident to ${v}_{i}$ in the same order as they appear in ${\Pi}_{{E}_{I}}$. Formally, the set of colors is:

**Figure 1.**An example of a graph ${G}_{I}$ and the edge-colored graph ${G}_{C}$ associated with it. For convenience, we labelled the edges of ${G}_{I}$ such as they correspond to the vertices in ${G}_{C}$. The colors of the edges in ${G}_{C}$ are indicated by numbers placed near the edges, while the two distinguished vertices s and t are highlighted in grey. The order ${\Pi}_{{E}_{I}}$ of the edges of ${G}_{I}$ is simply the lexicographic order of their labels.

**Properties of the gadget.**First, we introduce the following properties of the gadget.

**Remark 1.**A uni-color $st$-path of color i, with $1\le i\le c$, contains each vertex ${u}_{i,x}$ of ${G}_{C}$ associated with an edge incident in ${v}_{i}\in {V}_{I}$.

**Lemma 2**.

**Lemma 3**.

**Consequences.**Lemmas 2 and 3 prove the existence of an L-reduction [4] from MAX INDSET to MAX CDP with constants $\beta =\gamma =1$. Hence, considering that, unless $\text{P}=\mathrm{NP}$, MAX INDSET cannot be approximated in polynomial time within factor ${\left|{V}_{I}\right|}^{1-\epsilon}$ for any constant $\epsilon >0$ [5], and that $\left|{V}_{I}\right|=c$, the following theorem holds.

**Theorem 4**.

**Theorem 5**.

## 4. A Fixed-Parameter Algorithm for

_{p}, the length-bounded (decision) version of MAX CDP, which asks if there exist p uni-color disjoint $st$-paths of length at most ℓ. We show that ℓ-LCDP

_{p}is fixed-parameter tractable when the parameters are ℓ and p by presenting a parameterized algorithm based on the color coding technique [8]. For an introduction to parameterized complexity see [6]. Notice that ℓ-LCDP

_{p}is unlikely to admit fixed-parameter tractable algorithms when parameterized only by p or only by ℓ. Indeed in the latter case, ℓ-LCDP

_{p}is already -hard when $\ell =4$ [3]. In the former case, we have proved in the previous section that CDP (hence ℓ-LCDP

_{p}, when $\ell =n$) is W[1]-hard when parameterized by p.

_{p}problem is divided into two parts. First, we present a procedure that, given an edge-colored graph ${G}_{C}$ and a vertex-coloring function λ, verifies if in ${G}_{C}$ there exist p disjoint uni-color $st$-paths long at most ℓ and with the additional constraint that the inner vertices of the p paths are colored with distinct colors. Then, we show that, by exploiting well-known properties of families of perfect hash functions, the previous procedure can be used to solve the ℓ-LCDP

_{p}problem in polynomial time (if p and ℓ are parameters). In the following, to avoid ambiguities between vertex’s and edge’s colors, function λ will be called vertex-labelling function (or, simply, a labelling function) instead of the traditional term of coloring function.

**A dynamic-programming procedure for the $\mathcal{L}$-labelled problem.**Let ${G}_{C}=(V,{E}_{1},\dots ,{E}_{c})$ be a C-edge-colored graphs with two distinguished vertices s and t, and let λ be a labelling function which maps each vertex v of $V\backslash \{s,t\}$ to a label $\lambda \left(v\right)$ belonging to a set $\mathcal{L}$ (we assume that λ assigns a distinct label to each vertex of a solution of ℓ-LCDP

_{p}). Let $L\subseteq \mathcal{L}$ be a fixed set of labels. A simple path π in ${G}_{C}$ is L-labelled if and only if the labels of its vertices (with the exclusion of s and t) are contained in L and are pairwise distinct. A set $\{{\pi}_{1},\dots ,{\pi}_{k}\}$ of simple paths is L-labelled if and only if there exists a partition $\{{L}_{1},\dots ,{L}_{k}\}$ of L such that each ${\pi}_{i}$ is ${L}_{i}$-labelled. We say that a path π is g-colored, with $g\in C$, if all of its edges belong to set ${E}_{g}$. The $\mathcal{L}$-labelled ℓ-LCDP

_{p}problem, given ${G}_{C}$ and $\lambda :V\to \mathcal{L}$ with $\left|\mathcal{L}\right|=(\ell -1)p$, asks if there exists an $\mathcal{L}$-labelled solution for the ℓ-LCDP

_{p}problem on ${G}_{C}$. We solve the $\mathcal{L}$-labelled ℓ-LCDP

_{p}problem by combining two dynamic-programming recurrences. The first one, $M[L,v,g]$, tests if, for a set of labels $L\subseteq \mathcal{L}$, there exists an L-labelled g-colored path from vertex s to a vertex v different from t. The second one, $P\left[L\right]$, tests if, for a set of labels $L\subseteq \mathcal{L}$ such that $\left|L\right|=(\ell -1)q$ for some integer $q\in [0,p]$, there exists a partition $\{{L}_{1},\dots ,{L}_{q}\}$ of L in q subsets such that each set ${L}_{i}$ labels a ${g}_{i}$-colored $st$-path of length $l\le \ell $.

**Lemma 6**.

**Corollary 7**.

_{p}problem, is defined as follows:

_{0}problem is always Yes (i.e., $P\left[\varnothing \right]=1$).

**Lemma 8**.

**Property 9**.

**Property 10**.

_{p}can be built. Notice that the second case of Equation 4.2 tries every possible bi-partition of set $\mathcal{L}$ in two sets ${L}^{\prime}$ and ${L}^{\u2033}$ of cardinality $\left|\mathcal{L}\right|-(\ell -1)$ and $\ell -1$, respectively. If function $P\left[\mathcal{L}\right]$ is true, then at least one of the bi-partitions verifies the given conditions. Notice that $\left|{L}^{\prime}\right|=\left|\mathcal{L}\right|-(\ell -1)=(\ell -1)(k+1)-(\ell -1)=(\ell -1)k$. Hence, by induction hypothesis, since $P\left[{L}^{\prime}\right]$ is true, there exists an ${L}^{\prime}$-labelled set ${S}^{\prime}$ of k disjoint uni-color $st$-paths. The other conditions, as shown in the proof of Corollary 7, test the existence of an ${L}^{\u2033}$-labelled g-colored $st$-path π for some color $g\in C$. Thus, if there exists a bi-partition which satisfies all the conditions, then there exits an L-labelled set $S={S}^{\prime}\uplus \left\{\pi \right\}$ of $k+1$ uni-color $st$-paths. Moreover, since ${L}^{\prime}$ and ${L}^{\u2033}$ are disjoint, by Property 9, path π and any path of S are disjoint. Furthermore, since $\left|{L}^{\u2033}\right|=\ell -1$, by Property 10, the length of π is, at most, ℓ (in particular, $\ell -1$ from s to vertex v, plus 1 from v to t). As a consequence, S is an $\mathcal{L}$-labelled set of $p=k+1$ disjoint uni-color $st$-paths of length, at most, ℓ.

_{p}problem can be solved in polynomial time when ℓ and p are parameters.

**Corollary 11**.

**The algorithm for ℓ-LCDP**. As explained before, it is possible to explicitly construct a k-perfect family F of hash functions, that is a set F of hash functions from a universal set U to the set of integers $\{1,\dots ,k\}$ such that for each ${U}^{\prime}\subseteq U$ of cardinality k there exists a hash function $f\in F$ which assigns distinct integers to the elements of ${U}^{\prime}$. It has been shown (see, for example, [8,16,17]) that a k-perfect family of hash functions of size ${2}^{O\left(k\right)}{log}^{O\left(1\right)}\left|U\right|$ can be explicitly constructed in time proportional to its size. As a consequence, the ℓ-LCDP

_{p}_{p}problem can be solved by solving the $\mathcal{L}$-labelled ℓ-LCDP

_{p}problem for all the labelling functions given by the hash functions of a $(\ell -1)p$-perfect family (where $U=V$) in time ${2}^{O\left(\ell p\right)}O(m{log}^{O\left(1\right)}|{V}_{C}|)$. We remark that this algorithm is mainly of theoretical interest, since the running times are impractical even with modest choices of the parameters ℓ and p. However, as formalized by the following theorem, it settles the parameterized complexity of the ℓ-LCDP

_{p}problem for the parameters ℓ and p.

**Theorem 12**.

## 5. Conclusions

_{p}, a restriction of the problem where the length of the disjoint paths are bounded by a parameter. An interesting open problem is to improve the time complexity of the fixed-parameter algorithm for ℓ-LCDP

_{p}. Moreover, kernelization complexity issues are still completely unexplored.

## Acknowledgments

## References

- Hanneman, R.; Riddle, M. Introduction to Social Network Methods. In The SAGE Handbook of Social Network Analysis; Scott, J., Carrington, P.J., Eds.; SAGE Publications Ltd.: Thousand Oaks, CA, USA, 2011; pp. 340–369. [Google Scholar]
- Wasserman, S.; Faust, K. Social Network Analysis: Methods and Applications (Structural Analysis in the Social Sciences); Cambridge University Press: Cambridge, UK, 1994. [Google Scholar]
- Wu, B.Y. On the maximum disjoint paths problem on edge-colored graphs. Discret. Optim.
**2012**, 9, 50–57. [Google Scholar] [CrossRef] - Ausiello, G.; Crescenzi, P.; Gambosi, V.; Kann, G.; Marchetti-Spaccamela, A.; Protasi, M. Complexity and Approximation: Combinatorial Optimization Problems and their Approximability Properties; Springer-Verlag: Berlin/Heidelberg, Germany, 1999. [Google Scholar]
- Zuckerman, D. Linear Degree Extractors and the Inapproximability of Max Clique and Chromatic Number. In Proceedings of the 38th Annual ACM Symposium on Theory of Computing; ACM: New York, NY, USA, 2006; pp. 681–690. [Google Scholar]
- Niedermeier, R. Invitation to Fixed-Parameter Algorithms; Oxford University Press: Oxford, UK, 2006. [Google Scholar]
- Downey, R.G.; Fellows, M.R. Fixed-parameter tractability and completeness II: On completeness for W[1]. Theor. Comput. Sci.
**1995**, 141, 109–131. [Google Scholar] [CrossRef] - Alon, N.; Yuster, R.; Zwick, U. Color-coding. J. ACM
**1995**, 42, 844–856. [Google Scholar] [CrossRef] - Fellows, M.R.; Fertin, G.; Hermelin, D.; Vialette, S. Upper and lower bounds for finding connected motifs in vertex-colored graphs. J. Comput. Syst. Sci.
**2011**, 77, 799–811. [Google Scholar] [CrossRef] [Green Version] - Betzler, N.; van Bevern, R.; Fellows, M.R.; Komusiewicz, C.; Niedermeier, R. Parameterized algorithmics for finding connected motifs in biological networks. IEEE/ACM Trans. Comput. Biol. Bioinf.
**2011**, 8, 1296–1308. [Google Scholar] [CrossRef] [PubMed] - Dondi, R.; Fertin, G.; Vialette, S. Complexity issues in vertex-colored graph pattern matching. J. Discret. Algorithms
**2011**, 9, 82–99. [Google Scholar] [CrossRef] [Green Version] - Hüffner, F.; Wernicke, S.; Zichner, T. Algorithm engineering for color-coding with applications to signaling pathway detection. Algorithmica
**2008**, 52, 114–132. [Google Scholar] [CrossRef] - Bonizzoni, P.; Della Vedova, G.; Dondi, R.; Pirola, Y. Variants of constrained longest common subsequence. Inf. Process. Lett.
**2010**, 110, 877–881. [Google Scholar] [CrossRef] - Koutis, I. A faster parameterized algorithm for set packing. Inf. Process. Lett.
**2005**, 94, 7–9. [Google Scholar] [CrossRef] - Fellows, M.R.; Knauer, C.; Nishimura, N.; Ragde, P.; Rosamond, F.A.; Stege, U.; Thilikos, D.M.; Whitesides, S. Faster fixed-parameter tractable algorithms for matching and packing problems. Algorithmica
**2008**, 52, 167–176. [Google Scholar] [CrossRef] - Chen, J.; Lu, S.; Sze, S.H.; Zhang, F. Improved Algorithms for Path, Matching, and Packing Problems. In SODA; Bansal, N., Pruhs, K., Stein, C., Eds.; SIAM: Philadelphia, PA, USA, 2007; pp. 298–307. [Google Scholar]
- Alon, N.; Gutner, S. Balanced Hashing, Color Coding and Approximate Counting. In IWPEC; Chen, J., Fomin, F.V., Eds.; Springer: Berlin/Heidelberg, Germany, 2009; Volume 5917, pp. 1–16. [Google Scholar]

© 2013 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license ( http://creativecommons.org/licenses/by/3.0/).

## Share and Cite

**MDPI and ACS Style**

Bonizzoni, P.; Dondi, R.; Pirola, Y.
Maximum Disjoint Paths on Edge-Colored Graphs: Approximability and Tractability. *Algorithms* **2013**, *6*, 1-11.
https://doi.org/10.3390/a6010001

**AMA Style**

Bonizzoni P, Dondi R, Pirola Y.
Maximum Disjoint Paths on Edge-Colored Graphs: Approximability and Tractability. *Algorithms*. 2013; 6(1):1-11.
https://doi.org/10.3390/a6010001

**Chicago/Turabian Style**

Bonizzoni, Paola, Riccardo Dondi, and Yuri Pirola.
2013. "Maximum Disjoint Paths on Edge-Colored Graphs: Approximability and Tractability" *Algorithms* 6, no. 1: 1-11.
https://doi.org/10.3390/a6010001