Path Contraction Faster Than 2^n

LIPICS - Leibniz International Proceedings in Informatics, Jul 2019

A graph G is contractible to a graph H if there is a set X subseteq E(G), such that G/X is isomorphic to H. Here, G/X is the graph obtained from G by contracting all the edges in X. For a family of graphs F, the F-Contraction problem takes as input a graph G on n vertices, and the objective is to output the largest integer t, such that G is contractible to a graph H in F, where |V(H)|=t. When F is the family of paths, then the corresponding F-Contraction problem is called Path Contraction. The problem Path Contraction admits a simple algorithm running in time 2^n * n^{O(1)}. In spite of the deceptive simplicity of the problem, beating the 2^n * n^{O(1)} bound for Path Contraction seems quite challenging. In this paper, we design an exact exponential time algorithm for Path Contraction that runs in time 1.99987^n * n^{O(1)}. We also define a problem called 3-Disjoint Connected Subgraphs, and design an algorithm for it that runs in time 1.88^n * n^{O(1)}. The above algorithm is used as a sub-routine in our algorithm for Path Contraction.

A PDF file should load here. If you do not see its contents the file may be temporarily unavailable at the journal website or you do not have a PDF plug-in installed and enabled in your browser.

Alternatively, you can download the file locally and open with any standalone PDF reader:

http://drops.dagstuhl.de/opus/volltexte/2019/10587/pdf/LIPIcs-ICALP-2019-11.pdf

Path Contraction Faster Than 2^n

I C A L P Path Contraction Faster Than 2n Beersheba 0 1 2 Israel 0 1 2 Fedor V. Fomin University of Bergen 0 1 2 Bergen 0 1 2 Norway 0 1 2 Santa Barbara 0 1 2 California 0 1 2 Prafullkumar Tale 0 1 2 0 Saket Saurabh Institute of Mathematical Sciences, HBNI and UMI ReLaX Chennai, India University of Bergen , Bergen , Norway 1 Akanksha Agrawal, Fedor V. Fomin, Daniel Lokshtanov, Saket Saurabh, and Prafullkumar Tale; licensed under Creative Commons License CC-BY 46th International Colloquium on Automata , Languages, and Programming (ICALP 2019). Editors: Christel Baier, Ioannis Chatzigiannakis, Paola Flocchini, and Stefano Leonardi; Article No. 11; pp. 11:1-11:13 Leibniz International Proceedings in Informatics Schloss Dagstuhl - Leibniz-Zentrum fu?r Informatik, Dagstuhl Publishing , Germany 2 Institute of Mathematical Sciences , HBNI, Chennai , India - Digital Object Identifier 10.4230/LIPIcs.ICALP.2019.11 Category Track A: Algorithms, Complexity and Games Funding Akanksha Agrawal: During some part of the work, the author was supported by ERC Consolidator Grant SYSTEMATIC-GRAPH (No. 725978). Saket Saurabh: This work is supported by the European Research Council (ERC) via grant LOPPRE, reference no. 819416. ET A CS 11:2 1 The O? notation hides polynomial factors in the running time expression. have been studies, which break the O?(2n) brute force barrier, for 2-DCS. In particular, Cygan et al. [5] designed a O?(1.933n) algorithm for 2-DCS. This result was improved by Telle and Villanger, who designed an algorithm running in time O?(1.7804n), for the problem [16]. The main goal of this article is to break the O?(2n) barrier for Path Contraction. Obtaining such an algorithm for Path Contraction was stated as an open problem in [17]. Due to space limitation, most proofs appear in full version of the paper. In this section, we state some basic definitions and introduce terminologies from graph theory. We use standard terminology from the book of Diestel [7] for the graph related terminologies which are not explicitly defined here. We also establish some notations that will be used throughout. We note that all graphs considered in this article are connected graphs on at least two vertices (unless stated otherwise). We denote the set of natural numbers by N (including 0). For k ? N, [k] denotes the set {1, 2, . . . , k}. A graph G is isomorphic to a graph H if there exists a bijective function ? : V (G) ? V (H), such that for v, u ? V (G), uv ? E(G) if and only if (?(v), ?(u)) ? E(H). A graph G is contractible to a graph H if there exists F ? E(G), such that G/F is isomorphic to H. In other words, G is contractible to H if there is a surjective function ? : V (G) ? V (H), with W (h) = {v ? V (G) | ?(v) = h}, for h ? V (H), with the following properties: for any h ? V (H), the graph G[W (h)] is connected, and for any two vertices h, h0 ? V (H), hh0 ? E(H) if and only if W (h) and W (h0) are adjacent in G. Let W = {W (h) | h ? V (H)}. The sets in W are called witness sets, and W is an H-witness structure of G. In this paper, we will restrict ourselves to contraction to paths. This allows us to use an ordered notation for witness sets, rather than just the set notation. This ordering of the sets in witness set is given by the ordering of vertices in the path. That is, for a Pt = (h1, h2, ? ? ? , ht)witness structure, W = {W (h1), W (h2), ? ? ? , W (ht)} of a graph G, we use the ordered witness structure notation, (W (h1), W (h2), ? ? ? , W (ht)), or simply, (W1, W2, ? ? ? , Wt). We note that we use both unordered and ordered notation, as per the convenience. In the following, we give some useful observations regarding contraction to paths. I Observation 2.1. Let G be a graph contractible to Pt. Then, there is a Pt-witness structure, W = (W1, . . . , Wt), of G such that W1 is a singleton set. Moreover, if t ? 3, then there is a Pt-witness structure, W = (W1, . . . , Wt), of G such that both W1 and Wt are singleton set. I Observation 2.2. For a set U with n elements and a constant ? < 1/2, the number 1 of subsets of U of size at most ?n is bounded by O?([g(?)]n), where g(?) = ???(1??)(1??) . Moreover, all such subsets can be enumerated in the same time. For a graph G, a non-empty set Q ? V (G), and integers a, b ? N, a connected set A in G is a (Q, a, b)-connected set if Q ? A, |A| = a, and |N (A)| ? b. Moreover, a connected set A in G is an (a, b)-connected set if |A| ? a and |N (A)| ? b. Next, we state results regarding (Q, a, b)-connected sets and connected sets, which follow from Lemma 3.1 of [9]. (We note that their result give slightly better bounds, but for simplicity, we only use the bounds stated in the following lemmas.) I Lemma 1. For a graph G, a non-empty set Q ? V (G), and integers a, b ? N, the number of (Q, a, b)-connected sets in G is at most 2a+b?|Q|. Moreover, we can enumerate all (Q, a, b)-connected sets in G in time 2a+b?|Q| ? nO(1). I Lemma 2. For a graph G and integers a, b ? N the number of (a, b)-connected sets in G is at most 2a+b ? nO(1). Moreover, we can enumerate all such sets in 2a+b ? nO(1) time. 3 3-Disjoint Connected Subgraph running in time O?(1.88n), where n is number of vertices in input graph. This algorithm will be useful in designing our algorithm for Path Contraction. In the following, we formally define the problem 2-DCS which is studied in [5, 16]. 2-Disjoint Connected Subgraphs (2-DCS) Input: A connected graph G and two disjoint sets Z1 and Z2. Question: Does there exist a partition (V1, V2) of V (G), such that for each i ? [2], Zi ? Vi and G[Vi] is connected? In the following we state a result regarding 2-DCS which will be useful later sections. I Proposition 3 ([16] Theorem 3). There exists an algorithm that solves 2-Disjoint Connected Subgraphs problem in O?(1.7804n) time where n is number of vertices in input graph. 3-Disjoint Connected Subgraphs (3-DCS) Input: A connected graph G and two disjoint sets Z1 and Z2. Question: Does there exist a partition (V1, U, V2) of V (G), such that 1) for each i ? [2], Zi ? Vi and G[Vi] is connected, 2) G[U ] is connected, and 3) G ? U has exactly two connected components, namely, G[V1] and G[V2]? We note that the problem definitions for 2-DCS and 3-DCS do not require the sets Z1, Z2 to be non-empty. If either of this set is empty, we can guess a vertex for each of the non-empty sets. Since there are at most n2 such guesses, it will not affect the running time of our algorithm. Thus, here after we assume that both Z1 and Z2 are non-empty sets. In the following theorem, we state our result regarding 3-DCS. I Theorem 4. 3-DCS admits an algorithm running in time O?(1.88n), where n is number of vertices in the input graph. 4 In this section we design our algorithm for Path Contraction running in time O?(1.99987n), where n is the number of vertices in the input graph. To design our algorithm, we design four different subroutines each solving the problem Path Contraction. Each of these subroutines are better than the other when a specific ?type? of solution exists for the input instance. Thus the main algorithm will use these subroutines to search for solutions of the type they are the best for. We also design a sub-routine for enumerating special types of partial solution, which will be used in some of our algorithms for Path Contraction. In the following we briefly explain the four subroutines and describe when they are useful. Let G be an instance for Path Contraction, where G is a graph on n vertices. Let t be the largest integer (which we do not know a priori), such that G is contractible to Pt with (W1, W2, ? ? ? , Wt) as a Pt-witness structure of G. We let OS and ES be the union of vertices in odd and even witness sets, respectively. That is, OS = ?dxt=/12eW2x?1 and ES = Sbxt=/12c W2x. We now give an intuitive idea of the purposes of each of our subroutines in the main algorithm, while deferring their implementations to the subsequent sections. We also describe a subroutine which will help us build ?partial solutions?, and this subroutine will be used in two of our subroutines for Path Contraction. (We refer the reader to Figure 1 for an illustration of it.) Near Small Odd/Even PC. In the case when both OS and ES are ?large?, it may be the case that for one of OS/ES, there is just one witness set which is large. That is, when we remove this large witness set, then one of OS/ES becomes ?small?. The ?smallness? of the remaining OS/ES (after removing a witness set) will be quantified by a rational number 0 < ? 1, which will be part of the input. The subroutine will only look for those Pt-witness structures for G where the size of one of |OS| or |ES| after removal of a witness set is bounded by n. Moreover, the algorithm will return the largest such t. Our subroutines Balanced PC and 2-Union Heavy PC use a subroutine called Enum-Partial-PC for enumerating solutions for ?small? subgraphs. The efficiency of the algorithm for Enum-Partial-PC is centered around the bounds for (Q, a, b)-connected sets. In Section 4.1 we (define and) design an algorithm for Enum-Partial-PC. In Section 4.2, 4.3, 4.4 and 4.5 we present our algorithms for Balanced PC, 2-Union Heavy PC, Small Odd/Even PC, and Near Small Odd/Even PC, respectively. Finally, in Section 4.6 we show how we can use the above algorithms to obtain an algorithm for Path Contraction, running in time O?(1.99987n). 4.1 In this section, we describe an algorithm which computes ?nice solution? for all ??-small? subset of vertices of an input graph. In an input graph G, for a set S ? V (G), by ?(S) we denote the set of vertices in S that have a neighbor outside S. That is, ?(S) = {s ? S | N (s) \ S 6= ?}. A set S ? V (G) is ?-small if N [S] ? ?n. For an ?-small set S ? V (G), the largest integer tS is called the nice solution if G[S] is contractible to PtS with all the vertices in ?(S) in the end bag. That is, there is a PtS -witness structure (W1, W2, ? ? ? WtS ) of G[S], such that ?(S) ? WtS . We formally define the problem Enum-Partial-PC in the following way. We design an algorithm for Enum-Partial-PC running in time O?(2?n). We briefly explain how we can compute nice solutions for ?-small set. Consider an ?-small set S. Note that |S| ? ?n. Thus, by the method of 2-coloring (as was explained in the introduction), we can obtain the nice solution in time 2?n. This would lead us to an algorithm running in time O?(2?ng(?)n). By doing a simple dynamic programming we can also obtain an algorithm running in time O?(3n). We will improve upon these algorithms by a dynamic programming algorithm where we update the values ?forward? instead of looking ?backward?. The Algorithm. We start by defining the tables entries for our dynamic programming routine, which is used for computation of nice solutions. Let S be the set of all connected sets S in G, such that |N [S]| ? ?n. That is, S = {S ? V (G) | G[S] is connected and |N [S]| ? ?n}. For each S ? S, we have an entry denoted by ?[S]. ?[S] is the largest integer q ? 1 for which G[S] can be contracted to Pq with a Pq-witness structure W = (W1, W2, ? ? ? , Wq) of G[S], such that ?(S) ? Wq. The algorithm starts by initializing ?[S] = 1, for each S ? S. In the following we introduce some notations that will be useful in stating the algorithm. Consider S ? S. We will define a set A[S], which will be the set of all ?potential extenders bags? for S, when we look at contraction to paths for larger graphs (containing S). For the 11:10 denote by G[S1] and G[S2]. Also note that N [S1], N [S2] ? (1 ? ?/2)n. The algorithm starts by enumerating all such ?potential candidates? for S. As for each of the two components of G[S], the sizes of N [S1] and N [S2] can be bounded, the algorithm computes the ?optimum solution? for them using the algorithm for Enum-Partial-PC. In the above we use the algorithm for Enum-Partial-PC because we are only interested in those solutions where the vertices of ?(S1) and ?(S2) are contained in one of the ?end bags? of their respective solutions. Now we see how we can use these solutions to obtain the solution for the whole graph. Note that we have to ?split? vertices in V (G) \ S into two ?connected sets?, where the first set must contain all the vertices from N (S1) and the second set must contain all the vertices from N (S1). For the above we employ the algorithm for 2-Disjoint Connected Subgraphs (see Section 3 for its definition) by Telle and Villanger [16]. We now formally describe our algorithm. The algorithm will output an integer t, which is initially set to 2. Let S = {S ? V (G) | |S| ? (1 ? ?)n and G[S] has exactly two connected components G[S1], G[S2], s.t. |N [S1]|, |N [S2]| ? (1??/2)n}. Let Sb = {Sb ? V (G) | |N [Sb]| ? (1 ? ?/2)n and G[Sb] is connected}. The algorithm will now computes a table ?, which has an entry ?[Sb], for each Sb ? Sb. The definition of ? is the same as that in Section 4.2, where ? = 1 ? ?/2. That is, for Sb ? Sb, ?[Sb] is the largest integer q ? 1 for which G[Sb] can be contracted to Pq with a Pq-witness structure W = (W1, W2, ? ? ? , Wq) of G[Sb], such that ?(Sb) ? Wq. Compute the value of ?[Sb], for each Sb ? Sb, by using Enum-PartialPC(G, 1 ? ?/2). For each S ? S, the algorithm does the following. Recall that G[S] has exactly two connected components. Let the two connected components in G[S] be G[S1] and G[S2], where S1 ? S2 = S. Recall that |N [S1]|, N [S1]| ? (1 ? ?/2)n. Thus, S1, S2 ? Sb. If (G ? S, NG(S1), NG(S2)) is a yes-instance of 2-DCS, then the algorithm sets t = max{t, ?[S1] + ?[S2] + 2}, and otherwise, it moves to the next set in S. Finally, the algorithm outputs t. This completes the description of the algorithm. In the following two lemmas we present the correctness and runtime analysis of the algorithm, respectively. We formally define the problem Small Odd/Even PC in the following. Small Odd/Even PC Input: A graph G on n vertices and a fraction 0 < ? ? 1. Output: Largest integer t for which G can be contracted to Pt, with W = (W1, W2, ? ? ? , Wt) as a Pt-witness structure of G, such that |OSW | ? ?n/2 or |ESW | ? ?n/2, where OSW = ?i?[dt/2e]W2i?1 and ESW = ?i?[bt/2c]W2i. We now formally describe our algorithm. The algorithm will output an integer t, which is initially set to 2. Let S = {S ? V (G) | |S| ? n}. For each S ? S, the algorithm does the following. Let CS and CS be the sets of connected components in G[S] and G ? S, respectively. Let HS be obtained from G by contracting component in CS ? CS to single vertices. That is, HS has a vertex vC for each C ? CS ? CS, and two vertices vC , vC0 ? V (HS) are adjacent in HS if and only if C and C0 are adjacent in G. If HS is not a path, then the algorithm moves to the next set in S. Otherwise, for each C? ? CS it does the following. Intuitively speaking, C? is the current guess for the component containing vertices from Wi for the witness structure that we are looking for. Note that C? can be adjacent to at most two components from CS, as HS is a path. Moreover, C? must be adjacent to at least one component from CS, as G is connected and S is a strict subset of V (G), i.e., S 6= V (G). Let C1 be a component from CS that is adjacent to C? in G, and Z1 = N (C1) ? V (C?). Let C2 ? CS \ {C1} be a component of G[S] that is adjacent to C?, and Z2 = N (C2) ? V (C?). If such a C2 does not exist, then we set Z2 = ?. If (G[C?], Z1, Z2) is a yes-instance of 3-DCS, then the algorithm updates t = max{t, |V (HS)| + 2}. After finishing the processing for each S ? S, the algorithm outputs t. This finishes the description of our algorithm. In the following two lemmas we present the correctness and runtime analysis of the algorithm, respectively. We are now ready to present our algorithm for Path Contraction. The algorithm calls four of the subroutines Small Odd/Even PC, Balanced PC, 2-Union Heavy PC, and Near Small Odd/Even PC for appropriate instances, and returns the maximum of their outputs. In the following theorem, we present the algorithm, which is the main result of this paper.


This is a preview of a remote PDF: http://drops.dagstuhl.de/opus/volltexte/2019/10587/pdf/LIPIcs-ICALP-2019-11.pdf

Akanksha Agrawal, Fedor V. Fomin, Daniel Lokshtanov, Saket Saurabh, Prafullkumar Tale. Path Contraction Faster Than 2^n, LIPICS - Leibniz International Proceedings in Informatics, 2019, 11:1-11:13, DOI: 10.4230/LIPIcs.ICALP.2019.11