Finding Detours is Fixed-Parameter Tractable

Authors Ivona Bezáková, Radu Curticapean, Holger Dell, Fedor V. Fomin

Thumbnail PDF


  • Filesize: 0.56 MB
  • 14 pages

Document Identifiers

Author Details

Ivona Bezáková
Radu Curticapean
Holger Dell
Fedor V. Fomin

Cite AsGet BibTex

Ivona Bezáková, Radu Curticapean, Holger Dell, and Fedor V. Fomin. Finding Detours is Fixed-Parameter Tractable. In 44th International Colloquium on Automata, Languages, and Programming (ICALP 2017). Leibniz International Proceedings in Informatics (LIPIcs), Volume 80, pp. 54:1-54:14, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2017)


We consider the following natural "above guarantee" parameterization of the classical longest path problem: For given vertices s and t of a graph G, and an integer k, the longest detour problem asks for an (s,t)-path in G that is at least k longer than a shortest (s,t)-path. Using insights into structural graph theory, we prove that the longest detour problem is fixed-parameter tractable (FPT) on undirected graphs and actually even admits a single-exponential algorithm, that is, one of running time exp(O(k)) * poly(n). This matches (up to the base of the exponential) the best algorithms for finding a path of length at least k. Furthermore, we study a related problem, exact detour, that asks whether a graph G contains an (s,t)-path that is exactly k longer than a shortest (s,t)-path. For this problem, we obtain a randomized algorithm with running time about 2.746^k * poly(n), and a deterministic algorithm with running time about 6.745^k * poly(n), showing that this problem is FPT as well. Our algorithms for the exact detour problem apply to both undirected and directed graphs.
  • longest path
  • fixed-parameter tractable algorithms
  • above-guarantee parameterization
  • graph minors


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Noga Alon, Gregory Gutin, Eun Jung Kim, Stefan Szeider, and Anders Yeo. Solving MAX-r-SAT above a tight lower bound. Algorithmica, 61(3):638-655, 2011. URL:
  2. Noga Alon, Raphael Yuster, and Uri Zwick. Color-coding. Journal of the ACM, 42(4):844-856, 1995. URL:
  3. Andreas Björklund, Thore Husfeldt, Petteri Kaski, and Mikko Koivisto. Narrow sieves for parameterized paths and packings. Journal of Computer and System Sciences, 87:119-139, 2017. URL:
  4. Hans L. Bodlaender. On linear time minor tests with depth-first search. Journal of Algorithms, 14(1):1-23, 1993. URL:
  5. Hans L. Bodlaender, Marek Cygan, Stefan Kratsch, and Jesper Nederlof. Deterministic single exponential time algorithms for connectivity problems parameterized by treewidth. Information and Computation, 243:86-111, 2015. URL:
  6. Hans L. Bodlaender, Pål Grønås Drange, Markus S. Dregi, Fedor V. Fomin, Daniel Lokshtanov, and Michal Pilipczuk. A c^k n 5-approximation algorithm for treewidth. SIAM Journal on Computing, 45(2):317-378, 2016. URL:
  7. Chandra Chekuri and Julia Chuzhoy. Polynomial bounds for the grid-minor theorem. Journal of the ACM, 63(5):40:1-40:65, 2016. URL:
  8. Jianer Chen, Joachim Kneis, Songjian Lu, Daniel Mölle, Stefan Richter, Peter Rossmanith, Sing-Hoi Sze, and Fenghui Zhang. Randomized divide-and-conquer: Improved path, matching, and packing algorithms. SIAM Journal on Computing, 38(6):2526-2547, 2009. URL:
  9. Jianer Chen, Songjian Lu, Sing-Hoi Sze, and Fenghui Zhang. Improved algorithms for path, matching, and packing problems. In Proceedings of the 17th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 298-307. SIAM, 2007. Google Scholar
  10. Julia Chuzhoy. Improved bounds for the excluded grid theorem. CoRR, abs/1602.02629, 2016. URL:
  11. Robert Crowston, Mark Jones, Gabriele Muciaccia, Geevarghese Philip, Ashutosh Rai, and Saket Saurabh. Polynomial kernels for lambda-extendible properties parameterized above the Poljak-Turzik bound. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS), pages 43-54, 2013. URL:
  12. Marek Cygan, Fedor V. Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. URL:
  13. Reinhard Diestel. Graph theory, volume 173 of Graduate Texts in Mathematics. Springer-Verlag, Berlin, third edition, 2005. Google Scholar
  14. Fedor V. Fomin and Petteri Kaski. Exact exponential algorithms. Communications of the ACM, 56(3):80-88, 2013. URL:
  15. Fedor V. Fomin, Daniel Lokshtanov, and Saket Saurabh. Efficient computation of representative sets with applications in parameterized and exact algorithms. In Proceedings of the 24th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 142-151, 2014. URL:
  16. Gregory Gutin, Eun Jung Kim, Michael Lampis, and Valia Mitsou. Vertex cover problem parameterized above and below tight bounds. Theory of Computing Systems, 48(2):402-410, 2011. URL:
  17. Gregory Gutin, Leo van Iersel, Matthias Mnich, and Anders Yeo. Every ternary permutation constraint satisfaction problem parameterized above average has a kernel with a quadratic number of variables. Journal of Computer and System Sciences, 78(1):151-163, 2012. URL:
  18. John Hopcroft and Robert Tarjan. Algorithm 447: Efficient algorithms for graph manipulation. Communications of the ACM, 16(6):372-378, June 1973. URL:
  19. Falk Hüffner, Sebastian Wernicke, and Thomas Zichner. Algorithm engineering for color-coding with applications to signaling pathway detection. Algorithmica, 52(2):114-132, 2008. URL:
  20. Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-SAT. Journal of Computer and System Sciences, 62(2):367-375, 2001. URL:
  21. Ken-ichi Kawarabayashi and Stephan Kreutzer. The directed grid theorem. In Proceedings of the 47th Annual ACM Symposium on Theory of Computing (STOC), pages 655-664. ACM, 2015. URL:
  22. Joachim Kneis, Daniel Mölle, Stefan Richter, and Peter Rossmanith. Divide-and-color. In Proceedings of the 32nd International Workshop on Graph-Theoretic Concepts in Computer Science (WG), pages 58-67, 2006. URL:
  23. Ioannis Koutis. Faster algebraic algorithms for path and packing problems. In Proceedings of the 35th International Colloquium on Automata, Languages and Programming (ICALP), volume 5125, pages 575-586. Springer, 2008. URL:
  24. Ioannis Koutis and Ryan Williams. Algebraic fingerprints for faster algorithms. Communications of the ACM, 59(1):98-105, 2016. URL:
  25. Alexander Leaf and Paul D. Seymour. Tree-width and planar minors. Journal of Combinatorial Theory, Series B, 111:38-53, 2015. URL:
  26. Meena Mahajan and Venkatesh Raman. Parameterizing above guaranteed values: MaxSat and MaxCut. Journal of Algorithms, 31(2):335-354, 1999. URL:
  27. Meena Mahajan, Venkatesh Raman, and Somnath Sikdar. Parameterizing above or below guaranteed values. Journal of Computer and System Sciences, 75(2):137-153, 2009. URL:
  28. Burkhard Monien. How to find long paths efficiently. In Analysis and design of algorithms for combinatorial problems (Udine, 1982), volume 109 of North-Holland Math. Stud., pages 239-254. North-Holland, Amsterdam, 1985. URL:
  29. Christos H. Papadimitriou and Mihalis Yannakakis. On limited nondeterminism and the complexity of the V-C dimension. Journal of Computer and System Sciences, 53(2):161-170, 1996. URL:
  30. Jean-Florent Raymond and Dimitrios M. Thilikos. Low polynomial exclusion of planar graph patterns. Journal of Graph Theory, 84(1):26-44, 2017. URL:
  31. Neil Robertson and Paul D. Seymour. Graph minors. V. Excluding a planar graph. Journal of Combinatorial Theory, Series B, 41(1):92-114, 1986. URL:
  32. Neil Robertson, Paul D. Seymour, and Robin Thomas. Quickly excluding a planar graph. Journal of Combinatorial Theory, Series B, 62(2):323-348, 1994. URL:
  33. Ryan Williams. Finding paths of length k in O^*(2^k) time. Information Processing Letters, 109(6):315-318, 2009. URL:
  34. Meirav Zehavi. Mixing color coding-related techniques. In Proceedings of the 23rd Annual European Symposium on Algorithms (ESA), volume 9294, pages 1037-1049. Springer, 2015. URL: