Polyhedral Functions

  • Polyhedral functions: definition and examples

  • Minimization via LP

  • CVX implementation

Definition and examples

Definition

We say that a function f : mathbf{R}^n rightarrow mathbf{R} is polyhedral if its epigraph is a polyhedron.

That is, a function f : mathbf{R}^n rightarrow mathbf{R} is polyhedral if and only if the epigraph

 mbox{bf epi} f := left{ (x,t) in mathbf{R}^{n+1} ~:~ t ge f(x) right}

can be expressed as a polyhedron: there exist a matrix C in mathbf{R}^{m times (n+1)} and a vector d in mathbf{R}^m such that

 mbox{bf epi} f = left{ (x,t) in mathbf{R}^{n+1} ~:~ C left( begin{array}{c} x  t end{array} right) le d right} .

Maxima of affine functions

Polyhedral functions include in particular, functions that can be expressed as a maximum of a finite number of affine functions:

 f(x) = max_{1 le i le m} : (a_i^Tx+b_i),

where a_i in mathbf{R}^n, b_i in mathbf{R}, i=1,ldots,m. Indeed, the epigraph of f:

 mbox{bf epi} f = left{ (x,t) in mathbf{R}^{n+1} ~:~ t ge max_{1 le i le m} : (a_i^Tx+b_i) right}

can be expressed as the polyhedron

 mbox{bf epi} f = left{ (x,t) in mathbf{R}^{n+1} ~:~ t ge a_i^Tx+b_i, ;; i=1,ldots,m right} .

Example: The l_infty-norm function, with values f(x) = |x|_infty, is polyhedral, as it can be written as the maximum of 2n affine functions:

 f(x) = max_{1 le i le n} : max : (x_i,-x_i).

Sums of maxima of affine functions

Polyhedral functions include more general functions. For example, a function that can be expressed as a sum of functions themselves expressed as maxima of affine functions:

 f(x) = sum_{j=1}^p max_{1 le i le m} (a_{ij}^Tx+b_{ij})

for appropriate vectors a_{ij} in mathbf{R}^n and scalars b_{ij}, is polyhedral.

Indeed, the condition (x,t) in mbox{bf epi}f is equivalent to the existence of a vector u in mathbf{R}^p such that

 t ge sum_{j=1}^p u_j ~:~  begin{array}[t]{l}  u_j ge a_{ij}^Tx+b_{ij}, ;; i=1,ldots,m, ;; j=1,ldots,p,  Cx le d . end{array}

Hence, mbox{bf epi}f is the projection (on the space of (x,t)-variables) of a polyhedron, which is itself a polyhedron. Note however that representing this polyhedron in terms of a set of affine inequalities involving (x,t) only, is complicated.

Example: The l_1-norm function, with values f(x) = |x|_1, is polyhedral, as it can be written as the sum of maxima of affine functions:

 f(x) = sum_{i=1}^n : max(x_i,-x_i).

Minimization of Polyhedral Functions

Using LPs, we can minimize polyhedral functions, under polyhedral constraints.

Indeed, consider the problem

 min_x : f(x) ~:~ Ax le b,

with f polyhedral. We can solve the problem as the LP

 min_{x,t} : t ~:~(x,t) in mbox{bf epi} f, ;; Ax le b.

Minimization of maxima of affine functions

For example, assume that f is defined as the maximum of linear functions as above. The problem

 min_x : max_{1 le i le m} : (a_i^Tx+b_i) ~:~ Cx le d,

can be expressed as the LP (in variables x in mathbf{R}^n and t in mathbf{R})

 min_{x,t} : t ~:~ Cx le d, ;; t ge a_i^Tx+b_i, ;; i=1,ldots,m.

The above problem is indeed an LP:

  • The objective of the problem is linear in the variables (x,t);

  • the constraints are ordinary inequalities involving affine functions.

Minimization of a sum of maxima of affine functions

We can formulate the problem of minimizing the function f with values

 f(x) = sum_{j=1}^p max_{1 le i le m} (a_{ij}^Tx+b_{ij})

under polytopic constraints, as an LP.

We use the same trick as before, introducing a new variable for each max-linear function that appears in the function f. We obtain the LP representation

 min_{x,t} : sum_{j=1}^p t_j ~:~  begin{array}[t]{l}  t_j ge a_{ij}^Tx+b_{ij}, ;; i=1,ldots,m, ;; j=1,ldots,p,  Cx le d . end{array}

Examples:

CVX implementation

In CVX, there is no need to introduce new variables in order to transform a polyhedral function minimization. We can directly minimize the function expressed as a maximum of affine functions.

The snippet below implements the problem

  min_x : max_{1 le i le m} : c_i^Tx ~:~ Ax le b,

where c_1,ldots,c_m are given vectors in mathbf{R}^n. We assume that C = [c_1,ldots,c_m] exists in the workspace.

CVX implementation
cvx_begin
   variable x(n,1)
   minimize( max(C'*x) )
   subject to
        A*x <= b;
cvx_end

For minimizing l_1- or l_infty-norms, we can simply rely on the corresponding matlab functions, as they are overloaded in CVX. The following snippet solves

  min_x : |Ax-b|_infty + |x|_1,

where A in mathbf{R}^{m times n}, b in mathbf{R}^m exist in the workspace.

CVX implementation
cvx_begin
   variable x(n,1)
   minimize( norm(A*x-b,inf) + norm(x,1) )
cvx_end