Abstract
Björklund and Husfeldt developed a randomized polynomial time algorithm to solve the shortest two disjoint paths problem. Their algorithm is based on computation of permanents modulo 4 and the isolation lemma. In this paper, we consider the following generalization of the shortest two disjoint paths problem, and develop a similar algebraic algorithm. The shortest perfect \((A+B)\)-path packing problem is: given an undirected graph G and two disjoint node subsets A, B with even cardinalities, find shortest \(|A|/2+|B|/2\) disjoint paths whose ends are both in A or both in B. Besides its NP-hardness, we prove that this problem can be solved in randomized polynomial time if \(|A|+|B|\) is fixed. Our algorithm basically follows the framework of Björklund and Husfeldt but uses a new technique: computation of hafnian modulo \(2^k\) combined with Gallai’s reduction from T-paths to matchings. We also generalize our technique for solving other path packing problems, and discuss its limitation.
Similar content being viewed by others
References
Björklund, A.: Counting perfect matchings as fast as Ryser. Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 914–921. ACM, New York (2012)
Björklund, A., Husfeldt, T.: Shortest two disjoint paths in polynomial time. Proceedings of 41st International Colloquium on Automata, Languages, and Programming, Lecture Notes in Computer Science 8572, pp. 211–222. Springer, Berlin (2014)
Colin de Verdière, É., Schrijver, A.: Shortest vertex-disjoint two-face paths in planar graphs. ACM Trans. Algorithms 7(19), 12 (2011)
Gallai, T.: Maximum-minimum Sätze und verallgemeinerte Faktoren von Graphen. Acta Math. Acad. Sci. Hung. 12, 131–173 (1961)
Hirai, H., Pap, G.: Tree metrics and edge-disjoint S-paths. Math. Program. 147, 81–123 (2014)
Karzanov, A.: Edge-disjoint T-paths of minimum total cost. Technical Report, STAN-CS-92-1465. Department of Computer Science, Stanford University, Stanford (1993). Available at http://alexander-karzanov.net/
Kobayashi, Y., Sommer, C.: On shortest disjoint paths in planar graphs. Discret. Optim. 7, 235–245 (2010)
Kobayashi, Y., Toyooka, S.: Finding a shortest non-zero path in group-labeled graphs. Algorithmica 77, 1128–1142 (2017)
Mulmuley, K., Vazirani, U.V., Vazirani, V.V.: Matching is as easy as matrix inversion. Combinatorica 7, 105–113 (1987)
Robertson, N., Seymour, P.D.: Graph minors. XIII. The disjoint paths problem. J. Comb. Theory Ser. B 63, 65–110 (1995)
Schrijver, A.: Comb. Optim. Polyhedra Effic. Springer-Verlag, Berlin (2003)
Seymour, P.D.: Disjoint paths in graphs. Discret. Math. 29, 293–309 (1980)
Shiloach, Y.: A polynomial solution to the undirected two paths problem. J. ACM 27, 445–456 (1980)
Thomassen, C.: 2-Linked graphs. Eur. J. Comb. 1, 371–378 (1980)
Valiant, L.G.: The complexity of computing the permanent. Theor. Comput. Sci. 8, 189–201 (1979)
Yamaguchi, Y.: Shortest disjoint non-zero A-paths via weighted matroid matching. In: Proceedings of the 27th International Symposium on Algorithms and Computation, pp. 63:1–63:13 (2016)
Acknowledgements
We thank the referees for helpful comments. The work was partially supported by JSPS KAKENHI Grant Numbers 25280004, 26330023, 26280004, 17K00029.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Hirai, H., Namba, H. Shortest \((A+B)\)-Path Packing Via Hafnian. Algorithmica 80, 2478–2491 (2018). https://doi.org/10.1007/s00453-017-0334-0
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-017-0334-0