|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Hamiltonian sufficiency testing for graphs. More...
#include <tpl_graph.H>Go to the source code of this file.
Classes | |
| class | Aleph::Test_Hamiltonian_Sufficiency< GT, SN, SA > |
| Tests Ore's sufficient condition for Hamiltonian graphs. More... | |
| class | Aleph::Test_Dirac_Condition< GT, SN, SA > |
| Tests Dirac's sufficient condition for Hamiltonian graphs. More... | |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
Hamiltonian sufficiency testing for graphs.
This file provides algorithms to test sufficient conditions for a graph to contain a Hamiltonian cycle. A Hamiltonian cycle visits every vertex exactly once and returns to the starting vertex.
For an undirected simple graph G with n ≥ 3 vertices: If for every pair of non-adjacent vertices u and v, deg(u) + deg(v) ≥ n, then G is Hamiltonian.
| Operation | Time |
|---|---|
| Sufficiency test (undirected) | O(V²) |
| Sufficiency test (directed) | O(V² + E) |
Definition in file hamiltonian.H.