How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Directed and undirected Hamiltonian path and cycle are NP-complete
Statement
The directed Hamiltonian path, directed Hamiltonian cycle, undirected Hamiltonian path, and undirected Hamiltonian cycle problems are all NP-complete.
Facts & Assumptions
Given: An arbitrary instance of one of the four Hamiltonian problems.
The previous theorem builds, from every -CNF formula , a digraph with a directed Hamiltonian path exactly when is satisfiable and then a digraph with a directed Hamiltonian cycle exactly when is satisfiable, by 3SAT polynomial-time many-one reduces to directed Hamiltonian cycle.
Directed Hamiltonian cycle reduces in polynomial time to undirected Hamiltonian cycle, by Directed Hamiltonian cycle polynomial-time many-one reduces to undirected Hamiltonian cycle.
The language -SAT is NP-complete, by 3-SAT is NP-complete.
A language is NP-complete exactly when it is NP-hard and belongs to , by NP-hard and NP-complete languages.
Each Hamiltonian problem asks whether a proposed ordering of all vertices forms a path or cycle of the appropriate kind, by Directed and undirected Hamiltonian path and cycle decision problems.
Proof
Each of the four problems lies in : a certificate is an ordering of all vertices, and one checks in polynomial time that consecutive vertices are connected by the required edges or arcs, with one additional last-to-first check in the cycle cases.
By [L1], every -CNF formula gives a digraph with distinguished vertices such that is satisfiable exactly when has a directed Hamiltonian path from to , and also a digraph with a directed Hamiltonian cycle exactly when is satisfiable. Since [L3] makes -SAT NP-complete, directed Hamiltonian cycle is NP-hard, and the endpoint-labelled problem is NP-hard as well.
Reduce to the ordinary directed Hamiltonian path problem. Given , add fresh vertices and together with the two arcs and . Any Hamiltonian path in the new digraph must start at and end at , because has indegree and has outdegree . Deleting those two new vertices therefore recovers a directed Hamiltonian path from to in , and conversely any such path extends by adjoining at the front and at the end. Thus ordinary directed Hamiltonian path is NP-hard.
Next define the endpoint-labelled undirected problem First handle the allowed boundary case . If has one vertex, map it to the one-vertex yes-instance with its sole vertex named as both endpoints. If has more than one vertex, no Hamiltonian ordering can both start and end at the same vertex, so map it to the fixed two-isolated-vertex no-instance. Now assume . Build an undirected graph by replacing every vertex by a path , replacing by a single vertex , replacing by a single vertex , and adding an undirected edge for every arc of that is not incoming to and not outgoing from , with the conventions if and if . A directed Hamiltonian path in then becomes the undirected Hamiltonian path in . Conversely, an undirected Hamiltonian path from to must traverse every triple consecutively because the middle vertex has degree , and all external edges join a -vertex to a -vertex. Contracting each triple therefore recovers a directed Hamiltonian path from to in . Hence .
For undirected Hamiltonian cycle, NP-hardness is exactly [L2] composed with the NP-hardness of directed Hamiltonian cycle from step 1.2.
Reduce to the ordinary undirected Hamiltonian path problem. Given , attach two fresh leaves and by the edges and . Any Hamiltonian path in the enlarged graph must have the two leaves as its endpoints, so deleting them recovers a Hamiltonian path from to in ; conversely any -to- Hamiltonian path in extends by the two leaves. Therefore ordinary undirected Hamiltonian path is NP-hard.
Step 1.1 gives membership in , while steps 1.2, 2.1, 2.2, 2.3, and 3.1 give NP-hardness for directed Hamiltonian path, directed Hamiltonian cycle, undirected Hamiltonian path, and undirected Hamiltonian cycle. Hence all four problems are NP-complete by [L4].
Depends on
Used by
Nothing in the library uses this result yet.
Dependency tree · two levels
10 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.
Sources
- MIT 6.045J / 18.400J, Lecture 16: More NP-completeness (standard reference, not scraped)