arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:1809.02636v1 [cs.DS] 07 Sep 2018

Parameterized algorithm for 3-path vertex cover

Dekel Tsur Thanks: Department of Computer Science, Ben-Gurion University of the Negev. Email: dekelts@cs.bgu.ac.il
Abstract

In the 33-path vertex cover problem, the input is an undirected graph GG and an integer kk. The goal is to decide whether there is a set of vertices SS of size at most kk such that every path with 33 vertices in GG contains at least one vertex of SS. In this paper we give parameterized algorithm for 33-path cover whose time complexity is O(1.713k)O^{*}(1.713^{k}). Our algorithm is faster than previous algorithms for this problem.

1 Introduction

For an undirected graph GG, an ll-path vertex cover is a set of vertices SS such that every path with dd vertices in GG contains at least one vertex of SS. In the ll-path vertex cover problem, the input is an undirected graph GG and an integer kk. The goal is to decide whether there is an ll-path vertex cover of GG with size at most kk. The problem for l=2l=2 is the famous vertex cover problem. The problem is NP-hard for every constant l2l\geq 2.

In this paper we consider the 3-path vertex cover problem. The first non-trivial parameterized algorithm for the 3-path vertex cover problem was given by Tu [5], which gave an O(2k)O^{*}(2^{k})-time algorithm. This result was subsequently improved several times: Wu [6] gave an O(1.882k)O^{*}(1.882^{k})-time algorithm, Katrenič [4] gave an O(1.818k)O^{*}(1.818^{k})-time algorithm, and Chang et al. [2] gave an O(1.749k)O^{*}(1.749^{k})-time algorithm, and Xiao and Kou [8] also gave an O(1.749k)O^{*}(1.749^{k})-time algorithm. The algorithm of Chang et al. uses exponential space while the algorithm of Xiao and Kou uses polynomial space. The non-parameterized 3-path vertex cover problem has also been studied [3, 1, 7]. The fastest exact algorithm for this problem runs in O(1.366n)O^{*}(1.366^{n}) time [7].

In this paper, we give an algorithm whose time complexity is O(1.713k)O^{*}(1.713^{k}). This improves the previous parameterized algorithms for this problem. Our algorithm is based on the algorithm of Xiao and Kou [8]. In Section 3 we describe the algorithm of Xiao and Kou, and in Section 4 we describe our algorithm.

2 Preliminaries

For a graph G=(V,E)G=(V,E) and a vertex vVv\in V, NG(v)={uV:(u,v)E}N_{G}(v)=\{u\in V\colon(u,v)\in E\}, NG[v]=NG(v){v}N_{G}[v]=N_{G}(v)\cup\{v\}, and degG(v)=|NG(v)|\deg_{G}(v)=|N_{G}(v)|. For a set of vertices SS, NG(S)=(vSNG[S])SN_{G}(S)=(\bigcup_{v\in S}N_{G}[S])\setminus S and NG[S]=vSNG[v]N_{G}[S]=\bigcup_{v\in S}N_{G}[v].

For a graph G=(V,E)G=(V,E) and a set of vertices SS, G[S]G[S] is the subgraph of GG induced by SS (namely, G[S]=(S,E(S×S)CLOSEG[S]=(S,E\cap(S\times S)). We also define GS=G[VS]G-S=G[V\setminus S]. For a set that consists of a single vertex vv, we write GvG-v instead of G{v}G-\{v\}.

A vertex vv dominates a vertex uu if (u,v)E(u,v)\in E and N(u)N[v]N(u)\subseteq N[v]. We also say that vv is a dominating vertex. A vertex vv weakly dominates a vertex uu if (u,v)E(u,v)\in E and there is a vertex xN(u)x\in N(u) such that xN[v]x\notin N[v] and N(u){x}N[v]N(u)\setminus\{x\}\subseteq N[v].

Claim 1.

If u,vu,v are adjacent vertices and vv does not dominate uu then |N({u,v})|deg(v)|N(\{u,v\})|\geq\deg(v).

A chain is a path x,x1,x2,x3x,x_{1},x_{2},x_{3} such that xx3x\neq x_{3}, deg(x)3\deg(x)\geq 3, and deg(x1)=deg(x2)=2\deg(x_{1})=\deg(x_{2})=2.

Claim 2.

If u,vu,v are adjacent vertices without a common neighbor and deg(u)=deg(v)=2\deg(u)=\deg(v)=2 then GG contains a chain unless GG is a cordless path or a cordless cycle.

3 The algorithm of Xiao and Kou

In this section we describe a slightly modified version of the algorithm of Xiao and Kou. A branching algorithm is a recursive algorithm for a parameterized problem that uses reduction rules R1,,RrR_{1},\ldots,R_{r}. Each reduction rule RiR_{i} has the form (G,k)(Gi,1,kci,1),,(Gi,si,kci,si)(G,k)\to(G_{i,1},k-c_{i,1}),\ldots,(G_{i,s_{i}},k-c_{i,s_{i}}). Additionally, every rule (except the last) has a condition which needs to be satisfied in order for the rule to be applicable. Given an instance (G,k)(G,k) for the problem, the algorithm chooses a rule RiR_{i} and then recurse on the instances (Gi,1,kci,1),,(Gi,si,kci,si)(G_{i,1},k-c_{i,1}),\ldots,(G_{i,s_{i}},k-c_{i,s_{i}}). The algorithm “yes” if and only if at least one recursive call returned “yes”. The recursion stops on an instance (G,k)(G^{\prime},k^{\prime}) if either GG^{\prime} is an empty graph or k0k^{\prime}\leq 0, and the algorithm returns either “yes” or “no” depending whether (G,k)(G^{\prime},k^{\prime}) is a yes instance. To analyze the time complexity of the algorithm, define T(k)T(k) to be the maximum number of leaves in the recursion tree of the algorithm when the algorithm is run on an instance with parameter kk. Each reduction rule RiR_{i} with si2s_{i}\geq 2 corresponds to the following recurrence on T(k)T(k):

T(k)T(kci,1)+T(kci,2)++T(kci,si).T(k)\leq T(k-c_{i,1})+T(k-c_{i,2})+\cdots+T(k-c_{i,s_{i}}).

The largest root of the polynomial P(x)=1j=1sixci,jP(x)=1-\sum_{j=1}^{s_{i}}x^{-c_{i,j}} is called the branching factor of the recurrence. Let γ\gamma be the maximum branching factor over all rules. Then, the time complexity of the algorithm is O(γk)O^{*}(\gamma^{k}).

The algorithm of Xiao and Kou uses the following basic reduction rules.

  1. (B1)

    Let vv be a vertex. (G,k)(Gv,k1)(G,k)\to(G-v,k-1), (GN[v],kdeg(v))(G-N[v],k-\deg(v)), {(GN[{u,v}],k|N({u,v})|)}uN(v)\{(G-N[\{u,v\}],k-|N(\{u,v\})|)\}_{u\in N(v)}.

  2. (B2)

    Let vv be a dominating vertex. (G,k)(Gv,k1)(G,k)\to(G-v,k-1), (GN[v],k(deg(v)1))(G-N[v],k-(\deg(v)-1)).

  3. (B3)

    Let vv be a weakly dominating vertex. (G,k)(Gv,k1)(G,k)\to(G-v,k-1), {(GN[{u,v}],k|N({u,v})|)}uN(v)\{(G-N[\{u,v\}],k-|N(\{u,v\})|)\}_{u\in N(v)}.

  4. (B4)

    Let vv be a vertex with degree 3, whose neighbors u1,u2,u3u_{1},u_{2},u_{3} satisfy deg(u1)=1\deg(u_{1})=1 and (u2,u3)E(u_{2},u_{3})\in E. (G,k)(GN[v],k2)(G,k)\to(G-N[v],k-2), (G(N[{u2,u3}]{u1},k|N({u2,u3})|)CLOSE(G-(N[\{u_{2},u_{3}\}]\cup\{u_{1}\},k-|N(\{u_{2},u_{3}\})|).

We now describe the reduction rules of the algorithm, which are also called steps. Given an instance (G,k)(G,k), the algorithm apply the first applicable rule. Some rules are described as the application of two rules. This can be viewed as an application of a single reduction rule. For example, if we have two rules (G,k)(GS1,kc1),(GS2,kc2)(G,k)\to(G-S_{1},k-c_{1}),(G-S_{2},k-c_{2}) and (G,k)(GS3,kc3),(GS4,kc4)(G,k)\to(G-S_{3},k-c_{3}),(G-S_{4},k-c_{4}), then applying the first rule on (G,k)(G,k) and then applying the second rule on the instance (GS1,kc1)(G-S_{1},k-c_{1}) is equivalent to the rule (G,k)(G(S1S3),kc1c3),(G(S1S4),kc1c4),(GS2,kc2)(G,k)\to(G-(S_{1}\cup S_{3}),k-c_{1}-c_{3}),(G-(S_{1}\cup S_{4}),k-c_{1}-c_{4}),(G-S_{2},k-c_{2}).

  1. (S1)

    If SS is a connected component of GG such that G[S]G[S] has maximum degree at most 22, apply the rule (G,k)(GS,kγ)(G,k)\to(G-S,k-\gamma) where γ\gamma is the minimum size of a 3-path vertex cover of G[S]G[S].

  2. (S2)

    If vv is a vertex such that deg(v)=1\deg(v)=1 and the neighbor uu of vv has degree 2, apply the rule (G,k)(GN[u],k1)(G,k)\to(G-N[u],k-1).

  3. (S3)

    If vv is a dominating vertex and deg(v)3\deg(v)\geq 3, apply (B2) on (G,k)(G,k) and vv.

  4. (S4)

    If v,v1,v2,v3v,v_{1},v_{2},v_{3} is a chain in GG, apply (B3) on (G,k)(G,k) and vv. Apply (S2) on (Gv,k1)(G-v,k-1) and v1v_{1}.

  5. (S5)

    If vv is a weakly dominating vertex and deg(v)4\deg(v)\geq 4, apply (B3) on (G,k)(G,k) and vv.

  6. (S6)

    If vv is a vertex with deg(v)4\deg(v)\geq 4, apply (B1) on (G,k)(G,k) and vv.

  7. (S7)

    If vv is a vertex with deg(v)=2\deg(v)=2 and a neighbor uu of vv is inside a triangle, apply (B3) on (G,k)(G,k) and ww, where ww is the neighbor of vv other than uu. Apply (B4) on (Gw,k1)(G-w,k-1) and uu.

  8. (S8)

    If vv is a vertex with deg(v)=2\deg(v)=2 and a neighbor ww of vv has a neighbor w1w_{1} with degree 3, apply (B3) on (G,k)(G,k) and ww. Apply (B2) on (Gw,k1)(G-w,k-1) and uu, where uu is the neighbor of vv other than ww.

  9. (S9)

    Let SS be a connected component of GG such that G[S]G[S] is a bipartite graph with parts S1,S2S_{1},S_{2} such that deg(v)=2\deg(v)=2 for every vS1v\in S_{1} and deg(v)=3\deg(v)=3 for every vS2v\in S_{2}. Apply the rule (G,k)(GS,k|S2|)(G,k)\to(G-S,k-|S_{2}|).

  10. (S10)

    Pick an arbitrary vertex vv. Apply (B1) on (G,k)(G,k) and vv.

We note that the order of Step (S4) is different in the algorithm of Xiao and Kou, but this does not affect the correctness of the algorithm.

The maximum branching factor of Steps (S1)–(S9) is approximately 1.749. Additionally, Step (S10) does not affect the asymptotic time complexity of the algorithm since it is applied at most one in each path in the recursion tree. Therefore, the time complexity of the algorithm is O(1.749k)O^{*}(1.749^{k}).

4 New algorithm

In this section we describe our algorithm. Our algorithm is the same as the algorithm of Xiao and Kou except that we modify Steps (S5) and (S8). Each of these steps is replaced by several sub-steps. The maximum branching factor of these sub-steps is approximately 1.713. The branching factors of the other steps in the algorithm of Xiao and Kou are at most 1.710. Therefore, the time complexity of the algorithm is O(1.713k)O^{*}(1.713^{k}).

4.1 Step (S5)

Since steps (S1)–(S4) cannot be applied, the graph GG has the following properties.

(P1) Every vertex has degree at least 2. (P2) For every vertex with degree 2, its neighbors have degree at least 3 and they are not adjacent. (P3) There are no dominating vertices.

In the following sub-steps, a common condition for applying the steps is that the graph GG has a weakly dominating vertex vv with deg(v)4\deg(v)\geq 4. Each sub-step (except the last) has an additional condition which needs to be satisfied. See Figure 1 for graphs satisfying the different conditions of the sub-steps.

(a) (S5-1)
(b) (S5-2)
(c) (S5-3)
(d) (S5-4)
(e) (S5-5)
(f) (S5-6)
(g) (S5-7)
(h) (S5-8)
(i) (S5-9)
(j) (S5-11)
Figure 1: Example for the sub-steps of (S5).

Step (S5-1)

If deg(v)5\deg(v)\geq 5, apply (B3) on (G,k)(G,k) and vv. Recall that (B3) generates the instances (Gv,k1)(G-v,k-1) and {(GN[{u,v}],k|N({u,v})|)}uN(v)\{(G-N[\{u,v\}],k-|N(\{u,v\})|)\}_{u\in N(v)}. By Property (P3) and Claim 1, |N({u,v})|deg(v)|N(\{u,v\})|\geq\deg(v). Therefore, the recurrence of this step is

T(k)T(k1)+deg(v)T(kdeg(v)).T(k)\leq T(k-1)+\deg(v)\cdot T(k-\deg(v)).

The worst case of the recurrence is when deg(v)=5\deg(v)=5, and the branching factor is at most 1.660.

In the remaining sub-steps we have deg(v)=4\deg(v)=4 since (S5-1) cannot be applied.

Step (S5-2)

If there is a neighbor uu^{\prime} of vv that has at least two neighbors that are not neighbors of vv, apply (B3) on (G,k)(G,k) and vv. By Claim 1, |N({u,v})|deg(v)=4|N(\{u,v\})|\geq\deg(v)=4 for every uN(v)u\in N(v). Additionally, |N({u,v})|5|N(\{u^{\prime},v\})|\geq 5. Therefore, the recurrence of this step is (recall that deg(v)=4\deg(v)=4)

T(k)T(k1)+3T(k4)+T(k5)T(k)\leq T(k-1)+3T(k-4)+T(k-5)

and the branching factor is approximately 1.713.

In the remaining sub-steps we have that every vertex uN(v)u\in N(v) has exactly one neighbor that is not in N(v)N(v). This neighbor will be denoted by uu^{\prime}.

Step (S5-3)

If there are vertices u1,u2N(v)u_{1},u_{2}\in N(v) such that u1=u2u^{\prime}_{1}=u^{\prime}_{2}, apply (B3) on (G,k)(G,k) and vv. In this case, N[{u1,v}]=N[{u2,v}]N[\{u_{1},v\}]=N[\{u_{2},v\}] and |N({u1,v})|=|N({u2,v})||N(\{u_{1},v\})|=|N(\{u_{2},v\})|. Therefore, the instance (GN[{u1,v}],k|N({u1,v})|)(G-N[\{u_{1},v\}],k-|N(\{u_{1},v\})|) is the same instance as (GN[{u2,v}],k|N({u2,v})|)(G-N[\{u_{2},v\}],k-|N(\{u_{2},v\})|). The algorithm recurses on only one copy of this instance. Thus, the recurrence of this step is

T(k)T(k1)+3T(k4)T(k)\leq T(k-1)+3T(k-4)

and the branching factor is approximately 1.659.

Step (S5-4)

If there is a vertex uN(v)u\in N(v) that does not have neighbors in N(v)N(v) and deg(u)4\deg(u^{\prime})\geq 4, apply (B3) on (G,k)(G,k) and vv. Note that degGv(u)=1\deg_{G-v}(u)=1. Therefore, uu^{\prime} dominates uu in GvG-v. Additionally, degGv(u)=deg(u)\deg_{G-v}(u^{\prime})=\deg(u^{\prime}). Apply (B2) on (Gv,k1)(G-v,k-1) and uu^{\prime}, which generates the instances (G{v,u},k2)(G-\{v,u^{\prime}\},k-2) and (G({v}NGv[u]),kdegGv(u))(G-(\{v\}\cup N_{G-v}[u^{\prime}]),k-\deg_{G-v}(u^{\prime})). The recurrence of this step is (the worst case is deg(u)=4\deg(u^{\prime})=4)

T(k)(T(k2)+T(k4))+4T(k4)T(k)\leq(T(k-2)+T(k-4))+4T(k-4)

and the branching factor is approximately 1.671.

Step (S5-5)

If there are vertices u1,u2N(v)u_{1},u_{2}\in N(v) such that each of these vertices does not have neighbors in N(v)N(v) and (u1,u2)E(u^{\prime}_{1},u^{\prime}_{2})\in E, apply (B3) on (G,k)(G,k) and vv. Since (S5-4) cannot be applied, deg(u1),deg(u2)3\deg(u^{\prime}_{1}),\deg(u^{\prime}_{2})\leq 3. By Property (P2), deg(u1)=deg(u2)=3\deg(u^{\prime}_{1})=\deg(u^{\prime}_{2})=3. As in (S5-4), u1u^{\prime}_{1} dominates u1u_{1} in GvG-v. Apply (B2) on (Gv,k1)(G-v,k-1) and u1u^{\prime}_{1}, which generates the instances (G=G{v,u1},k2)(G^{\prime}=G-\{v,u^{\prime}_{1}\},k-2) and (G({v}NGv[u1]),k3)(G-(\{v\}\cup N_{G-v}[u^{\prime}_{1}]),k-3). Note that degG(u2)=1\deg_{G^{\prime}}(u_{2})=1 and degG(u2)=deg(u2)1=2\deg_{G^{\prime}}(u^{\prime}_{2})=\deg(u^{\prime}_{2})-1=2 (since u1u^{\prime}_{1} is a neighbor of u2u^{\prime}_{2} in GG but not in GG^{\prime}, and the other two neighbors of u2u^{\prime}_{2} in GG are also neighbors of u2u^{\prime}_{2} in GG^{\prime}). Next, apply (S2) on (G,k2)(G^{\prime},k-2) and u2u_{2}, which generates the instance (GNG[u2],k3)(G^{\prime}-N_{G^{\prime}}[u^{\prime}_{2}],k-3). The recurrence of this step is

T(k)2T(k3)+4T(k4)T(k)\leq 2T(k-3)+4T(k-4)

and the branching factor is approximately 1.643.

Step (S5-6)

If there are vertices u1,u2N(v)u_{1},u_{2}\in N(v) such that each of these vertices does not have neighbors in N(v)N(v), apply (B3) on (G,k)(G,k) and vv. As in (S5-5), deg(u1)=deg(u2)=3\deg(u^{\prime}_{1})=\deg(u^{\prime}_{2})=3 and u1u^{\prime}_{1} dominates u1u_{1} in GvG-v. Apply (B2) on (Gv,k1)(G-v,k-1) and u1u^{\prime}_{1}, which generates the instances (G=G{v,u1},k2)(G^{\prime}=G-\{v,u^{\prime}_{1}\},k-2) and (G({v}NGv[u1]),k3)(G-(\{v\}\cup N_{G-v}[u^{\prime}_{1}]),k-3). We have that u2u^{\prime}_{2} dominates u2u_{2} in GG^{\prime} and degG(u2)=deg(u2)=3\deg_{G^{\prime}}(u^{\prime}_{2})=\deg(u^{\prime}_{2})=3. Apply (B2) on (G,k2)(G^{\prime},k-2) and u2u^{\prime}_{2}, which generates the instances (G{u2},k3)(G^{\prime}-\{u^{\prime}_{2}\},k-3) and (GNG[u2],k4)(G^{\prime}-N_{G^{\prime}}[u^{\prime}_{2}],k-4). The recurrence of this step is

T(k)(2T(k3)+T(k4))+4T(k4)T(k)\leq(2T(k-3)+T(k-4))+4T(k-4)

and the branching factor is approximately 1.703.

Step (S5-7)

If there is exactly one vertex uN(v)u\in N(v) that does not have a neighbor in N(v)N(v), apply (B3) on (G,k)(G,k) and vv. Next, apply (B2) on (Gv,k1)(G-v,k-1) and uu^{\prime}, which generates the instances (G=G{v,u},k2)(G^{\prime}=G-\{v,u^{\prime}\},k-2) and (G({v}N[u]),kdeg(u))(G-(\{v\}\cup N[u^{\prime}]),k-\deg(u^{\prime})). Let u2,u3,u4u_{2},u_{3},u_{4} be the remaining neighbors of vv, numbered such that (u2,u3),(u3,u4)E(u_{2},u_{3}),(u_{3},u_{4})\in E. Note that {v,u}{u1,u2,u3,u1,u2,u3}=\{v,u^{\prime}\}\cap\{u_{1},u_{2},u_{3},u^{\prime}_{1},u^{\prime}_{2},u^{\prime}_{3}\}=\emptyset. Apply (B3) on (G,k2)(G^{\prime},k-2) and u3u_{3} (u3u_{3} weakly dominates u2u_{2} in GG^{\prime}), which generates the instances (G{u3},k3)(G^{\prime}-\{u_{3}\},k-3) and OPEN(GNG[{w,u3}]),k2|NG({w,u3})|)(G^{\prime}-N_{G^{\prime}}[\{w,u_{3}\}]),k-2-|N_{G^{\prime}}(\{w,u_{3}\})|) for every wNG(u3)={u2,u3,u4}w\in N_{G^{\prime}}(u_{3})=\{u_{2},u^{\prime}_{3},u_{4}\}. Note that for w{u2,u4}w\in\{u_{2},u_{4}\}, |N({w,u3})|=3|N(\{w,u_{3}\})|=3 (since NG({u2,u3})={u2,u3,u4}N_{G^{\prime}}(\{u_{2},u_{3}\})=\{u^{\prime}_{2},u^{\prime}_{3},u_{4}\} and NG({u4,u3})={u2,u3,u4}N_{G^{\prime}}(\{u_{4},u_{3}\})=\{u_{2},u^{\prime}_{3},u_{4}^{\prime}\}). Consider the instance (G′′=GNG[{u3,u3}],k′′=k2|NG({u3,u3})|)(G^{\prime\prime}=G^{\prime}-N_{G^{\prime}}[\{u^{\prime}_{3},u_{3}\}],k^{\prime\prime}=k-2-|N_{G^{\prime}}(\{u^{\prime}_{3},u_{3}\})|) which is generated by the application of (B3) on (G,k2)(G^{\prime},k-2). We claim that if (G′′,k′′)(G^{\prime\prime},k^{\prime\prime}) is a yes instance then (GN[{u,v}],k4)(G-N[\{u,v\}],k-4) (which is generated by the application of (B3) on (G,k)(G,k)) is also a yes instance. To prove the claim, note that if CC is 3-path vertex cover of G′′G^{\prime\prime} of size at most k′′=k2|NG({u3,u3})|=k3deg(u3)k^{\prime\prime}=k-2-|N_{G^{\prime}}(\{u^{\prime}_{3},u_{3}\})|=k-3-\deg(u^{\prime}_{3}) then C(N(u3){u3})C\cup(N(u^{\prime}_{3})\setminus\{u_{3}\}) is a 3-path vertex cover of GN[{u,v}]G-N[\{u,v\}] of size at most |C|+(deg(u3)1)k4|C|+(\deg(u^{\prime}_{3})-1)\leq k-4. It follows that the algorithm does not need to recurse on (G′′,k′′)(G^{\prime\prime},k^{\prime\prime}). Therefore, the recurrence of this step is

T(k)(2T(k3)+2T(k5))+4T(k4)T(k)\leq(2T(k-3)+2T(k-5))+4T(k-4)

and the branching factor is approximately 1.713.

We now claim that in the remaining sub-steps we have that every uN(v)u\in N(v) has exactly one neighbor in N(v)N(v). Clearly, since (S5-6) and (S5-7) cannot be applied, every uN(v)u\in N(v) has at least one neighbor in N(v)N(v). Suppose conversely that there is u2N(v)u_{2}\in N(v) which is adjacent to two distinct vertices u1,u3N(v)u_{1},u_{3}\in N(v). Let u4u_{4} be the remaining vertex in N(v)N(v). u4u_{4} is not a neighbor of u2u_{2} since otherwise u2u_{2} dominates vv, contradicting Property (P3). Since u4u_{4} has at least one neighbor in N(v)N(v), we have that u4u_{4} is adjacent to either u1u_{1} or u3u_{3}. Without loss of generality assume that u4u_{4} is adjacent to u3u_{3}. We have that u2u_{2} weakly dominates vv. Additionally, deg(u2)=4\deg(u_{2})=4 and u3N(u2)u_{3}\in N(u_{2}) has two neighbors that are not in N(u2)N(u_{2}): u3u^{\prime}_{3} and u4u_{4}. This contradicts the fact that (S5-2) cannot be applied.

Step (S5-8)

If there is a vertex uN(v)u\in N(v) whose connected component SS in GvG-v is a cordless cycle, apply (B3) on (G,k)(G,k) and vv. Then apply the rule (Gv,k1)(G({v}S),k1γ)(G-v,k-1)\to(G-(\{v\}\cup S),k-1-\gamma), where γ=|S|/3\gamma=\lceil|S|/3\rceil is the minimum size of a 3-path vertex of G[S]G[S]. We have that |S|4|S|\geq 4 (since {u,u,u2,u2}S\{u,u^{\prime},u_{2},u^{\prime}_{2}\}\subseteq S, where u2u_{2} is the unique neighbor of uu in N(v)N(v)), so γ2\gamma\geq 2. The recurrence of this step is (the worst case is γ=2\gamma=2)

T(k)T(k3)+4T(k4)T(k)\leq T(k-3)+4T(k-4)

and the branching factor is approximately 1.534.

For the remaining sub-steps, denote the neighbors of vv by u1,u2,u3,u4u_{1},u_{2},u_{3},u_{4}, where (u1,u2)E(u_{1},u_{2})\in E and (u3,u4)E(u_{3},u_{4})\in E are the only edges between these vertices.

Lemma 3.

There is a chain x,x1,x2,x3x,x_{1},x_{2},x_{3} in GvG-v such that the graph G{v,x,x1,x2,x3}G-\{v,x,x_{1},x_{2},x_{3}\} contains one of the following structures: (1) A connected component SS of size at least 4 which is a cordless path or a cordless cycle. (2) A chain y,y1,y2,y3y,y_{1},y_{2},y_{3}.

Proof.

We have that degGv(ui)=2\deg_{G-v}(u_{i})=2 for all ii, and degGv(w)=deg(w)\deg_{G-v}(w)=\deg(w) for all wN[v]w\notin N[v]. If deg(u2)3\deg(u^{\prime}_{2})\geq 3, x,x1,x2,x3=u2,u2,u1,u1x,x_{1},x_{2},x_{3}=u^{\prime}_{2},u_{2},u_{1},u^{\prime}_{1} is a chain in GvG-v. Otherwise, if deg(u1)3\deg(u^{\prime}_{1})\geq 3, x,x1,x2,x3=u1,u1,u2,u2x,x_{1},x_{2},x_{3}=u^{\prime}_{1},u_{1},u_{2},u^{\prime}_{2} is a chain in GvG-v. Now suppose that deg(u1),deg(u2)2\deg(u^{\prime}_{1}),\deg(u^{\prime}_{2})\leq 2. By Property (P1), deg(u1)=deg(u2)=2\deg(u^{\prime}_{1})=\deg(u^{\prime}_{2})=2. Let zz be neighbor of u2u^{\prime}_{2} other than u2u_{2}. By Property (P2), deg(z)3\deg(z)\geq 3. Therefore, z,u2,u2,u1z,u^{\prime}_{2},u_{2},u_{1} is a chain in GvG-v. If z{u3,u4}z\notin\{u^{\prime}_{3},u^{\prime}_{4}\} define x,x1,x2,x3=z,u2,u2,u1x,x_{1},x_{2},x_{3}=z,u^{\prime}_{2},u_{2},u_{1}. Otherwise, suppose without loss of generality that z=u3z=u^{\prime}_{3}, and x,x1,x2,x3=u3,u3,u4,u4x,x_{1},x_{2},x_{3}=u^{\prime}_{3},u_{3},u_{4},u^{\prime}_{4} is a chain in GvG-v.

Let G=G{v,x,x1,x2,x3}G^{\prime}=G-\{v,x,x_{1},x_{2},x_{3}\}. In the first three cases above, {v,x,x1,x2,x3}{u3,u4,u3,u4}=\{v,x,x_{1},x_{2},x_{3}\}\cap\{u_{3},u_{4},u^{\prime}_{3},u^{\prime}_{4}\}=\emptyset. Since u3,u4u_{3},u_{4} are adjacent vertices with no common neighbor and degG(u3)=degG(u4)=2\deg_{G^{\prime}}(u_{3})=\deg_{G^{\prime}}(u_{4})=2, the lemma follows from Claim 2. In the fourth case above, {v,x,x1,x2,x3}{u1,u2,u1,u2}=\{v,x,x_{1},x_{2},x_{3}\}\cap\{u_{1},u_{2},u^{\prime}_{1},u^{\prime}_{2}\}=\emptyset and the lemma follows again from Claim 2. ∎

Lemma 4.

There are no dominating vertices in GvG-v.

Proof.

By Property (P3), if GvG-v has a dominating vertex then either the dominating vertex is uiu_{i} for some ii, or the dominated vertex is uiu_{i} for some ii. The neighbors of uiu_{i} are uiu^{\prime}_{i} and uju_{j} for some jj. Since uiu^{\prime}_{i} and uju_{j} are not adjacent, uiu_{i} is not dominated by either of these vertices. Moreover, both uiu^{\prime}_{i} and uju_{j} have neighbors that are not adjacent to uiu_{i}, so uiu_{i} does not dominate these vertices. ∎

Step (S5-9)

If case (1) of Lemma 3 occurs, apply (B3) on (G,k)(G,k) and vv. Apply (S4) on (Gv,k1)(G-v,k-1) and the chain x,x1,x2,x3x,x_{1},x_{2},x_{3}, which generates the instances (G=G{v,x,x1,x2,x3},k3)(G^{\prime}=G-\{v,x,x_{1},x_{2},x_{3}\},k-3) and (G({v}NGv[{x,x}]),k1|NGv({x,x})|)(G-(\{v\}\cup N_{G-v}[\{x^{\prime},x\}]),k-1-|N_{G-v}(\{x^{\prime},x\})|) for every xNGv(x)x^{\prime}\in N_{G-v}(x). By Claim 1 and Lemma 4, for every xN(x)x^{\prime}\in N(x), |NGv({x,x})|degGv(x)=deg(x)3|N_{G-v}(\{x^{\prime},x\})|\geq\deg_{G-v}(x)=\deg(x)\geq 3. Next, apply the rule (G,k3)(GS,k3γ)(G^{\prime},k-3)\to(G^{\prime}-S,k-3-\gamma), where γ1\gamma\geq 1 is the minimum size of a 3-path vertex cover of SS. The recurrence of this step is (the worst case is γ=1\gamma=1)

T(k)4T(k4)+4T(k4)T(k)\leq 4T(k-4)+4T(k-4)

and the branching factor is approximately 1.682.

In the following two sub-steps we have that case (3) of Lemma 3 occurs.

Step (S5-10)

If yy is a dominating vertex, apply (B3) on (G,k)(G,k) and vv. Apply (S4) on (Gv,k1)(G-v,k-1) and the chain x,x1,x2,x3x,x_{1},x_{2},x_{3}, which generates the instances (G=G{v,x,x1,x2,x3},k3)(G^{\prime}=G-\{v,x,x_{1},x_{2},x_{3}\},k-3) and (G({v}NGv[{x,x}]),k1|NGv({x,x})|)(G-(\{v\}\cup N_{G-v}[\{x^{\prime},x\}]),k-1-|N_{G-v}(\{x^{\prime},x\})|) for every xNGv(x)x^{\prime}\in N_{G-v}(x). Apply (B2) on (G,k3)(G^{\prime},k-3) and yy which generates the instances (Gy,k4)(G^{\prime}-y,k-4) and (GNG[y],k2degG(y))(G^{\prime}-N_{G^{\prime}}[y],k-2-\deg_{G^{\prime}}(y)). The recurrence of this step is

T(k)(4T(k4)+T(k5))+4T(k4)T(k)\leq(4T(k-4)+T(k-5))+4T(k-4)

and the branching factor is approximately 1.712.

Step (S5-11)

In this step yy is not a dominating vertex. Apply (B3) on (G,k)(G,k) and vv. Apply (S4) on (Gv,k1)(G-v,k-1) and the chain x,x1,x2,x3x,x_{1},x_{2},x_{3}, which generates the instances (G=G{v,x,x1,x2,x3},k3)(G^{\prime}=G-\{v,x,x_{1},x_{2},x_{3}\},k-3) and (G({v}NGv[{x,x}]),k1|NGv({x,x})|)(G-(\{v\}\cup N_{G-v}[\{x^{\prime},x\}]),k-1-|N_{G-v}(\{x^{\prime},x\})|) for every xNGv(x)x^{\prime}\in N_{G-v}(x). Then, apply (S4) on (G,k3)(G^{\prime},k-3) and y,y1,y2,y3y,y_{1},y_{2},y_{3}, which generates the instances (G{y,y1,y2,y3},k5)(G^{\prime}-\{y,y_{1},y_{2},y_{3}\},k-5) and OPEN(GNG[{y,y}]),k3|NG({y,y})|)(G^{\prime}-N_{G^{\prime}}[\{y^{\prime},y\}]),k-3-|N_{G^{\prime}}(\{y^{\prime},y\})|) for every yNG(y)y^{\prime}\in N_{G^{\prime}}(y). By Claim 1 and since Step (S5-10) cannot be applied, |NG({y,y})|degG(y)|N_{G^{\prime}}(\{y^{\prime},y\})|\geq\deg_{G^{\prime}}(y) for every yNG(y)y^{\prime}\in N_{G^{\prime}}(y). The recurrence of this step is

T(k)(3T(k4)+T(k5)+3T(k6))+4T(k4)T(k)\leq(3T(k-4)+T(k-5)+3T(k-6))+4T(k-4)

and the branching factor is approximately 1.713.

4.2 Step (S8)

Since steps (S1)–(S7) cannot be applied, the graph GG has the following properties, in addition to the properties stated in Section 4.1.

(P4) Every vertex has degree 2 or 3. (P5) A vertex with degree 2 is not adjacent to a vertex in a triangle.

In the following sub-steps, a common condition for applying the steps is that there is a vertex vv such that deg(v)=2\deg(v)=2 and there is a neighbor ww of vv and a neighbor w1w_{1} of ww with deg(w1)=3\deg(w_{1})=3. Let uu be the other neighbor of vv. Due to Property (P2), deg(w)=deg(u)=3\deg(w)=\deg(u)=3. Denote the neighbors of ww and uu which are not vv by w1,w2w_{1},w_{2} and u1,u2u_{1},u_{2}, respectively. See Figure 2 for graphs satisfying the different conditions of the sub-steps.

(a) (S8-1)
(b) (S8-2)
(c) (S8-3)
(d) (S8-4)
(e) (S8-5)
(f) (S8-6)
Figure 2: Example for the sub-steps of (S8).

Step (S8-1)

If deg(w2)=3\deg(w_{2})=3, apply (B3) on (G,k)(G,k) and ww which generates the instances (Gw,k1)(G-w,k-1) and (GN[{w,w}],k|N({w,w})|)(G-N[\{w^{\prime},w\}],k-|N(\{w^{\prime},w\})|) for every wN(w)={w1,w2,v}w^{\prime}\in N(w)=\{w_{1},w_{2},v\}. Apply (B2) on (Gw,k1)(G-w,k-1) and uu which generates the instances (G{u,w},k2)(G-\{u,w\},k-2) and (G({w}NGw[u]),k3)(G-(\{w\}\cup N_{G-w}[u]),k-3). We have that |N({w1,w})|=4|N(\{w_{1},w\})|=4 since w,w1w,w_{1} are adjacent vertices with degree 3 that do not have common neighbor (due to Property (P5)). By the same arguments |N({w2,w})|=4|N(\{w_{2},w\})|=4. Additionally, vv and ww do not have common neighbor (due to Property (P2)), thus |N({v,w})|=3|N(\{v,w\})|=3. Therefore, the recurrence of this step is

T(k)T(k2)+2T(k3)+2T(k4)T(k)\leq T(k-2)+2T(k-3)+2T(k-4)

and the branching factor is approximately 1.696.

Due to Property (P4), in the following sub-steps we have deg(w2)=2\deg(w_{2})=2. Additionally, at least one of u1u_{1} and u2u_{2} has degree 22 (otherwise (S8-1) can be applied on vv) and assume that deg(u2)=2\deg(u_{2})=2 (note that the degree of u1u_{1} is either 3 or 2). Let w2w^{\prime}_{2} be the neighbor of w2w_{2} which is not ww, and let u2u^{\prime}_{2} be the neighbor of u2u_{2} which is not uu. We have that deg(w2)=deg(u2)=3\deg(w^{\prime}_{2})=\deg(u^{\prime}_{2})=3 (due to Property (P2)). Let δ1\delta_{1} be the minimum length of a path in G{u,w}G-\{u,w\} connecting a vertex from {w1,w2}\{w_{1},w_{2}\} to a vertex from {u1,u2}\{u_{1},u_{2}\} such that one endpoint of the path has degree 3 (in GG) and the other endpoint has degree 2 (in GG). Let δ2\delta_{2} be the minimum length of a path in G{u,w}G-\{u,w\} connecting {w2}\{w_{2}\} to a vertex from {u1,u2}\{u_{1},u_{2}\} such that both endpoints of the path have degree 2 (in GG). Let δ=min(δ1,δ2)\delta=\min(\delta_{1},\delta_{2}).

Step (S8-2)

Suppose that δ=0\delta=0. Note that by definition δ10\delta_{1}\neq 0, so we have δ2=0\delta_{2}=0. In other words, without loss of generality, w=u2w=u_{2}. The set {v,u,w,w2}\{v,u,w,w_{2}\} induces a cordless cycle. The vertices of this cycle that are adjacent to vertices outside the cycle are ww and uu. Therefore, there is a minimum 3-path vertex cover of GG which contains w,vw,v and does not contain v,w2v,w_{2}. Therefore, in this case apply the rule (G,k)(G{v,u,w,w2},k2)(G,k)\to(G-\{v,u,w,w_{2}\},k-2).

Step (S8-3)

If w1=u1w_{1}=u_{1}, as in Step (S8-1), apply (B3) on (G,k)(G,k) and ww and then apply (B2) on (Gw,k1)(G-w,k-1) and uu. We claim that if the instance (GN[{w1,w}],k|N({w1,w})|)=(GN[{w1,w}],k4)(G-N[\{w_{1},w\}],k-|N(\{w_{1},w\})|)=(G-N[\{w_{1},w\}],k-4) (which is generated by the application of (B3)) is a yes instance then the instance (G{u,w},k2)(G-\{u,w\},k-2) (which is generated by the application of (B2)) is a yes instance. To prove the correctness of this claim, note that if CC is a 3-path vertex cover of GN[{w1,w}]G-N[\{w_{1},w\}] of size at most k4k-4, then C{w2,x}C\cup\{w_{2},x\}, where xx is the neighbor of w1w_{1} other than ww and uu, is a 3-path vertex cover of G{u,w}G-\{u,w\} of size at most |C|+2k2|C|+2\leq k-2. Therefore, the algorithm does not recurse on (GN[{w1,w}],k4)(G-N[\{w_{1},w\}],k-4). The recurrence of this step is

T(k)T(k2)+3T(k3)T(k)\leq T(k-2)+3T(k-3)

and the branching factor is approximately 1.672.

Step (S8-4)

If δ=1\delta=1, perform the following. Note that δ21\delta_{2}\neq 1 (by the definition of δ2\delta_{2} and the fact that deg(w2)=3\deg(w^{\prime}_{2})=3), so δ1=1\delta_{1}=1. Without loss of generality, δ1\delta_{1} is a length of a path in G{u,w}G-\{u,w\} between w2w_{2} and u1u_{1}. As in Step (S8-1), apply (B3) on (G,k)(G,k) and ww and then apply (B2) on (Gw,k1)(G-w,k-1) and uu. Let xx be the neighbor of u1u_{1} other than uu and w2w_{2}. Note that xwx\neq w (otherwise the two neighbors ww and u1u_{1} of w2w_{2} are adjacent, contradicting Property (P2)). Therefore, degG{u,w}(u1)=2\deg_{G-\{u,w\}}(u_{1})=2. Additionally, degG{u,w}(w2)=1\deg_{G-\{u,w\}}(w_{2})=1. Therefore, apply Step (S2) on (G=G{u,w},k2)(G^{\prime}=G-\{u,w\},k-2) (which is generated by the application of (B2)) and w2w_{2}, which generates the instance (GNG[u1],k3)(G^{\prime}-N_{G^{\prime}}[u_{1}],k-3). The recurrence of this step is

T(k)4T(k3)+T(k4)T(k)\leq 4T(k-3)+T(k-4)

and the branching factor is approximately 1.664.

Step (S8-5)

If δ=2\delta=2, perform the following. Assume without loss of generality that the value of δ\delta is obtained due to a path between w2w_{2} and either u1u_{1} or u2u_{2}. As in Step (S8-1), apply (B3) on (G,k)(G,k) and ww and then apply (B2) on (Gw,k1)(G-w,k-1) and uu. Next, apply (B2) on (G=G{u,w},k2)(G^{\prime}=G-\{u,w\},k-2) and w2w^{\prime}_{2}, which generates the instances (Gw2,k3)(G^{\prime}-w^{\prime}_{2},k-3) and (GN[w2],k4)(G^{\prime}-N[w^{\prime}_{2}],k-4). We claim that if (GN[w2],k4)(G^{\prime}-N[w^{\prime}_{2}],k-4) (which is obtained by the second application of (B2)) is a yes instance then (G({w}NGw[u]),k3)(G-(\{w\}\cup N_{G-w}[u]),k-3) (which is generated by the first application of (B2)) is a yes instance. To prove the correctness of this claim, note that if CC is a 3-path vertex cover of GN[w2]G^{\prime}-N[w^{\prime}_{2}] of size at most k4k-4, then C{x}C\cup\{x\}, where xx is the neighbor of w2w^{\prime}_{2} other than w2w_{2} and u2u_{2}, is a 3-path vertex cover of G({w}NGw[u])G-(\{w\}\cup N_{G-w}[u]) of size at most |C|+1k3|C|+1\leq k-3. Therefore, the algorithm does not recurse on the former instance. The recurrence of this step is

T(k)4T(k3)+T(k4)T(k)\leq 4T(k-3)+T(k-4)

and the branching factor is approximately 1.664.

Step (S8-6)

As in Step (S8-1), apply (B3) on (G,k)(G,k) and ww and then apply (B2) on (Gw,k1)(G-w,k-1) and uu.

Consider the instance (G=GN[{w1,w}],k4)(G^{\prime}=G-N[\{w_{1},w\}],k-4) that is generated by the application of (B3). Since w,vw,v are not adjacent (due to Property (P2)), δ3\delta\geq 3, and w1u1w_{1}\neq u_{1}, we have that {u,u2,u2}N[{w1,w}]=\{u,u_{2},u^{\prime}_{2}\}\cap N[\{w_{1},w\}]=\emptyset. If degG(u)=1\deg_{G^{\prime}}(u)=1, then since degG(u2)=2\deg_{G^{\prime}}(u_{2})=2, apply (S2) on (G,k4)(G^{\prime},k-4). Otherwise, degG(u)=2\deg_{G^{\prime}}(u)=2 and by Claim 2 either the connected component SS of uu in GG^{\prime} is a path or a cycle (and no additional edges), or SS contains a chain x,x1,x2,x3x,x_{1},x_{2},x_{3}. In the former case the algorithm computes the minimum size γ\gamma of a 3-path vertex cover of SS, and apply the rule (G,k4)(GS,k4γ)(G^{\prime},k-4)\to(G^{\prime}-S,k-4-\gamma) (note that |S|3|S|\geq 3 so γ1\gamma\geq 1). In the latter case, if xx is a dominating vertex, apply (B2) on (G,k4)(G^{\prime},k-4) and xx. Otherwise, apply (S4) on (G,k4)(G^{\prime},k-4) and x,x1,x2,x3x,x_{1},x_{2},x_{3}, which generates the instances (G{x,x1,x2,x3},k6)(G^{\prime}-\{x,x_{1},x_{2},x_{3}\},k-6) and (GN[{x,x}],k4|NG({x,x})|)(G^{\prime}-N[\{x^{\prime},x\}],k-4-|N_{G^{\prime}}(\{x^{\prime},x\})|) for every xNG(x)x^{\prime}\in N_{G^{\prime}}(x).

We also handle the instance (GN[{w2,w}],k3)(G-N[\{w_{2},w\}],k-3) in a similar way.

We now consider the instances (G{u,w},k2)(G-\{u,w\},k-2) and (G′′=G({w}NGw[u]),k3)(G^{\prime\prime}=G-(\{w\}\cup N_{G-w}[u]),k-3) that were generated by the application of (B2) on (Gw,k1)(G-w,k-1). Apply (B2) on (G{u,w},k2)(G-\{u,w\},k-2) and w2w^{\prime}_{2}, which generates the instances (G{u,w,w2},k3)(G-\{u,w,w^{\prime}_{2}\},k-3) and (G({u,w}N[w2]),k4)(G-(\{u,w\}\cup N[w^{\prime}_{2}]),k-4). For the instance (G′′,k3)(G^{\prime\prime},k-3) we have that N[w2]({w}NGw[u])=N[w^{\prime}_{2}]\cap(\{w\}\cup N_{G-w}[u])=\emptyset (since w,vw,v are not adjacent, w1,w2w_{1},w_{2} are not adjacent, and δ3\delta\geq 3). Therefore, apply (B2) on (G′′,k3)(G^{\prime\prime},k-3) and w2w^{\prime}_{2} which generates the instances (G′′w2,k4)(G^{\prime\prime}-w^{\prime}_{2},k-4) and (G′′NG′′[w2],k5)(G^{\prime\prime}-N_{G^{\prime\prime}}[w^{\prime}_{2}],k-5). The recurrence of this step is (the worst case occurs when (S4) is applied on (G,k4)(G^{\prime},k-4) and on (GN[{w2,w}],k3)(G-N[\{w_{2},w\}],k-3)).

T(k)(T(k3)+2T(k4)+T(k5))+(T(k3)+T(k5)+4T(k6)+3T(k7))T(k)\leq(T(k-3)+2T(k-4)+T(k-5))+(T(k-3)+T(k-5)+4T(k-6)+3T(k-7))

and the branching factor is approximately 1.711.

References

  • [1] Maw-Shang Chang, Li-Hsuan Chen, Ling-Ju Hung, Yi-Zhi Liu, Peter Rossmanith, and Somnath Sikdar. An O(1.4658n)O^{*}(1.4658^{n})-time exact algorithm for the maximum bounded-degree-1 set problem. In Proc. 31st workshop on combinatorial mathematics and computation theory, pages 9–18, 2014.
  • [2] Maw-Shang Chang, Li-Hsuan Chen, Ling-Ju Hung, Peter Rossmanith, and Ping-Chen Su. Fixed-parameter algorithms for vertex cover P3P_{3}. Discrete Optimization, 19:12–22, 2016.
  • [3] František Kardoš, Ján Katrenič, and Ingo Schiermeyer. On computing the minimum 3-path vertex cover and dissociation number of graphs. Theoretical Computer Science, 412(50):7009–7017, 2011.
  • [4] Ján Katrenič. A faster FPT algorithm for 3-path vertex cover. Information Processing Letters, 116(4):273–278, 2016.
  • [5] Jianhua Tu. A fixed-parameter algorithm for the vertex cover P3P_{3} problem. Information Processing Letters, 115(2):96–99, 2015.
  • [6] Bang Ye Wu. A measure and conquer approach for the parameterized bounded degree-one vertex deletion. In Proc. 21st International Computing and Combinatorics Conference (COCOON), pages 469–480, 2015.
  • [7] Mingyu Xiao and Shaowei Kou. Exact algorithms for the maximum dissociation set and minimum 3-path vertex cover problems. Theoretical Computer Science, 657:86–97, 2017.
  • [8] Mingyu Xiao and Shaowei Kou. Kernelization and parameterized algorithms for 3-path vertex cover. In Proc. 14th International Conference on Theory and Applications of Models of Computation (TAMC), pages 654–668, 2017.