the alphabet or even a word.
the input. The result is the function output in the form of a number.
360
PART 5
Challenging Difficult Problems
If you plug the input 2 as x in this example, you obtain:
f(2) = 4
In math terms, by calling this function, you mapped the input 2 to the output 4.
Functions can be simple or complex, but every function has one and only one
result for every set of inputs that you provide (even when the input is made of
multiple variables).
Linear programming leverages functions to render the objectives it has to reach in
a mathematical way to solve the problem at hand. When you turn objectives into a
math function, the problem translates into determining the input to the function
that maps the maximum output (or the minimum, depending on what you want
to achieve). The function representing the optimization objective is the objective
function. In addition, linear programming uses functions and inequalities to
express constraints or bounds that keep you from plugging just any input you
want into the objective function. For instance, inequalities are
0 <= x <= 4
y
+ x < 10
The first of these inequalities translates into limiting the input of the objective
function to values between 0 and 4. Inequalities can involve more input variables
at a time. The second of these inequalities ties the values of an input to other
values because their sum can’t exceed 10.
Bounds imply an input limitation between values, as in the first example.
Con-
straints always involve a math expression comprising more than one variable, as
in the second example.
The final linear programming requirement is for both the objective function and
the inequalities to be linear expressions. This means that the objective function
and inequalities can’t contain variables that multiply each other, or contain vari-
ables raised to a power (squared or cubed, for instance).
All the functions in an optimization should be linear expressions because the pro-
cedure represents them as lines in a Cartesian space. (If you need to review the
concept of a Cartesian space, you can find useful information at
http://www.
mathsisfun.com/data/cartesian-coordinates.html
.) As explained in the
“Using Linear Programming in Practice” section, later in this chapter, you can
imagine working with linear programming more as solving a geometric problem
than a mathematical one.