You are on page 1of 9

 

 
 
 
 
 
 
 
 
 
The Simplex Method: Linear Programming and Restaurant Menu Optimization

By

Brittany Mollica

Math 547 – 003

Professor Marzuola

April 2013
  Mollica 1

The Simplex Method: Linear Programming and Restaurant Menu Optimization

Introduction
Linear algebra is a form of mathematics that can be applied in many real-life
situations. More specifically, linear programming, a type of mathematics that is used to
maximize or minimize a linear function of several variables, can be very useful
(Lancaster). For instance, the maximization of a function has the potential to be
particularly helpful in the restaurant industry, where a restaurant could use linear
programming to optimize meal production. By considering the total number of meals
needed in one day, the business’ daily budget, and the cost of producing each type of
meal, restaurant management can maximize their profits by using linear programming to
decide the quantity of each menu item to produce (Perez). We will explore this topic by
discussing the Simplex algorithm as a method of solving problems in linear
programming. This method was invented by George Dantzig in 1947 and is an efficient
way to maximize a function that has numerous variables (“Application to Linear
Programming”). We will solve an example problem using the Simplex algorithm that
explores how linear programming can be applied to the restaurant industry, and then
discuss the advantages and disadvantages of using this method by examining how
Mediterranean Deli, a local Chapel Hill restaurant, plans their menu.

The Simplex Algorithm


The Simplex algorithm is a method used in linear programming with functions of
more than two variables (Stapel). The first key steps of this method are to identify the
function that is being maximized and to define the variables that are being put into this
equation. This function is called the objective function, and its input variables will be
defined by certain given conditions (“Application to Linear Programming”).

Objective Function:

F(x)=c1x1 + c2x2 + … + cnxn

Given Constraints:

a11x1 + a12x2 + … + a1nxn ≤ b1

a21x1 + a22x2 + … + a2nxn ≤ b2

an1x1 + an2x2 + … + annxn ≤ bn

xi ≥ 0

bj ≥ 0
  Mollica 2

For an example that is relevant to the restaurant industry, suppose that a restaurant
has a $2,000 daily budget for its dinner meal specials. This restaurant is trying to
determine how many of each of its three dinner specials to cook so that it can maximize
its production while staying under budget. We will assume that there is no advantage to
being far below budget, and that this restaurant sells every item that it makes so that our
goal is simply to determine the optimal number of each item to make without going over
the daily budget.
We first must define the three dinner specials as the three input variables for the
objective function:
x1 =Number of meals of lasagna

x2 =Number of meals of salmon

x3 =Number of meals of veggie burgers

We also know how much it costs to produce each of these three items. The
lasagna costs $5.00 to produce one meal, the salmon costs $8.00, and the veggie burger
costs $4.00.
The objective function will determine the total amount of each item this restaurant
should produce, given the cost of producing each item. This function is defined as:

Objective Function:

F(x)=x1+x2 +x3

There are also several constraints that must be taken into account in this example.
The first one, already discussed, is the restaurant’s daily budget of $2,000 for specials.

5x1 + 8x2 + 4x3 ≤ 2000

Also, this restaurant has found that it needs to cook no more than 300 total meals
from its specials every night in order to profit. This constraint:

x1 +x2 +x3 ≤ 300

The last constraint in this situation is that only ¼ of the specials cooked should be
the veggie burger, as it is the least popular option because a fewer number of the
restaurant’s customers are vegetarian.

0x1 +0x2 +x3 =75

Now that the objective function and the constraints have been defined, the next
step is to make each constraint inequality into an equality by introducing a “slack
variable” into each constraint. The problem now becomes:
 
Mollica 3

Objective Function:

F(x)=x1 + x2 + x3 +0x4 +0x5

Constraints:

5x1 + 8x2 + 4x3 +x4 = 2000

x1 + x2 + x3 + x5 = 300

0x1 + 0x2 + x3 = 75

Note: xi > 0

This new function will still satisfy the constraints and will maximize the objective
function. The next step is to also include the objective function as a fourth equation in
this linear system.

5x1 + 8x2 + 4x3 +x4 = 2000

x1 + x2 + x3 + x5 = 300

0x1 + 0x2 + x3 = 75

-x1 – x2 – x3 +f =0

We can now transform this into an augmented matrix, called the initial simplex
tableau. This matrix is:

x1 x2 x3 <x4> <x5> f

5 8 4 1 0 0 2000
1 1 1 0 1 0 300
0 0 1 0 0 0 75
-1 -1 -1 0 0 1 0

With the Simplex method, we will always keep the f equation in the fourth row.
To begin to solve this matrix for its optimal solution, we will use elementary row
operations that are similar to Gaussian elimination. Columns that contain a single 1 and
then only 0’s in all of the other rows are called basic columns. The variable that contains
the 1 is called the basic variable, and in this matrix both of the slack variables are the
 
Mollica 4
basic variables- these are denoted by brackets (< >) in the tableau. Columns that
are not basic columns are called pivot columns (“Application to Linear Programming”).
To solve for a primary solution, we set all of the nonbasic variables equal to zero
and we solve for the basic variables. This type of solution is called a basic feasible
solution. The first basic feasible solution for our example results in:

x1 = x2 = x3 = 0

x4 = 2000

x5 = 300

f =1(0)+1(0)+1(0)+0(2000)+0(300)=0

This is a possible solution that leads to f=0. However, we are looking to find the
optimal solution, which should be greater than f=0.
In order to find another optimal solution, we look at the initial tableau and choose
a different variable to become a basic variable. Normally, you choose to look at the
variable that has the largest positive coefficient in the equation for f, but since these are
all equal (every coefficient is 1) we shall look at x2 and modify it by using elementary
row operations so that the second column becomes a basic column (value of 1 in one of
the rows and zeroes elsewhere). The “1” entry, also called the pivot entry, can be in any
of the rows of this column that are not the fourth row and that are nonzero- in this
example, this could be the first or the second row. To choose between those possible
rows, we must divide the far right entry in that row by the entry in the column we are
looking at- the smallest of these ratios will be the row in the pivot column that gets the 1.
By doing this, we know our solution will result in a feasible solution, not an infeasible
solution. We do this, looking at the second column, as follows:

x1 x2 x3 <x4> <x5> f

5 [8] 4 1 0 0 2000 ratio: 2000/8 =250


1 1 1 0 1 0 300 ratio: 300/1=300
0 0 1 0 0 0 75
-1 -1 -1 0 0 1 0

The ratio for row 1 is the smallest so that entry will be the pivot entry- this entry
has brackets around it. We now use elementary row operations to convert this column to
a basic column. The resulting matrix is:
 
Mollica 5

x1 < x2> x3 x4 <x5 > f

5/8 1 1/2 1/8 0 0 250


3/8 0 1/2 -1/8 1 0 50
0 0 1 0 0 0 75
-3/8 0 -1/2 1/8 0 1 250

Note that the basic variables are now x2 and x5, and that x4 no longer satisfies the
requirements to be a basic variable. However, we also know that x3 must equal 75 and so
we can make the third column into a basic column, such that:

x1 < x2> < x3> x4 <x5 > f

5/8 1 0 1/8 0 0 425/2


3/8 0 0 -1/8 1 0 25/2
0 0 1 0 0 0 75
-3/8 0 0 1/8 0 1 575/2

The basic variables are now x2, x3, and x5, and x4 no longer satisfies the
requirements to be a basic variable. Setting the nonbasic variables equal to zero, the new
feasible solution results in:

x1 =x4 = 0

x2 =425/2

x3=75

x5 = 25/2

f = 575/2

Or (0, 425/2, 75, 0, 25/2). The value of f has now increased dramatically, and by
looking at the last row of the tableau we can see that f =(575/2)+(3/8)x1 -(1/8)x4.
Because x1 has a positive coefficient, we see that we can further optimize this
equation by making x1 into a basic variable. We do this by repeating the previous
procedure- we want the first column to become a basic column and so we must use the
ratio method we used previously to choose which row of the column will contain the
pivot entry.
  Mollica 6

x1 < x2> < x3> x4 <x5 > f

5/8 1 0 1/8 0 0 425/2 ratio: (425/2)/(5/8)=340


[3/8] 0 0 -1/8 1 0 25/2 ratio: (25/2)/(3/8)=33.333
0 0 1 0 0 0 75
-3/8 0 0 1/8 0 1 575/2

The second row has the lower ratio so we will use that entry as the pivot entry.
As before, we will use elementary row operations to obtain the following matrix:

<x1 > < x2> < x3> x4 x5 f

0 1 0 1/3 -5/3 0 575/3


1 0 0 -1/3 8/3 0 100/3
0 0 1 0 0 0 75
0 0 0 0 1 1 300

After these operations, x1, x2, and x3 are the basic variables. We now set the
nonbasic variables equal to zero and the feasible solution becomes:

x4 = x5 = 0

x1 = 100/3

x2 = 575/3

x3 = 75

f = 300

We will round these numbers down because they represent the number of meals
to produce and therefore cannot be fractions. The solution is now (33, 191, 75, 0, 0).
The equation for f becomes f=-x5. This is a negative coefficient and so f cannot be further
optimized (“Application to Linear Programming)”.
Thus, the final solution for this restaurant is to produce 33 meals of lasagna, 191
meals of salmon, and 75 meals of the veggie burger. This adds to 299 total meals, at a
cost of $1,993, which is just below the restaurant’s daily budget of $2,000 for its dinner
specials.
By looking at several other possible solutions to this equation, we can see that we
found the optimal solution. For instance (75, 150, 75, 0, 0) is a possible solution because
it adds to 300 meals but will only cost the restaurant $1,875, meaning that the restaurant
could find a better combination that would allow them to maximize production and profit.
On the other hand, if the solution was (1, 224, 75, 0, 0), this would add to 300 meals but
would cost the restaurant $2,097, which is over budget.
Mollica 7
 

Through this simple example, we can see how linear programming can be utilized
in the process of menu planning and how linear algebra could be useful in the restaurant
industry. This method allows a business to determine how much of each item to make
given the cost of producing each item, the restaurant’s budget, and any other relevant
requirements, although in reality using this process would be more complicated than in
the above example.

Mediterranean Deli- A Local Chapel Hill Restaurant


Mediterranean Deli is a local Chapel Hill restaurant that also serves as a deli,
bakery, and as a popular catering service. This restaurant delivers to fifteen snack bars
around Chapel Hill, both on and off of the University of North Carolina’s campus.
Because Mediterranean Deli is committed to serving food that is as fresh as possible, they
make most of their items fresh each day and it necessary that they know approximately
how much of each item on their menu to make daily. As manager Parker Emerson
explained, “in order to have freshness, we must limit quantities and produce more often.”
Although there are certain products that can be stored for longer than one day, this
restaurant has to take into account each item’s shelf life, how long each item will last, and
each item’s typical rate of consumption. Emerson also explained that Mediterranean Deli
tries to not throw away too much of its food because it is wasteful and bad for business,
but “as long as there is a flowing and steady state of consumption, it is all right if the
restaurant is a bit over or under [in terms of food production]”.
In order to determine how much of each item to make, however, Mediterranean
Deli does not use equations or matrices or linear algebra; instead, the chefs use intuition
and knowledge from experience to guide them in deciding how much of each item to
prepare. For example, Emerson explained that they typically make their food in batches
of 20 or 40, and that they have determined that when catering, they need to prepare to
make about ¼ to ½ of a pound of each item per person.
Although they could use math to create what would likely be a complicated
system with many constraints and specifications that would inform them of the optimal
amount of food to cook, the management and cooks at Mediterranean Deli have found
that this is impractical. Emerson said that while a mathematical system created to
optimize menu production could seem to work perfectly theoretically, when put to actual
use it could become too complicated and is not necessary. Using fewer constraints will
allow a system to work better in practice, which is why Mediterranean Deli relies on the
cooks’ intuition and experience rather than a mathematical formula.

Conclusion
Thus, while the Simplex method displays the potential advantages to utilizing
linear programming and shows how it can successfully be used to theoretically optimize
menu planning at a restaurant, it has been found that this can be difficult to actually apply
in a real setting. In reality, this model would have to account for numerous constraints
and specifications and would become very complex. Because of this, some restaurants
that make large amounts of fresh food each day, such as Mediterranean Deli, simply rely
on their chefs’ intuition and previous experience to determine the optimal amount of each
item on their menu to produce.
  Mollica 8

References

Emerson, Parker. Personal Interview. Mediterranean Deli. 16 April 2013

Lancaster, L.M. (1992a). “The history of the application of mathematical

programming to menu planning.” The European Journal of Operational

Research, vol. 57, no. 3, pp. 339-347

N/A. “Application to Linear Programming.” Web. Accessed April 2013. <

http://aix1.uottawa.ca/~jkhoury/programming.htm >

Perez, Diane. “How Do Restaurants Use Linear Programming for Menu

Optimization.” Chron: Small Business. Web. Accessed March 2013. <

http://smal lbusiness.chron.com/restaurants-use-linear-programming-

menu-planning-37132.html >

Stapel, Elizabeth. “Linear Programming: Introduction and Optimizing Linear

Systems.” PurpleMath. Web. Accessed March 2013. < http://www.pur

plemath.com /modules/linprog.htm >

You might also like