    Minimum Eccentricity Shortest Path Problem with Respect to Structural Parameters

The Minimum Eccentricity Shortest Path Problem consists in finding a shortest path with minimum eccentricity in a given undirected graph. The problem is known to be NP-complete and W-hard with respect to the desired eccentricity. We present fpt algorithms for the problem parameterized by the modular width, distance to cluster graph, the combination of distance to disjoint paths with the desired eccentricity, and maximum leaf number.

Authors

11/04/2019

Successive shortest paths in complete graphs with random edge weights

Consider a complete graph K_n with edge weights drawn independently from...
03/04/2021

The Bounded Acceleration Shortest Path problem: complexity and solution algorithms

The purpose of this work is to introduce and characterize the Bounded Ac...
12/07/2012

Developments in the theory of randomized shortest paths with a comparison of graph node distances

There have lately been several suggestions for parametrized distances on...
12/14/2017

Cellular Automata Applications in Shortest Path Problem

Cellular Automata (CAs) are computational models that can capture the es...
08/27/2020

The k-interchange-constrained diameter of a transit network: A connectedness indicator that accounts for travel convenience

We study two variants of the shortest path problem. Given an integer k, ...
11/09/2021

Parameterized complexity of untangling knots

Deciding whether a diagram of a knot can be untangled with a given numbe...
02/18/2019

Geometric secluded paths and planar satisfiability

We consider paths with low "exposure" to a polygonal domain, i.e., paths...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

The Minimum Eccentricity Shortest Path (MESP) problem asks, given an undirected graph and a non-negative 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 . 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 . Furthermore, MESP can be used to obtain the best to date approximation for a minimum distortion embedding of a graph into the line 

which has applications in computer vision

, 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 . This notion is closely tied to the existence of low eccentricity shortest paths .

The problem was first introduced by Dragan and Leitert . They showed that it is NP-hard on general graphs and constructed a slice-wise 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 linear-time algorithm that solves MESP for trees. Additionally, they developed a 2-approximation, a 3-approximation, and an 8-approximation algorithm that runs in time, time, and time, respectively. Birmelé, Montgolfier, and Planche  further improved the 8-approximation to a 3-approximation, which still runs in linear time. Dragan and Leitert  showed that MESP can be solved in linear time for distance-hereditary graphs (generalizing the previous result for trees) and in polynomial time for chordal graphs and dually chordal graphs. Later, they proved  that the problem is NP-hard even for bipartite planar graphs with maximum degree 3, and W-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. . Birmelé et al.  studied a generalization of MESP, where the task is to decompose a graph into subgraphs with bounded shortest-path eccentricity, the hub-laminar decomposition.

Our contribution

We continue the research direction of MESP in structured graphs , 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

In Section 2, we provide necessary notations and formal definitions that will be used throughout the paper. Next, in Section 3, we describe our parameterized algorithms. Finally, in Section 4, we discuss possible future work.

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

 s⌢t=(s1,…,s|s|,t1,…,t|t|).

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 breadth-first search (BFS) starting in all vertices of with their distance set to 0. The distance of the last-discovered 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 NP-hard 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.  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, )

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 modular-width 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  .

Definition 2 (Distance to cluster graph)

For a graph , a modulator to cluster graph is a vertex subset such that is a vertex-disjoint 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 vertex-disjoint 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:

 Di(R)=⎧⎨⎩⊤if i=0∧R=∅siif ∃ (s1∈C1,…,si∈Ci):R⊆Ψ(s1)∪⋯∪Ψ(si)⊥otherwise.

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.

 Di+1(R)={si+1if ∃ K⊆R,si+1∈Ci+1:R⊆K∪Ψ(si+1)∧Di(K)≠⊥⊥otherwise
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 for-loop on line 4 iterates over all sets of candidates and the foreach-loop on line 7 iterates over all candidates in each set. Together, lines 8–10 will be executed times. The foreach-loop 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 for-loop 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. )

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 .

 Chi=⎧⎪ ⎪ ⎪⎨⎪ ⎪ ⎪⎩{(u,u)∈V2∣{{πhi,u},{u,πhi+1}}⊆E}if dG(πhi,πhi+1)=2{(u,v)∈V2∣{{πhi,u},{u,v},{v,πhi+1}}⊆E}if dG(πhi,πhi+1)=3 ∅otherwise

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

 μ(u,v)={(u)if u=v,(u,v)if u≠v.

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

Function

is a good estimate of the distance from

:

1. for every , and

2. for every .

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.

 P′= (πP1,…,πPh1)⌢μ(sh1)⌢(πPh1+1,…,πPh2) … ⌢ μ(shi)⌢(πPhi+1,…,πPhi+1)⌢μ(shi+1) … ⌢ (πPhℓ−1+1,…,πPhℓ)⌢μ(shℓ)⌢(πPhℓ+1,…,πP|LP|)

Then, is a shortest path and .

Proof

Clearly, is a shortest path.

Thanks to the way we chose and from 8 we know that:

1. for every ,

2. 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.

1. For each : create set according to 7 and 1.

2. Solve the CSC instance as described in 9.

3. If the CSC instance has a solution, construct a path as described in 9.

4. Check if and the length of is exactly . If yes, return . If not, try the same after prepending and/or appending all combinations of single vertices and of pairs of vertices to (see 10).

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 depth-first search.

If the highest degree in is at least 3, then the modulator to disjoint paths can be found by a simple branching rule.

1. Select any vertex with

2. 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