Abstract

We present the first optimal solution to list all the simple cycles in an undirected graph \(G\) with \(n\) vertices and \(m\) edges. Specifically, let \(\fancyscript{C}(G)\) denote the set of all these cycles. For a cycle \(c \in \fancyscript{C}(G)\), let \(|c|\) denote the number of edges in \(c\). Our algorithm requires \(O(m + \sum _{c \in \fancyscript{C}(G)}{|c|})\) time and is asymptotically optimal: \(\varOmega (m)\) time is necessarily required to read \(G\) as input, and \(\varOmega (\sum _{c \in \fancyscript{C}(G)}{|c|})\) time is required to list the output. We also present the first optimal solution to list all the simple paths from \(s\) to \(t\) (shortly, \((s, t)\)-paths) in an undirected graph \(G\). Let \(\fancyscript{P}_{st}(G)\) denote the set of \((s, t)\)-paths in \(G\) and, for an \((s, t)\)-path \(\pi \in \fancyscript{P}_{st}(G)\), let \(|\pi |\) be the number of edges in \(\pi \). Our algorithm lists all the \((s, t)\)-paths in \(G\) optimally in \(O(m + \sum _{\pi \in \fancyscript{P}_{st}(G)}{|\pi |})\) time.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.