Published on

28-Dec-2016View

212Download

0

Transcript

JID:TCS AID:9687 /FLA Doctopic: Algorithms, automata, complexity and games [m3G; v 1.131; Prn:3/04/2014; 14:22] P.1 (1-9)Theoretical Computer Science ()

Contents lists available at ScienceDirect

Pd

Za Db D

a

ArReReAcAv

KeFixApCoUnM

1.

siengrve

grcashprawanhase

*

ht03Theoretical Computer Science

www.elsevier.com/locate/tcs

arameterized and approximation algorithms for nding twoisjoint matchings

hi-Zhong Chen a,, Ying Fan b, Lusheng Wang b

ivision of Information System Design, Tokyo Denki University, Hatoyama, Saitama 350-0394, Japanepartment of Computer Science, City University of Hong Kong, Tat Chee Avenue, Kowloon, Hong Kong Special Administrative Region

r t i c l e i n f o a b s t r a c t

ticle history:ceived 26 January 2014ceived in revised form 6 March 2014cepted 25 March 2014ailable online xxxx

ywords:ed-parameter algorithmsproximation algorithmslor-codingiversal setsatchings

We rst present a randomized xed-parameter algorithm for the NP-hard problem ofdeciding if there are two matchings M1 and M2 in a given graph G such that |M1| + |M2|is a given number k. The algorithm runs in O (2kk(m + n)) expected time and can bederandomized to run in O (22k+12 log2(2k)kn(m + n)) time, where n (respectively, m) isthe number of vertices (respectively, edges) in G . We then extend the algorithm tothe weighted version of the problem. We further present a combinatorial approximationalgorithm for the NP-hard problem of nding two disjoint matchings in a given edge-weighted graph G so that their total weight is maximized. The algorithm achieves anapproximation ratio close to 0.76 and runs in O (m+ n3(n)) time, where is the inverseAckermann function.

2014 Elsevier B.V. All rights reserved.

Introduction

Throughout this paper, a graph means an undirected graph that may have parallel edges but no self-loops. A graph ismple if it has no parallel edges. A matching in a graph G is a set F of edges in G such that no two edges in F share andpoint. A maximum matching in G is a matching in G whose cardinality is maximized over all matchings in G . Given aaph G , the maximum matching problem (MM for short) requires the computation of a maximum matching in G . MM isry fundamental in many areas and has been extensively studied in the literature.In this paper, we consider a generalization of MM, called the maximum two-matching problem (MTM for short). Given a

aph G , MTM requires the computation of two disjoint matchings in G whose total cardinality is maximized. Motivated byll admittance issues in satellite based telecommunication networks, Feige et al. [8] introduced MTM (among others) andowed its APX-hardness. They also observed that MTM is obviously a special case of the well-known maximum coverageoblem (see [13]): We wish to cover the maximum number of edges of a given graph G with two sets each of which ismatching of G . Since this special case of the maximum coverage problem can be approximated by a greedy algorithmithin a ratio of 0.75 [13], so can be MTM. They then gave a randomized approximation algorithm for MTM that achievesexpected ratio of 1013 0.769. Their algorithm is based on an LP approach and random rounding. In particular, their LPs an exponential number of constraints and hence can only be solved by using the ellipsoid method together with aparation oracle. Hence, their algorithm is extremely slow although its running time is polynomial.

Corresponding author.E-mail addresses: zzchen@mail.dendai.ac.jp (Z.-Z. Chen), cswangl@cityu.edu.hk (L. Wang).

tp://dx.doi.org/10.1016/j.tcs.2014.03.03004-3975/ 2014 Elsevier B.V. All rights reserved.

JID:TCS AID:9687 /FLA Doctopic: Algorithms, automata, complexity and games [m3G; v 1.131; Prn:3/04/2014; 14:22] P.2 (1-9)2 Z.-Z. Chen et al. / Theoretical Computer Science ()

Feinis[1an

bydicoth

novethinraan

coisw5,no

alisacvesagr

2.

VFoG

Gofcywisthpaed

f

fosiz

3.

se

beanfroThe simple case of MTM (SMTM for short) where the input graph is simple has been studied recently [8,15,6,5,14,4].ige et al. [8] gave a simple approximation algorithm for SMTM that achieves a ratio of 0.8. This ratio was then improveda series of papers [15,6,5,14,4]. The best known ratio achieved by a polynomial-time approximation algorithm for SMTMroughly 0.842 [4]. All known approximation algorithms for SMTM start by using Hartvigsens polynomial-time algorithm1] to compute a maximum-sized subgraph H of the input graph such that the degree of each vertex in H is at most 2d there is no cycle of length 3 in H . Unfortunately, Hartvigsens algorithm only works for simple graphs.In this paper, we rst consider the parameterized complexity of MTM. We show that MTM is xed-parameter tractabledesigning an O (22k+12 log2(2k)kn(m + n))-time algorithm for deciding if a given n-vertex m-edge graph G contains two

sjoint matchings M1 and M2 such that |M1| + |M2| is a given number k. To obtain the algorithm, we rst use thelor-coding technique of Alon et al. [1] to design a randomized algorithm that runs in O (2kk(m + n)) expected time anden derandomize it by using an (n,2k)-universal set.We then consider the weighted version of MTM (MWTM for short), where each edge of the input graph G is given annegative weight and the goal is to nd two disjoint matchings whose total weight is maximized. In the parameterizedrsion of MWTM, we are given G and a positive integer k and want to nd two disjoint matchings M1 and M2 suchat |M1| + |M2| = k and the total weight of edges in M1 M2 is maximized over all pairs (N1,N2) of disjoint matchingsG with |N1| + |N2| = k. By extending the randomized algorithm for the parameterized version of MTM, we obtain a

ndomized algorithm for the parameterized version of MWTM. The algorithm runs in O (2kk(m + n logn)) expected timed can be derandomized by using an (n,2k)-universal set.We further design an approximation algorithm for MWTM. First note that MWTM is also a special case of the maximumverage problem: We wish to cover the maximum-weight set of edges of a given graph G with two sets each of whicha matching of G . Since this special case of the maximum coverage problem can be approximated by a greedy algorithmithin a ratio of 0.75 [13], so can be MWTM. However, all the ideas used in the known approximation algorithms [8,15,6,14,4] for MTM cannot be applied to MWTM because the algorithms call Hartvigsens algorithm [11] which only works fornweighted simple graphs.We can observe that the algorithm of Feige et al. [8] for MTM can be slightly modied into a randomized approximation

gorithm for MWTM that achieves an expected ratio of 1013 0.769. However, as mentioned before, Feige et al.s algorithmextremely slow. So, in this paper, we present a completely new (deterministic) approximation algorithm for MWTM thathieves a ratio close to 0.76. Our new algorithm is combinatorial and runs in O (m + n3(n)) time, where is the in-rse Ackermann function. The algorithm is motivated by the approaches developed in [18,12,7] for the maximum travelinglesman problem which is the problem of nding a maximum-weight Hamiltonian cycle in a given edge-weighted completeaph. The algorithm also uses our xed-parameter algorithm for MWTM as a subroutine.

Basic denitions

Let G be a graph. We denote the vertex set of G by V (G), and denote the edge set of G by E(G). For a subset U of(G), G U denotes the graph obtained from G by removing the vertices in U (together with the edges incident to them).r a subset F of E(G), G F denotes the graph obtained from G by removing the edges in F . The degree of a vertex v inis the number of edges incident to v in G . Two edges of G are adjacent if they have at least one common endpoint.A cycle in G is a connected subgraph of G in which each vertex is of degree 2. A path in G is either a single vertex ofor a connected subgraph of G in which exactly two vertices are of degree 1 and the others are of degree 2. The lengtha cycle or path C is the number of edges in C and is denoted by |C |. A k-cycle is a cycle of length k. If the length of acle or path P is odd, then we say that P is odd; otherwise, we say that P is even. A 2-matching of G is a subgraph H of Gith V (H) = V (G) in which the degree of each vertex is at most 2. Note that each connected component of a 2-matchinga path or cycle. A 2-matching C of G is even if each cycle in C is even. A semi-path set of G is a set F of edges in G suchat each connected component of the graph (V (G), F ) is a path or a 2-cycle. A matching of G is a (possibly empty) set ofirwise nonadjacent edges of G . A perfect matching of G is a matching M of G such that each vertex of G is incident to ange in M . An independent set of G is a set of vertices no two of which are adjacent in G .For a positive integer n, let Zn denote the set {0,1, . . . ,n 1}. A 2-coloring of the vertices in G is a function

: V (G) Z2.An (n,k)-universal set is a family F of hash functions from Zn to Z2 such that for every subset S of Zn with |S| = k and

r every (possibly empty) subset S of S , some function h F maps each s S to 1 and maps each t S S to 0. Thee of F is the number of functions in F .

The parameterized algorithm for MTM

In this section, we design a randomized xed-parameter algorithm for MTM and then derandomize it. Throughout thisction, x a nonnegative integer k and a graph G with n vertices and m edges.We want to decide whether G has an even 2-matching with k edges. To this end, we rst remove all but two edgestween u and v from G for each pair {u, v} of vertices in G such that G has more than two parallel edges between ud v . This step removes redundant edges from G . After this step, let H be the simplied version of G , which is obtainedm G by keeping only one edge between every pair of adjacent vertices. We check if H has a connected component H

JID:TCS AID:9687 /FLA Doctopic: Algorithms, automata, complexity and games [m3G; v 1.131; Prn:3/04/2014; 14:22] P.3 (1-9)Z.-Z. Chen et al. / Theoretical Computer Science () 3

wdeH2k

cvNco

iscy

H

at

LeO

Pr

2-2-w

Stamfo

SivethartorelaM

thmof

thbetobithtiith at least k |V (H )| edges. If such H exists, then we can nd a path of length at least k in H within O (n+m) time viapth-rst search (as rst observed in [2]), and we are done. So, we may hereafter assume that each connected component of H has less than k |V (H )| edges. By this assumption, H has less than k |V (H)| edges. Consequently, G has less thann edges. Hence, we can hereafter assume that m < 2kn.To decide whether G has an even 2-matching of size k, we proceed as follows. First, for each vertex v of G , we choose Z2 uniformly at random and view cv as the color of v . That is, we randomly color the vertices of G with two colors.

ote that the colors of the vertices of G are chosen independently. For an even 2-matching H of G , we say that H is properlylored if no two adjacent vertices of H receive the same color.Consider an even 2-matching H of size k in G . Let H1, . . . , Hb be the connected components of H . Each Hi (1 i b)a path or an even cycle. Let i be the length of Hi . Note that

bi=1 i = k because H has exactly k edges. If Hi is an even

cle, then Hi has i vertices and hence H is properly colored with probability22i

. On the other hand, if Hi is a path, then

i has i + 1 vertices and hence H is properly colored with probability 22i+1 . Thus, H is properly colored with probabilityleast

bi=1 12i = 12bi=1 i =

12k.

mma 3.1. Suppose that G has a properly-colored 2-matching of size k. Then, we can nd an even 2-matching of G of size k in(km + kn) time.

oof. To nd an even 2-matching of G of size k, we perform the following steps:

1. Construct a bipartite graph B from G by deleting every edge whose endpoints have the same color.2. Try to nd a 2-matching H of size k in B . If H is found, then report that G has an even 2-matching of size k; otherwise,

report that G has no even 2-matching of size k.

Since B is bipartite, a 2-matching of B is also an even 2-matching of B . Moreover, since B is a subgraph of G , an evenmatching of B is also an even 2-matching of G . So, no error is made when we report (in Step 2) that G has an evenmatching of size k. By assumption, G has a properly-colored 2-matching H of size k. Obviously, H remains in B and soe can nd an even 2-matching of G in Step 2.We next analyze the time complexity. Clearly, Step 1 can be done in O (m + n) time. An obvious way to implement

ep 2 is to compute a maximum 2-matching in B . However, this takes O (mn) time [9]. Fortunately, we only need to nd

2-matching of size k in B . To see how this can be done in O (kn + km) time, rst note that Gabows algorithm nds aaximum 2-matching in B by nding a maximum matching in an auxiliary graph B , which is obtained by modifying B asllows:

Split each edge e into three edges by adding two new vertices u and v on e.(Comment: The new vertices added in this step are called external vertices. We also say that the edge between u and vcorresponds to the original edge e.)

Delete every original vertex with at most two neighbors. For each original vertex v with at least four neighbors, add dB(v) 3 new vertices and connect each of them to the

neighbors of v .

nce B is bipartite, so is B . For convenience, we refer to those vertices of B other than the external vertices as the internalrtices. Note that each neighbor of an internal vertex in B is an external vertex. We say that a matching of B is valid ife matching covers all internal vertices of B . If a matching M of B is invalid, then we can modify M by selecting anbitrary internal vertex v not covered by M , selecting a suitable neighbor u of v in B , deleting the edge of M incidentu if any, and adding the edge {u, v}. This modication increases the number of internal vertices covered by M . So, bypeating this modication of M , we can transform an invalid matching of B into a valid matching with the same or arger size. Moreover, if we start with M = and repeat this modication of M #in times, then we obtain a valid matching of B with #in edges, where #in is the number of internal vertices in B .One can verify that each valid matching N of B corresponds to a 2-matching N of B with |N| = |N | #in . To increasee size of M , we rst nd an augmenting path P with respect to M in B , then use P to augment M into a largeratching, and further make M valid if it is invalid. By repeating this process at most k times, M becomes a valid matchingB of size at least k + #in and we can then obtain a 2-matching M of B from M with |M| = |M | #in k.However, |V (B )| and |E(B )| can be much larger than |V (B)| and |E(B)|, respectively. Fortunately, Gabow [9] discoversat it is unnecessary to construct B and maintain M explicitly. In more details, we only memorize those edges of M tween external vertices. Gabow [9] shows that even with this shrunk M , we can nd an augmenting path P with respectthe original M in the original B in O (|V (B)| + |E(B)|) time. His idea is to use the shrunk M to construct a new

partite gra...