62#ifndef __ADS_Reductions
63 #define __ADS_Reductions
94inline int tileVar(
int h ,
int i ,
int j ,
int n );
122inline std::pair< Adjacency , int >
173inline std::pair< std::vector< std::vector< long > > , std::vector< long > >
225inline long halfSum(
const std::vector< long > & A );
292inline std::vector< Point >
sortToHull(
const std::vector< long > & a );
302#include "ADS/complexity/impl/Reductions.tpp"
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The convex hull of a set of points of the plane (section 16.1), the smallest convex polygon that co...
The square tiling (BOUNDED TILING, the DOMINO LIMITATO of the book) of chapter 18: squares to cover ...
The problems in NP of chapter 18, each with its polynomial certificate, which checks a proposed solut...
std::pair< std::vector< std::vector< long > >, std::vector< long > > dominoToLp01(const std::vector< Tile > &D, int n)
BOUNDED TILING to 0-1 INTEGER PROGRAMMING: on the variables of tileVar(), each equation as two ineq...
Adjacency cycleToPath(const Adjacency &G)
DIRECTED HAMILTONIAN CIRCUIT to DIRECTED HAMILTONIAN PATH from to 0: the node 0 split,...
long halfSum(const std::vector< long > &A)
half the sum, or if the sum is odd (then no partition: the bound has no YES in any of the three pro...
Cnf dominoToSat(const std::vector< Tile > &D, int n)
BOUNDED TILING to SATISFIABILITY, on the variables of tileVar().
Adjacency complement(const Adjacency &G)
the complement graph: CLIQUE of size to INDEPENDENT SET of size
std::vector< std::vector< long > > hamiltonToTsp(const Adjacency &G)
HAMILTONIAN CIRCUIT to TRAVELING SALESMAN: the distances, .
std::vector< Point > sortToHull(const std::vector< long > &a)
SORTING to CONVEX HULL: the points .
std::pair< Adjacency, int > dominoToClique(const std::vector< Tile > &D, int n)
BOUNDED TILING to CLIQUE: the graph on the places of tileVar(), the ones of but isolated,...
Adjacency cycleToChain(const Adjacency &G)
DIRECTED HAMILTONIAN CIRCUIT to HAMILTONIAN PATH: the path of cycleToPath(), each node a chain ,...
int tileVar(int h, int i, int j, int n)
the place of the variable or node of the tile in the square
std::vector< Clause > Cnf
a formula
Definition Problems.h:85
std::vector< std::vector< bool > > Adjacency
an adjacency
Definition Problems.h:83