next up previous contents
Next: Running LattE Up: LattE Input Files Previous: Nonnegativity Constraints   Contents

Cost Vector

The functions maximize and minimize solve the integer linear programs

$\displaystyle \max\{c^\intercal x: x\in P\cap{\mathbb{Z}}^d\}
$

and

$\displaystyle \min\{c^\intercal x: x\in P\cap{\mathbb{Z}}^d\}.
$

Besides a description of the polyhedron $ P$ , these functions need a linear objective function given by a certain cost vector $ c$ . If the polyhedron is given in the file ``fileName''
4  4
1 -1  0  0
1  0 -1  0
1  0  0 -1
1 -1 -1 -1
linearity 1 4
nonnegative 3 1 2 3
the cost vector must be given in the file ``fileName.cost'', as for example in the following three-dimensional problem:
1 3
2 4 7
The first two entries state the size of a $ 1\times n$ matrix (encoding the cost vector), followed by the $ 1\times n$ matrix itself. Assuming that we call maximize, this whole data encodes the integer program

$\displaystyle \max\{2x_1+4x_2+7x_3: x_1+x_2+x_3=1, x_1,x_2,x_3\in\{0,1\}\}.
$



De Loera account latte 2005-08-18