Alphabeta Math
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.

✓ 11 results · all verified · 5 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs. The 6 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Classical NP-Completeness Reductions

1 · Prerequisites

2 · Summary

This page records the standard web of classical polynomial-time reductions that propagates NP-completeness outward from 3-SAT. The reductions are organized by gadget families and simple graph or arithmetic transforms: clause-cluster graphs for CLIQUE, complement and set-complement moves for INDEPENDENT SET and VERTEX COVER, Hamiltonian detour gadgets, digit-column encodings for SUBSET SUM and PARTITION, the edge-incidence translation to SET COVER, and the not-all-equal colouring gadget for 3-COLORABILITY.

The emphasis is on exact reduction obligations. Each theorem checks the construction cost, the witness translation, and both directions of the iff condition required by polynomial-time many-one reducibility. The two false statements isolate the common mistakes of proving only one implication and of confusing pseudopolynomial dependence on a numeric target with polynomial dependence on the binary input length.

3 · Logical flowchart

4 · Definitions, theorems and proofs

DefinitionDefinition: AI-adaptedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-09-05Open item page →

Reduction gadgets and interface invariants

Definition

Let source and target languages A,B be equipped with explicit witness relations RA(x,w) and RB(y,z), so that membership means existence of a corresponding witness. Fix a proposed polynomial-time map f between their ambient string spaces in the sense of Polynomial-time many-one reductions.

A reduction gadget is a bounded local piece of f(x) together with a specified way that candidate witnesses may enter, exit, or label its boundary. An interface invariant is the condition imposed on those boundary data so that local choices from neighbouring gadgets are compatible with one global target witness z satisfying RB(f(x),z).

On this page, a gadget proof is regarded as complete only after all of the following have been established.

  1. A total algorithm constructs the target instance from the source instance in polynomial time.
  2. The target size is polynomially bounded in the source size.
  3. Every source witness w with RA(x,w) induces target choices satisfying each gadget's local constraints and the interface invariants.
  4. Every global target witness z with RB(f(x),z) projects back to a source witness because the interface invariants rule out inconsistent local choices.

The gadget language is therefore bookkeeping for the two directions of the iff condition in a many-one reduction, not a substitute for that condition.

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-09-05Open item page →

Clique, independent set, and vertex cover decision problems

Definition

Let G=(V,E) be a finite simple graph.

  • A subset K⊆V is a clique when every two distinct vertices of K are adjacent.
  • A subset I⊆V is an independent set when no two distinct vertices of I are adjacent.
  • A subset C⊆V is a vertex cover when every edge in E has at least one endpoint in C.

The associated decision problems are:

  • CLIQUE: given (G,k) with k∈N, decide whether G has a clique of size at least k;
  • INDEPENDENT SET: given (G,k), decide whether G has an independent set of size at least k;
  • VERTEX COVER: given (G,k), decide whether G has a vertex cover of size at most k.

Because the input graph is simple, adjacency means the edge relation from Adjacency, incidence, open and closed neighbourhoods, vertex degree, minimum degree and maximum degree on the vertex set of A finite simple graph is a finite vertex set together with a set of two-element vertex subsets.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passverified 2026-09-08 (gpt-6-astra)Open item page →

3SAT polynomial-time many-one reduces to CLIQUE

Statement

There is a polynomial-time many-one reduction from 3-SAT to CLIQUE. Explicitly, for every 3-CNF formula φ=C1∧⋯∧Cm one can construct in polynomial time a graph Gφ such that φ∈3-SAT  ⟺  (Gφ,m)∈CLIQUE.

Facts & Assumptions

Given: A 3-CNF formula φ=C1∧⋯∧Cm,Cj=(ℓj1∨ℓj2∨ℓj3).

Here a literal is a Boolean variable or its negation, a clause is the disjunction of its three listed literal occurrences, and the formula is their conjunction. Repeated occurrences are allowed; the empty conjunction is true. The language 3-SAT consists of well-formed encodings of such formulas admitting a satisfying truth assignment; malformed encodings are not members. Variable names and clause lists are explicitly encoded, so syntax and literal comparison can be checked in polynomial time.

[L1]

A polynomial-time many-one reduction is a total polynomial-time function preserving membership in both directions, by Polynomial-time many-one reductions.

[L2]

A gadget reduction is correct only after the construction cost and both directions of the witness translation are proved, by Reduction gadgets and interface invariants.

[F1]

A CLIQUE instance asks for k pairwise adjacent vertices in a finite simple graph, by Clique, independent set, and vertex cover decision problems.

Proof

technique · direct
1.1L1F1construct

On malformed source strings output the empty graph with target size 1, a fixed negative CLIQUE instance. On a well-formed formula perform the construction below, including m=0, when the empty graph has a clique of size 0.

1.2L2F1givenconstruct

Construct a graph Gφ with one vertex vjr for each literal occurrence ℓjr in clause Cj. Join vjr and vj′r′ by an edge exactly when j≠j′ and the literals ℓjr and ℓj′r′ are not complementary. Output the CLIQUE instance (Gφ,m).

2.1step 1.2givenconstruct

Assume that φ is satisfiable, and choose a satisfying assignment. For each clause Cj, pick one literal made true by that assignment and take the corresponding vertex of Gφ. This gives m chosen vertices, one from each clause. Two chosen literals cannot be complementary because one assignment cannot make a variable and its negation both true, so step 1.2 makes every chosen pair adjacent. Therefore the chosen vertices form an m-clique.

2.2F1step 1.2construct

Assume conversely that Gφ has a clique K of size m. By step 1.2, no two vertices from the same clause are adjacent, so K contains exactly one vertex from each clause. Again by step 1.2, the literals represented by those vertices are pairwise noncomplementary. Assign truth values so that every chosen literal is true, and extend arbitrarily to variables not yet assigned. Then each clause contains its chosen true literal, so φ is satisfiable.

3.1L1L2step 1.2step 2.1step 2.2∎

The graph Gφ has 3m vertices and at most 9m2 candidate edges, so the map in step 1.2 is computable in polynomial time. Steps 2.1 and 2.2 prove φ∈3-SAT  ⟺  (Gφ,m)∈CLIQUE. By [L1] and [L2], this is a polynomial-time many-one reduction.

CorollaryStatement: Literature-sourcedProof: AI-generatedprecheck passverified 2026-09-23 (gpt-6-sol)Open item page →

CLIQUE is NP-complete

Statement

CLIQUE is NP-complete.

Facts & Assumptions

Given: An arbitrary CLIQUE instance (G,k).

[L1]

The previous theorem gives a polynomial-time many-one reduction from 3-SAT to CLIQUE, by 3SAT polynomial-time many-one reduces to CLIQUE.

[L2]

The language 3-SAT is NP-complete, by 3-SAT is NP-complete.

[L3]

A language is NP-complete exactly when it is NP-hard and belongs to NP, by NP-hard and NP-complete languages.

[F1]

A yes-instance of CLIQUE consists of a graph with k pairwise adjacent chosen vertices, by Clique, independent set, and vertex cover decision problems.

Proof

technique · direct
1.1F1givenconstruct

First reject malformed instances and any k>∣V(G)∣; such an instance cannot contain a k-clique. Otherwise k≤∣V(G)∣, so a certificate is a list of at most ∣V(G)∣ vertices. Check that exactly k listed vertices are distinct and every pair is adjacent. The certificate length and verification time are polynomial in the graph encoding length, even when k is written in binary. Thus CLIQUE lies in NP.

1.2L1L2L3

Because [L2] says that 3-SAT is NP-complete, every language in NP reduces to 3-SAT. Composing any such reduction with the fixed reduction [L1] shows that every language in NP reduces to CLIQUE. Hence CLIQUE is NP-hard.

2.1L3step 1.1step 1.2∎

Step 1.1 gives CLIQUE ∈NP, and step 1.2 gives NP-hardness. Therefore CLIQUE is NP-complete by [L3].

TheoremStatement: Literature-sourcedProof: AI-generatedverified 2026-09-26 (gpt-6-sol)Open item page →

CLIQUE, INDEPENDENT SET, and VERTEX COVER are polynomially interreducible

Statement

Each of the languages CLIQUE, INDEPENDENT SET, and VERTEX COVER polynomial-time many-one reduces to each of the other two.

Facts & Assumptions

Given: A finite simple graph G=(V,E) and a natural number k.

[L1]

The complement G‾ has the same vertex set as G, and distinct vertices are adjacent in G‾ exactly when they are nonadjacent in G, by Graph isomorphisms, automorphisms and graph complements.

[L2]

A finite vertex set has a cardinality ∣V∣ in N, by The cardinality ∣A∣ of a finite set.

[F1]

CLIQUE, INDEPENDENT SET, and VERTEX COVER are the graph problems defined on G by pairwise adjacency, absence of adjacency, and edge coverage respectively, by Clique, independent set, and vertex cover decision problems.

Proof

technique · direct
1.1L1F1givenconstruct

For any subset S⊆V, [L1] implies that the vertices of S are pairwise adjacent in G if and only if they are pairwise nonadjacent in G‾. Thus S is a clique in G if and only if it is an independent set in G‾. Therefore (G,k)↦(G‾,k) is a polynomial-time many-one reduction from CLIQUE to INDEPENDENT SET, and the same map is also a reduction in the reverse direction.

1.2L2F1given

For any subset I⊆V, the complement V∖I is a vertex cover if and only if I is an independent set. Indeed, if I is independent, every edge has at least one endpoint outside I, so it is covered by V∖I. Conversely, if V∖I is a vertex cover and two vertices of I were adjacent, that edge would have no endpoint in V∖I, a contradiction. Hence, whenever k≤∣V∣, the graph G has an independent set of size at least k if and only if it has a vertex cover of size at most ∣V∣−k.

2.1L2F1step 1.2construct

Use step 1.2 to define total reductions. For INDEPENDENT SET to VERTEX COVER, map (G,k) to (G,∣V∣−k) when k≤∣V∣, and map it to the fixed no-instance (K2,0) when k>∣V∣. For VERTEX COVER to INDEPENDENT SET, map (G,k) to (G,∣V∣−k) when k≤∣V∣, and map it to the fixed yes-instance (K1,1) when k>∣V∣. The exceptional branches are correct because no graph has an independent set larger than its vertex set, while every graph has a vertex cover of size at most ∣V∣. Both maps are clearly polynomial-time.

3.1step 1.1step 2.1construct∎

Encode a finite simple graph by its vertex count and adjacency matrix and encode k in binary. Syntax and symmetry of the matrix can be checked in polynomial time. Extend each map above to malformed input words by outputting a fixed no-instance of its target problem: (K1,2) for CLIQUE or INDEPENDENT SET and (K2,0) for VERTEX COVER. Thus each map is total on encoded words, as required by Polynomial-time many-one reductions. Step 1.1 gives reductions between CLIQUE and INDEPENDENT SET, and step 2.1 gives reductions between INDEPENDENT SET and VERTEX COVER. Composing these total reductions yields reductions in every direction among the three problems.

CorollaryStatement: Literature-sourcedProof: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-09-05Open item page →

INDEPENDENT SET and VERTEX COVER are NP-complete

Statement

INDEPENDENT SET and VERTEX COVER are NP-complete.

Facts & Assumptions

Given: Arbitrary instances (G,k) of INDEPENDENT SET and VERTEX COVER.

[L1]

CLIQUE is NP-complete, by CLIQUE is NP-complete.

[L2]

CLIQUE, INDEPENDENT SET, and VERTEX COVER polynomial-time many-one reduce to one another, by CLIQUE, INDEPENDENT SET, and VERTEX COVER are polynomially interreducible.

[L3]

A language is NP-complete exactly when it is NP-hard and belongs to NP, by NP-hard and NP-complete languages.

[F1]

INDEPENDENT SET asks for k pairwise nonadjacent chosen vertices, and VERTEX COVER asks for at most k vertices meeting every edge, by Clique, independent set, and vertex cover decision problems.

Proof

technique · direct
1.1F1givenconstruct

A certificate for INDEPENDENT SET is a list of k vertices, and one checks in polynomial time that no pair among them is adjacent. A certificate for VERTEX COVER is a list of at most k vertices, and one checks in polynomial time that every edge has an endpoint in that list. Hence both problems lie in NP.

1.2L1L2L3

Since [L1] makes CLIQUE NP-complete, every language in NP reduces to CLIQUE. Applying the reductions from [L2] from CLIQUE to INDEPENDENT SET and from CLIQUE to VERTEX COVER shows that every language in NP reduces to each of those target problems. Therefore both targets are NP-hard.

2.1L3step 1.1step 1.2∎

Combine step 1.1 with step 1.2 and [L3]. Both INDEPENDENT SET and VERTEX COVER are NP-complete.

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-09-05Open item page →

Directed and undirected Hamiltonian path and cycle decision problems

Definition

Let D=(V,A) be a finite directed graph in the sense of Multigraphs, loops and directed graphs as variants distinct from the default finite simple graph. A directed Hamiltonian path in D is an ordering v1,…,vn of all vertices of V such that (vi,vi+1)∈A for each 1≤i<n. A directed Hamiltonian cycle in D is a cyclic ordering v1,…,vn,v1 of all vertices of V such that (vi,vi+1)∈A for 1≤i<n and (vn,v1)∈A.

Let G be a finite simple graph. An undirected Hamiltonian path in G is a path in the sense of Walks, closed walks, trails, paths and cycles, with length equal to the number of traversed edges that visits every vertex exactly once, and an undirected Hamiltonian cycle in G is a cycle there that visits every vertex exactly once.

The four decision problems are:

  • directed Hamiltonian path: given D, decide whether D has a directed Hamiltonian path;
  • directed Hamiltonian cycle: given D, decide whether D has a directed Hamiltonian cycle;
  • undirected Hamiltonian path: given G, decide whether G has an undirected Hamiltonian path;
  • undirected Hamiltonian cycle: given G, decide whether G has an undirected Hamiltonian cycle.
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passverified 2026-09-08 (gpt-6-astra)Open item page →

3SAT polynomial-time many-one reduces to directed Hamiltonian cycle

Statement

There is a polynomial-time many-one reduction from 3-SAT to directed Hamiltonian cycle.

More explicitly, for every 3-CNF formula φ one can construct in polynomial time a directed graph Dφ with distinguished vertices sφ,tφ such that

  1. φ is satisfiable if and only if Dφ has a directed Hamiltonian path from sφ to tφ; and
  2. after adjoining one fresh vertex zφ and the two arcs zφ→sφ and tφ→zφ, the resulting digraph Dφ′ has a directed Hamiltonian cycle if and only if φ is satisfiable.

Facts & Assumptions

Given: A 3-CNF formula φ=C1∧⋯∧Cm.

Each clause is a disjunction of exactly three literal occurrences, where a literal is a Boolean variable or its negation; repeated occurrences are allowed. The formula is satisfiable when a truth assignment makes every clause true. The empty conjunction is true. The language 3-SAT consists of the well-formed satisfiable encodings under explicit variable-name and clause-list coding; malformed strings are excluded.

[L1]

A polynomial-time many-one reduction is a total polynomial-time function preserving membership in both directions, by Polynomial-time many-one reductions.

[L2]

A gadget reduction must prove the construction bound and both directions of the witness translation, by Reduction gadgets and interface invariants.

[F1]

Directed Hamiltonian paths and cycles are the decision problems from Directed and undirected Hamiltonian path and cycle decision problems.

Proof

technique · direct
1.1L2F1givencasesconstruct

If m=0, then φ is the empty conjunction and is satisfiable. Let Dφ be the one-vertex digraph and name its unique vertex both sφ and tφ; it has the required one-vertex Hamiltonian path. Adjoining zφ and the two opposite arcs between zφ and sφ=tφ gives a directed Hamiltonian cycle. This is the required constant-size output in the empty case. Assume henceforth that m≥1, so at least one variable occurs. Enumerate the variables of φ as x1,…,xn and the clauses as C1,…,Cm. For each variable xi, create vertices pi, qi, si,0,…,si,m, ℓi,1,ri,1,…,ℓi,m,ri,m. The crossbar of the gadget Xi is the bidirected path si,0↔ℓi,1↔ri,1↔si,1↔⋯↔si,m−1↔ℓi,m↔ri,m↔si,m, and we also add the four boundary arcs pi→si,0,pi→si,m,si,0→qi,si,m→qi. Thus every Hamiltonian path from pi to qi inside Xi must enter the crossbar at one end, traverse every crossbar vertex exactly once, and exit from the opposite end; equivalently it is either the left-to-right route through all clause pairs or the right-to-left route through all clause pairs. Identify qi with pi+1 for 1≤i<n, and write sφ:=p1, tφ:=qn. For each clause Cj, add one clause vertex cj. If the literal xi occurs in Cj, add the two arcs ℓi,j→cj,cj→ri,j; if the literal ¬xi occurs in Cj, add ri,j→cj,cj→ℓi,j. If both literals occur, add both pairs of arcs. This completely specifies the digraph Dφ, which has O(nm) vertices and arcs and is computable in polynomial time.

2.1L2step 1.1construct

Suppose that φ is satisfiable. In each gadget Xi, choose the left-to-right crossbar route if xi=true and the right-to-left route if xi=false. Concatenating these routes through the identified vertices qi=pi+1 already yields a directed path from sφ to tφ visiting every gadget vertex exactly once. Now fix a clause Cj, and choose one literal of Cj that is true under the satisfying assignment. If it is a positive occurrence of xi, replace the local edge ℓi,j→ri,j on the left-to-right route by the detour ℓi,j→cj→ri,j. If it is a negative occurrence of xi, replace the local edge ri,j→ℓi,j on the right-to-left route by ri,j→cj→ℓi,j. Doing this once for each clause visits every clause vertex exactly once and does not revisit any gadget vertex, because each detour leaves and re-enters the same clause pair. Hence Dφ has a directed Hamiltonian path from sφ to tφ.

2.2L2F1step 1.1cases

Suppose conversely that Dφ has a directed Hamiltonian path from sφ to tφ. Consider the first departure from traversal of successive crossbars in one direction, with optional same-pair clause detours. Until such a departure, the preceding crossbar vertices have been visited and the succeeding ones have not. One possible departure would exit directly to qi from the same end that was just entered from pi. This leaves the opposite end unvisited; its only later possible entry is from its crossbar neighbor, after which its exits to that neighbor and to the already visited qi are blocked. This is impossible. Every other possible departure is an arc to a clause vertex cj: all other available unvisited successors continue the crossbar or its prescribed gadget connector. If the departure is from the first endpoint of its pair and does not return to the second endpoint, that second endpoint remains unvisited. Its only neighbors are its visited mate, the clause vertex just visited, and its next crossbar neighbor. It can later be entered only from the last of these, after which every exit goes to a visited vertex, although it is not tφ. If instead the departure is from the second endpoint after its mate has already been visited, its next crossbar separator remains unvisited. An interior separator has only its two crossbar neighbors; entering it later from the other neighbor again leaves no unvisited exit. For a separator at the far end, its only possible incoming arcs are from the departed endpoint and pi, both already visited with their successors fixed, so it cannot be entered later at all. These arguments are unchanged on reversing left and right and also cover clauses containing both signs of a variable. Consequently no first departure exists. Thus every clause visit is a same-pair detour, the gadgets are traversed in order, and each entire crossbar is traversed monotonically. Set xi=true exactly for a left-to-right traversal. The detour through every clause vertex has the orientation of a literal made true by this assignment, so every clause is satisfied.

3.1F1step 2.1step 2.2construct

Now add one fresh vertex zφ and the two arcs zφ→sφ and tφ→zφ. If Dφ has a Hamiltonian path from sφ to tφ, then adjoining zφ closes that path to a directed Hamiltonian cycle in Dφ′. Conversely, any directed Hamiltonian cycle in Dφ′ must pass through the fresh vertex zφ, whose only outgoing arc is to sφ and whose only incoming arc is from tφ. Deleting zφ from the cycle therefore yields a directed Hamiltonian path from sφ to tφ in Dφ.

4.1L1L2step 1.1step 2.1step 2.2step 3.1cases-exhaustive∎

Step 1.1 handles the empty formula and gives a polynomial-time construction for every well-formed 3-CNF formula. For m≥1, steps 2.1 and 2.2 prove the iff for directed Hamiltonian path, and step 3.1 converts that iff to directed Hamiltonian cycle. Extend the map to every input string by checking 3-CNF syntax in polynomial time and sending any malformed string to the fixed one-vertex loopless digraph, which has no directed Hamiltonian cycle. By [L1] and [L2], the resulting total function is a polynomial-time many-one reduction from 3-SAT to directed Hamiltonian cycle.

TheoremStatement: Literature-sourcedProof: AI-generatedverified 2026-09-26 (gpt-6-sol)Open item page →

Directed Hamiltonian cycle polynomial-time many-one reduces to undirected Hamiltonian cycle

Statement

Directed Hamiltonian cycle polynomial-time many-one reduces to undirected Hamiltonian cycle.

Facts & Assumptions

Given: A finite directed graph D=(V,A).

[L1]

A polynomial-time many-one reduction is a total polynomial-time function preserving membership in both directions, by Polynomial-time many-one reductions.

[F1]

Directed Hamiltonian cycles and undirected Hamiltonian cycles are the problems defined in Directed and undirected Hamiltonian path and cycle decision problems.

[F2]

A directed graph has a finite vertex set and an arc set A⊆V×V, by Multigraphs, loops and directed graphs as variants distinct from the default finite simple graph.

Proof

technique · direct
1.1F1F2givenconstruct

Use adjacency-matrix encodings of finite directed and undirected graphs. Matrix dimensions and entries are checked in polynomial time; a malformed source word denotes no instance and is sent to the fixed undirected no-instance consisting of one isolated vertex. If a valid D has ∣V∣≤1, decide directly whether it has a directed Hamiltonian cycle and map it to the triangle as a fixed yes-instance or to that no-instance accordingly. Thus it is enough to treat the case ∣V∣≥2. Delete every loop, since a Hamiltonian cycle through at least two distinct vertices cannot use a loop. For each vertex v∈V, create three undirected vertices v1,v2,v3 and the two edges v1v2 and v2v3. For each arc (u,v)∈A with u≠v, add the undirected edge u3v1. Call the resulting graph GD.

2.1step 1.1F1

In any Hamiltonian cycle of GD, the middle vertex v2 has degree two, so the cycle must traverse the gadget for v as the consecutive path v1,v2,v3 or as the consecutive path v3,v2,v1. Moreover, every external gadget edge joins a 3-vertex to a 1-vertex. Hence, after orienting the cycle, once one gadget is traversed in one of those two directions, every subsequent gadget is forced to be traversed in the same direction around the cycle.

2.2step 1.1construct

If D has a directed Hamiltonian cycle v(1)→v(2)→⋯→v(n)→v(1), then v1(1),v2(1),v3(1),v1(2),v2(2),v3(2),…,v1(n),v2(n),v3(n),v1(1) is a Hamiltonian cycle in GD, because each directed arc v(i)→v(i+1) supplies the edge v3(i)v1(i+1).

3.1F1step 1.1step 2.1

Conversely, let C be a Hamiltonian cycle in GD. By step 2.1 and, if necessary, reversing the orientation of C, we may assume that every gadget is traversed as v1,v2,v3. Whenever C moves from the gadget of u to the gadget of v, it uses an edge u3v1, and such an edge exists only when (u,v)∈A. Replacing each gadget path v1,v2,v3 by the single vertex v therefore projects C to a directed Hamiltonian cycle of D.

4.1L1step 1.1step 2.2step 3.1∎

The map D↦GD uses 3∣V∣ vertices and at most ∣A∣+2∣V∣ edges, so it is polynomial-time. Steps 2.2 and 3.1 prove D has a directed Hamiltonian cycle if and only if GD has an undirected Hamiltonian cycle. By [L1], this is a polynomial-time many-one reduction.

CorollaryStatement: Literature-sourcedProof: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-09-05Open item page →

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.

[L1]

The previous theorem builds, from every 3-CNF formula φ, a digraph Dφ with a directed Hamiltonian path exactly when φ is satisfiable and then a digraph Dφ′ with a directed Hamiltonian cycle exactly when φ is satisfiable, by 3SAT polynomial-time many-one reduces to directed Hamiltonian cycle.

[L2]

Directed Hamiltonian cycle reduces in polynomial time to undirected Hamiltonian cycle, by Directed Hamiltonian cycle polynomial-time many-one reduces to undirected Hamiltonian cycle.

[L3]

The language 3-SAT is NP-complete, by 3-SAT is NP-complete.

[L4]

A language is NP-complete exactly when it is NP-hard and belongs to NP, by NP-hard and NP-complete languages.

[F1]

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

technique · direct
1.1F1givenconstruct

Each of the four problems lies in NP: 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.

1.2L1L3L4

By [L1], every 3-CNF formula φ gives a digraph Dφ with distinguished vertices sφ,tφ such that φ is satisfiable exactly when Dφ has a directed Hamiltonian path from sφ to tφ, and also a digraph Dφ′ with a directed Hamiltonian cycle exactly when φ is satisfiable. Since [L3] makes 3-SAT NP-complete, directed Hamiltonian cycle is NP-hard, and the endpoint-labelled problem DHAMPATH∗:={(D,s,t):D has a directed Hamiltonian path from s to t} is NP-hard as well.

2.1F1step 1.2construct

Reduce DHAMPATH∗ to the ordinary directed Hamiltonian path problem. Given (D,s,t), add fresh vertices s− and t+ together with the two arcs s−→s and t→t+. Any Hamiltonian path in the new digraph must start at s− and end at t+, because s− has indegree 0 and t+ has outdegree 0. Deleting those two new vertices therefore recovers a directed Hamiltonian path from s to t in D, and conversely any such path extends by adjoining s− at the front and t+ at the end. Thus ordinary directed Hamiltonian path is NP-hard.

2.2F1step 1.2casesconstruct

Next define the endpoint-labelled undirected problem UHAMPATH∗:={(G,s,t):G has an undirected Hamiltonian path from s to t}. First handle the allowed boundary case s=t. If D has one vertex, map it to the one-vertex yes-instance with its sole vertex named as both endpoints. If D 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 s≠t. Build an undirected graph G′ by replacing every vertex v∉{s,t} by a path v1−v2−v3, replacing s by a single vertex s3, replacing t by a single vertex t1, and adding an undirected edge u3−v1 for every arc u→v of D that is not incoming to s and not outgoing from t, with the conventions u3=s3 if u=s and v1=t1 if v=t. A directed Hamiltonian path s=v(1)→v(2)→⋯→v(r)=t in D then becomes the undirected Hamiltonian path s3,v1(2),v2(2),v3(2),…,v1(r−1),v2(r−1),v3(r−1),t1 in G′. Conversely, an undirected Hamiltonian path from s3 to t1 must traverse every triple v1−v2−v3 consecutively because the middle vertex v2 has degree 2, and all external edges join a 3-vertex to a 1-vertex. Contracting each triple therefore recovers a directed Hamiltonian path from s to t in D. Hence DHAMPATH∗≤pUHAMPATH∗.

2.3L2step 1.2algebra

For undirected Hamiltonian cycle, NP-hardness is exactly [L2] composed with the NP-hardness of directed Hamiltonian cycle from step 1.2.

3.1F1step 2.2construct

Reduce UHAMPATH∗ to the ordinary undirected Hamiltonian path problem. Given (G,s,t), attach two fresh leaves s− and t+ by the edges s−s and tt+. Any Hamiltonian path in the enlarged graph must have the two leaves as its endpoints, so deleting them recovers a Hamiltonian path from s to t in G; conversely any s-to-t Hamiltonian path in G extends by the two leaves. Therefore ordinary undirected Hamiltonian path is NP-hard.

4.1L4step 1.1step 1.2step 2.1step 2.2step 2.3step 3.1∎

Step 1.1 gives membership in NP, 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].

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-09-05Open item page →

Subset sum and partition decision problems

Definition

An instance of SUBSET SUM is a finite list of positive integers a1,…,an written in binary together with a target integer d>0, also written in binary. It is a yes-instance when some subset of the listed integers sums exactly to d.

An instance of PARTITION is a finite list of positive integers q1,…,qr written in binary. It is a yes-instance when the list can be divided into two subcollections having the same total sum.

TheoremStatement: Literature-sourcedProof: AI-generatedprecheck passaudited 2026-09-05Open item page →

3SAT polynomial-time many-one reduces to subset sum

Statement

There is a polynomial-time many-one reduction from 3-SAT to SUBSET SUM.

Facts & Assumptions

Given: An arbitrary INDEPENDENT SET instance (G,k), where V(G)={v1,…,vn},E(G)={e1,…,em}.

[L1]

There is a polynomial-time many-one reduction from 3-SAT to CLIQUE, by 3SAT polynomial-time many-one reduces to CLIQUE.

[L2]

CLIQUE, INDEPENDENT SET, and VERTEX COVER polynomial-time many-one reduce to one another, by CLIQUE, INDEPENDENT SET, and VERTEX COVER are polynomially interreducible.

[F1]

INDEPENDENT SET asks for k pairwise nonadjacent vertices, and SUBSET SUM asks for a subcollection of positive integers whose sum is a prescribed target, by Clique, independent set, and vertex cover decision problems and Subset sum and partition decision problems.

Proof

technique · direct
1.1L1L2F1givencases

By [L1] and [L2], it is enough to reduce INDEPENDENT SET to SUBSET SUM. If k=0, map (G,k) to the fixed yes-instance consisting of the list (1) with target 1, because every graph has an independent set of size 0. If k>n, map (G,k) to the fixed no-instance consisting of the list (1) with target 2, because no graph on n vertices has an independent set of size greater than n. So assume from now on that 1≤k≤n. Set the base to B:=n+2.

2.1F1step 1.1givenconstruct

For each vertex vi, form a base-B integer ai with m+1 digits: the leading digit is 1, and the digit in edge-column j is 1 exactly when ej is incident to vi. For each edge ej, form one slack integer bj whose only nonzero digit is a 1 in edge-column j. Let the target integer T have leading digit k and digit 1 in every edge-column. Since the leading-column sum is at most n<B and every edge-column sum is at most 3<B, no carries can occur in any valid sum.

3.1F1step 2.1construct

If I⊆V(G) is an independent set of size k, choose the vertex numbers ai with vi∈I. For each edge ej that has no endpoint in I, also choose the slack number bj. Then the leading digit sums to k, and each edge-column sums to 1: an edge with one endpoint in I receives its 1 from the corresponding vertex number, while an edge with no endpoint in I receives its 1 from its slack number. Hence the chosen integers sum to T.

3.2F1step 2.1

Conversely, suppose that some subcollection of the constructed integers sums to T. Because the slack numbers have leading digit 0, exactly k vertex numbers ai must be chosen. Consider any edge ej={u,v}. The target has digit 1 in column j, and there are no carries by step 2.1. Hence both endpoint numbers for u and v cannot both be chosen, because that would contribute at least 2 in column j. Therefore the chosen k vertices are pairwise nonadjacent, so they form an independent set.

4.1L1L2step 1.1step 2.1step 3.1step 3.2∎

The map in step 2.1 uses n+m integers with m+1 base-B digits, so its binary output size and construction time are polynomial in the size of (G,k). Steps 3.1 and 3.2 prove a polynomial-time many-one reduction from INDEPENDENT SET to SUBSET SUM. Composing that reduction with [L1] and [L2] yields a polynomial-time many-one reduction from 3-SAT to SUBSET SUM.

TheoremStatement: Literature-sourcedProof: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-09-05Open item page →

Subset sum polynomial-time many-one reduces to partition

Statement

SUBSET SUM polynomial-time many-one reduces to PARTITION.

Facts & Assumptions

Given: A SUBSET SUM instance (a1,…,an;k) and the total A:=a1+⋯+an.

[L1]

A polynomial-time many-one reduction is a total polynomial-time function preserving membership in both directions, by Polynomial-time many-one reductions.

[F1]

SUBSET SUM asks for a subcollection summing to k, and PARTITION asks for a split into two subcollections of equal total sum, by Subset sum and partition decision problems.

Proof

technique · direct
1.1F1givenconstruct

If k>A, map the instance to the one-element list (1) for PARTITION. This is a correct no-instance because no subcollection of a1,…,an can exceed the total A, and the list (1) cannot be partitioned into two equal sums. Thus it remains to treat the case k≤A. Define b:=2A−k and c:=A+k, and output the PARTITION instance with list (a1,…,an,b,c).

2.1step 1.1algebra

The new total sum is A+b+c=A+(2A−k)+(A+k)=4A, so any equal partition must split the numbers into two subcollections each summing to 2A.

3.1step 1.1step 2.1construct

If the SUBSET SUM instance is positive, choose I⊆{1,…,n} with ∑i∈Iai=k. Then ∑i∈Iai+b=k+(2A−k)=2A. The complementary numbers among a1,…,an therefore sum to A−k, and (A−k)+c=(A−k)+(A+k)=2A. So the augmented list is a yes-instance of PARTITION.

3.2step 1.1step 2.1algebra

Conversely, suppose the augmented list has a partition into two subcollections each summing to 2A. The numbers b and c cannot lie on the same side because b+c=3A>2A, and they cannot both be absent from one side because then that side would use only the original ai and so would sum at most A<2A. Hence exactly one of b,c lies on each side. The side containing b must then contain original numbers summing to 2A−b=2A−(2A−k)=k. Those numbers witness a yes-instance of SUBSET SUM.

4.1L1step 1.1step 3.1step 3.2∎

The construction adds only two binary integers computed from A and k, so it is polynomial-time. Steps 3.1 and 3.2 establish the required iff, and [L1] therefore gives a polynomial-time many-one reduction from SUBSET SUM to PARTITION.

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-09-05Open item page →

The set cover decision problem

Definition

An instance of SET COVER consists of a finite set U={u1,…,um}, a family of subsets S={S1,…,Sn}⊆P(U), and a natural number k. It is a yes-instance when there exist indices i1,…,it with t≤k such that Si1∪⋯∪Sit=U.

TheoremStatement: Literature-sourcedProof: AI-generatedprecheck passaudited 2026-09-05Open item page →

Vertex cover polynomial-time many-one reduces to set cover

Statement

VERTEX COVER polynomial-time many-one reduces to SET COVER.

Facts & Assumptions

Given: A VERTEX COVER instance (G,k), where G=(V,E).

[L1]

A polynomial-time many-one reduction is a total polynomial-time function preserving membership in both directions, by Polynomial-time many-one reductions.

[F1]

A vertex cover is a subset of vertices meeting every edge, by Clique, independent set, and vertex cover decision problems.

[F2]

A set cover chooses at most k members of a family of subsets whose union is the whole universe, by The set cover decision problem.

Proof

technique · direct
1.1F1F2givenconstruct

Let the SET COVER universe be the edge set U:=E. For each vertex v∈V, define the subset Sv:={ e∈E:v∈e }. Output the SET COVER instance (U,{Sv:v∈V},k). This is computable in polynomial time by scanning the incidence relation of G.

2.1F1F2step 1.1

If C⊆V is a vertex cover with ∣C∣≤k, then every edge of G has an endpoint in C. Equivalently, every element of U=E lies in one of the sets Sv with v∈C. Hence {Sv:v∈C} is a set cover of size at most k.

2.2F1F2step 1.1

Conversely, if {Sv:v∈C} is a set cover of size at most k, then every edge e∈E belongs to some Sv with v∈C. By definition of Sv, that means v is an endpoint of e. Therefore C is a vertex cover of size at most k.

3.1L1step 1.1step 2.1step 2.2∎

Steps 2.1 and 2.2 prove (G,k)∈VERTEX COVER  ⟺  (U,{Sv}v∈V,k)∈SET COVER. By [L1], the construction in step 1.1 is a polynomial-time many-one reduction.

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-09-05Open item page →

The three-colourability decision problem

Definition

Let G=(V,E) be a finite simple graph. A proper three-colouring of G is a map κ:V→{0,1,2} such that κ(u)≠κ(v)whenever{u,v}∈E.

The decision problem 3-COLORABILITY asks, given G, whether such a proper three-colouring exists.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passverified 2026-09-08 (gpt-6-astra)Open item page →

3SAT polynomial-time many-one reduces to 3-COLORABILITY

Statement

There is a polynomial-time many-one reduction from 3-SAT to 3-COLORABILITY.

Facts & Assumptions

Given: A 3-CNF formula φ=⋀j=1m(ℓj1∨ℓj2∨ℓj3).

Here a literal is a Boolean variable or its negation, and each clause is a disjunction of exactly three literal occurrences, with repetitions permitted. The formula is satisfied when every clause has a true literal; the empty conjunction is true. Use explicit variable-name and clause-list encodings, rejecting malformed strings. The predicate NAE means that its listed Boolean values are not all equal.

[L1]

A polynomial-time many-one reduction is a total polynomial-time function preserving membership in both directions, by Polynomial-time many-one reductions.

[L2]

A gadget reduction must prove the construction cost and both directions of correctness, by Reduction gadgets and interface invariants.

[F1]

A graph is a yes-instance of 3-COLORABILITY exactly when it admits a proper colouring with colours 0,1,2, by The three-colourability decision problem.

Proof

technique · direct
1.1L2givenconstruct

First reduce φ to a not-all-equal 3-CNF formula. Introduce one global fresh variable z and, for each clause Cj=(ℓj1∨ℓj2∨ℓj3), one fresh variable sj. Replace Cj by the two NAE clauses Nj,1=NAE(ℓj1,ℓj2,sj) and Nj,2=NAE(¬sj,ℓj3,z). Call the conjunction of all these clauses ψ. This is polynomial-time and doubles the number of clauses.

2.1L2step 1.1construct

The formula φ is satisfiable if and only if ψ is NAE-satisfiable. If φ is satisfiable, set z=0 and keep the satisfying values of the original variables. Then every original clause has at least one true literal, so the four-tuple (ℓj1,ℓj2,ℓj3,z) is not all equal; choose sj so that the pair of NAE clauses in step 1.1 holds, which is possible exactly because NAE(a,b,c,d)  ⟺  ∃s(NAE(a,b,s)∧NAE(¬s,c,d)). Indeed, if a=b=v, the first clause forces s=1−v, and the second then holds exactly unless c=d=v. If a≠b, the first clause allows either s; if c=d=w, take s=w, and if c≠d, take either value. These cases prove both directions of the identity. Conversely, if ψ is NAE-satisfiable and z=0, then each original clause has at least one true literal and φ is satisfiable. If instead z=1, complement every Boolean value. NAE truth is invariant under global complementation, so the complemented assignment still satisfies ψ and now has z=0. Thus φ is satisfiable in all cases.

2.2L2F1step 1.1construct

From ψ, build a graph Gψ as follows. Add one distinguished vertex ν. For each variable u appearing in ψ, add the triangle on the three vertices u,¬u,ν. For each NAE clause with ordered literal occurrences (a,b,c), add a clause triangle with three position-distinguished vertices (j,1),(j,2),(j,3), and join them respectively to the variable-triangle vertices labeled a,b,c. The position labels remain distinct even when a literal is repeated. This is polynomial-time and creates O(∣ψ∣) vertices and edges.

3.1F1step 2.1step 2.2construct

Suppose that ψ is NAE-satisfiable. Colour ν by 2. In each variable triangle, colour the literal vertices u and ¬u by their Boolean values 0 and 1, which are opposite because they are complements. Now fix one clause triangle. Because the clause is NAE-satisfied, two of its literals have different Boolean values; colour the corresponding two clause vertices by the opposite Boolean values, so each differs from the colour of the adjacent variable vertex. Colour the third clause vertex by 2. The three clause-vertex colours are then 0,1,2, so the clause triangle is proper. Doing this for every clause yields a proper three-colouring of Gψ.

4.1F1step 2.2step 3.1construct

Suppose conversely that Gψ has a proper three-colouring. Every triangle uses all three colours, so after permuting colour names assume ν has colour 2. In each variable triangle, the vertices u and ¬u therefore receive colours 0 and 1 in some order; assign the truth value of each literal to be its vertex colour, so u and ¬u receive opposite truth values. In each clause triangle, exactly one vertex has colour 2 and the other two have colours 0 and 1. Because each clause vertex is adjacent to the matching literal vertex, a clause vertex with colour 0 or 1 forces the corresponding literal to have the complementary truth value. Thus the three literals of the clause are not all equal, so the clause is NAE-satisfied. Therefore ψ is NAE-satisfiable.

5.1L1L2step 1.1step 2.1step 2.2step 3.1step 4.1∎

Steps 2.1, 3.1, and 4.1 show φ∈3-SAT  ⟺  ψ is NAE-satisfiable   ⟺  Gψ∈3-COLORABILITY. For the empty conjunction the construction is still colourable (only variable triangles, if any, and ν occur). Map a malformed source string to the complete graph on four vertices, which requires four distinct colours and is a fixed negative instance. Syntax checking and the constructions in steps 1.1 and 2.2 are polynomial-time, so [L1] and [L2] yield a polynomial-time many-one reduction from 3-SAT to 3-COLORABILITY.

5 · Examples, counterexamples and false statements

False statementConstruction: AI-adaptedVerification: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-09-05Open item page →

A gadget reduction is correct as soon as every yes-instance maps to a yes-instance

Statement

A gadget reduction is correct as soon as every yes-instance maps to a yes-instance.

Facts & Assumptions

Given: A source language A having at least one no-instance and a target language B having at least one yes-instance yB.

[L1]

A gadget reduction is not complete until both directions of correctness have been proved, by Reduction gadgets and interface invariants.

[L2]

A polynomial-time many-one reduction requires x∈A if and only if f(x)∈B, by Polynomial-time many-one reductions.

Refutation

technique · direct
1.1L2givenconstruct

Define the constant map f(x):=yB for every source instance x. This map is total and polynomial-time, and it certainly sends every yes-instance of A to a yes-instance of B.

2.1L1L2step 1.1

Let x0∉A. Then f(x0)=yB∈B, so the reverse implication in [L2] fails: f(x0)∈B does not force x0∈A. Therefore yes-preservation alone does not make f a correct many-one reduction.

3.1step 2.1∎

The statement is false.

False statementConstruction: AI-adaptedVerification: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-09-05Open item page →

A pseudopolynomial algorithm is polynomial in the binary input length

Statement

A pseudopolynomial algorithm is polynomial in the binary input length.

Facts & Assumptions

Given: The standard dynamic program for SUBSET SUM that fills an n×T table for an instance with n input numbers and target T.

[F1]

A SUBSET SUM instance writes its target integer in binary, by Subset sum and partition decision problems.

[L1]

Worst-case running time is measured as a function of the input length, not of the numeric value of a parameter written inside that input, by Worst-case time and space complexity of a machine.

Refutation

technique · direct
1.1F1given

Consider the one-number SUBSET SUM instances ([2m],2m) for m≥1. By [F1], the binary input length is O(m).

2.1step 1.1givenalgebra

The standard table-filling algorithm uses Θ(nT)=Θ(2m) time on this family because here n=1 and T=2m.

3.1L1step 1.1step 2.1

Since 2m is exponential in the binary length m, the running time in step 2.1 is not polynomial in the input length. By [L1], polynomial-time complexity is measured against that binary length. Therefore pseudopolynomial dependence on T does not imply polynomial dependence on the bit-length of T.

4.1step 3.1∎

The statement is false.

Sources