NP-douce 1.2

Solving the world's hardest problems.

Version 1.2 - Offline browser app

Shared settings apply across tabs. TSP uses adaptive beta with the multiplier c; for gr17 matrix/manual, try c = 1.5 with HC backtrack tries = 4.

3-SAT to Hamiltonian Cycle

Uses the classic 3-SAT to Vertex Cover triangle reduction, then the direct Hamiltonian-cycle gadget with the degree-2 forced-edge precheck. The optional third number on the first line adds forced padding nodes.

Benchmark: SATLIB uf20-91, instance uf20-01.cnf, DIMACS CNF converted to app 3-literal rows, expected SAT. Set HC backtrack tries to 2 before running this example.

Vertex Cover to Hamiltonian Cycle

First line is vertices k optional_padding, then one undirected edge per line. Example: 12 4 followed by edge pairs.

Benchmark: DIMACS COLOR myciel3.col graph, converted to Vertex Cover with k=6, expected YES; k=5 is NO.

Clique to Hamiltonian Cycle

First line is vertices k optional_padding, then one undirected edge per line. Example: 50 10 followed by the clique edge pairs.

Benchmark: complement of DIMACS COLOR myciel3.col graph, clique threshold k=5, expected YES; k=6 is NO.

Independent Set to Hamiltonian Cycle

First line is vertices k optional_padding, then one undirected edge per line. Example: 16 6 followed by edge pairs.

Benchmark: DIMACS COLOR myciel3.col graph, independent-set threshold k=5, expected YES; k=6 is NO.

Set Cover to Hamiltonian Cycle

First line is universe_size set_count k optional_padding, then one set per line using element numbers. Example: 12 6 4 followed by six sets.

Benchmark: Beasley-style set-covering example, converted from row/column incidence to app set rows, optimum 3, expected YES for k=3.

X3C to Hamiltonian Cycle

First line is universe_size set_count optional_padding, then one 3-element set per line. Example: 12 6 followed by six 3-sets.

Benchmark: canonical X3C/3-dimensional-matching teaching instance; no tiny library-format X3C file is bundled, expected YES.

Graph Coloring to Hamiltonian Cycle

First line is vertices edges colors optional_padding, then one undirected edge per line. Example: 12 12 3 followed by a 12-cycle.

Benchmark-format DIMACS COLOR complete bipartite graph K3,3, 3 colors, expected YES; it survives the exact precheck and runs through HC witness search.

Hamiltonian Pairs

One undirected edge per line, like u v. Listed edges get weight -1; all others are 0.

Benchmark: DIMACS COLOR myciel3.col interpreted as an HC graph; locally verified Hamiltonian cycle exists.

TSP Weight Matrix

First line is n, followed by an n x n symmetric weight matrix.

Benchmark: TSPLIB gr17, full symmetric matrix converted from lower-diagonal format, optimum tour length 2085.

For gr17, try c = 1.5 with HC backtrack tries = 4.

TSP Euclidean Points

First line is n, followed by x y point coordinates.

Benchmark: TSPLIB burma14 coordinates, converted to app Euclidean points; TSPLIB's official GEO optimum is not reused for Euclidean scoring.

TSP Manual Weights

First line is n, then one upper-triangle weight per line in order: (1,2), (1,3), ....

Benchmark: TSPLIB gr17, upper-triangle manual weights derived from the same instance as the matrix tab, optimum 2085.

For gr17, try c = 1.5 with HC backtrack tries = 4.

Output

Ready.