We study two "above guarantee" versions of the classical Longest Path problem on undirected and directed graphs and obtain the following results. In the first variant of Longest Path that we study, called Longest Detour, the task is to decide whether a graph has an (s,t)-path of length at least dist_G(s,t)+k (where dist_G(s,t) denotes the length of a shortest path from s to t). Bez\'akov\'a et al. proved that on undirected graphs the problem is fixed-parameter tractable (FPT) by providing an algorithm of running time 2^{O (k)} n. Further, they left the parameterized complexity of the problem on directed graphs open. Our first main result establishes a connection between Longest Detour on directed graphs and 3-Disjoint Paths on directed graphs. Using these new insights, we design a 2^{O(k)} n^{O(1)} time algorithm for the problem on directed planar graphs. Further, the new approach yields a significantly faster FPT algorithm on undirected graphs. In the second variant of Longest Path, namely Longest Path Above Diameter, the task is to decide whether the graph has a path of length at least diam(G)+k (diam(G) denotes the length of a longest shortest path in a graph G). We obtain dichotomy results about Longest Path Above Diameter on undirected and directed graphs. For (un)directed graphs, Longest Path Above Diameter is NP-complete even for k=1. However, if the input undirected graph is 2-connected, then the problem is FPT. On the other hand, for 2-connected directed graphs, we show that Longest Path Above Diameter is solvable in polynomial time for each k\in{1,\dots, 4} and is NP-complete for every k\geq 5. The parameterized complexity of Longest Path Above Diameter on general directed graphs remains an interesting open problem.
翻译:我们研究古典长程路径问题的两个“ 高保障” 版本, 在非方向和定向的图表中找到以下结果。 在我们研究的“ 长程路径” 的第一个变体中, 任务在于确定一个图形是否具有长度的( s, t) 路径, 至少 dist_ G, t) +k ( dist_ G, t) 表示从 s 到 t 的最短路径的长度 。 Bez\'akov\ a etal. atal. 证明, 在非方向的图表中, 问题是固定的参数( FPT) 直径 。 在运行时间 2 {O (k) n. 上, 直径 直径( FPT) 路径的算法( t) 。 直径 直径 直径( t) 直径( t) 直径( t) 直径( t) 直径( 直径) 直径( 直) 直径( 直径) 直径( 直径) 直径( 直径) 直 直) 直径( 直径 直) 直( 直) 直( 直) 直) 直( 直) 直( 直) 直) 直( 直) 直) 直( 直) 直) 直( 直) 直( 直) 直 直 直) 直( 直) 直) 直) 直) 直径( 直) 直) 直 直径径直 。 。 直 直 直 。 。 直 直( 直( 直( 直) 直) 直( 直( 直) 直) 直( 直) 直) 直) 直( 直) 直) 直( 直) 直) 直( 直) 直) 直) 直) 直( 直) 直( 直) 直) 直) 直( 直) 直) 直 直 直 直 。 直 直 直 直) 直 直 直 直) 。 直 直 。 直