Algorithms to find the number of Hamiltonian paths in a graph

后端 未结 5 1367
轮回少年
轮回少年 2020-12-19 10:05

I\'m trying to solve a slightly modified version of the Hamiltonian Path problem. It is modified in that the start and end points are given to us and instead of determining

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-19 10:42

    According to Wolfram Alpha,

    ... the only known way to determine whether a given general graph has a Hamiltonian path is to undertake an exhaustive search

    I believe you would want to start by finding a single hamiltonian path, and then splitting it into two paths, making the split point one that clearly separates the two paths as much as possible. Then you can find the permutations in the subgraphs (and recurse, of course!)

    I don't know the exact algorithm, but that sort of divide and conquer method is where I would start.

提交回复
热议问题