This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Polynomial Kernels for Tracking Shortest Paths11footnotemark: 1

Václav Blažej [email protected] Pratibha Choudhary [email protected] Dušan Knop [email protected] Jan Matyáš Křišťan [email protected] Ondřej Suchý [email protected] Tomáš Valla [email protected] Department of Theoretical Computer Science, Faculty of Information Technology,
Czech Technical University in Prague, Thákurova 9, Prague, 160 00, Czech Republic
Abstract

Given an undirected graph G=(V,E)G=(V,E), vertices s,tVs,t\in V, and an integer kk, Tracking Shortest Paths requires deciding whether there exists a set of kk vertices TVT\subseteq V such that for any two distinct shortest paths between ss and tt, say P1P_{1} and P2P_{2}, we have TV(P1)TV(P2)T\cap V(P_{1})\neq T\cap V(P_{2}). In this paper, we give the first polynomial size kernel for the problem. Specifically we show the existence of a kernel with 𝒪(k2)\mathcal{O}(k^{2}) vertices and edges in general graphs and a kernel with 𝒪(k)\mathcal{O}(k) vertices and edges in planar graphs for the Tracking Paths in DAG problem. This problem admits a polynomial parameter transformation to Tracking Shortest Paths, and this implies a kernel with 𝒪(k4)\mathcal{O}(k^{4}) vertices and edges for Tracking Shortest Paths in general graphs and a kernel with 𝒪(k2)\mathcal{O}(k^{2}) vertices and edges in planar graphs. Based on the above we also give a single exponential algorithm for Tracking Shortest Paths in planar graphs.

keywords:
tracking paths , shortest paths , directed acyclic graphs , kernel
journal: Information Processing Letters

1 Introduction

Given a graph GG with a source vertex ss, a destination vertex tt, and a budget kk, the Tracking Shortest Paths problem is defined as follows. Find a set of vertices TV(G)T\subseteq V(G) (tracking set) with at most kk vertices such that the set of vertices of TT encountered in each distinct shortest path between ss and tt (ss-tt path) contains is a unique subset of TT. The purpose of finding a tracking set is to be able to distinguish between any two shortest ss-tt paths in the graph by using (preferably small number of) vertices in those paths. The problem is known to be NP-complete [1] and FPT when parameterized by the size of the solution [2, 3].

A closely related problem is that of Tracking Paths, where the aim is to find a tracking set that distinguishes between all ss-tt paths and not just the shortest ss-tt paths. The Tracking Paths problem admits a quadratic kernel for general graphs [4] and a linear kernel for planar graphs [5] when parameterized by the solution size i.e., the size of tracking set. However, so far no polynomial kernels have been known for Tracking Shortest Paths.

In this paper, we fill this gap by computing a kernel with 𝒪(k2)\mathcal{O}(k^{2}) vertices and edges for Tracking Paths in DAG and a kernel with 𝒪(k)\mathcal{O}(k) vertices and edges for Tracking Paths in DAG in planar graphs. The kernel of size O(k)O(k) leads to the first single exponential algorithm known for the Tracking Shortest Paths in planar graphs. It is known that Tracking Shortest Paths is reducible to Tracking Paths in DAG [3]. We show that Tracking Paths in DAG admits a polynomial parameter transformation to Tracking Shortest Paths (see Section 5), which implies a kernel for for Tracking Shortest Paths with size square of the size of that for Tracking Paths in DAG.

Preliminaries

The Tracking Shortest Paths problem is formally defined as follows.

Tracking Shortest Paths
Input: An undirected graph G=(V,E)G=(V,E), source sVs\in V, destination tVt\in V, and a budget kk\in\mathbb{N}.
Question: Is there a set of vertices TVT\subseteq V, with |T|k|T|\leq k, such that for any two distinct shortest ss-tt paths P1P_{1} and P2P_{2} in GG, TV(P1)TV(P2)T\cap V(P_{1})\neq T\cap V(P_{2})?

The set of vertices comprising the output is referred to as a tracking set, and the vertices in a tracking set are called trackers. We consider the parameterized version of the problem with respect to the desired solution size kk.

We consider only unweighted graphs. We use G=(V,E)G=(V,E) to denote a graph with vertex set VV and edge set EE. The neighborhood of a vertex vv comprises the vertices adjacent to vv and is denoted by N(v)N(v). The degree of a vertex vv is denoted by deg(v)\deg(v) and is equal to the size of the neighborhood of the vertex vv. In the case of directed graphs, for a vertex vv, N+(v)N^{+}(v) denotes the set of out-neighbors of vv, N(v)N^{-}(v) denotes the in-neighbors of vv, and deg+(v)=|N+(v)|\deg^{+}(v)=|N^{+}(v)|, deg(v)=|N(v)|\deg^{-}(v)=|N^{-}(v)|. A directed acyclic graph is a directed graph without any directed cycles. For a set of edges {(u1,v1),,(u,v)}\{(u_{1},v_{1}),\dots,(u_{\ell},v_{\ell})\} we call the vertices {v1,,v}\{v_{1},\dots,v_{\ell}\} heads and {u1,,u}\{u_{1},\dots,u_{\ell}\} tails. For more details on graph theory and related notations, we refer to Diestel [6] and for details on parameterized complexity, we refer to Cygan et al. [7].

2 Common Preprocessing

In this section, we discuss some preliminary preprocessing that is performed on the input graph. For both of our kernelization algorithms, we start by exhaustively applying the following reduction rule.

Reduction Rule 1 (Banik et al. [3]).

If there exists a vertex or edge in GG that does not participate in any shortest ss-tt path, delete it.

Next, we reduce the input instance to an instance of Tracking Paths in DAG by directing the edges away from ss. Note that edges that have both endpoints in the same distance from ss do not participate in any shortest ss-tt path. Furthermore, any shortest ss-tt path becomes a directed ss-tt path.

We proceed with applying two more reduction rules which are applicable on directed acyclic graphs.

Reduction Rule 2 (Banik et al. [3]).

If deg(s)=1\deg(s)=1 and uN+(s)u\in N^{+}(s), then delete ss and set s=us=u. If deg(t)=1\deg(t)=1 and vN(t)v\in N^{-}(t), then delete tt and set t=vt=v.

Reduction Rule 3 (Banik et al. [3]).

If there exist x,y,zV(G)x,y,z\in V(G), and (x,y),(y,z)E(G)(x,y),(y,z)\in E(G), and deg(x)=deg(y)=2\deg(x)=\deg(y)=2, then delete the vertex yy and introduce the edge (x,z)(x,z) in GG.

After applying Reduction Rules 13 all vertices and edges of the input graph appear in some ss-tt path, there are no degree-one vertices, and there are no adjacent degree-two vertices, unless one of them is ss or tt.

3 Quadratic Kernel for Directed Acyclic Graphs

In this section, we give an algorithm to compute an 𝒪(k2)\mathcal{O}(k^{2}) kernel for Tracking Paths in DAG. Let (G=(V,E),s,t,k)(G=(V,E),s,t,k) be an instance of Tracking Paths in DAG reduced with respect to Reduction Rules 13.

Let TT be a tracking set for GG. For a vertex xV{t}x\in V\setminus\{t\} let ZxZ_{x} be the set of vertices zz such that there is a directed path from xx to zz in G((T{t}){x})G\setminus\big{(}(T\cup\{t\})\setminus\{x\}\big{)}. Note that xZxx\in Z_{x}. Let BxB_{x} be the set of vertices bb of T{t}T\cup\{t\} such that there is a directed path from xx to bb in G((T{t}){x,b})G\setminus\big{(}(T\cup\{t\})\setminus\{x,b\}\big{)}.

Lemma 1.

If TT is a tracking set, then for every xV{t}x\in V\setminus\{t\} we have,
zZx(deg+(z)1)|Bx|\sum_{z\in Z_{x}}(\deg^{+}(z)-1)\leq|B_{x}|.

Proof.

Let ExE_{x} be the set of edges with tails in ZxZ_{x}. Then observe that |Ex|=zZxdeg+(z)|E_{x}|=\sum_{z\in Z_{x}}\deg^{+}(z).

Claim 1.

If there are two edges in ExE_{x} with the same vertex as the head, then TT is not tracking.

Proof.

Assume that there are two edges (z,y)(z,y) and (z,y)(z^{\prime},y) in ExE_{x}. By the definition of ZxZ_{x} there is a directed path PzP_{z} from xx to zz that does not contain any vertex of (T{t}){x}(T\cup\{t\})\setminus\{x\} and a directed path PzP_{z^{\prime}} from xx to zz^{\prime} also does not contain any vertex of (T{t}){x}(T\cup\{t\})\setminus\{x\}. Due to application of Reduction Rule 1 each vertex and edge participate in an ss-tt path. Therefore, there is a directed path PyP_{y} from yy to tt and a directed path PxP_{x} from ss to xx. Let P1P_{1} be the ss-tt path obtained as a concatenation of PxP_{x}, PzP_{z}, (z,y)(z,y), PyP_{y} and P2P_{2} be the ss-tt path obtained as a concatenation of PxP_{x}, PzP_{z^{\prime}}, (z,y)(z^{\prime},y), PyP_{y}. These two paths differ only in the subpaths PzP_{z}, (z,y)(z,y) and PzP_{z^{\prime}}, (z,y)(z^{\prime},y) and no internal vertex of these subpaths is in TT. Hence, P1P_{1} and P2P_{2} are two distinct paths that contain the same set of trackers and TT is not tracking. ∎

Claim 2.

If yy is the head of an edge of ExE_{x} that is not in ZxZ_{x}, then it is in BxB_{x}.

Proof.

Suppose that (z,y)Ex(z,y)\in E_{x} and yZxBxy\notin Z_{x}\cup B_{x}. According to the definition of ZxZ_{x}, there is a directed path PzP_{z} from xx to zz that does not contain any vertex of (T{t}){x}(T\cup\{t\})\setminus\{x\}. Let PyP_{y} be the path obtained by concatenating PzP_{z} with (z,y)(z,y). If yT{t}y\notin T\cup\{t\}, then PyP_{y} is a directed path from xx to yy that does not contain any vertex of (T{t}){x}(T\cup\{t\})\setminus\{x\}, contradicting yZxy\notin Z_{x}. Hence, yT{t}y\in T\cup\{t\} and PyP_{y} prove that yBxy\in B_{x}. ∎

By the above claims and since xZxx\in Z_{x} is not a head of any edge in ExE_{x}, we have zZxdeg+(z)=|Ex||Zx|1+|Bx|\sum_{z\in Z_{x}}\deg^{+}(z)=|E_{x}|\leq|Z_{x}|-1+|B_{x}| and the lemma follows. ∎

Lemma 2.

If TT is a tracking set, then zV(deg+(z)1)(|T|+1)21\sum_{z\in V}(\deg^{+}(z)-1)\leq{(|T|+1)}^{2}-1.

Proof.

We claim that V{t}=xT{s}ZxV\setminus\{t\}=\bigcup_{x\in T\cup\{s\}}Z_{x}. For a vertex zV{t}z\in V\setminus\{t\}, let PzP_{z} be an ss-tt path containing zz. Let xx be the last vertex of T{s}T\cup\{s\} on PzP_{z}. Then zZxz\in Z_{x}. Hence,

zV(deg+(z)1)\displaystyle\sum_{z\in V}\left(\deg^{+}(z)-1\right) deg+(t)1+xT{s}zZx(deg+(z)1)\displaystyle\leq\deg^{+}(t)-1+\!\!\!\sum_{x\in T\cup\{s\}}\sum_{\,z\in Z_{x}}\left(\deg^{+}(z)-1\right)
(a)1+xT{s}|Bx|\displaystyle\mathrel{\overset{\makebox[0.0pt]{\mbox{\tiny(a)}}}{\leq}}-1+\;\smashoperator[]{\sum_{x\in T\cup\{s\}}^{}}|B_{x}|
(b)1+xT{s}(|T|+1)\displaystyle\mathrel{\overset{\makebox[0.0pt]{\mbox{\tiny(b)}}}{\leq}}-1+\;\smashoperator[]{\sum_{x\in T\cup\{s\}}^{}}\big{(}|T|+1\big{)}
(|T|+1)21.\displaystyle\leq{(|T|+1)}^{2}-1.

Inequality (a) comes from Lemma 1 and Inequality (b) comes from the fact that BxT{t}B_{x}\subseteq T\cup\{t\}. ∎

Lemma 3.

If (G=(V,E),s,t,k)(G=(V,E),s,t,k) is a YES instance of Tracking Paths in DAG after applying the Reduction Rules 13, then |V|5(k+1)2|V|\leq 5{(k+1)}^{2} and |E|6(k+1)2|E|\leq 6{(k+1)}^{2}.

Proof.

Let TT be a tracking set of size at most kk in GG. Let V2V_{2} be the set of vertices with out-degree at least 22. Note that all other vertices have out-degree at least 11, except for tt, which has out-degree 0. We have

|V2|\displaystyle|V_{2}| =zV21\displaystyle=\sum_{z\in V_{2}}1
zV2(deg+(z)1)\displaystyle\leq\sum_{z\in V_{2}}(\deg^{+}(z)-1)
(a)1+zV(deg+(z)1)\displaystyle\mathrel{\overset{\makebox[0.0pt]{\mbox{\tiny(a)}}}{\leq}}1+\sum_{z\in V}(\deg^{+}(z)-1)
(b)1+(|T|+1)21\displaystyle\mathrel{\overset{\makebox[0.0pt]{\mbox{\tiny(b)}}}{\leq}}1+{(|T|+1)}^{2}-1
=(|T|+1)2.\displaystyle={(|T|+1)}^{2}.

Inequality (a) comes from V2VV_{2}\subseteq V and adds 11 for vertex tt, (b) comes from Lemma 2. Therefore, there are at most zV2(deg+(z))=|V2|+zV2(deg+(z)1)|V2|+1+zV(deg+(z)1)2(|T|+1)2\sum_{z\in V_{2}}(\deg^{+}(z))=|V_{2}|+\sum_{z\in V_{2}}(\deg^{+}(z)-1)\leq|V_{2}|+1+\sum_{z\in V}(\deg^{+}(z)-1)\leq 2{(|T|+1)}^{2} edges with tails in vertices with out-degree at least 22. There are at most |V2|(|T|+1)2|V_{2}|\leq{(|T|+1)}^{2} edges with heads in vertices with out-degree at least 22 and in-degree 11. By a symmetrical argument, there are at most 2(|T|+1)22{(|T|+1)}^{2} edges with heads in vertices with in-degree at least 22 and at most (|T|+1)2{(|T|+1)}^{2} edges with tails in vertices with in-degree at least 22 and out-degree 11.

As the graph is reduced by Reduction Rules 13 every edge is incident to a vertex with in-degree at least 22 or out-degree at least 22. Hence, there are at most 6(|T|+1)26(k+1)26{(|T|+1)}^{2}\leq 6{(k+1)}^{2} edges in total. Each vertex with in-degree 11 and out-degree 11 is incident to an edge with tail in vertex with total degree at least 33. Therefore, there are at most 3(|T|+1)23{(|T|+1)}^{2} vertices with in-degree 11 and out-degree 11 and, hence, at most 5(|T|+1)25(k+1)25{(|T|+1)}^{2}\leq 5{(k+1)}^{2} vertices in total. ∎

Thus, in the case of a YES instance, the number of vertices and edges in the graph can be bounded by 𝒪(k2)\mathcal{O}(k^{2}), where kk is the desired size of a tracking set. After application of Reduction Rules 13 if there are more than 5(k+1)25{(k+1)}^{2} vertices or more than 6(k+1)26{(k+1)}^{2} edges in the graph, then we return a NO instance, otherwise we have a kernel. Since all reduction rules are applicable in polynomial time, our kernelization algorithm runs in polynomial time.

Theorem 1.

Tracking Paths in DAG admits a kernel with 𝒪(k2)\mathcal{O}(k^{2}) vertices and edges, where kk is the size of a solution.

4 Linear Kernel for Planar Directed Acyclic Graphs

In this section, we give a linear kernel when the input is a planar graph. The algorithm uses a set of reductions and a lemma of Banik et al. [1, Lemma 4.6], which shows bounds for a slightly different setting. Once again, we start by reducing the problem to an instance, say (G,s,t,k)(G,s,t,k), of Tracking Paths in DAG and applying Reduction Rules 13.

We use the term reduced graph to refer to the graph on which Reduction Rule 1 has already been applied exhaustively.

Lemma 4 (Banik et al. [1, Lemma 4.6]).

The number of faces |F||F| in a planar embedding of a reduced planar graph is at most 2OPT2\cdot{\rm OPT}, where OPT{\rm OPT} is the number of trackers in an optimum tracking set for the graph.

We would like to note that although the above lemma was given for undirected graphs, it can be observed that orientation of edges does not affect the lemma statement. Indeed, while reducing an instance of Tracking Shortest Paths to Tracking Paths in DAG, the number of faces in the graph remains unchanged.

It follows from Lemma 4 that if the number of faces in an embedding of a reduced planar graph exceeds 2k2k, then the graph does not have a tracking set of size kk. Therefore, we have the following reduction rule.

Reduction Rule 4.

If a planar embedding of a reduced planar graph GG has more than 2k2k faces, then return a trivial NO instance.

Next, we introduce two more reduction rules. These rules are simply directed variants of two rules given by Eppstein et al. [5]; hence the proofs of their correctness are omitted to avoid redundancy.

Reduction Rule 5.

If there exists a vertex vV(G){s,t}v\in V(G)\setminus\{s,t\} with degree 22 with incident edges (u,v),(v,w)(u,v),(v,w), and (u,w)E(G)(u,w)\in E(G), then mark vv as a tracker and remove it. Set k=k1k=k-1.

Reduction Rule 6.

If there exist two vertices xx and yy with degree 22, adjacent to the same pair of vertices uu and vv, i.e., (u,x),(u,y),(x,v)(u,x),(u,y),(x,v), and (y,v)E(G)(y,v)\in E(G), then mark xx as a tracker and delete it. Set k=k1k=k-1.

In the case of Reduction Rule 5, there exists an ss-tt path that contains the vertex vv, say PvP_{v}, and so there also exists another ss-tt path with the same vertex set as that of PvP_{v}, except that edges (u,v),(v,w)(u,v),(v,w) are replaced by the edge (u,w)(u,w). Hence, vv needs to be marked a tracker. In the case of Reduction Rule 6, there is an ss-tt path containing vertex xx, say PxP_{x}, and so there is another ss-tt path which has the same vertex set as PxP_{x}, except that the vertex xx is replaced by vertex yy. Hence, either xx or yy necessarily needs to be marked as a tracker.

Now we prove the existence of a linear kernel.

Lemma 5.

For a planar graph G=(V,E)G=(V,E) if (G,s,t,k)(G,s,t,k) is a YES instance of Tracking Paths in DAG reduced with respect to Reduction Rules 16, then |V|10k10|V|\leq 10k-10 and |E|12k12|E|\leq 12k-12.

Proof.

Let GG be a reduced planar DAG and FF be the set of faces in some planar drawing of GG. Note that, since the instance is reduced with respect to Reduction Rule 4, we have |F|2k|F|\leq 2k. Let V3V_{\geq 3} be the set of vertices with degree at least 33 and V2V_{2} be the set of vertices with degree equal to 22. Recall that after exhaustive application of Reduction Rules 13 there are no vertices with degree 11 in GG and each vertex with degree 22 has vertices with degree 33 or more as its neighbors.

First we construct an auxiliary graph G=(V,E)G^{\prime}=(V^{\prime},E^{\prime}) by short-circuiting all vertices in V2V_{2} (the vertex is deleted and an edge is introduced between its neighbors). Due to Reduction Rules 5 and 6, the short-circuiting does not create parallel edges. Note that the number of faces |F||F| in GG is the same as that in GG^{\prime}, that is, at most 2k2k. Further, |V|=|V3||V^{\prime}|=|V_{\geq 3}|, |V2||E||V_{2}|\leq|E^{\prime}|, and |E|2|E||E|\leq 2|E^{\prime}|.

We now bound the size of V3V_{\geq 3}. Due to the Handshaking lemma and the fact that degree of all vertices in GG^{\prime} is at least 33, we get

|E|3|V|/2.\displaystyle|E^{\prime}|\geq 3|V^{\prime}|/2. (1)

Due to Euler’s formula, we have

|F|=|E||V|+2(1)|V|/2+2.|F|=|E^{\prime}|-|V^{\prime}|+2\mathrel{\overset{\makebox[0.0pt]{\mbox{\tiny(\ref{eq:1})}}}{\geq}}|V^{\prime}|/2+2.

Hence,

|V3|=|V|2(|F|2)Red. 42(2k2)4k4.|V_{\geq 3}|=|V^{\prime}|\leq 2(|F|-2)\mathrel{\overset{\makebox[0.0pt]{\mbox{\tiny Red.\leavevmode\nobreak\ \ref{red:bound-faces}}}}{\leq}}2(2k-2)\leq 4k-4.

Thus, |V2||E|=|F|+|V|22k+4k42=6k6|V_{2}|\leq|E^{\prime}|=|F|+|V^{\prime}|-2\leq 2k+4k-4-2=6k-6. The total number of vertices in GG is |V|=|V2|+|V3|6k6+4k4=10k10|V|=|V_{2}|+|V_{\geq 3}|\leq 6k-6+4k-4=10k-10. Since |E|2|E||E|\leq 2|E^{\prime}|, |E|12k12|E|\leq 12k-12. ∎

Thus, after the application of Reduction Rules 16, if there exist more than 10k1010k-10 vertices or 12k1212k-12 edges, we return a NO instance; otherwise, we have a kernel. Since all reduction rules are applicable in polynomial time, our kernelization algorithm runs in polynomial time, therefore, Theorem 2 follows.

Theorem 2.

Tracking Paths in DAG in planar graphs admits a kernel with 𝒪(k)\mathcal{O}(k) vertices and edges.

Once a kernel is computed, a tracking set of size kk can be found by considering all subsets of vertices of size kk, and verifying if any of them is a tracking set for the given graph using the polynomial time algorithm of Banik et al. [8].

Since we have at most 10k10k vertices in the kernel, we have i=1k(10ki)\sum_{i=1}^{k}\binom{10k}{i} subsets of size at most kk. We use [9, Lemma 3.13] which states that

i=1αn(ni)(1α)αn(11α)(1α)n.\sum_{i=1}^{\alpha n}\binom{n}{i}\leq\left(\frac{1}{\alpha}\right)^{\alpha n}\!\!\cdot\left(\frac{1}{1-\alpha}\right)^{(1-\alpha)n}.

for α(0,1)\alpha\in(0,1). By setting α=1/10\alpha=1/10 and n=10kn=10k we get the following bound.

i=1k(10ki)(1110)k(11110)(1110)10k=(101099)k25.811747k26k\sum_{i=1}^{k}\binom{10k}{i}\leq\left(\frac{1}{\frac{1}{10}}\right)^{k}\cdot\left(\frac{1}{1-\frac{1}{10}}\right)^{(1-\frac{1}{10})10k}\!\!=\left(\frac{{10}^{10}}{9^{9}}\right)^{k}\approx 25.811747^{k}\leq 26^{k}

Thus, a tracking set can be found in 26kn𝒪(1)26^{k}\cdot n^{\mathcal{O}(1)} time in this case. Note that the tracking set will also include vertices that were marked as trackers and deleted in the intermediate steps of the algorithm.

Corollary 1.

There exists a 26kn𝒪(1)26^{k}\cdot n^{\mathcal{O}(1)} time (FPT) algorithm for Tracking Shortest Paths and Tracking Paths in DAG in planar graphs.

5 Polynomial Parameter Transformation

It has been shown that Tracking Shortest Paths is reducible to Tracking Paths in DAG [3]. In this section, we show how to reduce Tracking Paths in DAG to Tracking Shortest Paths.

Lemma 6.

Let (G,s,t,k)(G,s,t,k) be an instance of Tracking Paths in DAG, where GG does not contain parallel edges. Let (u,w)(u,w) be an edge of GG, and let GG^{\prime} be obtained from GG by subdividing the edge (u,w)(u,w), that is, by removing the edge (u,w)(u,w), introducing a new vertex vv, and adding edges (u,v)(u,v) and (v,w)(v,w). Then (G,s,t,k)(G^{\prime},s,t,k) is a YES instance of Tracking Paths in DAG if and only if (G,s,t,k)(G,s,t,k) is a YES instance of Tracking Paths in DAG.

Proof.

There is a one-to-one correspondence between the directed ss-tt paths in GG and the directed ss-tt paths in GG^{\prime}. Hence, if TT is a solution for (G,s,t,k)(G,s,t,k), then it is also a solution for (G,s,t,k)(G^{\prime},s,t,k). Similarly, if TT is a solution for (G,s,t,k)(G^{\prime},s,t,k) that does not contain vv, then it is also a solution for (G,s,t,k)(G,s,t,k). Hence, assume that there is a solution TT for (G,s,t,k)(G^{\prime},s,t,k) which contains vv. Our aim is to show that there is also a solution TT^{\prime} for (G,s,t,k)(G^{\prime},s,t,k) which does not contain vv and hence is also a solution for (G,s,t,k)(G,s,t,k).

Suppose first that there is a directed uu-ww path QQ in GG^{\prime} which does not contain vertices of TT as internal vertices. Note that, as vTv\in T, this path does not contain vv. If QQ is the single edge (u,w)(u,w), then there are parallel edges in GG that contradict our assumptions. Hence, QQ contains at least one internal vertex. Let vv^{\prime} be an arbitrary internal vertex of QQ. We claim that T=(T{v}){v}T^{\prime}=(T\setminus\{v\})\cup\{v^{\prime}\} is a solution for (G,s,t,k)(G^{\prime},s,t,k).

Refer to caption
Figure 1: The case where there exists a directed uu-ww path in GG^{\prime} which does not contain vertices of TT as internal vertices.

Assume it is not and let P1P_{1} and P2P_{2} be two different ss-tt paths such that V(P1)T=V(P2)TV(P_{1})\cap T^{\prime}=V(P_{2})\cap T^{\prime}, see Figure 1. Since V(P1)TV(P2)TV(P_{1})\cap T\neq V(P_{2})\cap T, exactly one of the paths contains vv. Without loss of generality, assume that vV(P1)v\in V(P_{1}) and vV(P2)v\notin V(P_{2}). Note that vV(P1)v^{\prime}\notin V(P_{1}) since the graph does not have directed cycles. Hence, vV(P2)v^{\prime}\notin V(P_{2}) as V(P1)T=V(P2)TV(P_{1})\cap T^{\prime}=V(P_{2})\cap T^{\prime}. Therefore V(P2)T=V(P2)TV(P_{2})\cap T=V(P_{2})\cap T^{\prime}. Now consider the path P1P^{\prime}_{1} obtained from P1P_{1} by replacing the subpath u,v,wu,v,w with QQ. Since QQ does not contain vertices of TT as internal vertices, we have V(P1)T=V(P1)TV(P^{\prime}_{1})\cap T=V(P_{1})\cap T^{\prime}. It follows that

V(P1)T=V(P1)T=V(P2)T=V(P2)TV(P^{\prime}_{1})\cap T=V(P_{1})\cap T^{\prime}=V(P_{2})\cap T^{\prime}=V(P_{2})\cap T

which contradicts that TT is a solution for (G,s,t,k)(G^{\prime},s,t,k).

Now assume that there is no directed uu-ww path in GG^{\prime} that does not contain vertices of TT as internal vertices, see Figure 2. Consider the set Tu=(T{v}){u}T_{u}=(T\setminus\{v\})\cup\{u\} and the set Tw=(T{v}){w}T_{w}=(T\setminus\{v\})\cup\{w\}. We will show that if neither TuT_{u} nor TvT_{v} is a solution in (G,s,t,k)(G^{\prime},s,t,k), then TT is not a solution in (G,s,t,k)(G^{\prime},s,t,k), a contradiction.

Refer to caption
Figure 2: The case where there is no path from uu to ww which does not contain vertices of TT. We show that a path through Q2Q^{\prime}_{2} and P1P^{\prime}_{1} has the same trackers in TT as the one through Q1Q^{\prime}_{1} and P2P^{\prime}_{2}.

If TuT_{u} is not a solution, then there are two ss-tt paths P1P_{1} and P2P_{2} such that V(P1)Tu=V(P2)TuV(P_{1})\cap T_{u}=V(P_{2})\cap T_{u}. Since V(P1)TV(P2)TV(P_{1})\cap T\neq V(P_{2})\cap T, exactly one of the paths, say P1P_{1}, contains vv. This implies uV(P1)u\in V(P_{1}) and, as uTuu\in T_{u}, also uV(P2)u\in V(P_{2}). Let tt^{\prime} be the first common vertex of the paths P1P_{1} and P2P_{2} after uu. Let P1P^{\prime}_{1} be the part of the path P1P_{1} between ww and tt^{\prime}, P2P^{\prime}_{2} be the part of the path P2P_{2} between uu and tt^{\prime} (note the slight asymmetry). Since V(P1)Tu=V(P2)TuV(P_{1})\cap T_{u}=V(P_{2})\cap T_{u}, neither P1P^{\prime}_{1} nor P2P^{\prime}_{2} contains vertices of TT as internal vertices. By assumption, this implies twt^{\prime}\neq w, as otherwise P2P^{\prime}_{2} would be a uu-ww path. This, in turn, implies wTw\notin T.

Now, the same argument could be repeated on a graph with swapped labels uu and ww, ss and tt, and where direction of all edges is reversed. We present it for completeness. If TwT_{w} is not a solution, then there are two ss-tt paths Q1Q_{1} and Q2Q_{2} such that V(Q1)Tw=V(Q2)TwV(Q_{1})\cap T_{w}=V(Q_{2})\cap T_{w}. Since V(Q1)TV(Q2)TV(Q_{1})\cap T\neq V(Q_{2})\cap T, exactly one of the paths, say Q1Q_{1}, contains vv. This implies wV(Q1)w\in V(Q_{1}) and, as wTww\in T_{w}, also wV(Q2)w\in V(Q_{2}). Let ss^{\prime} be the last common vertex of the paths Q1Q_{1} and Q2Q_{2} before ww. Let Q1Q^{\prime}_{1} be the part of the path Q1Q_{1} between ss^{\prime} and uu, Q2Q^{\prime}_{2} be the part of the path Q2Q_{2} between ss^{\prime} and ww (again the slight asymmetry). Since V(Q1)Tw=V(Q2)TwV(Q_{1})\cap T_{w}=V(Q_{2})\cap T_{w}, neither Q1Q^{\prime}_{1} nor Q2Q^{\prime}_{2} contains vertices of TT as internal vertices. By assumption, this implies sus^{\prime}\neq u. This, in turn, implies uTu\notin T.

Let PsP_{s} be any path from ss to ss^{\prime}, e.g., a part of Q1Q_{1} and let PtP_{t} be any path from tt^{\prime} to tt, e.g., a part of P1P_{1}. Let R1R_{1} be the ss-tt path formed by the concatenation of PsP_{s}, Q1Q^{\prime}_{1}, P2P^{\prime}_{2}, and PtP_{t}; also let R2R_{2} be formed by the concatenation of PsP_{s}, Q2Q^{\prime}_{2}, P1P^{\prime}_{1}, and PtP_{t}. Note that R1R_{1} goes through uu and R2R_{2} goes through ww, but neither of them contains vv. These paths only differ in the part between ss^{\prime} and tt^{\prime}. Namely, R1R_{1} contains Q1Q^{\prime}_{1} and P2P^{\prime}_{2} while R2R_{2} contains Q2Q^{\prime}_{2} and P1P^{\prime}_{1}. As argued above, neither of P1,P2,Q1,Q2P^{\prime}_{1},P^{\prime}_{2},Q^{\prime}_{1},Q^{\prime}_{2} contains a vertex of TT as an internal vertex. Moreover, neither uu nor ww is in TT. It follows that V(R1)T=V(R2)TV(R_{1})\cap T=V(R_{2})\cap T which contradicts that TT is a solution for (G,s,t,k)(G^{\prime},s,t,k). Therefore, TuT_{u} or TwT_{w} is a solution for (G,s,t,k)(G^{\prime},s,t,k) which finishes the proof. ∎

Lemma 7.

There is a polynomial parameter transformation from Tracking Paths in DAG to Tracking Shortest Paths mapping instances (G,s,t,k)(G,s,t,k) to instances (G,s,t,k)(G^{\prime},s,t,k) such that |V(G)|,|E(G)||E(G)||V(G)||V(G^{\prime})|,|E(G^{\prime})|\leq|E(G)|\cdot|V(G)|.

Proof.

Let (G=(V,E),s,t,k)(G=(V,E),s,t,k) be an instance of Tracking Paths in DAG. We first compute the prospective layer L(v)L(v) for each vertex vv by the following procedure. Start by assigning L(s)=0L(s)=0 for ss (and all other sources if there are any; there are none in our kernels). For all other vertices vv in topological order, assign L(v)=1+max{L(u)uN(v)}L(v)=1+\max\{L(u)\mid u\in N^{-}(v)\}. Note that, as we always only add 11 for each vertex, we have max{L(v)vV}|V|1\max\{L(v)\mid v\in V\}\leq|V|-1.

Next, we create an auxiliary directed graph G′′G^{\prime\prime} from GG as follows. For each edge (u,v)(u,v) with L(u)+1<L(v)L(u)+1<L(v) we subdivide the edge L(v)L(u)1L(v)-L(u)-1 times to obtain a path with L(v)L(u)1L(v)-L(u)-1 internal vertices. In G′′G^{\prime\prime} every directed ss-tt path has length exactly L(t)L(t). Also it follows from Lemma 6 that (G′′,s,t,k)(G^{\prime\prime},s,t,k) is a YES instance of Tracking Paths in DAG if and only if (G,s,t,k)(G,s,t,k) is a YES instance of Tracking Paths in DAG.

Let GG^{\prime} be the underlying undirected graph of G′′G^{\prime\prime}. Every ss-tt path in GG^{\prime} is of length at least L(t)L(t) and all paths of length exactly L(t)L(t) are actually directed paths in G′′G^{\prime\prime}, since the edges of G′′G^{\prime\prime} only connect consecutive layers. Hence, the shortest ss-tt paths in GG^{\prime} are exactly the directed ss-tt paths in G′′G^{\prime\prime}.

Hence, (G,s,t,k)(G^{\prime},s,t,k) is a YES instance of Tracking Shortest Paths if and only if (G,s,t,k)(G,s,t,k) is a YES instance of Tracking Paths in DAG. Observe that for each edge of GG the corresponding path in GG^{\prime} contains at most |V|2|V|-2 new vertices and edges. Since each path can be of length at most V(G)V(G), the number of vertices and edges in GG^{\prime} is at most |E(G)||V(G)||E(G)|\cdot|V(G)|. ∎

Theorem 3.

Tracking Shortest Paths admits a kernel with 𝒪(k4)\mathcal{O}(k^{4}) vertices and edges, where kk is the size of a solution. Tracking Shortest Paths in planar graphs admits a kernel with 𝒪(k2)\mathcal{O}(k^{2}) vertices and edges.

Proof.

Lemma 7 implies that if there exists a kernel of size XX for an instance of Tracking Paths in DAG, then there exists a kernel of size X2X^{2} for the corresponding instance of Tracking Shortest Paths. Theorem 1 gives a kernel for Tracking Paths in DAG with 𝒪(k2)\mathcal{O}(k^{2}) vertices and edges, and Theorem 2 gives a kernel with 𝒪(k)\mathcal{O}(k) vertices and edges in planar graphs. Applying the implied bound to these kernels for Tracking Paths in DAG yields the desired kernels for Tracking Shortest Paths. ∎

Declaration of competing interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgements

This work was supported by the Grant Agency of the Czech Technical University in Prague, grant No. SGS20/208/OHK3/3T/18. The authors acknowledge the support of the OP VVV MEYS funded project CZ.02.1.01/0.0/0.0/16_019/0000765 “Research Center for Informatics”.

References

  • Banik et al. [2020] A. Banik, M. J. Katz, E. Packer, M. Simakov, Tracking paths, Discret. Appl. Math. 282 (2020) 22–34. doi:10.1016/j.dam.2019.11.013.
  • Banik and Choudhary [2018] A. Banik, P. Choudhary, Fixed-parameter tractable algorithms for tracking set problems, in: B. S. Panda, P. P. Goswami (Eds.), Algorithms and Discrete Applied Mathematics - 4th International Conference, CALDAM 2018, volume 10743 of Lecture Notes in Computer Science, Springer, 2018, pp. 93–104. doi:10.1007/978-3-319-74180-2\_8.
  • Banik et al. [2020] A. Banik, P. Choudhary, V. Raman, S. Saurabh, Fixed-parameter tractable algorithms for tracking shortest paths, Theor. Comput. Sci. 846 (2020) 1–13. doi:10.1016/j.tcs.2020.09.006.
  • Choudhary and Raman [2020] P. Choudhary, V. Raman, Improved kernels for tracking path problems, CoRR abs/2001.03161 (2020).
  • Eppstein et al. [2019] D. Eppstein, M. T. Goodrich, J. A. Liu, P. Matias, Tracking paths in planar graphs, in: P. Lu, G. Zhang (Eds.), 30th International Symposium on Algorithms and Computation, ISAAC, volume 149 of LIPIcs, Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2019, pp. 54:1–54:17. doi:10.4230/LIPIcs.ISAAC.2019.54.
  • Diestel [2016] R. Diestel, Graph Theory, 5th Edition, volume 173 of Graduate texts in mathematics, Springer, 2016.
  • Cygan et al. [2015] M. Cygan, F. V. Fomin, L. Kowalik, D. Lokshtanov, D. Marx, M. Pilipczuk, M. Pilipczuk, S. Saurabh, Parameterized Algorithms, 1st ed., Springer, 2015.
  • Banik et al. [2020] A. Banik, P. Choudhary, D. Lokshtanov, V. Raman, S. Saurabh, A polynomial sized kernel for tracking paths problem, Algorithmica 82 (2020) 41–63. doi:10.1007/s00453-019-00602-8.
  • Fomin and Kratsch [2010] F. V. Fomin, D. Kratsch, Exact Exponential Algorithms, Texts in Theoretical Computer Science. An EATCS Series, 1 ed., Springer, Heidelberg, 2010. doi:10.1007/978-3-642-16533-7.