Class HamiltonianPathRubin

  • All Implemented Interfaces:
    HamiltonianPathAlgo

    public class HamiltonianPathRubin
    extends HamiltonianPathAlgoAbstractBasedCycle
    Frank Rubin's algorithm for finding Hamiltonian paths in directed and undirected graphs.

    The algorithm perform a depth-first search on the graph, maintaining a path of edges that is extended by a single edge in each step. The algorithm maintains a set of edges that are required to be in the path, and a set of edges that are not allowed to be in the path.

    Based on 'A Search Procedure for Hamilton Paths and Circuits ' by Frank Rubin, 1974. Some improvements, such as sorting edges extending the current path by their degree, are taken from 'Backtracking (the) Algorithms on the Hamiltonian Cycle Problem' by J. SleegersD. V. D. Berg, 2021.

    Author:
    Barak Ugav