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.

13 results · all verified · 8 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 5 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 KV is a clique when every two distinct vertices of K are adjacent.
  • A subset IV is an independent set when no two distinct vertices of I are adjacent.
  • A subset CV 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 kN, 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-generatedprecheck passaudited 2026-09-05Open 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 φ=C1Cm one can construct in polynomial time a graph Gφ such that φ3-SAT    (Gφ,m)CLIQUE.

Facts & Assumptions

Given: A 3-CNF formula φ=C1Cm,Cj=(j1j2j3).

[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.1

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

L2F1givenconstruct
2.1

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.1 makes every chosen pair adjacent. Therefore the chosen vertices form an m-clique.

step 1.1givenconstruct
2.2

Assume conversely that Gφ has a clique K of size m. By step 1.1, no two vertices from the same clause are adjacent, so K contains exactly one vertex from each clause. Again by step 1.1, 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.

F1step 1.1construct
2.3

The graph Gφ has 3m vertices and at most 9m2 candidate edges, so the map in step 1.1 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.

L1L2step 1.1step 2.1step 2.2
CorollaryStatement: Literature-sourcedProof: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-09-05Open 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.1

A certificate for (G,k)CLIQUE is a list of k vertices. One checks in polynomial time that the listed vertices are distinct and that every pair is adjacent, so CLIQUE lies in NP.

F1givenconstruct
1.2

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.

L1L2L3
2.1

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

L3step 1.1step 1.2
TheoremStatement: Literature-sourcedProof: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-09-05Open 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.1

For any subset SV, [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.

L1F1givenconstruct
1.2

For any subset IV, the complement VI 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 VI. Conversely, if VI is a vertex cover and two vertices of I were adjacent, that edge would have no endpoint in VI, a contradiction. Hence, whenever kV, 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 Vk.

L2F1given
2.1

Use step 1.2 to define total reductions. For INDEPENDENT SET to VERTEX COVER, map (G,k) to (G,Vk) when kV, and map it to the fixed no-instance (K2,0) when k>V. For VERTEX COVER to INDEPENDENT SET, map (G,k) to (G,Vk) when kV, 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.

L2F1step 1.2construct
3.1

Step 1.1 gives reductions between CLIQUE and INDEPENDENT SET, and step 2.1 gives reductions between INDEPENDENT SET and VERTEX COVER. Composing these reductions yields reductions in every direction among the three problems.

step 1.1step 2.1
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.1

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.

F1givenconstruct
1.2

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.

L1L2L3
2.1

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

L3step 1.1step 1.2
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 1i<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 1i<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-generatedprecheck passaudited 2026-09-05Open 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 φ=C1Cm.

[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.1

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 m1, 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,0i,1ri,1si,1si,m1i,mri,msi,m, and we also add the four boundary arcs pisi,0,pisi,m,si,0qi,si,mqi. 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 1i<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,jcj,cjri,j; if the literal ¬xi occurs in Cj, add ri,jcj,cji,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.

L2F1givencasesconstruct
2.1

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,jri,j on the left-to-right route by the detour i,jcjri,j. If it is a negative occurrence of xi, replace the local edge ri,ji,j on the right-to-left route by ri,jcji,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φ.

L2step 1.1construct
2.2

Suppose conversely that Dφ has a directed Hamiltonian path from sφ to tφ. We first verify the interface invariant omitted by a merely pictorial gadget argument. If the path enters a clause vertex cj from an occurrence pair in Xi and leaves toward a different occurrence pair, then the unused vertex of the first pair can subsequently be entered only from its other crossbar neighbour; after that entry, every possible exit goes to that already visited neighbour, the visited mate, or the already visited clause vertex. The path is therefore stuck before reaching tφ. The same four-case check applies with the crossbar direction reversed and with positive and negative occurrence arcs exchanged. Hence every visit to cj leaves through the mate in the same occurrence pair: a clause visit only replaces one crossbar edge by its two-edge detour. It follows that the path cannot jump between variable gadgets through a clause vertex. The remaining connections force it through X1,,Xn in order, and within each Xi it traverses the entire crossbar monotonically from one end to the other. Set xi=true exactly for a left-to-right traversal. Every clause vertex is visited by a same-pair detour whose orientation exists only for a literal made true by this assignment. Thus every clause has a true literal and φ is satisfiable.

L2F1step 1.1cases
3.1

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φ.

F1step 2.1step 2.2construct
4.1

Step 1.1 handles the empty formula and gives a polynomial-time construction for every well-formed 3-CNF formula. For m1, 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.

L1L2step 1.1step 2.1step 2.2step 3.1cases-exhaustive
TheoremStatement: Literature-sourcedProof: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-09-05Open 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 AV×V, by Multigraphs, loops and directed graphs as variants distinct from the default finite simple graph.

Proof

technique · direct
1.1

If V1, decide directly whether D has a directed Hamiltonian cycle and map it to a fixed yes-instance or no-instance of undirected Hamiltonian cycle accordingly. Thus it is enough to treat the case V2. Delete every loop, since a Hamiltonian cycle through at least two distinct vertices cannot use a loop. For each vertex vV, create three undirected vertices v1,v2,v3 and the two edges v1v2 and v2v3. For each arc (u,v)A with uv, add the undirected edge u3v1. Call the resulting graph GD.

F1F2givenconstruct
2.1

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.

step 1.1F1
2.2

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).

step 1.1construct
3.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.

F1step 1.1step 2.1
4.1

The map DGD uses 3V vertices and at most A+2V 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.

L1step 1.1step 2.2step 3.1
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.1

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.

F1givenconstruct
1.2

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.

L1L3L4
2.1

Reduce DHAMPATH to the ordinary directed Hamiltonian path problem. Given (D,s,t), add fresh vertices s and t+ together with the two arcs ss and tt+. 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.

F1step 1.2construct
2.2

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 st. Build an undirected graph G by replacing every vertex v{s,t} by a path v1v2v3, replacing s by a single vertex s3, replacing t by a single vertex t1, and adding an undirected edge u3v1 for every arc uv 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(r1),v2(r1),v3(r1),t1 in G. Conversely, an undirected Hamiltonian path from s3 to t1 must traverse every triple v1v2v3 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 DHAMPATHpUHAMPATH.

F1step 1.2casesconstruct
2.3

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

L2step 1.2algebra
3.1

Reduce UHAMPATH to the ordinary undirected Hamiltonian path problem. Given (G,s,t), attach two fresh leaves s and t+ by the edges ss 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.

F1step 2.2construct
4.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].

L4step 1.1step 1.2step 2.1step 2.2step 2.3step 3.1
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.1

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 1kn. Set the base to B:=n+2.

L1L2F1givencases
2.1

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.

F1step 1.1givenconstruct
3.1

If IV(G) is an independent set of size k, choose the vertex numbers ai with viI. 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.

F1step 2.1construct
3.2

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.

F1step 2.1
4.1

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.

L1L2step 1.1step 2.1step 3.1step 3.2
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.1

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 kA. Define b:=2Ak and c:=A+k, and output the PARTITION instance with list (a1,,an,b,c).

F1givenconstruct
2.1

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

step 1.1algebra
3.1

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

step 1.1step 2.1construct
3.2

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 2Ab=2A(2Ak)=k. Those numbers witness a yes-instance of SUBSET SUM.

step 1.1step 2.1algebra
4.1

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.

L1step 1.1step 3.1step 3.2
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 tk such that Si1Sit=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.1

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

F1F2givenconstruct
2.1

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

F1F2step 1.1
2.2

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

F1F2step 1.1
3.1

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

L1step 1.1step 2.1step 2.2
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-generatedprecheck passaudited 2026-09-05Open 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(j1j2j3).

[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.1

First reduce φ to a not-all-equal 3-CNF formula. Introduce one global fresh variable z and, for each clause Cj=(j1j2j3), 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.

L2givenconstruct
2.1

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)). 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.

L2step 1.1construct
2.2

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.

L2F1step 1.1construct
3.1

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ψ.

F1step 2.1step 2.2construct
4.1

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 the literal to be the complementary Boolean value, 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.

F1step 2.2step 3.1construct
5.1

Steps 2.1, 3.1, and 4.1 show φ3-SAT    ψ is NAE-satisfiable     Gψ3-COLORABILITY. Since the constructions in steps 1.1 and 2.2 are polynomial-time, [L1] and [L2] yield a polynomial-time many-one reduction from 3-SAT to 3-COLORABILITY.

L1L2step 1.1step 2.1step 2.2step 3.1step 4.1

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 xA if and only if f(x)B, by Polynomial-time many-one reductions.

Refutation

technique · direct
1.1

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.

L2givenconstruct
2.1

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

L1L2step 1.1
3.1

The statement is false.

step 2.1
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.1

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

F1given
2.1

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

step 1.1givenalgebra
3.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.

L1step 1.1step 2.1
4.1

The statement is false.

step 3.1

Sources