I took some more time to thought about the will of unifying these behaviors (which is a good idea) and I now believe it is not a good idea to use the same method / term to check if the graph has a hamiltonian cycle or a hamiltonian path. Doing so, we are making methods more complicated and introduce confusion. For instance, the 'backtrack' algorithm is for path only, so why should it be associated to a method for checking if the graph has a hamiltonian cycle ?
The Wikipedia page about Hamiltonian graphs <https://en.wikipedia.org/wiki/Hamiltonian_path> gives the following definitionsr: - A graph that contains a Hamiltonian cycle is called a *Hamiltonian graph*. - A graph that contains a Hamiltonian path is called a *traceable graph. * Furthermore, one can also find in some articles the notion of "semi-hamiltonian graph": A graph is semi-hamiltonian if it contains a hamiltonian path but no hamiltonian cycle. So I suggest to have one specific method per concept. I have changed the status of #23994 to wait for the end of this discussion. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.