0% found this document useful (0 votes)
101 views

Lec 4

The document summarizes the caterer problem, a linear programming formulation. It involves minimizing the total cost of providing napkins over 5 consecutive dinner days with varying attendance levels. Variables include: X1-X5 for new napkins used each day; Y1-Y3 for used napkins sent to the laundry after days 1-3. Constraints ensure napkin demand is met each day using new napkins, leftovers from prior days, and napkins returned from the laundry. The objective is to find the combination of variables that meets all constraints while minimizing total costs of new napkins and laundry fees.

Uploaded by

Amit Kr Godara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views

Lec 4

The document summarizes the caterer problem, a linear programming formulation. It involves minimizing the total cost of providing napkins over 5 consecutive dinner days with varying attendance levels. Variables include: X1-X5 for new napkins used each day; Y1-Y3 for used napkins sent to the laundry after days 1-3. Constraints ensure napkin demand is met each day using new napkins, leftovers from prior days, and napkins returned from the laundry. The objective is to find the combination of variables that meets all constraints while minimizing total costs of new napkins and laundry fees.

Uploaded by

Amit Kr Godara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Introduction to Operations Research

Prof. G. Srinivasan
Department of Management Studies
Indian Institute of Technology, Madras

Module - 01
Linear Programming - Introduction and Formulations
Lecture - 04
Caterer Problem

In today's class we will look at another formulation for Linear Programming which is called
the Napkins problem. This napkins problem also sometimes called the Caterer problem is a
very important formulation in linear programming, the problem is as follows.

(Refer Slide Time: 00:49)

The requirement of napkins on 5 consecutive days of dinner is 100, 60, 80, 90 and 70, which
means that, we are going to have dinner on 5 consecutive days and for each guest, there is a
napkin that is given for them to use and the requirement of these napkins are given as 100,
60, 80, 90 and 70. A new napkin costs rupees 60, we can also send some of the used napkins
to a laundry and these napkins sent to a laundry at the end of any day, which means after the
dinner can be used from the second day onwards which means, if we send a bunch of napkins
at the end of the first day’s dinner to the laundry.

We will assume that these napkins that have come from the laundry can be used for the
dinner on the third day and so on. We can actually use these napkins even on days 4 and 5.
Now, we have some use napkins are sent to the laundry at the end of the second day, then
they can be used from day 4 onwards and so on. The laundry cost is rupees 20 per napkin to
wash and give it back. Find a solution to the napkins problem that minimizes the total cost.

Now, we first introduce the decision variables, now there are 5 days it is possible to use new
napkins on each of these 5 days. So, we can define X 1 to X5 as the number of new napkins
bought on days 1 to 5. We can also define X 1 to X5 the same variables as the number of new
napkins used on days 1 to 5, they mean the same. So, X 1 to X5 would represent the number of
new napkins used in day 1 to 5.

Now, we can also use napkins that have come from the laundry and we can put it to use on
certain days. Because, this problem has demand only for 5 days and the laundry takes 2 days,
we are not going to consider putting the used napkins to the laundry on days 4 and 5.
Because, when they come back they cannot be used. Therefore, we are going to define that
we are going to send used napkins to the laundry only on the first 3 days and therefore, we
introduce Y1 to Y3 as the number of used napkins sent to the laundry at the end of days 1, 2
and 3.

Let me again explain the variables, there are 5 days in which we are going to have the dinner
and obviously, we can use new napkins for the dinner. So, X 1 to X5 will represent the number
of new napkins used in days 1 to 5, I have indicated here that they are bought on that day,
they are bought and used they can be used. So, the number of new napkins used on that day,
Y1 to Y3 represents the number of napkins sent to laundry at the end of days 1, 2 and 3.

Now, we do not define Y4 and Y5, because if some used napkins are sent at the end of day 4
they will arrive on day 6 and can be used from day 6 onwards. But, the problem talks only
about 5 days therefore, we do not introduce Y 4 and Y5 and we introduce only Y1 to Y3. So, we
have 8 variables, 5 variables representing the new napkins for days 1 to 5 and 3 variables
representing the number of napkins sent to the laundry at the end of days 1, 2 and 3. So, there
are 8 variables in this formulation, we will now look at the constraints.
(Refer Slide Time: 05:36)

Now, the important constraint is that the demand for napkins on each day has to be met. So,

day 1 demand X1 is the number of new napkins used in day 1, X1 ≥ 100, because 100 is

the demand for day 1. The first day we have only one way of meeting the demand

which is by using new napkins, napkins that come from the laundry can be used only

on days 3, 4 and 5. Because, we have defined variables as the napkins that go to

the laundry at the end of days 1, 2 and 3 and these Y 1, Y2 and Y3 number of napkins
which go at the end of days 1, 2 and 3 can be used to meet the demand of days 3, 4 and 5
because they take two days to come back.

So, the first two days we have to use new napkins and therefore, to meet the first day’s

demand we have X1 ≥ 100. Second day’s demand we have to use new napkins, but we

can also do something like this. We can either buy exactly the required number of

napkins on day 2 or nothing prevents us from buying more than 100 on day 1 and

using the remaining ones to meet the demand of day 2.

So, we can buy more than 100 on day 1 and use some of the extra napkins on day 2. So, this

becomes X 1 −100+ X 2 ≥60 . Now, this comes because we have X 1 ≥ 100, the number of new

napkin, the number of new napkins bought on day 1 ≥ 100. So, X 1 −100napkins
can be carried to day 2, so X 1 −100 napkins that are carried to day 2 plus X 2 which are the
number of napkins bought at the beginning of day 2. Now, these two act as supplies for day 2
and this should be greater than or equal to 60.

So, this is rewritten as X 1 + X 2 ≥160, because you take this 100 to the other side of the
inequality. So, X 1 + X 2 ≥160 which is shown in blue color and the two constraints shown in
blue color are the actual constrains for days 1 and 2 respectively. Now, we move onto the
third day, now the third day we have to meet the demand and we can do it in 3 ways.

One is, if we could carry some extra new napkins which have not been used, new napkins
which have not been used at the end of second day, we can buy some new napkins on the
third day and some napkins that we have put to the laundry at the end of the first day are
going to come back as usable napkins. And therefore, there are 3 ways in which we could
meet the demand of day 3. So, extra napkins from day 2, new napkins bought on day 3 and
napkins received from laundry on day 3 which were sent at the end of day 1.

So, this gives us… Now, from the previous constraint X 1 + X 2 ≥160, now the extra napkins
that are available, extra new napkins that are available are X 1 + X 2−160, so that act as some
kind of a supply for day 3. So, X 1 + X 2−160 is the number of new napkins that are available
at the end of day 2 and have not yet been used. So, they can be used to meet the demand of
day 3, so X 1 + X 2−160 plus X3 napkins are bought in day 3.

So, they can be used plus Y1 napkins have come back from the laundry, Y1 was sent at the
end of day 1. So, Y1 laundry napkins would come back from the laundry. So,
X 1 + X 2−160+ X 3 +Y 1 ≥ 80, which is the demand for day 3. Now, this is again simplified and
the 160 is taken to the other side of the inequality to give us X 1 + X 2 + X 3 +Y 1 ≥240

You can also see a pattern emerging in the constraints; the first constraint had only X1 and the
first day’s demand. The second constraint has X 1 + X 2 and the sum of two days demand. The
third constraint has X 1 + X 2 + X 3 plus another Y1 the sum of 3 days demand. So, you can see a
pattern emerging and you will see that this pattern will continue. Now, day 4 again has 3
sources, now at the end of day 3 if we have unused new napkins they can be used on day 4,
new napkins bought on day 4, napkins received from laundry on day 4 that were sent on day
2.
So, there are 3 sources and we also have to bear in mind that the extra napkins that are
available unused napkins available at day 3. Now, can be new napkins can also be some of
the napkins that have come on the earlier day and have not been used. So, I have written here
day 4’s demand can be met in 3 ways, extra napkins available for use at the end of day 3.
Now, we do not really worry at this point whether they are new or they have come from the
laundry, the inequality will tell us that these number are extra napkins.

New napkins bought on day 4 and napkins that have come on day 4 morning or before the
dinner and these have been sent at the end of day 2. So, again there are types of supplies and

these three are written as, from the previous constraint X 1 + X 2 + X 3 +Y 1 are the napkins

available for use on day 3 that has to be ≥ 240. So, if there is an excess, so
X 1 + X 2 + X 3 +Y 1−240is what is carried from day 3 to day 4 which represents the extra
napkins from day 3 to day 4.

So, X 1 + X 2 + X 3 +Y 1 again repeating is the number of napkins available for use in day

3. Now, that is ≥ 240 and with that we meet the demand of day 3 in addition to day 2

and day 1. Now, this inequality if X 1 + X 2 + X 3 +Y 1exceeds 240, then a balance of


X 1 + X 2 + X 3 +Y 1−240 is carried over to the 4th day and that represents the extra napkins from
day 3. X4 is bought on the 4th day and Y 2 are received before the dinner on the 4th day and
Y2 are the number of napkins sent at the end of the second day to the laundry.

So, these available napkins for day 4 are

X 1 + X 2 + X 3 +Y 1−240+ X 4 +Y 2 ≥ 90

which is the demand for the 4th day. Now, this is rewritten as,

X 1 + X 2 + X 3 + X 4 +Y 1 +Y 2 ≥330

Now, consistent with the pattern you can now see the first constraint as X1 and first day's
demand, the second constraint has X 1 + X 2 and it has sum of two days demand.

The third constraint has X 1 + X 2 + X 3 and a Y1 and 3 days demand, the fourth constraint has
X 1 + X 2 + X 3 + X 4 which is new napkins. But, on 4 days plus Y 1 +Y 2 napkins that are coming in
and then greater than or equal to sum of the 4 days demand, so you can see that pattern
emerging.

(Refer Slide Time: 15:44)

We now move to the 5th day, so again the 5th day will have three types of supplies, the
excess napkins available at the end of the 4th day. The new napkins bought on the 5th day
and the napkins received from the laundry just before dinner on the 5th day and these have
been sent to the laundry at the end of the 3rd day. So, we write this. the expression becomes
longer, so we could go back to the previous one and say that now this is the day 4 constraint.

So, X 1 + X 2 + X 3 + X 4 +Y 1 +Y 2−330 are the extra napkins carried from day 4 to day 5. So,
X 1 + X 2 + X 3 + X 4 +Y 1 +Y 2−330 is what is carried this long expression is what is carried from
day 4 to day 5. And then we buy another X5 on day 5 and then we have the other supply of Y3
which has come before dinner on the 5th day and this Y3 had been sent to the laundry at the
end of the 3rd day. So, this should be greater than or equal to 70 which is the requirement for
the 5th day.

Now, this is again simplified to the 330 is taken to the other side of the inequality.

So, X 1 + X 2 + X 3 + X 4 + X 5 +Y 1 +Y 2 +Y 3 ≥ 440 and consistent with the pattern you realize that X1
to X5 is appearing in the 5th constraint, Y 1 to Y3 is appearing in the 5th constraints and the
sum of demands of all 5 days are appearing. Now, this is happening largely because we could
carry the excess napkins on a certain day for use on a subsequent day.
(Refer Slide Time: 19:22)

Because, we are modeling this we get the constraint of this type where for each day finally,
the constraint is the sum of the demands of up to that day. So, we have now written all the 5
constraints to meet the demand on all the 5 days. Now, we also have some limits on the
number of napkins that can be sent to laundry, now these are Y 1 ≤100 , Y 2 ≤60 , Y 3 ≤80
this is because the demand for day 1 is 100.

And therefore, at the end of day 1 we can have a maximum of 100 soiled napkins and we will
assume that all these 100 are used by the people and therefore, poses a limit on what can be
sent to the laundry at the end of day 1. So, Y 1 ≤100 , Y 2 ≤60 , Y 3 ≤80 So, these three
constraints give the limit on the napkins sent to the laundry and the objective function now
will be to minimize the costs, the new napkin cost 60 and we are buying X 1 + X 2 + X 3 + X 4 + X 5
amount of new napkins on days 1 to 5.

So, the new napkin cost is 60 ( X ¿ ¿ 1+ X 2 + X 3 + X 4 + X 5 )¿, Y 1 +Y 2 +Y 3 is the number of napkins


sent to laundry taking into account all the 3 days, the laundry cost is 20 per napkin. So,
20 (Y ¿ ¿1+Y 2 +Y 3 )¿ , so the objective function is to minimize the total cost, which is the

cost of new napkins and also the cost of sending these napkins to the laundry. We

also have the non-negativity restriction, where we have all the X variables and the Y

variables to be ≥ 0.
(Refer Slide Time: 20:19)

We also summarize this by giving a general formulation, so X1 be the number of new napkins
bought on day I, Xi be the number of new napkins bought on day i. The number of napkins
sent to laundry at the end of day i be Y i, c is the cost of the new napkin, a is the laundry cost,
d is the demand and p is the number of days it takes in the laundry. So, our objective function
will be the sum of the new napkin cost and the laundry cost now X i is the new napkins bought
on day i, i equal to 1 to n. So, X1 to Xn and c is this cost.

Now, the y variable will be from 1 to n-p in our example we looked at 5 days total and 2 days
for the laundry. So, only the first 3 days we set therefore, we will have Y i, i =1 to n-
p. A typical constraint would look like on a particular day i the sum of the new napkins up to
i plus the sum of the napkins that have come from laundry up to that day is greater than or
equal to sum of the demands up to that day.

Minimize ,

n n− p
Z=c ∑ X i +a ∑ Y i
i=1 i =1

i i i

∑ X j+ ∑ Y j ≥ ∑ di ∀ i
j =1 j =p+1 j=1

So, this was our 5 constraints that we had for each of these 5 days, the limit on putting the

napkins to laundry is Yi ≤ di. So, each day I can put only the maximum demand to the

laundry Xi, Yi ≥ 0 is a general formulation of the napkins problem. We have seen a


slightly simpler version of this problem in many instances you would observe that

there will be two types of laundries there will be a fast laundry and a slow laundry,

but just to make the problem simple I have used only one type of laundry. So, this

napkins problem or the caterer problem is a very important formulation in linear

programming.

In the next class we will look at two more formulations related to linear programming.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy