Polynomial Kernels for Tracking Shortest Paths11footnotemark: 1
Abstract
Given an undirected graph , vertices , and an integer , Tracking Shortest Paths requires deciding whether there exists a set of vertices such that for any two distinct shortest paths between and , say and , we have . In this paper, we give the first polynomial size kernel for the problem. Specifically we show the existence of a kernel with vertices and edges in general graphs and a kernel with 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 vertices and edges for Tracking Shortest Paths in general graphs and a kernel with 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 , kernel1 Introduction
Given a graph with a source vertex , a destination vertex , and a budget , the Tracking Shortest Paths problem is defined as follows. Find a set of vertices (tracking set) with at most vertices such that the set of vertices of encountered in each distinct shortest path between and (- path) contains is a unique subset of . The purpose of finding a tracking set is to be able to distinguish between any two shortest - 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 - paths and not just the shortest - 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 vertices and edges for Tracking Paths in DAG and a kernel with vertices and edges for Tracking Paths in DAG in planar graphs. The kernel of size 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 , source , destination , and a budget .
Question: Is there a set of vertices , with , such that for any two distinct shortest - paths and in , ?
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 .
We consider only unweighted graphs. We use to denote a graph with vertex set and edge set . The neighborhood of a vertex comprises the vertices adjacent to and is denoted by . The degree of a vertex is denoted by and is equal to the size of the neighborhood of the vertex . In the case of directed graphs, for a vertex , denotes the set of out-neighbors of , denotes the in-neighbors of , and , . A directed acyclic graph is a directed graph without any directed cycles. For a set of edges we call the vertices heads and 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 that does not participate in any shortest - path, delete it.
Next, we reduce the input instance to an instance of Tracking Paths in DAG by directing the edges away from . Note that edges that have both endpoints in the same distance from do not participate in any shortest - path. Furthermore, any shortest - path becomes a directed - path.
We proceed with applying two more reduction rules which are applicable on directed acyclic graphs.
Reduction Rule 2 (Banik et al. [3]).
If and , then delete and set . If and , then delete and set .
Reduction Rule 3 (Banik et al. [3]).
If there exist , and , and , then delete the vertex and introduce the edge in .
3 Quadratic Kernel for Directed Acyclic Graphs
In this section, we give an algorithm to compute an kernel for Tracking Paths in DAG. Let be an instance of Tracking Paths in DAG reduced with respect to Reduction Rules 1–3.
Let be a tracking set for . For a vertex let be the set of vertices such that there is a directed path from to in . Note that . Let be the set of vertices of such that there is a directed path from to in .
Lemma 1.
If is a tracking set, then for every we have,
.
Proof.
Let be the set of edges with tails in . Then observe that .
Claim 1.
If there are two edges in with the same vertex as the head, then is not tracking.
Proof.
Assume that there are two edges and in . By the definition of there is a directed path from to that does not contain any vertex of and a directed path from to also does not contain any vertex of . Due to application of Reduction Rule 1 each vertex and edge participate in an - path. Therefore, there is a directed path from to and a directed path from to . Let be the - path obtained as a concatenation of , , , and be the - path obtained as a concatenation of , , , . These two paths differ only in the subpaths , and , and no internal vertex of these subpaths is in . Hence, and are two distinct paths that contain the same set of trackers and is not tracking. ∎
Claim 2.
If is the head of an edge of that is not in , then it is in .
Proof.
Suppose that and . According to the definition of , there is a directed path from to that does not contain any vertex of . Let be the path obtained by concatenating with . If , then is a directed path from to that does not contain any vertex of , contradicting . Hence, and prove that . ∎
By the above claims and since is not a head of any edge in , we have and the lemma follows. ∎
Lemma 2.
If is a tracking set, then .
Proof.
We claim that . For a vertex , let be an - path containing . Let be the last vertex of on . Then . Hence,
Inequality (a) comes from Lemma 1 and Inequality (b) comes from the fact that . ∎
Lemma 3.
Proof.
Let be a tracking set of size at most in . Let be the set of vertices with out-degree at least . Note that all other vertices have out-degree at least , except for , which has out-degree . We have
Inequality (a) comes from and adds for vertex , (b) comes from Lemma 2. Therefore, there are at most edges with tails in vertices with out-degree at least . There are at most edges with heads in vertices with out-degree at least and in-degree . By a symmetrical argument, there are at most edges with heads in vertices with in-degree at least and at most edges with tails in vertices with in-degree at least and out-degree .
As the graph is reduced by Reduction Rules 1–3 every edge is incident to a vertex with in-degree at least or out-degree at least . Hence, there are at most edges in total. Each vertex with in-degree and out-degree is incident to an edge with tail in vertex with total degree at least . Therefore, there are at most vertices with in-degree and out-degree and, hence, at most vertices in total. ∎
Thus, in the case of a YES instance, the number of vertices and edges in the graph can be bounded by , where is the desired size of a tracking set. After application of Reduction Rules 1–3 if there are more than vertices or more than 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 vertices and edges, where 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 , of Tracking Paths in DAG and applying Reduction Rules 1–3.
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 in a planar embedding of a reduced planar graph is at most , where 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 , then the graph does not have a tracking set of size . Therefore, we have the following reduction rule.
Reduction Rule 4.
If a planar embedding of a reduced planar graph has more than 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 with degree with incident edges , and , then mark as a tracker and remove it. Set .
Reduction Rule 6.
If there exist two vertices and with degree , adjacent to the same pair of vertices and , i.e., , and , then mark as a tracker and delete it. Set .
In the case of Reduction Rule 5, there exists an - path that contains the vertex , say , and so there also exists another - path with the same vertex set as that of , except that edges are replaced by the edge . Hence, needs to be marked a tracker. In the case of Reduction Rule 6, there is an - path containing vertex , say , and so there is another - path which has the same vertex set as , except that the vertex is replaced by vertex . Hence, either or necessarily needs to be marked as a tracker.
Now we prove the existence of a linear kernel.
Lemma 5.
Proof.
Let be a reduced planar DAG and be the set of faces in some planar drawing of . Note that, since the instance is reduced with respect to Reduction Rule 4, we have . Let be the set of vertices with degree at least and be the set of vertices with degree equal to . Recall that after exhaustive application of Reduction Rules 1–3 there are no vertices with degree in and each vertex with degree has vertices with degree or more as its neighbors.
First we construct an auxiliary graph by short-circuiting all vertices in (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 in is the same as that in , that is, at most . Further, , , and .
We now bound the size of . Due to the Handshaking lemma and the fact that degree of all vertices in is at least , we get
(1) |
Due to Euler’s formula, we have
Hence,
Thus, . The total number of vertices in is . Since , . ∎
Thus, after the application of Reduction Rules 1–6, if there exist more than vertices or 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 vertices and edges.
Once a kernel is computed, a tracking set of size can be found by considering all subsets of vertices of size , 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 vertices in the kernel, we have subsets of size at most . We use [9, Lemma 3.13] which states that
for . By setting and we get the following bound.
Thus, a tracking set can be found in 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 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 be an instance of Tracking Paths in DAG, where does not contain parallel edges. Let be an edge of , and let be obtained from by subdividing the edge , that is, by removing the edge , introducing a new vertex , and adding edges and . Then is a YES instance of Tracking Paths in DAG if and only if is a YES instance of Tracking Paths in DAG.
Proof.
There is a one-to-one correspondence between the directed - paths in and the directed - paths in . Hence, if is a solution for , then it is also a solution for . Similarly, if is a solution for that does not contain , then it is also a solution for . Hence, assume that there is a solution for which contains . Our aim is to show that there is also a solution for which does not contain and hence is also a solution for .
Suppose first that there is a directed - path in which does not contain vertices of as internal vertices. Note that, as , this path does not contain . If is the single edge , then there are parallel edges in that contradict our assumptions. Hence, contains at least one internal vertex. Let be an arbitrary internal vertex of . We claim that is a solution for .

Assume it is not and let and be two different - paths such that , see Figure 1. Since , exactly one of the paths contains . Without loss of generality, assume that and . Note that since the graph does not have directed cycles. Hence, as . Therefore . Now consider the path obtained from by replacing the subpath with . Since does not contain vertices of as internal vertices, we have . It follows that
which contradicts that is a solution for .
Now assume that there is no directed - path in that does not contain vertices of as internal vertices, see Figure 2. Consider the set and the set . We will show that if neither nor is a solution in , then is not a solution in , a contradiction.

If is not a solution, then there are two - paths and such that . Since , exactly one of the paths, say , contains . This implies and, as , also . Let be the first common vertex of the paths and after . Let be the part of the path between and , be the part of the path between and (note the slight asymmetry). Since , neither nor contains vertices of as internal vertices. By assumption, this implies , as otherwise would be a - path. This, in turn, implies .
Now, the same argument could be repeated on a graph with swapped labels and , and , and where direction of all edges is reversed. We present it for completeness. If is not a solution, then there are two - paths and such that . Since , exactly one of the paths, say , contains . This implies and, as , also . Let be the last common vertex of the paths and before . Let be the part of the path between and , be the part of the path between and (again the slight asymmetry). Since , neither nor contains vertices of as internal vertices. By assumption, this implies . This, in turn, implies .
Let be any path from to , e.g., a part of and let be any path from to , e.g., a part of . Let be the - path formed by the concatenation of , , , and ; also let be formed by the concatenation of , , , and . Note that goes through and goes through , but neither of them contains . These paths only differ in the part between and . Namely, contains and while contains and . As argued above, neither of contains a vertex of as an internal vertex. Moreover, neither nor is in . It follows that which contradicts that is a solution for . Therefore, or is a solution for which finishes the proof. ∎
Lemma 7.
There is a polynomial parameter transformation from Tracking Paths in DAG to Tracking Shortest Paths mapping instances to instances such that .
Proof.
Let be an instance of Tracking Paths in DAG. We first compute the prospective layer for each vertex by the following procedure. Start by assigning for (and all other sources if there are any; there are none in our kernels). For all other vertices in topological order, assign . Note that, as we always only add for each vertex, we have .
Next, we create an auxiliary directed graph from as follows. For each edge with we subdivide the edge times to obtain a path with internal vertices. In every directed - path has length exactly . Also it follows from Lemma 6 that is a YES instance of Tracking Paths in DAG if and only if is a YES instance of Tracking Paths in DAG.
Let be the underlying undirected graph of . Every - path in is of length at least and all paths of length exactly are actually directed paths in , since the edges of only connect consecutive layers. Hence, the shortest - paths in are exactly the directed - paths in .
Hence, is a YES instance of Tracking Shortest Paths if and only if is a YES instance of Tracking Paths in DAG. Observe that for each edge of the corresponding path in contains at most new vertices and edges. Since each path can be of length at most , the number of vertices and edges in is at most . ∎
Theorem 3.
Tracking Shortest Paths admits a kernel with vertices and edges, where is the size of a solution. Tracking Shortest Paths in planar graphs admits a kernel with vertices and edges.
Proof.
Lemma 7 implies that if there exists a kernel of size for an instance of Tracking Paths in DAG, then there exists a kernel of size for the corresponding instance of Tracking Shortest Paths. Theorem 1 gives a kernel for Tracking Paths in DAG with vertices and edges, and Theorem 2 gives a kernel with 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.