1 Introduction
The Minimum Eccentricity Shortest Path (MESP) problem asks, given an undirected graph and a nonnegative integer , to find a shortest path with eccentricity at most —a shortest path (no path joining the same endpoints is shorter) whose distance to all other vertices in the graph is at most . The shortest path achieving the minimum may be viewed as the “most accessible”, and as such, may find applications in communication networks, transportation planning, water resource management, and fluid transportation [7]. Some large graphs constructed from reads similarity networks of genomic data appear to have very long shortest paths with all vertices in short distance from them [16]. Furthermore, MESP can be used to obtain the best to date approximation for a minimum distortion embedding of a graph into the line [7]
which has applications in computer vision
[15], computational biology and chemistry [13, 12]. If there is a diameter of the graph (a longest among shortest paths) with eccentricity at most , then the graph is called laminar [16]. This notion is closely tied to the existence of low eccentricity shortest paths [2].The problem was first introduced by Dragan and Leitert [7]. They showed that it is NPhard on general graphs and constructed a slicewise polynomial (XP) algorithm, which finds a shortest path with eccentricity at most in a graph with vertices and edges in time. They also presented a lineartime algorithm that solves MESP for trees. Additionally, they developed a 2approximation, a 3approximation, and an 8approximation algorithm that runs in time, time, and time, respectively. Birmelé, Montgolfier, and Planche [2] further improved the 8approximation to a 3approximation, which still runs in linear time. Dragan and Leitert [8] showed that MESP can be solved in linear time for distancehereditary graphs (generalizing the previous result for trees) and in polynomial time for chordal graphs and dually chordal graphs. Later, they proved [9] that the problem is NPhard even for bipartite planar graphs with maximum degree 3, and W[2]hard with respect to the desired eccentricity for general graphs. Furthermore, they showed that in a graph with a shortest path of eccentricity , a minimum dominating set can be found in time. A related problem of finding shortest isometric cycle was studied by Birmelé et al. [3]. Birmelé et al. [1] studied a generalization of MESP, where the task is to decompose a graph into subgraphs with bounded shortestpath eccentricity, the hublaminar decomposition.
Our contribution
We continue the research direction of MESP in structured graphs [8], focusing on parameters which can measure the amount of structure present in the graph. We provide fpt algorithms for the problem with respect to the modular width, distance to cluster graph, distance to disjoint paths combined with the desired eccentricity, and maximum leaf number (see Figure 1 for an overview of our results).
Outline
2 Preliminaries
We consider finite connected unweighted undirected simple loopless graphs. A graph is a pair of a set of vertices and a set of edges . We denote and .
We denote an ordered sequence of elements . For two sequences we denote their concatenation
A path is a sequence of vertices such that every two consecutive vertices in the sequence are adjacent. The length of a path is the number of edges in it, i.e., . The distance between two vertices is the length of the shortest path between and .
The distance between a vertex and a set of vertices is . The eccentricity of a vertex is defined as . The eccentricity of a set is .
For a path , we denote the set of vertices that are in . However, we simply use instead of if it is clear from the context that we are dealing with a set of vertices, e.g., and .
For vertex we denote the degree of , the open neighborhood of and the closed neighborhood of . We denote the set of vertices at distance at most from . We denote the induced subgraph of on vertices . We denote .
In this paper, we focus on the following problem.
Minimum Eccentricity Shortest Path Problem (MESP)
Input: An undirected graph , desired eccentricity .
Question: Is there a shortest path in such that ?
Given a graph and a path in we can perform a breadthfirst search (BFS) starting in all vertices of with their distance set to 0. The distance of the lastdiscovered vertex determines the eccentricity of . Hence, we have the following observation.
Observation 1
Given a graph and a path in , the value of may be calculated in time.
The idea in parameterized (or fpt) algorithmics is to accept exponential running times, which are seemingly inevitable in solving NPhard problems, but to restrict them to one aspect of the problem, the parameter. Formally, an instance of a parameterized problem is a pair consisting of the input and the parameter . A parameterized problem is fixed parameter tractable (FPT) with respect to a parameter if there is an algorithm solving any instance of with size in time for some computable function . Such an algorithm is called a fpt algorithm. See Cygan et al. [6] for more information on parameterized algorithms.
In this paper, we present fpt algorithms for MESP with respect to the following structural parameters.
Definition 1 (Modular width, [10])
Consider graphs that can be obtained from an algebraic expression that uses the following operations:
 (O1)

create an isolated vertex;
 (O2)

the disjoint union of graphs (the disjoint union of graphs and is the graph );
 (O3)

the complete join of graphs (the complete join of graphs and is the graph );
 (O4)

the substitution operation with respect to some pattern graph (for a graph with vertices and graphs the substitution of the vertices of by the graphs is the graph with vertex set and edge set ).
Let be an algebraic expression that uses only the operations (O1)–(O4). We define the width of as the maximum number of operands used by any occurrence of the operation (O4) in . The modularwidth of a graph , denoted , can be defined as the least integer such that can be obtained from such an algebraic expression of width at most . An algebraic expression of width can be constructed in linear time [14].
Definition 2 (Distance to cluster graph)
For a graph , a modulator to cluster graph is a vertex subset such that is a vertexdisjoint union of cliques. The distance to cluster graph is the size of the smallest modulator to cluster graph.
Definition 3 (Distance to disjoint paths)
For a graph a modulator to disjoint paths is a vertex subset , such that is a vertexdisjoint union of paths. The distance to disjoint paths is the size of the smallest modulator to disjoint paths.
Definition 4 (Maximum leaf number)
The maximum leaf number of a graph G is the maximum number of leaves in a spanning tree of G.
3 Parameterized Algorithms
In this section, we present several fpt algorithms for MESP. In Subsection 3.1, we present an algorithm parameterized by the modular width. In Subsection 3.2 we define the Constrained Set Cover (CSC) problem and present an algorithm to solve it. In Subsection 3.3 we show an fpt algorithm for MESP parameterized by the distance to cluster graph which reduces MESP to CSC. In Subsection 3.4, we present an fpt algorithm parameterized by the distance to disjoint paths and the desired eccentricity, combined. Again, this algorithm depends on the solution of the CSC problem. In Subsection 3.5, we present an algorithm parameterized by the maximum leaf number.
3.1 Modular Width
In this section, we present an fpt algorithm for MESP parameterized by the modular width.
Let be a graph with modular width and be the corresponding algebraic expression describing the graph. We take a look at the last operation applied in . Operation (O1) is trivial and (O2) yields a disconnected graph, therefore we suppose the last operation is either (O3) or (O4).
If the last operation is (O3) and is a path, then the whole path is trivially a shortest path with eccentricity 0. If is not isomorphic to a path, then the minimum eccentricity shortest path is any single edge connecting the two original graphs, and its eccentricity is 1.
If the last operation is (O4), we consider the pattern graph with and the substituted graphs . We suppose that and is not a clique; otherwise could be created using only operations (O1)–(O3). We continue by showing that the structure of the pattern graph restricts the structure of any shortest path in the resulting graph significantly.
Lemma 1
If the last operation in is (O4), then there is a minimum eccentricity shortest path in which contains at most one vertex from each for .
Proof
Let be a shortest path in .
If the length of is at most 2 and contains two vertices from , then we create a path with . Because was created with (O4), we know that , thus . We denote the two vertices from on . If there is another vertex on on and , we let ; otherwise we choose a vertex arbitrarily from some such that and . Then, we let . For every vertex we have and for every vertex we have .
If the length of is at least 3, we show by contradiction that it cannot contain two vertices from . Let . Suppose that . Clearly, at least one of is not an endpoint of (otherwise the length of would be at most 2). Without loss of generality, suppose that is not an endpoint of , thus it has a predecessor and . We have and . Path may be shortened to . Thus, is not a shortest path. ∎
We have shown that there is a minimum eccentricity shortest path which contains at most one vertex from each graph . Now, we show that with respect to eccentricity, all vertices in the same graph are equivalent, and it does not matter which of them we choose. In other words, a minimum eccentricity shortest path in can be found by trying all shortest paths in .
Lemma 2
Let be a shortest path in and . We create a path by substituting in by any . Then, .
Proof
Let such that and . If , then and thus . If , then and because the neighbors of on , as well as the neighbors of on , are also neighbors of . Moreover, . ∎
Based on what we have shown, we can construct an algorithm to solve MESP. We handle separately the graphs created using (O1) or (O3) as the last operation. For (O4), we iterate through all the subsets of and all their permutations (containing all shortest paths in ). For each of them and each we let arbitrarily and let . Then we check whether is a shortest path with eccentricity at most in . By the above arguments, if there is a shortest path of eccentricity at most , we will find one.
As there are possible subsets and possible orders, we arrive at the following theorem.
Theorem 3.1
There is an algorithm that solves MESP in time, where is the modular width of the input graph.
3.2 Constrained Set Cover
In this subsection we define the Constrained Set Cover (CSC) problem and present an algorithm to solve it. In the next subsection it will be used as a subroutine to solve MESP.
Constrained Set Cover
Input: A set of candidates, a set of requirements to be satisfied, and a function that determines for each candidate which requirements it satisfies.
Question: Is there a constrained set cover, that is, a set of candidates, exactly one from each set
such that together they satisfy all the requirements, i.e., ?
To help us solve CSC, we now define a function for each .
Definition 5
Let be an instance of CSC. We define function as follows:
If there are more candidates in the second case, we select an arbitrary one to make a function. As we will see, it does not matter which specific value it has, as long as it satisfies the definition.
Before using this function to solve CSC, we need to know how to calculate its values effectively. Note that if and otherwise.
Lemma 3
Let . Then can be computed recursively as follows.
Proof
We suppose that the initial values of are taken directly from 5 and prove the lemma for any . First, we show that if the recursion yields some value , then it is one of the correct possible values of according to 5. Second, we show that if , then the recursion does not yield either.
If the recursion yields , then there is some such that . From induction, the value of is correct, thus there exist . Hence, , which corresponds to 5 and yields a correct value.
If , then there are some candidates such that . Let . Then, and . Hence the recursion does not yield . ∎
We continue by showing how a solution of CSC may be extracted from the values of . We will use each function to choose the candidate from .
Lemma 4
If , then no solution exists. Otherwise, the solution can be found by iterating through the calculated values backwards and setting: , , …, , …, .
Proof
By the definition of , we only have if no set of candidates exists, such that , i.e., if no solution of the CSC instance exists.
Otherwise, using the definition of , we can set . We know that given an , all the requirements are satisfied by , so the rest of them needs to be satisfied by . Also, by the definition of we know that there exists such that they satisfy the rest of the requirements. Then, by the definition of , we have . ∎
Finally, we propose Algorithm 1 to solve CSC. It is a dynamic programming algorithm that first computes all values for each of using the recursion from 3, and then constructs the solution from them as in 4. The following lemma summarizes the properties of Algorithm 1.
Lemma 5
Constrained Set Cover can be solved in time.
Proof
We show that Algorithm 1 works correctly and runs in time.
On lines 1–3 we set according to 5. On lines 4–10 we compute according to 3. On lines 11–17 we construct the solution from according to 4.
The forloop on line 4 iterates over all sets of candidates and the foreachloop on line 7 iterates over all candidates in each set. Together, lines 8–10 will be executed times. The foreachloop on line 8 iterates over all subsets of and all subsets of the output of , which sums to at most iterations in total. Lines 9–10 can be implemented in time. The forloop on line 12 has iterations, and lines 13–14 can be implemented in time. ∎
3.3 Distance to Cluster Graph
In this section, we present an fpt algorithm for MESP parametrized by the distance to cluster graph. We do not consider the trivial case of a graph with distance to cluster graph 0. A connected graph with distance to cluster graph 0 is a clique, and any single edge in such a graph is the minimum eccentricity shortest path.
Observation 2
Let be a graph with modulator to cluster graph . Then, for any edge in , and have the same neighborhood in .
Lemma 6 (Boral et al. [4])
A modulator to cluster graph of a graph with distance to cluster graph can be found in time.
First, we discuss some properties of graphs in which a shortest path with eccentricity at most exists.
Lemma 7
Let be a graph with modulator to cluster graph and let be a shortest path with . Then, there exists a shortest path such that it contains at least one vertex from and .
Proof
Suppose that only contains vertices from . All these vertices form a clique, so the length of is at most 1. Let . If there is some vertex such that it is a neighbor of exactly one endpoint of , then either or is the sought path. If all vertices in are neighbors of both and , then for any is the sought path. ∎
Definition 6
Let be a graph with a modulator to cluster graph . Let be a shortest path in with that contains at least one vertex from . We denote and the permutation/order of vertices from in which they appear on the path . We denote the set of vertices in partition that are at distance from , for .
Since is a disjoint union of cliques, and for every , all vertices that are between and on are from , we have , as otherwise would not be a shortest path.
Let be a candidate on Intuitively, if we had the correct values of , we would only need to select the (at most two) vertices between each . Also, if there is an edge between some and , then there will be no other vertex between them on .
To help us refer to those pairs between which we still need to choose some vertices we denote the increasing sequence of all indices such that . For every , there is no vertex between and on . For every : If , then there is one vertex on between and , and it is from . If , then there are two vertices on between and , and both are from .
Definition 7
We define the set of candidate vertices between and for each .
For with , the set contains pairs of the same vertices . To avoid adding some vertex into a path twice, we define the function which maps a pair of any two elements to a sequence of length 1 or 2 as follows
To solve MESP, we need to choose exactly one pair from each of . Later, we will show that the problem of choosing these pairs is an instance of CSC.
First, we define a function that will help us prove that the path constructed from the CSC solution will have a small eccentricity.
We define function as .
Lemma 8
Proof
Clearly, .
Let be the nearest vertex to on and be the shortest path from to . If there are any vertices from on , let be the last vertex from on . We know that because is a shortest path and all vertices connected in form a clique. If , then . If , then . If , then . Hence, . If consists only of vertices from , let be the nearest vertex to such that . Clearly, and . ∎
Now we show how to choose optimal vertices from each by solving CSC.
Lemma 9
Suppose that is a shortest path in with , both endpoints of are in , and we have the corresponding values of as described in 6. Let and be a solution of the CSC instance with requirements , sets of candidates , and function . Consider the following path.
Then, is a shortest path and .
Proof
Clearly, is a shortest path.
Thanks to the way we chose and from 8 we know that:

for every ,

for every .
If and , then . Because contains at least one vertex from and all vertices in form a clique, we have . ∎
Clearly, if , then we can use 9 to construct a shortest path with eccentricity at most . Now, we discuss the case when .
Observation 3
If , then for every we have .
Proof
If , then either or , and . For each , let be the nearest vertex to on from . Because all vertices that are connected in form a clique, we get , and hence . ∎
Corollary 1
If , then a path with can be constructed similarly as in 9 but for each candidate set which contains some pair such that there is a neighbor of (and of , they have the same neighborhood in ) with , removing every such that is not a neighbor of (and ) from .
Proof
For any , if any of the removed pairs were selected into , then the distance of to would be and therefore . ∎
We have shown how to construct a shortest path with eccentricity at most by solving the CSC problem, even if . Finally, we observe that such a path can be constructed even if one or both of its endpoints are in .
Lemma 10
If has an endpoint , its neighbor might also be in . Let . We may obtain a path with by removing (and if ) from , finding by solving the CSC, and prepending (and if ) to .
Proof
All vertices in are on , and, thanks to the way we chose , all vertices in are at distance from either , , or one of . Thus, the same argument as in the proof of 9 applies. ∎
MESP can be solved by trying all possible combinations of is a permutation of , . For each combination, the following steps should be performed.
Theorem 3.2
In a graph with distance to cluster graph , MESP can be solved in time.
Proof
There are at most different combinations of . In step 1, there are at most sets and each of these can be constructed in time. In step 2, the CSC instance can be solved by Algorithm 1 in time as and . In step 4, there are at most combinations of vertices to prepend/append, and checking the length of the resulting path and its eccentricity can be implemented in time. ∎
3.4 Distance to Disjoint Paths
In this section, we present an fpt algorithm for MESP parameterized by the distance to disjoint paths and the desired eccentricity, combined.
For completeness, we include the following result which is rather folklore.
Lemma 11
The modulator to disjoint paths of a graph with distance to disjoint paths can be found in time.
Proof
If the highest degree in is at most 2, then consists only of disjoint paths and cycles, and the modulator to disjoint paths is a set of vertices containing one vertex from each cycle. Thus, the modulator to disjoint paths can be found in time by identifying all cycles with a depthfirst search.
If the highest degree in is at least 3, then the modulator to disjoint paths can be found by a simple branching rule.

Select any vertex with

Either or some subset of size must be in .
We show that this algorithm has time complexity for some constant , where is the given maximum distance to disjoint paths. We show that by induction on . For we only have to check whether the graph is a disjoint union of paths, which can be done in time, i.e., time for a suitably chosen .
For we have for some , which, by induction hypothesis is at most . To show that this is at most , it remains to show that , i.e., that for every . For we have , whereas for we have and for we have .
Hence, the time complexity is indeed . ∎
We start by discussing some properties of graphs in which a shortest path with does exist. Assume that is such a path, fixed for the next few lemmas and definitions.
Definition 8
Let be a shortest path in with . Let . Let . We denote the permutation/order of vertices from on the path . We define function for every .
Let , , and be candidates for , , and , respectively. For each consecutive pair of vertices , there may be multiple shortest paths connecting them, such that they do not contain any other vertices from . Exactly one of these shortest paths is contained in for each pair. We say is a candidate segment if it is a sequence of vertices on some shortest path from to excluding the endpoints and . We define as a set of all candidate segments between and . We denote the set of all candidate segments in . We say that a candidate segment is a necessary segment if it must be part of any shortest path such that , , is the order of vertices from on the path , and .
Intuitively, if we had the correct values of , we would only need to select one segment out of each for
Comments
There are no comments yet.