Abstract
The Path Contraction and Cycle Contraction problems take as input an undirected graph G with n vertices, m edges and an integer k and determine whether one can obtain a path or a cycle, respectively, by performing at most k edge contractions in G. We revisit these NP-complete problems and prove the following results.
-
Path Contraction admits an \(\mathcal {O}^*(2^{k})\)-time algorithm. This improves over the current algorithm known for the problem [Algorithmica 2014].
-
Cycle Contraction admits an \(\mathcal {O}^*((2 + \epsilon _{\ell })^k)\)-time algorithm where \(0 < \epsilon _{\ell } \le 0.5509\) and \(\epsilon _{\ell }\) decreases as length of the resultant cycle \(\ell \) increases.
Central to these results is an algorithm for a general variant of Path Contraction, namely, Path Contraction With Constrained Ends. We also give an \(\mathcal {O}^*(2.5191^n)\)-time algorithm to solve the optimization version of Cycle Contraction.
Next, we turn our attention to restricted graph classes and show the following results.
-
Path Contraction on planar graphs admits a polynomial-time algorithm.
-
Path Contraction on chordal graphs does not admit an \(\mathcal {O}(n^{2-\epsilon } \cdot 2^{o(tw)})\)-time algorithm for any \(\epsilon > 0\), unless the Orthogonal Vectors Conjecture fails. Here, tw is the treewidth of the input graph.
The second result complements the \(\mathcal {O}(nm)\)-time, i.e., \(\mathcal {O}(n^2 \cdot tw)\)-time, algorithm known for the problem [Discret. Appl. Math. 2014].
R. Krithika—Supported by SERB MATRICS grant number MTR/2022/000306.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
\(\mathcal {O}^*(.)\) suppresses polynomial factors.
- 2.
The treewidth of a graph measures how close the graph is to a tree. See [5] for the definitions of tree decomposition and treewidth.
- 3.
In Orthogonal Vectors, given two sets of n d-dimensional boolean vectors X and Y, the objective is to determine if there is a pair of vectors \(x \in X\) and \(y \in Y\) that are orthogonal. The problem can be solved in \(\ensuremath {\mathcal {O}}(n^2 d)\) time and the Orthogonal Vectors Conjecture [16] states that it cannot be solved in \(\ensuremath {\mathcal {O}}(n^{2-\epsilon })\) time for any \(\epsilon > 0\) when \(d=\mathcal {O}(\log n)\).
References
Agrawal, A., Fomin, F.V., Lokshtanov, D., Saurabh, S., Tale, P.: Path contraction faster than 2\( ^{\text{ n }}\). SIAM J. Discret. Math. 34(2), 1302–1325 (2020). https://doi.org/10.1137/19M1259638
Asano, T., Hirata, T.: Edge-contraction problems. J. Comput. Syst. Sci. 26(2), 197–208 (1983). https://doi.org/10.1016/0022-0000(83)90012-0
Belmonte, R., Golovach, P.A., van ’t Hof, P., Paulusma, D.: Parameterized complexity of three edge contraction problems with degree constraints. Acta Informatica 51(7), 473–497 (2014). https://doi.org/10.1007/s00236-014-0204-z
Brouwer, A.E., Veldman, H.J.: Contractibility and NP-completeness. J. Graph Theory 11(1), 71–79 (1987). https://doi.org/10.1002/jgt.3190110111
Cygan, M., et al.: Parameterized Algorithms. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21275-3
Diestel, R.: Graph Theory. Graduate texts in mathematics, vol. 173, 4th edn. Springer, Berlin (2012)
Fomin, F.V., Villanger, Y.: Treewidth computation and extremal combinatorics. Combinatorica 32(3), 289–308 (2012). https://doi.org/10.1007/S00493-012-2536-Z
Hammack, R.H.: Cyclicity of graphs. J. Graph Theory 32(2), 160–170 (1999). https://doi.org/10.1002/(SICI)1097-0118(199910)32:2<160::AID-JGT6>3.0.CO;2-U
Hammack, R.H.: A note on the complexity of computing cyclicity. Ars Comb. 63 (2002)
Heggernes, P., van ’t Hof, P., Lévêque, B., Lokshtanov, D., Paul, C.: Contracting graphs to paths and trees. Algorithmica 68(1), 109–132 (2014). https://doi.org/10.1007/s00453-012-9670-2
Heggernes, P., van ’t Hof, P., Lévêque, B., Paul, C.: Contracting chordal graphs and bipartite graphs to paths and trees. Discret. Appl. Math. 164, 444–449 (2014). https://doi.org/10.1016/j.dam.2013.02.025
van ’t Hof, P., Paulusma, D., Woeginger, G.J.: Partitioning graphs into connected parts. Theor. Comput. Sci. 410(47-49), 4834–4843 (2009). https://doi.org/10.1016/J.TCS.2009.06.028
Li, W., Feng, Q., Chen, J., Hu, S.: Improved kernel results for some fpt problems based on simple observations. Theor. Comput. Sci. 657, 20–27 (2017). https://doi.org/10.1016/j.tcs.2016.06.012, https://www.sciencedirect.com/science/article/pii/S0304397516302481. frontiers of Algorithmics
Saurabh, S., dos Santos Souza, U., Tale, P.: On the parameterized complexity of grid contraction. In: 17th Scandinavian Symposium and Workshops on Algorithm Theory, SWAT. LIPIcs, vol. 162, pp. 1–17 (2020). https://doi.org/10.4230/LIPIcs.SWAT.2020.34
Sheng, B., Sun, Y.: An improved linear kernel for the cycle contraction problem. Inf. Process. Lett. 149, 14–18 (2019). https://doi.org/10.1016/j.ipl.2019.05.003, https://www.sciencedirect.com/science/article/pii/S0020019019300912
Williams, R., Yu, H.: Finding orthogonal vectors in discrete structures. In: Chekuri, C. (ed.) Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2014, Portland, Oregon, USA, 5-7 January 2014, pp. 1867–1877. SIAM (2014). https://doi.org/10.1137/1.9781611973402.135
Acknowledgement
We thank Roohani Sharma for initial discussions.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Ethics declarations
Disclosure of Interests
The authors have no competing interests to declare that are relevant to the content of this article.
Rights and permissions
Copyright information
© 2025 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Krithika, R., Malu, V.K.K., Tale, P. (2025). Revisiting Path Contraction and Cycle Contraction. In: Kráľ, D., Milanič, M. (eds) Graph-Theoretic Concepts in Computer Science. WG 2024. Lecture Notes in Computer Science, vol 14760. Springer, Cham. https://doi.org/10.1007/978-3-031-75409-8_26
Download citation
DOI: https://doi.org/10.1007/978-3-031-75409-8_26
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-75408-1
Online ISBN: 978-3-031-75409-8
eBook Packages: Computer ScienceComputer Science (R0)