2
Linear programs
In this section, we discuss the ingredients of linear programs more carefully.
As an example for our discussion, here is a simple linear program:
maximize
x
1
+
x
2
subject to
x
1
≤
2
x
1
+ 2
x
2
≤
4
x
1
,
x
2
≥
0
.
(2.1)
Any linear programming problem involves assigning real-number values
to certain
variables
, which we often denote
x
1
, x
2
, . . . , x
n
. In our example,
the integer
n
is 2. Central to linear programming is the idea of a
linear
function
of these variables, by which we mean a function of the form
a
1
x
1
+
a
2
x
2
+
···
+
a
n
x
n
,
where the numbers
a
1
, a
2
, . . . , a
n
are given in advance — we call such numbers
data
. In our example,
x
1
+2
x
2
is a linear function. More compactly, we could
write our general linear function as
n
X
j
=1
a
j
x
j
,
or, using vector notation, as
a
T
x
, where
T
denotes the transpose,
a
is the
column vector [
a
1
, a
2
, . . . , a
n
]
T
and
x
is the column vector [
x
1
, x
2
, . . . , x
n
]
T
.
In a linear program, the values we assign to the variables must satisfy
a given list of
linear constraints
, each of which requires a linear function
to be either equal to some given number
b
(a
linear equation
), or be at
least
b
, or at most
b
(
linear inequalities
). Our example involves four linear
inequality constraints:
x
1
≤
2,
x
1
+ 2
x
2
≤
4,
x
1
≥
0 and
x
2
≥
0. Any
assignment of values to the variables that satisﬁes all the constraints is called
a
feasible solution
. In our simple linear program,