1
00:00:19,960 --> 00:00:28,660
in today's class we will look at two more
formulations in linear programming the first
2
00:00:28,660 --> 00:00:34,000
one is called the media selection problem
and the other is called the bicycle problem
3
00:00:34,000 --> 00:00:42,489
will first look at the media selection problem
which is a very popular formulation in linear
4
00:00:42,489 --> 00:00:51,660
programming the problem is as follows a company
wants to advertise a product in four different
5
00:00:51,660 --> 00:01:00,440
media which are television news paper websites
and radio the reach per advertisement in this
6
00:01:00,440 --> 00:01:08,539
four media are eight thousand five thousand
three thousand and two thousand respectively
7
00:01:08,539 --> 00:01:14,409
each advertisement is going to cost and the
cost are given as rupees four lakhs three
8
00:01:14,409 --> 00:01:23,390
lakhs two lakhs and one point five lakhs respectively
in each of these four different media namely
9
00:01:23,390 --> 00:01:33,250
television news paper website and radio
the company does not want to have a large
10
00:01:33,250 --> 00:01:40,360
number of advertisements in a single media
and therefore it restricts the number of advertisement
11
00:01:40,360 --> 00:01:50,789
certain wishes to have in each media as three
four five and four respectively there is also
12
00:01:50,789 --> 00:01:56,780
a budget restriction and the budget restriction
is rupees thirty two lakhs which is the maximum
13
00:01:56,780 --> 00:02:05,500
amount that can be spent in this advertisements
so the problem is how many advertisements
14
00:02:05,500 --> 00:02:11,590
does the company decide to have in each of
the media so that we maximize the overall
15
00:02:11,590 --> 00:02:19,750
reach now we are going to formulate this problem
as a linear programming problem and we first
16
00:02:19,750 --> 00:02:25,970
define the decision variables
now the decision variables are x one to x
17
00:02:25,970 --> 00:02:34,090
four where x one is the number of advertisements
placed in television x two in newspaper x
18
00:02:34,090 --> 00:02:43,250
three in websites and x four in radio there
are four different media in which this advertisements
19
00:02:43,250 --> 00:02:50,609
can be placed and there are four decision
variables one corresponding to each of these
20
00:02:50,609 --> 00:02:57,900
we now move on to write the objective function
the objective function is to maximize the
21
00:02:57,900 --> 00:03:07,709
total reach the total reach is the sum of
the reach associated with each of these media
22
00:03:07,709 --> 00:03:17,870
so if x one advertisements go to tv then eight
thousand x one is the reach that we get similarly
23
00:03:17,870 --> 00:03:26,229
five thousand x two is the reach that we have
through the advertisements in the newspaper
24
00:03:26,229 --> 00:03:33,930
three thousand x three is for websites and
two thousand x four is for radio
25
00:03:33,930 --> 00:03:41,250
so the total reach is a sum of the reach obtained
through advertisements in the four media and
26
00:03:41,250 --> 00:03:46,840
therefore we wish to maximize eight thousand
x one plus five thousand x two plus three
27
00:03:46,840 --> 00:03:54,669
thousand x three plus to thousand x four there
are several constraints the first constraint
28
00:03:54,669 --> 00:04:03,590
is the budget restriction so x one advertisements
in television would cast us four x one lakhs
29
00:04:03,590 --> 00:04:11,669
x two advertisements in newspaper would cast
us three x two lackhs x three advertisements
30
00:04:11,669 --> 00:04:18,470
in the website would cast us two x three and
x four advertisements in the radio would cast
31
00:04:18,470 --> 00:04:24,450
us one point five x four so the total money
that we will be spending is four x one plus
32
00:04:24,450 --> 00:04:29,380
three x two plus two x three plus one point
five x four
33
00:04:29,380 --> 00:04:39,199
and that cannot exceed thirty two lakhs which
is the budget restriction we also have restrictions
34
00:04:39,199 --> 00:04:45,090
on the number of advertisements that we would
place in each of these media and they are
35
00:04:45,090 --> 00:04:51,500
given by x one less than or equal to three
x two less than or equal to four x three less
36
00:04:51,500 --> 00:04:59,330
than or equal to five and x four less than
or equal to four we also have the non negativity
37
00:04:59,330 --> 00:05:06,289
restriction which is x one x two x three x
four greater than or equal to zero so this
38
00:05:06,289 --> 00:05:12,150
completes the formulation of the media selection
problem where the objective is to maximize
39
00:05:12,150 --> 00:05:19,310
the total reach there is a budget restriction
and there are restrictions on the maximum
40
00:05:19,310 --> 00:05:25,900
number of advertisements that can be placed
in each of the media so this formulation has
41
00:05:25,900 --> 00:05:33,120
four decision variables and it has five constraint
one is the overall budget constraint and the
42
00:05:33,120 --> 00:05:39,789
other four are restrictions on the number
of advertisement that we would like to place
43
00:05:39,789 --> 00:05:45,599
in each of this media
i have also indicated that these four constraints
44
00:05:45,599 --> 00:05:52,129
are called limits are bounds and if we have
a constraint of the form x one less than equal
45
00:05:52,129 --> 00:05:58,370
to three or x two less than equal to four
which means if you are restricting the value
46
00:05:58,370 --> 00:06:03,860
that a variable can take and if that comes
in the form of a constraint like this four
47
00:06:03,860 --> 00:06:10,409
constraints that we have these constraints
are also called bounds on the variables at
48
00:06:10,409 --> 00:06:18,129
the moment we will define this four as four
separate constrains but there also called
49
00:06:18,129 --> 00:06:26,650
bounds on the individual variables so this
formulation has four variables it has five
50
00:06:26,650 --> 00:06:33,629
constraints four of which are bounds and it
has the non negativity restriction once again
51
00:06:33,629 --> 00:06:39,490
since we have define x one x two x three and
x four as the number of advertisements we
52
00:06:39,490 --> 00:06:45,840
have this question whether x one x two x three
x four should be defined as continues variables
53
00:06:45,840 --> 00:06:52,029
or should be defined as integer variables
at the moment we are going to define them
54
00:06:52,029 --> 00:06:58,470
as continues variables because we are going
to formulate a linear programming problem
55
00:06:58,470 --> 00:07:04,279
so we restrict this variable to be continuous
and at the moment we do not restrict them
56
00:07:04,279 --> 00:07:13,840
to have only integer values we now move on
to this second formulation for this class
57
00:07:13,840 --> 00:07:19,110
which is called by cycle problem and it's
a very interesting problem and you will see
58
00:07:19,110 --> 00:07:24,930
how interesting it is as we move along now
the problem statement is as follows three
59
00:07:24,930 --> 00:07:34,919
friends let's call them a b and c start from
p and want to reach q each p and q are different
60
00:07:34,919 --> 00:07:45,279
places are different points and p and q are
five kilometers away they have only one bicycle
61
00:07:45,279 --> 00:07:49,809
and only one person ride the bicycle at a
time
62
00:07:49,809 --> 00:07:56,550
so we will assume that the remaining two people
will be working at different speeds while
63
00:07:56,550 --> 00:08:03,779
one person will be riding the bi cycle now
the three people can walk at speeds four five
64
00:08:03,779 --> 00:08:11,089
and six kilometers per hour and they can ride
the bicycle at seven eight and ten kilometers
65
00:08:11,089 --> 00:08:17,909
per hour when they get to write the bi cycle
how do they travel such that all the three
66
00:08:17,909 --> 00:08:24,569
reach the destination q at the earliest time
this is a very interesting problem that also
67
00:08:24,569 --> 00:08:33,240
has a simple linear programming formulation
now we will also observed that when we tray
68
00:08:33,240 --> 00:08:40,760
and solve this problem the first thing we
observe is the individual cycling speeds seven
69
00:08:40,760 --> 00:08:47,120
eight and ten kilometer per hour are faster
than the individual walking speed the four
70
00:08:47,120 --> 00:08:54,560
five and six kilometers per hour the slowest
among the cycling speed is still higher than
71
00:08:54,560 --> 00:09:00,450
the fastest among the walking speed and therefore
at any point in time
72
00:09:00,450 --> 00:09:08,480
one of them will be riding the bicycle while
the other two will be walking and we also
73
00:09:08,480 --> 00:09:13,380
have to understand that when they are walking
they are walking at different speeds and therefore
74
00:09:13,380 --> 00:09:21,190
there not going to walk together we will also
make one assumption that it actually doesn't
75
00:09:21,190 --> 00:09:30,450
matter who start the cycle first whoever riding
the cycle will go to a certain distance stop
76
00:09:30,450 --> 00:09:37,070
lead the cycle there and start walking while
the other two who are bean walking the one
77
00:09:37,070 --> 00:09:43,360
who reaches a cycle first between the two
of them will now take the cycle and ride the
78
00:09:43,360 --> 00:09:49,700
certain distance leave the cycle at some point
and walk towards the destination for the third
79
00:09:49,700 --> 00:09:56,520
person when the person reaches there will
now take the cycle and come towards the destination
80
00:09:56,520 --> 00:10:03,960
so we will try to model this situation as
a linear programming problem and our assumption
81
00:10:03,960 --> 00:10:10,990
is valid because the the fastest the walking
speed which is six kilometer per hour is still
82
00:10:10,990 --> 00:10:17,560
smaller than the slowest of the cycling speed
which is seven kilometers per hour so with
83
00:10:17,560 --> 00:10:25,590
this assumption letter start for this problem
so there are three of them so we will say
84
00:10:25,590 --> 00:10:35,470
that out of the distance of 5 kilometers let
person a write a distance one in the cycle
85
00:10:35,470 --> 00:10:46,080
let person bride x two in the cycle and let
person c ride x three in the cycle it also
86
00:10:46,080 --> 00:10:52,930
means that person a is going to walk five
minus one person b will walk five minus x
87
00:10:52,930 --> 00:11:01,210
two and person c will walk five minus x three
so there are three variables which are called
88
00:11:01,210 --> 00:11:12,750
x one x two x three which represent the distance
cycle by a b and c respectively now we have
89
00:11:12,750 --> 00:11:24,550
to find out the time taken by a now the time
taken by a is the time taken when a is using
90
00:11:24,550 --> 00:11:31,300
the cycle the time when a is walking so a
is travelling a and the time when a is walking
91
00:11:31,300 --> 00:11:41,330
so a is travelling distance x one and a is
riding at 7 kilometers per hour so the time
92
00:11:41,330 --> 00:11:52,160
taken by a when a is riding the bicycle is
x one by seven the time taken by a when a
93
00:11:52,160 --> 00:11:59,430
is walking is a walks a is the distance of
five minus x one because a cycles a distance
94
00:11:59,430 --> 00:12:06,990
x one a walks a distance five minus x one
and a wailks a speed of four kilometer per
95
00:12:06,990 --> 00:12:12,180
meter hour
so the time taken by a in walking five minus
96
00:12:12,180 --> 00:12:21,950
x one is five minus x one by four so the total
time taken by a is x one by seven plus five
97
00:12:21,950 --> 00:12:29,420
minus x one by four now we have to find out
the time taken by b and the computation are
98
00:12:29,420 --> 00:12:39,320
similar so b cycles a distance x two therefore
b would take time to x two by eight on the
99
00:12:39,320 --> 00:12:48,130
cycle b would walk distance of five minus
x two and would take five minus x two by hours
100
00:12:48,130 --> 00:12:57,580
to walk and the total time taken by b will
x two by eight plus five minus x two by five
101
00:12:57,580 --> 00:13:06,780
in hours similarly we can compute the time
taken by c which is the sum of the time taken
102
00:13:06,780 --> 00:13:16,630
when c is riding the cycle and the time taken
when c is walking so c rides at a speed of
103
00:13:16,630 --> 00:13:25,610
ten so c would take time x three by ten to
cover a distance of x three c would take five
104
00:13:25,610 --> 00:13:32,840
by six because c walks at six kilometers per
hour and covers a distance of five minus x
105
00:13:32,840 --> 00:13:38,480
three
so the total time taken by c is equal to x
106
00:13:38,480 --> 00:13:47,470
three by ten plus five minus x three six now
this three are constraints by themselves we
107
00:13:47,470 --> 00:13:53,780
have to write constraint out of this at the
moment the only constraint we can write x
108
00:13:53,780 --> 00:14:01,570
one plus x two plus x three d equals five
the distance cycle by a the distance cycle
109
00:14:01,570 --> 00:14:08,321
by b and the distance cycle by c is equal
to five so x one x two plus x three equal
110
00:14:08,321 --> 00:14:17,440
to five where we also do two things distance
to five and we also now say that only one
111
00:14:17,440 --> 00:14:24,240
person write the cycle at a time which is
implied an implicitly assumed in the formulation
112
00:14:24,240 --> 00:14:30,380
we write an equation x one plus x two plus
x three equals five under the assumption that
113
00:14:30,380 --> 00:14:37,630
one of them is using the bicycle right through
the distance and that come from the assumption
114
00:14:37,630 --> 00:14:45,170
that the fastest of the walking speeds is
lower than the slowest of the cycling speed
115
00:14:45,170 --> 00:14:51,620
this would mean that one person would be using
the bicycle at any point in time so the one
116
00:14:51,620 --> 00:14:57,180
can strain that we have written is x one plus
x two plus x three is equal five and we are
117
00:14:57,180 --> 00:15:05,300
yet to write other constraints and the objective
function let us now see that now we all know
118
00:15:05,300 --> 00:15:16,240
that we wish to minimize the time at which
all three reach the destination so the the
119
00:15:16,240 --> 00:15:22,930
objective is to find out the time at which
all three reach them destination at the earliest
120
00:15:22,930 --> 00:15:29,570
so all the three have reach the destination
when the last person out of a b and c reaches
121
00:15:29,570 --> 00:15:34,880
the destination
therefore we minimize the maximum of the three
122
00:15:34,880 --> 00:15:41,380
times the time taken by a the time taken by
b and the time taken by c the maximum of the
123
00:15:41,380 --> 00:15:49,410
three time is going to decide when all the
three have reach the destination so the the
124
00:15:49,410 --> 00:15:54,740
maximum of the tree is the time in which all
three have reached the destination and we
125
00:15:54,740 --> 00:16:01,740
now wish to minimize the maximum of the three
times so let us called the maximum of the
126
00:16:01,740 --> 00:16:10,070
three times to be u which is a variable so
we minimize a u which is our objective function
127
00:16:10,070 --> 00:16:16,920
now the corresponding constrains are since
u is the maximum of the tree times u have
128
00:16:16,920 --> 00:16:23,770
to be greater than or equal to the three times
therefore the u grater then you x one by seven
129
00:16:23,770 --> 00:16:29,650
plus five minus x one by four u greater than
or equal to x two by eight plus five minus
130
00:16:29,650 --> 00:16:33,430
x two by five
and u greater than or equal to x three by
131
00:16:33,430 --> 00:16:38,840
ten plus five minus x three by six now we
realize that we have written the objective
132
00:16:38,840 --> 00:16:45,960
function and we have also three constraints
where we relate the variable u which is in
133
00:16:45,960 --> 00:16:54,970
the objective function to the tree times taken
by a b and c respectively we also have the
134
00:16:54,970 --> 00:17:00,350
constraints x one plus x two plus x three
e equal to five which is the fourth constraint
135
00:17:00,350 --> 00:17:09,120
and x one x two x three and u greater than
or equal to zero so this problem has now four
136
00:17:09,120 --> 00:17:15,820
variable the three variables x one x two x
three which are the distance cycle by a b
137
00:17:15,820 --> 00:17:24,319
and c and you which is the maximum of the
time taken by a b and c respectively
138
00:17:24,319 --> 00:17:30,600
so the objective is to minimize u u greater
than or equal to time taken by a u greater
139
00:17:30,600 --> 00:17:36,630
than or equal to time taken by b u greater
than or equal to time taken by c and x one
140
00:17:36,630 --> 00:17:44,249
x two x three and u greater than or equal
to zero so the formulation has four variables
141
00:17:44,249 --> 00:17:49,970
four constrained the three constrained that
are shown here for u and the constraint x
142
00:17:49,970 --> 00:17:56,470
one plus x two plus x three equal to five
and then all the four variables are greater
143
00:17:56,470 --> 00:18:03,620
than or equal to zero
now this formulation also teaches us to have
144
00:18:03,620 --> 00:18:10,419
objective functions which essentially try
to minimize the maximum of or in certain function
145
00:18:10,419 --> 00:18:16,340
or in certain other formulations we will have
situations where we have to maximize the minimum
146
00:18:16,340 --> 00:18:23,179
of certain function so if we have to minimize
the maximum of certain functions in this case
147
00:18:23,179 --> 00:18:29,899
minimize the maximum of the this three functions
now defined another variables u which represent
148
00:18:29,899 --> 00:18:34,009
the maximum of the
so the minimize the you and then say that
149
00:18:34,009 --> 00:18:41,190
since u is the maximum u has to be greater
than or equal to each one of the three so
150
00:18:41,190 --> 00:18:47,529
this formulation helps us to understand and
helps us do the modelling when we have situation
151
00:18:47,529 --> 00:18:55,799
where we minimize the maximum of certain given
functions in the next class we will look at
152
00:18:55,799 --> 00:18:59,289
two more formulations related to linear programming