IE University / Math II Workshop
Mathematical Format of a Program
With students in mind
Author
Mirco Soffritti
January 11, 2026
Contents
1 Crafting Economic Models
1.1 Optimization programs and their solutions . . . . . . . . . . . . . . . . . .
1.2 What kinds of optimization programs are there? . . . . . . . . . . . . . . .
1.2.1 By objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.2 By constraint structure . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.3 By functional form . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.4 By variable type . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 A linear program and its standard form . . . . . . . . . . . . . . . . . . . .
1.3.1 More on linear programs . . . . . . . . . . . . . . . . . . . . . . . .
1.3.2 The standard form of a LP . . . . . . . . . . . . . . . . . . . . . . .
1.3.3 Writing a LP in its standard form . . . . . . . . . . . . . . . . . . .
1.4 Many optimization programs . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.1 The gardener’s problem . . . . . . . . . . . . . . . . . . . . . . . .
1.4.2 The milking problem . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.3 The vertical farming problem . . . . . . . . . . . . . . . . . . . . .
1.4.4 The milk vs cream problem . . . . . . . . . . . . . . . . . . . . . .
1.4.5 The streaming problem . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.6 The consulting problem . . . . . . . . . . . . . . . . . . . . . . . .
1.4.7 Two knapsack problems . . . . . . . . . . . . . . . . . . . . . . . .
1.4.8 The cabinet problem . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.9 The bartender problem . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.10 The data-analysis problem . . . . . . . . . . . . . . . . . . . . . . .
1.4.11 The water meter problem . . . . . . . . . . . . . . . . . . . . . . .
1.4.12 The cleaning problem . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.13 The store location problem . . . . . . . . . . . . . . . . . . . . . . .
1.4.14 The book-staking problem . . . . . . . . . . . . . . . . . . . . . . .
1.4.15 The crude oil problem . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.16 The camper problem . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.17 The solar panel problem . . . . . . . . . . . . . . . . . . . . . . . .
1.4.18 Now is your turn! . . . . . . . . . . . . . . . . . . . . . . . . . . . .
i
1
2
3
3
4
5
5
7
7
8
8
12
12
13
16
16
18
18
19
21
22
23
24
25
27
28
29
30
31
32
Chapter 1
Crafting Economic Models
At the heart of economic analysis lies the ability to translate real-world problems into
precise mathematical terms. This translation process represents the essence of what we
call an optimization program—a formal Economic modeling begins with a fundamental
tension - the need to reconcile the messy complexity of human behavior with the precise
language of mathematics. Like cartographers mapping uncharted territories, economists
face the challenge of creating representations that are simultaneously simple enough to
analyze yet rich enough to provide meaningful insights. This chapter explores how we
navigate this tension through the disciplined art of mathematical modeling.
At its core, every economic model is an exercise in constrained optimization. The canonical formulation:
max f (x) subject to gi (x) ≤ bi ,
x∈K
i = 1, . . . , m
(1.1)
captures this universal structure, where f (x) represents our economic objective - whether
a firm’s profit function, a consumer’s utility, or a society’s welfare measure - while the
constraints gi (x) ≤ bi encode the limitations we face: scarce resources, technological
boundaries, institutional constraints, demand limitations, etc.. The feasible region becomes our economic universe, defining what’s possible within our model’s assumptions.
In the formalized version of a program, the terms ‘subject to’. will be often replaced with
their acronym ‘s.t.’.
The power of this framework becomes evident when we examine its applications. A production manager might use it to determine optimal input combinations, where the objective function represents output and the constraints capture budget limitations. A central
banker could employ a dynamic version to set interest rates, balancing inflation control
against employment goals across multiple periods. In each case, the mathematical structure forces clarity about what we’re trying to achieve and what limits our choices.
Yet economic modeling must grapple with deeper challenges than most physical sciences.
Human behavior resists neat mathematical characterization - preferences shift, expectations adapt, and decisions often defy perfect rationality. The standard utility maximization framework, elegant as it may be, struggles to explain why investors hold losing stocks
too long or why consumers pay attention to arbitrary reference prices. Modern modeling
1
approaches have responded by incorporating insights from behavioral economics, using
prospect theory’s value functions or introducing bounded rationality constraints.
The computational revolution has dramatically expanded modeling possibilities. Where
early economists relied on pencil-and-paper solutions to tractable problems, today’s modelers can tackle high-dimensional optimizations that would have been unimaginable to previous generations. Machine learning techniques help identify patterns in massive datasets,
while stochastic programming methods allow us to model uncertainty in increasingly sophisticated ways.
This chapter will guide you through the modeler’s craft - from formulating problems with
appropriate assumptions to selecting solution techniques matched to problem structure.
We’ll examine how different functional forms lead to varying economic interpretations,
how constraint specification affects policy conclusions, and how to validate models against
real-world data. Along the way, we’ll maintain a dual focus: the economist’s attention to
human behavior and institutional detail, paired with the mathematician’s rigor in analysis
and computation.
The journey from economic question to mathematical formulation to policy insight is
rarely linear. It requires iteration - testing assumptions, refining specifications, and sometimes fundamentally rethinking the problem structure. But this iterative process is precisely what makes economic modeling both challenging and rewarding. By the chapter’s
end, you’ll have developed not just technical skills but a modeler’s intuition for how
mathematical structure can illuminate economic reality.
1.1
Optimization programs and their solutions
An optimization program (or problem) is a mathematical framework used to find the
optimal solution (best value) from a set of possible choices, subject to certain constraints.
The elements of a program are:
• A task: when formalizing a problem we need to be aware of whether we want to
maximize, minimize or both..
• A list of choice (or decision) variables: these are the numbers that we should
adjust to influence the objective until it becomes optimal.
• An objective function: this is the function f that formalizes our objective and
that needs to be either maximized, or minimized, or both. Note that the objective
function is typically written in terms of some (or all) choice variables.
• Restrictions: these are conditions that limit our search for the optimal solutions
(budget limits, resource availability, preferences, physical laws, etc.). We will denote
with K the set of all combinations of choice variables that are compatible with the
program’s constraints.
2
The solutions of an optimization program
For a given optimization program:
• A solution is any assignment of values to each of the choice variables of the
program.
• A solution is feasible if it has the property that it satisfies all the constraints
simultaneously. The set of all the feasible solutions is known as the feasible
set of the program, which we will typically denote with K.
• A solution is optimal if it is a/the feasible solution that maximizes the objective function (or minimizes it if the optimization problem is a minimization
problem).
1.2
What kinds of optimization programs are there?
In what follows, we detail a classification of optimization programs based on a number of
key characteristics, along with some illustrative examples.
1.2.1
By objective
Maximization Problems:
– Definition: These are problems where the goal is to find the maximum value of an
objective function f over a feasible set K.
– Mathematical form: This is:
max f (x) s.t. x ∈ K
x
– Business example: A firm using capital (K) and labor (L) aims at maximizing
profit, which is obtained by subtracting total production
√ costs, T C, from total
revenues T R. The firm’s production function is q = 5 KL, while the per-unit
price for capital and labor is pK = $150 and pL = $30. The firm also bears $100
of fixed costs. The price at which the firm can sell each unit of output is p = $12.
Formally:
max
K,L
π(K, L) = T R − T C = pq − T C =12q − (100 + V C)
√
s.t. q = 5 KL, V C = 150K+30L, K, L ≥ 0
Minimization Problems:
– Definition: Problems where the goal is to find the minimum value of an objective
function f over a feasible set K.
– Mathematical form: This is:
min f (x) s.t. x ∈ K
x
– Business example: A factory produces two kinds of flour: X and Y (both measured
in quintals/qt per day).
3
∗ Each quintal of X (quantity denoted with x) requires 2 hours of machine time
and 1’1 qt of wheat.
∗ Each quintal of Y (quantity denoted with y) requires 1 hour of machine time
and 1’3 qt of wheat.
∗ The cost of producing one quintal of X is $20, and for Y it is $30. In addition,
there is a fixed electricity cost of $200 a day.
The factory, which is expected to produce at least 50 qt of flour every day to satisfy
current demand for flour, has access to:
∗ A maximum of 80 hours of machine time, and
∗ No more than 120 qt of wheat.
The factory wants to determine how many quintals of each kind of flour to produce
in order to minimize the total production cost, while staying within the demand,
machine time, and wheat constraints. Formally:
min
x,y
T C(x, y) = 200 + 20x + 30y
subject to:
(demand constraint)
(machine time constraint)
(wheat constraint)
(non-negativity)
x + y ≥ 50
2x + y ≤ 80
′
1 1x + 1′ 3y ≤ 120
x, y ≥ 0
1.2.2
By constraint structure
Unconstrained (free) program:
· Definition: Problems where the decision variables x have no restrictions.
· Mathematical form: Tjis is
opt f (x) s.t. x ∈ Df
x
where Df denotes the natural domain of the objective function f .
· Business examples: Free programs are a true rarity in business and economics.
Indeed, every economic activity is, by definition, limited by some (money, time,
resource, non-negativity, etc.) constraints.
Constrained program:
· Definition: There are problems where the choice variables must satisfy some
equality and/or inequality constraints.
· Mathematical form:
max f (x)
x
s.t. gi (x) ≤ bi , i = 1, . . . , m,
4
and/or hj (x) = bj , j = 1, . . . , p.
· Business example: Utility maximization problem subject to a budget constraint:
max
x1 ,x2 ∈R
U (x1 , x2 )
s.t. p1 x1 + p2 x2 ≤I,
x1 , x2 ≥ 0
where U () is a person’s utility function, p1 , p2 is the unit price for good 1 and
good 2, respectively, and I denotes this person’s available income.
1.2.3
By functional form
Linear Programs (LP):
· Definition: Both objective function and constraints are linear functions.
· Mathematical form:
opt f (x) = c0 + c1 x1 + c2 x2 + . . . + cn xn
x
s.t. gi (x) = βi1 x1 + . . . + βin xn ≤ bi , i = 1, . . . , m, and
hj (x) = δj1 x1 + . . . + δjn xn = dj , j = 1, . . . , p,
where the number of restrictions is required to be finite (m + p ∈ R).
· Business example: Profit maximization in a production planning problem:
max
q1 ,q2
π(q1 , q2 ) = 3x1 + 5x2
s.t. q1 ≤ 4, 2q2 ≤ 12,
q1 , q2 ≥ 0.
3q1 + 2q2 = 18,
Non-linear Programs (NLP):
· Definition: Either the objective function and/or constraints are nonlinear.
· Mathematical form:
opt f (x)
x
s.t. gi (x) ≤ bi , and hj (x) = dj , i = 1, . . . , m,
j = 1, . . . , p,
where either f , and/or some gi and/or hj is non-linear.
· Business example: A firm wants to find the level of production q that minimizes
the average cost associated to the total cost function T C(q) = 3q 3 −12q 2 +12q.
In practice, this firm’s problem is:
min AC(q) =
q
1.2.4
T C(q)
= 3q 2 − 12q + 12,
q
s.t. q ≥ 0.
By variable type
Continuous Variables:
· Definition: All decision variables are real-valued (i.e. continuous).
5
· Mathematical form:
opt f (x) s.t. x ∈ K ⊆ Rn
x
· Business example: A company spends money on digital advertising to drive
traffic to its online store. For every dollar spent on ads is estimated to earn
(100 − 2x) dollars in profit, whereas x is the amount spent on advertising (in
thousands of dollars). The company wants to determine how much to spend
on advertising to maximize profit, but it has a budget limit of $30.000. This
company’s problem is:
max π(x) = (100 − 2x)x = 100x − 2x2 ,
x∈R
s.t. 0 ≤ x ≤ 30.000.
Discrete Variables:
· Definition: Variables take integer (or possibly binary) values.
· Mathematical form:
opt f (x) s.t. x ∈ K ⊆ Nn0
x
where Nn0 = Nn ∪ {0}.
· Business example: A small company produces and sells handcrafted mugs
of two kinds: X and Y. Each mug of kind X earns $5 of profit while each
mug of kind Y earns a $3 profit. The company can make at most 300 mugs
per day due to labor constraints. How many mugs of each kind should the
company produce each day to maximize its daily profit (Hint: the quantity of
mugs produced and sold is an integer number). This firm’s problem can be
formalized as follows:
max π(x, y) = 5x + 3y,
x,y∈N0
s.t. x + y ≤ 300.
A special case of program with discrete variables is a problem with binary variables, i.e., whose value is either 0 or 1.
· Mathematical form:
opt f (x) s.t. x ∈ K ⊆ {0, 1}n
x
· Business example: Consider a retailer that needs to decide where to open
new stores from three potential locations (1, 2, and 3) to serve customers at
minimum cost. The key decision is: Which stores should be open (yes/no
decisions)? The opening costs are $10.000, $20.000, and $30.000 for store 1,
2, and 3, respectively. In addition, the retailer must open at least two stores
(regardless of location). This can be formalized as follows:
min T C(x1 , x2 , x3 ) = x1 + 2x + 3x3
x1 ,x2 ,x3
s.t. x1 + x2 + x3 ≥ 2, xi ∈ {0, 1}, i = 1, 2, 3.
6
where xi indicates whether store in location i should open (xi = 1) or not (xi =
0). Notice that we scaled the objective function by 1.000. This simplifying
step bears no consequences on the optimal solution of our program.
Mix of continuous and discrete variables:
· Definition: In this kind of program, some choice variables take real values
while others take discrete (possibly binary) values.
· Mathematical form:
opt f (x, y) s.t. (x, y) ∈ K, x ∈ Rn , and y ∈ Zm .
x,y
· Business example: A business is considering whether to rent a kiosk. Renting
costs a flat fee of $100 and enables lemonade sales at a profit. If rented,
the business can sell up to 50 liters of lemonade at $2 per liter. Producing
lemonade costs $0.50 per liter.
The business must decide:
i) Whether to rent the kiosk (binary choice)
ii) How many liters of lemonade to produce (real-valued choice)
This can be formalized as follows:
max π(x, y) = (2 − 0.5)x − 100y
x, y
s.t. x ≤ 50y,
x ≥ 0, and y ∈ {0, 1}.
1.3
A linear program and its standard form
1.3.1
More on linear programs
Linear optimization, also known as linear programming (LP), is a fundamental
tool in applied mathematics, economics, and operations research. It concerns the
maximization or minimization of a linear objective function subject to a collection
of linear constraints. Despite its simple structure, LP can model a vast range of
real-world optimization problems in economics, business, engineering, and public
policy.
The key features of a LP are:
· Linearity: All relationships (objective and constraints) must be linear. That
is, no terms like x1 x2 , or x2j , or ln(x1 ), or ex2 , etc.
· Additivity: Effects of variables are additive (no cross-effects).
· Finiteness: The number of restrictions must be finite (not infinite).
· Divisibility: Solutions need not be integers (unless specified).
· Certainty: All parameters (cj , aij , bi ) are known constants.
7
1.3.2
The standard form of a LP
Writing a LP in standard form is helpful because it makes the problem easier
to solve and understand. Most solution methods, like the Simplex Method or
the Karush–Kuhn–Tucker (KKT) approach, expect the LP to be written this way.
Standard form also helps us clearly describe the problem’s geometry, write its dual,
and check conditions for optimality. In practice, optimization software usually
requires the LP in standard form, so converting it helps us use those tools correctly.
When in its standard (or canonical form) a LP has the following ingredients:
1. Maximization: The standard form of a LP requires the objective function
to be maximized:
n
X
max (c0 + c⊤ x) = c0 +
cj x j
x
j=1
where c = (c0 , c1 , . . . , cn )⊤ ∈ Rn+1 is the vector of objective coefficients and
x = (x1 , . . . , xn )⊤ is the vector of choice variables. Note that in a LP, we allow
for a drift c0 in the objective function.
2. Constraints: In the standard form, the constraints of a LP are compacted
into a system of linear inequalities of the kind ‘≤’:
a11 x1 + a12 x2 + · · · + a1n xn ≤ b1
a21 x1 + a22 x2 + · · · + a2n xn ≤ b2
..
.
a x + a x + · · · + a x ≤ b
m1 1
m2 2
mn n
m
which can be expressed in matrix form as Ax ≤ b, where:
a11
a21
An×m = .
..
a12
a22
..
.
am1 am2
. . . a1n
. . . a2n
.. ,
...
.
. . . amn
b1
b2
bn×1 = .
..
bm
are, respectively, the constraint matrix and the right-hand side vector. For a
LP it is required that the number of restrictions is finite (n ∈ R).
3. Non-negativity: In business and economics, the standard form of a LP typically includes non-negativity constraints:
xj ≥ 0 ∀j = 1, . . . , n
unless otherwise specified.
1.3.3
Writing a LP in its standard form
In linear programming, it may be necessary to express a problem in standard
form before applying solution techniques. For any LP, its standard (or canonical)
8
matrix form is given by: The complete standard form LP is therefore:
max (c0 + c⊤ x)
x
s.t. Ax ≤ b
x≥0
However, real-world and theoretical problems often deviate from this structure.
This section outlines how to transform such problems into standard form by systematically addressing each deviation. For each case, we provide detailed examples
to illustrate the transformation techniques.
i. From min to max
A minimization problem can be converted into a maximization problem by multiplying the objective function by −1. This does not alter the feasible region but
reverses the optimization direction.
· Example 1: Minimize z = 3x1 + 4x2 becomes Maximize z = −3x1 − 4x2 .
· Example 2: Minimize z = 2y1 + 5y2 + y3 becomes Maximize z = −2y1 −
5y2 − y3 .
· Example 3: Minimize z = x becomes Maximize z = −x.
ii. According to Constraints
Equality constraints
An equality constraint of the form a⊤ x = b is split into two inequalities:
a⊤ x ≤ b and a⊤ x ≥ b,
and then the second is made standard form by multiplying both sides by −1.
· Example 1: x1 + x2 = 5 becomes x1 + x2 ≤ 5, −x1 − x2 ≤ −5.
· Example 2: 2x + 3y = 12 becomes 2x + 3y ≤ 12, −2x − 3y ≤ −12.
· Example 3: y1 − y2 = 0 becomes y1 − y2 ≤ 0, −y1 + y2 ≤ 0.
Greater-than-or-equal-to constraints
These restrictions are standardized by multiplying both sides of the inequality by
−1.
· Example 1: x1 + 2x2 ≥ 10 becomes −x1 − 2x2 ≤ −10.
· Example 2: 4y − z ≥ 3 becomes −4y + z ≤ −3.
· Example 3: x ≥ −5 becomes −x ≤ 5.
9
Variable not restricted to be non-negative
Any variable that is unrestricted in sign (can take positive or negative values)
must be expressed as the difference of two non-negative variables:
−
xj = x+
j − xj
−
with x+
j , xj ≥ 0.
· Example 1: If x ∈ R, then write x = x+ − x− , with x+ , x− ≥ 0.
· Example 2: If y is unrestricted, let y = y1 − y2 , with y1 , y2 ≥ 0.
· Example 3: A free variable z becomes z = z + − z − , with z + , z − ≥ 0.
In summary, every linear program can be methodically converted into standard
form by rewriting the objective function if necessary, transforming all constraints
into ≤ form, and replacing unrestricted variables with the difference of two nonnegative variables. These adjustments ensure compatibility with algorithmic solvers
and facilitate the application of fundamental theoretical results, such as the simplex method and duality theory.
A couple of examples
Example i)
Let the program
min
x1 ,x2 ,x3
f (x1 , x2 , x3 ) = 2x1 − x2 + 4x3
s.t. x1 + x2 ≥ 7
2x2 − x3 = 5
− x1 + x3 ≤ 4
x1 unrestricted,
x2 , x3 ≥ 0
We shall write it in its standard form and present the matrix A and vector
b associated to the corresponding matrix format.
Step 1: Convert to maximization Multiply the objective function by −1:
max f (x1 , x2 , x3 ) = −2x1 + x2 − 4x3
x1 ,x2 ,x3
Step 2: Transform constraints
· x1 + x2 ≥ 7 becomes −x1 − x2 ≤ −7
· 2x2 − x3 = 5 becomes:
2x2 − x3 ≤ 5
−2x2 + x3 ≤ −5
· −x1 + x3 ≤ 4 remains unchanged.
10
Step 3: Handle unrestricted variables Since x1 is unrestricted, write:
−
x1 = x+
1 − x1 ,
−
with x+
1 , x1 ≥ 0
Standard form program
max
−
x+
1 ,x1 ,x2 ,x3
s.t.
Matrix form
x+
1
−
x
x = 1 ,
x2
x3
−
+
−
f (x+
1 , x1 , x2 , x3 ) = −2(x1 − x1 ) + x2 − 4x3
−
− (x+
1 − x1 ) − x2 ≤ −7
2x2 − x3 ≤ 5
− 2x2 + x3 ≤ −5
−
− (x+
1 − x1 ) + x 3 ≤ 4
−
x+
1 , x1 , x2 , x3 ≥ 0
c0 = 0,
−2
2
c = ,
1
−4
−1
0
A=
0
−1
1 −1 0
0 2 −1
,
0 −2 1
1 0
1
−7
5
b=
−5
4
Example ii)
Let the program
min
y1 ,y2 ,y3 ,y4
f (y1 , y2 , y3 , y4 ) = −y1 + 6y2 + y3 − 2y4
s.t. y1 − y3 = 4
y2 + y 4 ≥ 1
y1 + y 2 + y 3 ≤ 8
y4 unrestricted, y1 , y2 , y3 ≥ 0
We now write it in its standard form and identify the matrix A and vector
b associated to the matrix format.
[This will be solved in class]
11
Practice problem on LPs
Which of the following four programs is a LP and why?
max
f (x1 , x2 , x3 ) = x1 + 2x2 − x3
x1 ,x2 ,x3
P1 s.t. ax1 + x2 + x3 ≥ 4,
x1 − x2 = 0,
x1 , x2 , x3 ≥ 0, a ∈ [0, 1]
max
f (x1 , x2 ) = x1 + 2x2 − 4.000
x1 ,x2 ,x3
P2 s.t. x1 + x2 + x3 ≥ 4,
x1 − x2 = 0,
x1 , x2 , x3 ≥ 0
max
f (x1 , x2 , x3 ) = x1 + x2 − ln x3
x1 ,x2 ,x3
P3 s.t. x1 + x2 + x3 ≥ 4,
x1 − x2 = 0,
x1 , x2 , x3 ≥ 0
max
f (x1 , x2 , x3 ) = x1 + 2x2 − x3
x1 ,x2 ,x3
x1
s.t.
≥ 4,
P4
x2
x1 − x2 = 0,
x1 , x2 , x3 ≥ 0
For each LP you have identified, write it in its matrix form.
1.4
Many optimization programs
1.4.1
The gardener’s problem
We begin with an easy problem:
The gardener’s problem (i)
You work as a gardener for Mr. Royden, a wealthy man who asks you to
build a rectangular flowerbed with the greatest area and a perimeter equal
to 10 mt. Mr. Royden is unconcerned about which and how many flowers
you decide to plant, how much money this will cost, what maintenance needs
this flowerbed has, etc.
Formalize and classify the problem. Use your intuition to guess the optimal
solution.
The glossary of symbols (legend) for this program could be:
x = first side (base) of the rectangle
y = second side (height) of the rectangle
12
Hence, the program can be formalized as follows:
max a(x, y) = xy
x, y
s.t.
p(x, y) = 2x + 2y = 10
x > 0, y > 0
(1.2)
If instead, Mr. Royden asked you to build the flowerbed with the smallest area
and a given perimeter, we shall write:
min xy
x, y
s.t.
2x + 2y = 10
x > 0, y > 0
(1.3)
The gardener problems have two brother programs:
The gardener’s problem (ii)
This time, Mr. Royden asks you to build a rectangular flowerbed with the
greatest perimeter for an area equal to 10 square meters. Again, Mr. Royden
is unconcerned about factors other than area and perimeter.
Formalize and classify the problem. Use your intuition to guess the optimal
solution.
[This will be solved in class]
I want to remind you that the main focus of this part of the course is not to solve
optimization problems. Said this, take a couple of minutes to try to intuitively
figure out what optimal solution (if any) each of the gardener’s problems has. To
start, consider that if a solution exists, it must perform x = y. Indeed, neither
in the objective function nor in the restrictions is there anything that justifies a
different value for x and y. In the third part of the course, we will return to them
with ideas on how to precisely solve these problems.
1.4.2
The milking problem
The milking problem represents the first of many business problems in which you
will be required to think creatively about how to transform a word setting into its
mathematical counterpart. For each of the three versions of the milking program,
we will briefly discuss its possible optimal solutions.
13
The milking problem (i)
You are running Milk.IA, a small company producing organic milk, which
is manually milked from your prestigious herd of cows. You currently have
two workers, Xavier and Ylenia, whose costs and productivity are described
as follows:
· Xavier (inefficient) can work non-stop for a maximum of three hours a
day, costs $20 an hour, and can milk half a liter of milk every minute.
· Ylenia (efficient) can work non-stop for a maximum of two hours a
day, costs $30 an hour, and can milk one liter of milk every minute.
Mathematically formulate this problem, knowing that the production of milk
has no additional costs and that the price per liter at which you can sell milk
is $1 a liter, and you aim at maximizing profit.
Formalize and classify the problem. Then use your intuition to guess the
optimal solution.
Prior to formalizing this program, we must decide whether to express our choice
variables as ‘number of hours’ (or minutes) of work or as ‘number of liters’ of milk.
[This will be solved in class]
We now consider also a slight variation of Milk.IA’s problem:
The milking problem (ii)
Consider again the setup from the ‘Milking Problem (i)’. However, this time
assume that market conditions limit to 200 liters the maximum amount milk
that Milk.IA is allowed to sell every day.
Formalize and classify the problem and use your intuition to guess its optimal
solution.
[This will be solved in class]
Comparing version (i) with version (ii) shows that adding a restriction to a program
may reduce the maximum value of the objective function. Is this a general result,
or does it happen by chance? The following theorem provides the answer to this
question.
14
Theorem 1: Adding new constraints
Let P be a maximization problem:
max f (x),
x∈K
where f : Rn → R and x ⊆ Rn , K feasible. We define a new program P ′ as:
max′ f (x),
x∈K
where K′ ⊆ K, K′ also feasible, obtained by adding one (or more) additional
constraint(s) to K. Then:
max′ f (x) ≤ max f (x).
x∈K
x∈K
Proof - Sketch. Since K′ ⊆ K, every point feasible for the modified problem is also
feasible for the original one. Since the objective function f is the same, in P ′ we
are maximizing f over a smaller (or possibly the same) set than P . Let x∗ ∈ K
be an optimal solution to P . Then
z ∗ = f (x∗ ).
Now consider the modified problem P ’ with a feasible set K′ ⊆ K, which may or
may not contain x∗ . If x∗ ∈ K′ , then it remains feasible for the modified problem
and:
z ′∗ = f (x∗ ) = z ∗ .
If x∗ ∈
/ K′ , then the optimizer of the modified problem must lie elsewhere in K′ ,
and since we’re maximizing over a subset of K, we cannot obtain a larger value:
z ′∗ = max′ f (x) ≤ max f (x) = z ∗ .
x∈K
x∈K
In both cases, we conclude that:
z ′∗ ≤ z ∗ ,
as required.
■
Finally, let’s now consider a third variation of Milk.IA’s problem:
The milking problem (iii)
Consider again the setup from ‘The milking problem (ii)’. We assume that
Ylenia gets a raise and now costs $65 an hour.
Formalize and classify the problem. Also, try to guess its optimal solution.
[This will be solved in class]
15
1.4.3
The vertical farming problem
The vertical farming problem
Urban H. is a company specializing in vertical farming. They produce two
types of crops in their indoor facility: cherry tomatoes (CT, kg per day) and
micro-greens (MG, kg per day). The company wants to optimize its weekly
revenue while respecting several physical and market constraints:
1. Cherry tomatoes require three times more artificial lighting per kg
than micro-greens, and micro-greens require one unit of lighting per
kg. Due to energy-saving regulations, the farm can use no more than
18 lighting units per day.
2. Both crops grow on vertical shelves. Tomatoes take up 2 units of
space per kg, while micro-greens take up 1 unit per kg. The facility
has no more than 12 space units available per week.
3. Due to a seasonal contract with a local supplier, the farm cannot sell
more than 3 kg of cherry tomatoes per week.
4. The selling price is $15 per kg for tomatoes and $8 per kg for microgreens.
Determine the optimal weekly production quantities of cherry tomatoes and
micro-greens to maximize revenue.
[This will be solved in class]
1.4.4
The milk vs cream problem
The milk vs cream problem
MuCow (Milk Undertakings, CO Waterloo) owns a herd of Holstein cows
and a herd of Jersey cows. For each herd, the total number of litres produced
each day, and milk-fat content (as a percentage) are as follows:
Holstein
Jersey
Litres produced % Milk-fat
500 lt
3.7%
250 lt
4.9%
The fat is split from the ‘rest of the milk’ and then they are blended again
to create various boxes of product. For each box, the required amount of
milk (litres), required milk-fat percentage, and profit are as follows:
Type
Volume (lt)
Fat requirement (%)
Profit per box ($)
Skmmd
2
0
0.10
2% Whole Table cr.
2
2
0.6
2
4
15
0.15
0.20
0.50
Whip. cr.
0.3
45
1.20
MuCow aims at determining the optimal production of each kind of output
that maximizes its profit. Formalize and classify the problem.
16
Let the decision variables be:
x1 = boxes of skimmed milk
x2 = boxes of 2% milk
x3 = boxes of whole milk
x4 = boxes of table cream
x5 = boxes of whipping cream
Let the total milk volume available be:
V = 500 + 250 = 750 lt,
and the total fat available be:
F = 500 · 0.037 + 250 · 0.049 = 18.5 + 12.25 = 30.75lt of fat.
Then the problem can be formulated as:
max π(x1 , . . . , x5 ) = 0.10x1 +0.15x2 + 0.20x3 + 0.50x4 + 1.20x5
x1 ,...,x5
s.t. 2x1 + 2x2 +2x3 + 0.6x4 + 0.3x5 ≤ 750,
0x1 + 0.02(2)x2 + 0.04(2)x3 + 0.15(0.6)x4 + 0.45(0.3)x5 ≤ 30.75,
xi ≥ 0 for i = 1, . . . , 5
In particular, the second constraint can be compacted as:
0.04x2 + 0.08x3 + 0.9x4 + 1.35x5 ≤ 30.75
This is a constrained linear maximization program based on real (continuous)
choice variables. Its standard-form matrix format uses the following ingredients:
x1
0.10
0.15
x
2
x = x3 , c0 = 0, c = 0.20 ,
0.50
x4
1.20
x5
2 2
2 0.6 0.3
A=
,
0 0.04 0.08 0.9 1.35
17
750
b=
.
30.75
1.4.5
The streaming problem
The streaming problem
Annabelle is deciding how to allocate her annual budget between two types
of entertainment subscriptions on the Time platform: Movie Time and Music
Time. Her objective is to maximize her total enjoyment (utility) from both
services. Although movie and music streaming are substitutes, Annabelle
enjoys movies twice as much as she enjoys music. She therefore models her
utility function as:
u(x, y) = 2x + y
where:
· x = number of months per year of Movie Time subscription,
· y = number of months per year of Music Time subscription.
Annabelle’s budget and time constraints are as follows:
1. She has an annual budget of $90 for streaming services. A one-month
subscription costs $8 for Movie Time and $5 for Music Time.
2. She plans to spend at most 300 hours per year on streaming. She
estimates that each month of Movie Time consumes 40 hours, while
each month of Music Time consumes 30 hours.
3. Her contract with Time limits her to a combined total of at most 10
subscription months per year across both services.
Determine the number of months per year that Annabelle should subscribe
to Movie Time (x) and Music Time (y) to maximize her utility.
Note: The values of x and y need not be integers.
Formalize and classify the problem.
[This will be solved in class]
1.4.6
The consulting problem
The consulting problem
ConsHulk is a consulting firm that needs to decide whether to launch a
premium research service and how many hours to allocate to a standard
consulting service. Here are some details:
· Launching the premium service yields $5,000 in revenue and restricts
consulting time.
· Standard consulting earns $150 per hour.
· The firm has 200 total hours available.
· If the premium service is launched, only 80 hours can be used for
standard consulting.
ConsHulk aims at maximizing revenue. Formalize and classify the program.
18
Symbols for our decision variables could be:
(
1 if the premium service is launched
x1 =
0 otherwise
(binary)
x2 = number of hours allocated to standard consulting (real, x2 ≥ 0)
Consistent with our legend, the revenue maximization program can be formalized
as follows:
max R(x1 , x2 ) =5.000x1 + 150x2
x1 ,x2
s.t.
0 ≤ x1 ≤ 200, x2 ≤ 80 + 120(1 − x1 ), x1 ∈ {0, 1}
This is a linear maximization program based on a mix of discrete (binary) and
real choice variables.
1.4.7
Two knapsack problems
In mathematical programming, a knapsack problem is a classic maximization problem over binary choice variables that can be built according to the following ingredients:
· A set of n items, the i-th (i = 1, . . . , n) of which is endowed with:
(i) a value vi > 0,
(ii) a weight wi > 0.
· A knapsack with total capacity W > 0
The general setup of a knapsack problem is given by:
max
{i=1,...,n}
subject to:
n
X
n
X
vi xi
i=1
w i xi ≤ W
i=1
for all i = 1, . . . , n.
xi ∈ {0, 1},
In practice, a problem has the structure of a knapsack if:
1. You are selecting from a set of items.
2. At most one element of each kind must be chosen.
3. Each item has a known value (or profit) and weight (or cost).
4. There is a single constraint limiting the total weight or cost.
5. The goal is to maximize total value without exceeding the constraint.
6. The items to choose are indivisible (i.e., no fractions are allowed).
19
Typical knapsack applications are packing items into a bag or vehicle, selecting a
portfolio or budget, and choosing ads for limited space.
We now explore three knapsack problems, from basic to more structured.
A basic knapsack problem
You are about to trek across the Sierra around Madrid. Given a set of
different items, each one with an associated value and weight, you want to
determine which you should pick to maximize the value of the items without
surpassing the capacity of your backpack.
Suppose you have a set of 5 items (one per kind) to choose from, according
to the following table:
Type
Weight (kg)
Value ($)
1
3
60
2
2
70
3
3
40
4
9
70
5
3
20
6
7
90
Assume that at least three items must be chosen from the set, and that
either the first or the fourth item must be put in your backpack. If your
backpack’s weight limit is 16 kg, what is the optimal solution? That is,
which items should you take with you?
Formalize and classify the problem.
A structured kanpsack problem
The company KitchTech wishes to ship a number of crates from Toronto to
Kitchener in a freight container. The crates are of six possible types, say
type 1 through type 6. Each type of crate has a given weight in kg and a
particular retail value in dollars, as shown in the table below:
Type
Weight (kg)
Value ($)
1
30
60
2
20
70
3
30
40
4
90
70
5
30
20
6
70
90
In addition, the following constraints apply:
(i) You cannot send more than ten crates of the same type.
(ii) You can only send some crates of type 3 if you send at least one crate
of type 4.
(iii) One (but not both) of the following two conditions must be satisfied:
1. A total of at least four crates of type 1 or type 2 is selected.
2. A total of at least four crates of type 5 or type 6 is selected.
(iv) Finally, the total weight allowed on the freight container is 1.000 kg.
Your goal is to calculate how many crates of each type to place in the freight
container so that the total value of the crates in the container is maximized.
Find the Integer Programming (IP) formulation for this problem.
20
A more general knapsack problem
You are about to trek across the desert with a vehicle having ∆ cubic metres
of cargo space for goods. There are N types of items available for putting
in this space (each with a different volume and a different net value for your
trip), and for each type there are only 2 units available. Both ∆ and N are
numbers that you know. You also know the volumes and net values that are
given in the following table:
Item
Volume (m3 )
Net Value ($)
1
v1
n1
2
v2
n2
3
v3
n3
4
v4
n4
...
...
...
N
vN
nN
You need to decide which items to take, not exceeding the volume constraint.
You can take at most two of any item, but no item can be split into fractions.
The objective is to maximize the total net value of your trip. Formulate this
problem as an LP or IP. Formalize and classify the problem.
1.4.8
The cabinet problem
The cabinet problem
Your renowned law firm, High&Law, has recently relocated to a refurbished
loft in the outskirts of Cambridge, MA (USA). To store thousands of documents, both past and future, you plan to purchase file cabinets to fill a
corridor that is 16.5 meters long.
You have identified two types of cabinets for this purpose:
· Cabinet X :
A small cubic cabinet that costs $70, which dimensions are 50 cm ×
50 cm × 50 cm (depth × width × height).
· Cabinet Y :
A larger cubic cabinet that costs $100, with dimensions 50 cm
times100 cm times50 cm.
You are planning to stack three rows of cabinets vertically, one on top of the
other, reaching a total height of 1.5 meters. Your objective is to identify the
optimal combination x and y that minimizes the total cost while covering
the entire horizontal length of the corridor.
Formalize and classify the problem. Guess the optimal solution.
(Hint: Do you really need to work with three rows? Can you simplify the
problem?)
[This will be solved in class]
21
1.4.9
The bartender problem
The bartender problem
his coming weekend Bob will work as a bartender and will be mixing drinks
at the Garaboldi Techno Rave Party (GTRP). Each cocktail will consist
of some combination of 4 alcoholic fluids, and no other ingredient will be
permitted. You have available the following quantity of fluids:
Fluid
Bourbon
Brandy
Vodka
Vermouth
Avail. Amount (lt)
120
120
120
60
Bob will make only the following four cocktails:
Cocktail
The New Yorker
The Garaboldi
The Kentuckian
The Russian
Bourbon Brandy
25%
25%
0%
25%
100%
0%
0%
0%
Vodka
25%
0%
0%
75%
Vermouth
25%
75%
0%
25%
The profit for a liter of any cocktail is $10, but the amount of liters sold
does not have to be an integer.
Bob’s goal is to generate the largest profit from selling drinks made with the
available liquors (the attendees at a rave party are not picky and would drink
whatever you give them). In particular, Bob wants to find the combination
of the four drinks that meets the objective by satisfying all the constraints.
Formalize and classify this problem.
We recommend the following list of symbols:
xn = liters of New Yorker drink
xg = liters of Garaboldi drink
xk = liters of Kentuckian drink
xr = liters of Russian drink
The math formulation is given by:
max
{xn ,xg ,xk ,xr }
π(xn , xg , xk , xr ) = 10(xn + xg + xk + xr )
subject to:
0.25xn + 1.00xk ≤ 120,
0.25xn + 0.25xg ≤ 120,
0.25xn + 0.75xr ≤ 120,
0.25xn + 0.75xg + 0.25xr ≤ 60,
xn , xg , xk , xr ≥ 0.
22
(Restriction on Bourbon)
(Restriction on Brandy)
(Restriction on Vodka)
(Restriction on Vermouth)
(Non-negativity)
The matrix form for this program relies on the following vectors and matrices:
10
0.25 0 1.00 0
120
xn
0
10
0.25 0.25 0
120
x
x = g , c0 = 0, c = , A =
, b = .
0 0.75
10
0.25 0
120
xk
10
0.25 0.75 0 0.25
60
xr
1.4.10
The data-analysis problem
The data-analysis problem
NeuroByte is a company operating a high-performance data analytics platform that processes real-time scientific data. As data accumulates over time,
the system becomes increasingly vulnerable to memory overload errors. The
longer the system runs without a full data backup, the higher the potential
cost of system instability.
The cost of performing a backup after x months from the previous backup
is given by:
C(x) = 20 + x2 (in hundreds of dollars)
Useful information:
(i) A full backup can be scheduled at the end of any month.
(ii) The system is fully backed up at the start of month 1.
(iii) Company policy mandates that exactly 9 backups be conducted over
the next 48 months.
(iv) One backup required at the end of month 48.
(v) Finally, at least three backups must occur within the first 15 months
to comply with regulatory guidelines.
The goal is to determine the months in which to schedule backups to minimize total cost over the 48-month period. Formalize and classify this problem.
Legend:
· t0 = 0 (initial backup at beginning of month 1).
· ti ∈ {1, 2, . . . , 48} (if backup occurs at the end of month i).
· zi ∈ {0, 1} (binary var. indicating if the i-th backup is in the first 15 months).
The mathematical formulation for the data-analysis problem is given by:
min
{ti ,zi ,M }
9
X
i=1
23
20 + (ti − ti−1 )2
subject to:
ti + 1 ≤ ti+1
t9 = 48
ti ≤ 15 + (1 − zi )M
9
X
i = 1, . . . , 8 (strictly increasing times)
(final backup at end of month 48)
i = 1, . . . , 9 (link between ti and zi )
zi ≥ 3
(at least 3 backups in first 15 months)
1 ≤ ti ≤ 48
zi ∈ {0, 1}
i = 1, . . . , 9
i = 1, . . . , 9, (backup within month 15)
i=1
ti ∈ Z,
Regarding variable M , a sufficiently large positive constant (e.g., M = 48), is used
to deactivate the constraint ti ≤ 15 when zi = 0.
This minimization problem is linear with mixed variables (continuous and discrete), which does not allow for a standard form.
1.4.11
The water meter problem
The water meter problem
Water Tech manufactures four sophisticated kinds of water meters and requires time on two machines and two types (skilled and unskilled) of labor.
The amount of machine time and labor (in hours) needed to produce one
unit of each product and the sales prices (in dollars) per unit are given in
the following table:
Meter
1
2
3
4
Mchn 1
11 hr
7
6
5
Mchn 2 Sklld labor
4 hr
8 hr
6
5
5
6
4
6
Unsklld labor
7 hr
8
7
4
Price
$300
260
220
180
Each month, the following resources are available:
· Machine 1 : 700 hours.
· Machine 2 : 500 hours.
· Skilled labor : Up to 600 hours, at a cost of $8 per hour.
· Unskilled labor : Up to 650 hours, at a cost of $6 per hour.
Water Tech wants to determine how many units of each kind of meter to
produce each month. Formalize and classify the problem.
(Hint: Do not overdose on unnecessary variables and symbols)
The list of symbols to be used for our decision variables can be
xi = number of produced units of meter type i, i = 1, 2, 3, 4.
. The program’s objective function is:
π(x1 , x2 , x3 , x4 ) = [300x1 + 260x2 + 220x3 + 180x4 ]−
24
−[8(8x1 + 6x2 + 6x3 + 6x4 ) − 6(7x1 + 8x2 + 7x3 + 4x4 )]
Simplifying we obtain the following mathematical formulation:
max
x1 ,x2 ,x3 ,x4
π(x1 , x2 , x3 , x4 ) = 194x1 + 164x2 + 130x3 + 108x4
subject to:
11x1 + 7x2 + 6x3 + 5x4 ≤ 700
4x1 + 6x2 + 5x3 + 4x4 ≤ 500
8x1 + 6x2 + 6x3 + 6x4 ≤ 600
7x1 + 8x2 + 7x3 + 4x4 ≤ 650
x1 , x2 , x3 , x4 ∈ N0
(Machine 1)
(Machine 2)
(Skilled labor)
(Unskilled labor)
(Non-negative integers)
This maximization program is linear. It is based on discrete choice variables. The
matrix-vector ingredients of its standard form are:
194
11 7 6 5
700
x1
164
4 6 5 4
500
x
c0 = 0,
c = ,
A=
b=
x = 2 ,
,
130
8 6 6 6
600
x3
x4
108
7 8 7 4
650
with x ∈ N40 .
1.4.12
The cleaning problem
The cleaning problem
chemical manufacturing company produces two types of liquid cleaning
products, X and Y, both measured in liters (lt). These products are created
using two blending processes: process A and process B. In addition, each
process uses three ingredients: chemical A, chemical B, and chemical C. The
following table represents the resource consumption and output per liter of
processed material:
Process
Process A
Process B
Chem A (kg)
5
4
Chem B (kg)
6
7
Chem C (kg)
3
2
The next table indicates how many liters of each product (X and Y) are
obtained per liter of processed material:
Process
Process A
Process B
Good X (lt)
2
1
Good Y (lt)
3
5
Available amounts of each chemical are summarized below:
25
Resource
Chemical A
Chemical B
Chemical C
Availability (kg)
2000
2500
1200
The company must meet the following minimum production levels:
Product
Product X
Product Y
Min Required (lt)
250
400
Finally, the unit selling prices for the two products are listed below:
Product
Product X
Product Y
Price (Rs. per lt)
50
70
Determine the optimal number of liters to process using Process A and
Process B to maximize total revenue, subject to chemical availability and
minimum production requirements.
Formalize and classify the associated program.
Let:
xA = liters produced using Process A, xB = liters produced using Process B
The mathematical formulation:
max 50(2xA + xB ) + 70(3xA + 5xB ) = 310xA + 400xB
xA ,xB
subject to:
(Chemical A constraint)
(Chemical B constraint)
(Chemical C constraint)
(Product X minimum)
(Product Y minimum)
(Non-negativity)
5xA + 4xB ≤ 2000
6xA + 7xB ≤ 2500
3xA + 2xB ≤ 1200
2xA + xB ≥ 250
3xA + 5xB ≥ 400
xA , xB ≥ 0
Continuous (real) variables characterize this maximization linear program.
The matrices and vectors that support its mathematical formulation are:
5
4
2000
6
2500
7
xA
310
x=
, c0 = 0, c =
A= 3
2 , b = 1200 .
xB
400
−2 −1
−250
−3 −5
−400
26
1.4.13
The store location problem
The store location problem
Sughero, an Italian fashion retail chain, is planning to expand by opening
one store in various cities in the north of Italy: Ancona (A), Bologna (B),
Como (C), and Domodossola (D). Each potential store location has associated costs, expected revenue, and specific constraints related to resource
allocation and market strategy. The company has limited capital and operational resources, so they must decide which locations to open to maximize
their profits based on the stores Expected Gross Profita (EGP) and Setup
Cost (SC)
Location
A
B
C
D
EGP ($)
500.000
700.000
600.000
800.000
SC ($)
200.000
400.000
300.000
500.000
Conditions to be taken into account are:
i. Budget Constraint:
The total budget for setting up new stores is $1.000.000.
ii. Operational Resource Constraint:
Each store requires a dedicated team of employees, and the company
can support up to 3 new teams.
iii. Market Strategy Constraint:
The company wants to open at least one store in either City B or
City C to ensure market penetration in a high-demand tourist region.
iv. Dependency Constraint:
Opening a store in City D requires also opening a store in City C due
to logistics and supply chain requirements.
Help Sughero determine which cities to open stores in to maximize total
expected net profit (ENP), defined as:
ENP =
D
X
(EGPj − SCj )
j=A
subject to the constraints listed above. Formalize and classify the problem.
Make sense of its optimal solution.
a
Expected gross profit is calculated before subtracting setup costs.
[This will be solved in class]
27
The store location problem (ii)
Formalize again the ’Store location problem’ under the assumption that the
setup cost for city D, is now SCD = $400.000. Again, make sense of its
optimal solution.
1.4.14
The book-staking problem
The book-staking problem
BookStoned sells decorative books with the following discount policy:
For each cm you purchase today on a book, you get a 1% discount
on the (before-discount) price of the book you purchase tomorrow.
Useful information:
i. BookStoned only sells books for $10, $20, $30, $40, and $50€ (which
are 1cm, 2cm, 3cm, 4cm, and 5cm thick, respectively).
ii. For this discount policy you must purchase one book at a time.
iii. the % discount is applied to the before-discount price of a book (i.e.,
it depends on the width of the book).a
iv. A total of 7 meters (700 cm) of books must be filled. You do not care
about author, title, size, color, or genre.
Since you want to cover the required space (7 meters) at the lowest cost, what
is the cheapest way to buy these books? In other words, which sequence of
widths should you purchase?
a
You do not get a cumulative discount. For example, if you purchase a 3cm book on
day one, you would get a 3% discount on the book you buy on day two. Then, if you
decide to purchase a 5cm book on day two, you will get a 5% discount on the book you
purchase day 3, and so on.
[This will be solved in class]
This is a discrete variable (sequential) minimization problem that is not linear,
due to the recursive and order-sensitive discount which determines a sequence of
products xj xj−1 in the objective function. Even though a brute-force solution is
not feasible due to the enormous number of permutations, dynamic programming
or greedy heuristics may work. Try to guess what the optimal solution for the x’s
in case you knew that N = 1, N = 2, and N = 3. Then generalize your guess for
a generic N ∈ N. Due to its non linearir feature, this program does not have a
standard (matrix) form.
28
1.4.15
The crude oil problem
The A crude oil problem
A crude oil extracting company needs to determine how many barrels of
crude oil to extract during this and next year. The firm estimates that if
the company extracts x millions of barrels this year and y millions of barrels
next year, the price per barrel (in $) will be based on the following linear
demand functions:
px = 80 − x,
py = 75 − y
where px and py denote the price per barrel this year and next year, respectively.
The total cost of extracting x millions of barrels this year and y millions of
barrels next year is approximately (in millions of dollars):
C(x, y) = 1.25x + 1.38y
Additional constraints include:
i. The total amount of oil extracted cannot exceed 35 million barrels.
ii. The total extraction cost cannot exceed 250 million dollars.
iii. The company can extract any number (not necessarily integer) of barrels every year.
Formulate and solve the program that synthesizes the managers’ aim for
total maximum profit (i.e., over two years).
Since we want to maximize profit, the mathematical formulation of the crude oil
problem is:
max π(x, y) = (px x + py y) − (1.25x + 1.38y)
x,y,px ,py
subject to:
(Demand for oil this year)
(Demand for oil next year)
(Non-negativity)
px = 80 − x ≥ 0
py = 75 − y ≥ 0
x, y, px , py ≥ 0
This real-variable maximization program is not linear and has no standard matrix
representation.
29
1.4.16
The camper problem
The camper problem
You’re building out a camper van for a long trip. Since you want it to be
warm, self-powered, and affordable, there are four key design choices:
i. How much insulation to install (in inches).
ii. How much solar panel area to include (in square meters).
iii. How many battery packs to bring.
iv. Whether or not to install a wood stove.
Each decision affects cost and space, and your goal is to minimize total cost
while satisfying basic power, warmth, and space needs. In particular:
Costs:
· $50 per inch of insulation you install.
· $300 per m2 of solar panels you include.
· $120 per battery pack you bring.
· $600 for the stove (if installed)
Requirements:
· The solar area must be at least 0.8 times the insulation thickness.
· We need at least 2 battery packs.
· All equipment must fit in at most 5 m3 of space:
i. 0.1 m3 per inch of insulation.
ii. 0.3 m3 per m2 3 of solar panels.
iii. 0.5 m3 per battery.
iv. 1.5 m3 if stove is installed
Formalize and classify the problem. Use your intuition to guess the optimal
solution.
The decision variables are:
x1 = insulation thickness (in inches)
x2 = solar panel area (in m2 )
x3 = number of battery packs
x4 = stove installed (1 if yes, 0 if no)
The mathematical formulation is:
min
{x1 ,x2 ,x3 ,x4 }
50x1 + 300x2 + 120x3 + 600x4
30
subject to:
x2 ≥ 0.8x1
x3 ≥ 2
0.1x1 + 0.3x2 + 0.5x3 + 1.5x4 ≤ 5
x1 , x2 ≥ 0
x3 ∈ N0
x4 ∈ {0, 1}
(solar requirement)
(minimum batteries)
(space constraint)
(non-negative vars)
(integer vars)
(binary var)
For the standard form we use the following matrices and vectors:
x1
−50
0.8 −1 0
0
x
−300
x = 2 , c0 = 0, c =
0 −1 0 ,
, A = 0
x3
−120
0.1 0.3 0.5 1.5
x4
−600
0
b = −2
5
with x1 , x2 ≥ 0, x3 ∈ N0 , and x4 ∈ {0, 1}
1.4.17
The solar panel problem
The solar panel problem
Bright-Roof Solar sells rooftop solar panel kits through two plants: east plant
(E) and west plant (W). The company can influence demand via marketing
and pricing. The firm appoints you to determine the price p, marketing
budget m, and production levels xE and xW to maximize total annual profit.
The company’s market demand for solar panels is estimated as:
√
D(p, m) = 12,000 − 40p + 300 m
where p is the selling price (in $1.000s) and m is the marketing budget (in
$1.000s). In addition, the company’s production costs are:
East Plant: 4.000xE + 0, 004x2E ,
West Plant: 4.500xW + 0, 005x2W .
Optimization must satisfy the following constraints:
i. Production must match demand
ii. Capacity limits: xE ≤ 10.000, xW ≤ 8.000
iii. Price bounds: 9 ≤ p ≤ 15 (in $1.000s)
iv. Marketing limit: m ≤ 600 (in $1.000s)
Formalize and classify the problem.
The legend for this program could be:
xE =number of panels produced by plant E
xW =number of panels produced by plant W
31
Notice that the annual profit (objective) function is given by:
π(xE , xW , p, m) =
px − 4.000xE + 0, 004x2E + 4.500xW + 0, 005x2W −
|{z}
{z
}
|
Revenue
Production Cost
m
|{z}
Marketing Cost
where x denotes the total amount of panels sold in one year. Hence, the mathematical formulation becomes:
max
px − 4000xE + 0.004x2E + 4500xW + 0.005x2W − m
{p, m, x, xE , xW }
subject to:
x = xE + xW
√
x = 12 000 − 40p + 300 m
xE ≤ 10 000
xW ≤ 8 000
9 ≤ p ≤ 15
m ≤ 600
xE , xW , x, p, m ∈ R
(Total production)
(Matching demand)
(Capacity limits E)
(Capacity limits W)
(Price bounds)
(Marketing limit)
(Continuous real variables)
Due to the non-linear nature of the ‘matching demand’ restriction, the program is
not linear and has no standard form.
1.4.18
Now is your turn!
The following three scenarios challenge students to reason about trade-offs, constraints, and optimal business decisions in realistic settings. While the math is
hidden, each story contains the structure of a formal optimization problem. Mathematically formalize each program and classify it. If possible, provide the matrices
and the vectors that support a standard form.
Silvia’s coffee trade decision
Silvia owns Bean Genius Ltd., a small firm that brokers premium green
coffee to high-end roasters. Her clients expect a shipment of at least 12
metric tons this month. In addition to meeting the volume target, Silvia
must ensure that the average quality score of the delivered coffee is at least
7,5 out of 10.
Silvia can source green coffee from three origins, each offering a different
trade-off between cost, quality, and profit:
Origin
Brazil
Ethiopia
Vietnam
Price ($/ton)
4,000
5,000
3,000
Quality Score
7
9
6
Profit ($/ton)
1,000
1,200
800
Silvia has a budget of $60,000 to spend on purchases, and she must decide
how many tons to purchase from each origin in order to maximize her total
profit, while respecting both the budget and the quality expectation from
her clients.
32
Factory expansion: line 2 or not?
A manufacturing company, SteelPeak Components, currently operates a single production line. Each week, this line can produce up to 60 units. Each
unit generates $180 in revenue and costs $100 to make.
Management is considering launching a second line, but this decision is not
without risks. The second line would cost $12,000 per week in fixed expenses,
produce up to 150 units per week, and require fewer labor hours per unit
than the first line.
Labor availability is limited to 1.200 hours per week. The two lines differ in
labor efficiency:
Line
Uts allowed
Line 1 (existing)
up to 60
Line 2 (new)
up to 150
Labor (hrs/ut)
8
6
The company must now decide:
i. Whether to open the second line (yes/no);
ii. How many units to produce on each line;
iii. How to allocate labor efficiently to stay within limits and maximize
profit.
Splitting the marketing budget
A fintech start-up has a monthly marketing budget of $20,000. Management
wants to divide this budget between social media advertising and television
advertising. Both channels show diminishing returns: the more is spent, the
less additional revenue is generated per extra dollar.
The revenue return functions, which are based on past campaigns, are given
by:
Channel
Revenues
Social media 10.000s - 0,5s2
TV
8.000s - 0,3s2
Insight
Early returns, fade fast
Moderate and stable
where s denotes spending measured in thousands of US dollars.
Management’s goal is to optimally allocate the $20.000 between the two
channels to maximize total expected revenue. Any unused funds do not
generate benefits.
33
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )