Abstract
We study the problem of counting all cycles or self- avoiding walks (SAWs) on triangulated planar graphs. We present a subexponential \(2^{O(\sqrt{n})}\) time algorithm for this counting problem. Among the technical ingredients used in this algorithm are the planar separator theorem and a delicate analysis using pairs of Motzkin paths and Motzkin numbers. We can then adapt this algorithm to uniformly sample SAWs, in subexponential time. Our work is motivated by the problem of gerrymandered districting maps.
Similar content being viewed by others
Notes
The algorithm in [4] is applicable for grid graphs only, and it was explicitly calculated that the number of self avoiding walks connecting two diagonal corners in a \(19 \times 19\) grid graph is 1523344971704879993080742810319229690899454255323294555776029866737355060592877569255844, which is \(> 10^{88}\). Our algorithm for planar graphs is based on a recursive, thus different, approach.
It is known that asymptotically we have \(\left|{\mathcal {L}}_{A} \right|\le O(3^{|E_{A}|})\).
References
Tiernan, J.C.: An efficient search algorithm to find the elementary circuits of a graph. Commun. ACM 13(12), 722–726 (1970)
Tarjan, R.: Enumeration of the elementary circuits of a directed graph. SIAM J. Comput. 2(3), 211–216 (1973)
Johnson, D.B.: Finding all the elementary circuits of a directed graph. SIAM J. Comput. 4(1), 77–84 (1975)
Bousquet-Mélou, M., Guttmann, A.J., Jensen, I.: Self-avoiding walks crossing a square. J. Phys. A Math. Gen. 38(42), 9159 (2005)
Dorn, F., Penninkx, E., Bodlaender, H.L., Fomin, F.V.: Efficient exact algorithms on planar graphs: exploiting sphere cut decompositions. Algorithmica 58(3), 790–810 (2010)
Bodlaender, H.L., Cygan, M., Kratsch, S., Nederlof, J.: Deterministic single exponential time algorithms for connectivity problems parameterized by treewidth. Inf. Comput. 243, 86–111 (2015)
Jerrum, M.R., Valiant, L.G., Vazirani, V.V.: Random generation of combinatorial structures from a uniform distribution. Theoret. Comput. Sci. 43, 169–188 (1986)
Najt, E., Deford, D., Solomon, J.: Complexity and geometry of sampling connected graph partitions.2019. arXiv preprint arXiv:1908.08881
Lipton, R.J., Tarjan, R.E.: A separator theorem for planar graphs. SIAM J. Appl. Math. 36(2), 177–189 (1979)
Miller, G.L.: Finding small simple cycle separators for 2-connected planar graphs. J. Comput. Syst. Sci. 32(3), 265–279 (1986)
Alon, N., Seymour, P., Thomas, R.: Planar separators. SIAM J. Discret. Math. 7(2), 184–193 (1994)
Spielman, D.A., Teng, S.-H.: Disk packings and planar separators. In: Proceedings of the Twelfth Annual Symposium on Computational Geometry, pp. 349–358 (1996)
Har-Peled, S.: A simple proof of the existence of a planar separator.2011. arXiv preprint arXiv:1105.0103
Aigner, M.: Motzkin numbers. Eur. J. Comb. 19(6), 663–675 (1998)
Motzkin, T.: Relations between hypersurface cross ratios, and a combinatorial formula for partitions of a polygon, for permanent preponderance, and for non-associative products. Bull. Am. Math. Soc. 54(4), 352–360 (1948)
Djidjev, H.N., Venkatesan, S.M.: Reduced constants for simple cycle graph separation. Acta Inf. 34(3), 231–243 (1997)
Author information
Authors and Affiliations
Contributions
All authors wrote and reviewed the main manuscript text.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare no competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Support for this research was provided by the Office of VCRGE at UW-Madison with funding from WARF.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Cai, JY., Maran, A. Counting Cycles on Planar Graphs in Subexponential Time. Algorithmica 86, 656–693 (2024). https://doi.org/10.1007/s00453-023-01182-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-023-01182-4