65#ifndef __ADS_Approximation
66 #define __ADS_Approximation
116inline std::vector< int >
firstFit(
const std::vector< long > & A ,
long k ,
117 bool decreasing =
false );
206inline std::pair< long , Nodes >
apSubsetSum(
const std::vector< long > & A ,
240inline std::pair< long ,
242 const std::vector< long > & v ,
243 long C ,
double eps );
279#include "ADS/intractable/impl/Approximation.tpp"
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The minimum spanning tree of an unoriented connected graph with weights on the edges (section 14....
The problems in NP of chapter 18, each with its polynomial certificate, which checks a proposed solut...
std::vector< int > firstFit(const std::vector< long > &A, long k, bool decreasing=false)
the box of each object, the first one with room for it (ff), the objects in the order given or,...
Nodes deltaTsp(const std::vector< std::vector< T > > &D)
the circuit of the nodes of a minimum spanning tree of the complete graph of the symmetric distances ...
Nodes vertexCoverApprox(const Adjacency &G)
both ends of each edge , , whose ends are both out of , at most twice a minimum vertex cover; on the...
std::vector< std::vector< long > > tspGap(const Adjacency &G, long s)
the distances of Theorem 19.2: 1 on the edges of , elsewhere; their optimum is if has a Hamiltonia...
std::pair< long, Nodes > apSubsetSum(const std::vector< long > &A, long k, int h)
the sum, at most , and the places of of the best set found from the sets of at most elements,...
std::pair< long, Nodes > knapsackApprox(const std::vector< long > &p, const std::vector< long > &v, long C, double eps)
the best profit and the objects of an -approximation of KNAPSACK, profits and volumes within ,...
T tourCost(const std::vector< std::vector< T > > &D, const Nodes &S)
the cost of the circuit of the distances
std::vector< int > Nodes
a set, a path
Definition Problems.h:86
std::vector< std::vector< bool > > Adjacency
an adjacency
Definition Problems.h:83