Modelling With Algorithms
Modelling With Algorithms
Algorithms
1. The instructions labelled 1 to 7 describe the steps of a sorting algorithm applied to a list of six numbers.
1. Let i equal 1.
2. Repeat lines 3 to 7, stopping when i becomes 6.
3. Let j equal 1.
4. Repeat lines 5 and 6, until j becomes 7 − i.
5. If the jth number in the list is bigger than the (j + 1)th, then swap them.
6. Let the new value of j be j + 1.
7. Let the new value of i be i + 1.
a. Apply the sorting algorithm to the list of numbers shown below. Record in the table provided the state of the list after each pass.
Record the number of comparisons and the number of swaps that you make in each pass. (The result of the first pass has
already been recorded.) [5]
i Comps Swaps
1 9 7 3 11 5 13 5 3
b. Suppose now that the list is split into two sublists, {9, 11, 7} and {3, 13, 5}. The sorting algorithm is adapted to apply to three
numbers and is applied to each subsist separately. This gives {7, 9, 11} and {3, 5, 13}. How many comparisons and swaps does
this need? [2]
c. How many further swaps would the original algorithm need to sort the revised list {7, 9, 11, 3, 5, 13} into increasing order? [1]
2.
i. Apply the instructions with 6 as the chosen integer, stopping when a sequence repeats itself. [2]
ii. Apply the instructions with 256 as the chosen integer, stopping when a sequence repeats itself. [3]
Item A B C D E F
Weight (kg) 2 1 6 3 3 5
i. Use the first-fit algorithm to pack the items in the order given, and state how many boxes are needed. [2]
ii. Place the items in increasing order of weight, and then apply the first-fit algorithm. [2]
iii. Place the items in decreasing order of weight, and then apply the first-fit algorithm. [2]
iv. An optimal solution is one which uses the least number of boxes. Find a set of weights for which placing in decreasing order
of weight, and then applying the first fit algorithm, does not give an optimal solution. Show both the results of first-fit
decreasing and an optimal solution. [2]
v. First-fit decreasing has quadratic complexity. If it takes a person 30 seconds to apply first-fit decreasing to 6 items, about
how long would it take that person to apply it to 60 items? [2]
Network Algorithms
3. The network below represents a number of villages together with connecting roads. The numbers on the arcs represent distances (in miles).
a. Use Dijkstra’s Algorithm to find the shortest routes from A to each of the other villages. Give these shortest routes and the
corresponding distances. [6]
b. Traffic in the area travels at 30mph. An accident delays all traffic passing through C by 20 minutes. Describe how the network
can be adapted and used to find the fastest journey time from A to F. [2]
4. Six remote villages are linked by a set of roads. Two villages are connected directly if there is a road between them which does not pass
through another village. The table gives the lengths in miles of all direct connections.
A B C D E F
A 6 7 12 3
B 6 10 8
C 7 10 2
D 12 2 9 8
E 8 9
F 3 8
a. Why might it be thought surprising that the direct distance between A and D is as long as 12 miles? Give a possible reason why
the distance is longer than might have been expected. [2]
b. Use the tabular form of Prim's algorithm, starting at A, to find a minimum connector for these villages. Draw your connector and
give its total length. [6]
5. A mountain ridge separates two populated areas. Networks representing roads connecting the villages in each area are shown below. The
numbers on the arcs represent distances in kilometres. There is also a mountain road of length 15 kilometres connecting C to Z.
• Use Dijkstra's algorithm on the complete network, including CZ, to find the shortest route from A to X. Give the route and its
corresponding distance. [6]
• Would it need fewer computations to use Dijkstra's algorithm on the network for villages A to F to find the shortest route
from A to C, and then use Dijkstra's algorithm on the network for villages U to Z to find the shortest route from Z to X? Give
a brief justification for your answer. [2]
b. The local council needs to discover which roads it should keep clear of snow during the winter to keep all the villages connected,
and the corresponding total length of road.
• Use Kruskal's algorithm on the network for villages A to F to find a minimum connector for {A, B, C, D, E, F}. Show your use
of the algorithm. Draw your minimum connector. [3]
• Use Prim's algorithm on the network for villages U to Z to find a minimum connector for {U, V, W, X, Y, Z}, starting at U.
Show your use of the algorithm. Draw your minimum connector. [3]
• What is the total length of road that the council must keep clear of snow? [2]
Further Network Problems
6. Simon has a list of tasks which he has to complete before leaving his home to go on holiday. The table lists those tasks, their durations, and
their immediate predecessors. The durations assume that only one person is working on each activity
Duration
Task Immediate predecessor(s)
(minutes)
A pack suitcases 30 –
B make up beds 10 –
C clean upstairs 20 A, B
G disconnect TV system 5 –
H load car 10 A
I clean downstairs 25 D, F
L lock up 5 G, H, J, K
b. Mark on your diagram the early time and the late time for each event. Give the minimum completion time and the critical
activities. [6]
c. Explain why Simon will require help if the tasks are all to be completed within the minimum time. [1]
d. Simon’s friend offers to help. They share the tasks between them so that each task is completed by only one person. Produce a
cascade chart to show how the tasks can be shared between Simon and his friend, and scheduled, so that the project can be
completed in the minimum time. [4]
7. The table lists tasks which are involved in adding a back door to a garage. The table also lists the duration and immediate predecessor(s)
for each task. Each task is undertaken by one person.
A measure 0.5 –
E fit frame 1 B, C
F fit door 1 E
b. Mark on your diagram the early time and the late time for each event. Give the minimum completion time and the critical
activities. [6]
c. Produce a schedule to show how two people can complete the project in the minimum time. [2]
d. Soon after starting activity D, the marble step breaks. Getting a replacement step adds 4 hours to the duration of activity D. How
does this delay affect the minimum completion time, the critical activities and the minimum time needed for two people to
complete the project? [3]
8. A village amateur dramatic society is planning its annual pantomime. Three rooms in the village hall have been booked for one evening per
week for 12 weeks. The following activities must take place. Their durations are shown.
• Each activity needs a room except for activities G, I and J.
• Choosing actors and dancers can be done in the same week. Rehearsals can begin after this.
• Rehearsing the dancers cannot begin until the music has been prepared.
• The scenery must be installed after rehearsals, but before dress rehearsals.
• Making the costumes cannot start until after the actors and dancers have been chosen.
• Everything must be ready for the dress rehearsals in the final two weeks of the 12-week preparation period.
C choose dancers 1
F rehearse dancers 6
G prepare scenery 6
H install scenery 1
I prepare music 2
J make costumes 4
K dress rehearsals 2
a. Complete the table above showing the immediate predecessors for each activity [4]
c. Mark on your network the early time and the late time for each event. Give the critical activities. [5]
d. It is discovered that there is a double booking and that one of the rooms will not be available after week 6. Using the space
provided, produce a schedule showing how the pantomime can be ready in time for its first performance. [2]
Free Space
1
Room
1 2 3 4 5 6 7 8 9 10 11 12
Week
9. The figure below represents a system of one-way roads through which traffic flows from a source, S, to a sink, T. The weights on the arcs
show the capacities of the roads in cars per minute.
a. Explain why the maximum possible flow across FG must be less than 23 cars per minute [1]
b. The cut α partition the vertices into sets {S, C} and {A, B, D, E, F, G, T}. Calculate the capacity of cut α [1]
c. The cut β partition the vertices into sets {S, A, C, F, G} and {B, D, E, T}. Calculate the capacity of cut β [1]
d. Given that one of α or β is a minimum cut, write down the maximum possible flow from S to T. [1]
e. On a particular morning
• Road GE is closed for repairs,
• Roads FB, AD and DE are full to capacity
Use the diagram below to show that the maximum possible flow from part (d) is still achievable when GE is not used and FB, AD
and DE are full to capacity [2]
10. The figure below represents a system of pipes through which fluid can flow from two sources, S1 and S2, to three sinks, T1, T2 and T3. The
weights on the arcs show the capacities of the pipes in gallons per hour.
a. Add a supersource and a supersink to the network shown above. Give appropriate weightings and directions to the connected
arcs. [2]
b. Calculate the capacity of the cut X = {S1, S2, A, D}, Y = {B, C, E, F, T1, T2, T3}. [1]
c. Explain why the arcs FT1 and FT2 cannot both be flowing at capacity. [1]
d. On the diagram below, show a flow through the network of 230 gallons per hour. [2]
b. Give the objective function and find the solution which will give the maximum profit. [3]
c. Angelo considers increasing the cost of snowboard hire so that snowboard profits rise enough to change the optimal solution. By
how much will snowboard profits have to rise to change the optimal solution? [1]
d. Angelo increases the cost of snowboard hire and creates extra storage space for snowboards. What is the greatest number of
extra snowboards it is worth Angelo accommodating? [2]
12. Ian the chef is to make vegetable stew and vegetable soup for distribution to a small chain of vegetarian restaurants. The recipes for both of
these require carrots, beans and tomatoes.
• 10 litres of stew requires 1.5 kg of carrots, 1 kg of beans and 1.5 kg of tomatoes.
• 10 litres of soup requires 1 kg of carrots, 0.75 kg of beans and 1.5 kg of tomatoes.
• Ian has available 100 kg of carrots, 70 kg of beans and 110 kg of tomatoes
a. Identify appropriate variables and write down three inequalities corresponding to the availabilities of carrots, beans and tomatoes.
[5]
b. Graph your inequalities and identify the region corresponding to feasible production plans. [5]
c. The profit on a litre of stew is £5, and the profit on a litre of soup is £4. Find the most profitable production plan, showing your
working. Give the maximum profit. [3]
d. Ian can buy in extra tomatoes at £2.50 per kg. What extra quantity of tomatoes should Ian buy? How much extra profit would be
generated by the extra expenditure? [3]
13. Two products are to be made from material that is supplied in a single roll, 20 m long and 1 m wide. The two products require widths of 47
cm and 32 cm respectively.
Two ways of cutting lengths of material are shown in the plans below.
a. Given that there should be no unnecessary waste, draw one other cutting plan that might be used for a cut of length z metres. [2]
b. Write down an expression for the total area that is wasted in terms of x, y and z. [2]
c. All of the roll is to be cut, so x + y + z = 20. There needs to be a total length of at least 20 metres of the material for the first
product, the one requiring width 47 cm. Write this as a linear constraint on the variables [1]
d. Formulate an LP in terms of x and y to minimize the area that is wasted. You will need to use the relationship x + y + z = 20,
together with your answers to parts (b), (c) and (d). [3]
b. Colin sells the objects at craft fairs. He charges £30 for a bowl, £15 for a candle holder and £3 for a key fob.
Set up an initial simplex tableau for the problem of maximizing Colin's monthly income subject to your constraints from part (a),
assuming that he sells all that he produces [2]
P b c f s1 s2 RHS
c. Use the simplex algorithm to solve your LP, and interpret the solution from the simplex algorithm [8]
P b c f s1 s2 RHS
P b c f s1 s2 RHS
P b c f s1 s2 RHS
d. Over a spell of several months Colin finds it difficult to sell bowls so he stops making them. Modify and solve your LP, using
simplex, to find how many candle holders and how many key fobs he should make, and interpret your solution. [3]
e. At the next craft fair Colin takes an order for 4 bowls. He promises to make exactly 4 bowls in the next month. Set up this
modified problem as an application of two-stage simplex. [3]
f. The solution now is for Colin to produce 4 bowls, 6⅔ candle holders and no key fobs. What is Colin's best integer solution to the
problem? [1]
g. Your answer to part (f) is not necessarily the integer solution giving the maximum profit for Colin. Explain why. [1]
15. A school awards three types of prize: junior, intermediate and senior. The school has the following constraints on the number of prizes it can
award.
• At most 50 prizes may be awarded
• At most twice as many senior prizes as junior prizes may be awarded
• At least 10 % of the prizes must be intermediate
Each junior prize is worth £10, each intermediate prize is worth £15 and each senior prize is worth £25. The school wants to maximise the
total value of the prizes awarded.
Let x represent the number of junior prizes awarded, let y represent the number of intermediate prizes awarded and let z represent the
number of senior prizes awarded.
a. Formulate this information as an LP problem by
• Stating the objective function
• Listing the constraints as simplified inequalities with integer coefficients. [5]
b. The simplex algorithm is used to solve this LP problem. After a first iteration the tableau below is produced.
i. Explain how the tableau shows that the solution obtained after the first iteration is not optimal. [1]
ii. Perform a second iteration [3]
c. The final tableau after a third iteration of the simplex algorithm is given below
i. State the number of each type of prize that should be awarded. [1]
d. The school decides, as an additional constraint, to award at least 10 intermediate prizes. Explain why the simplex algorithm cannot
be used to solve the LP problem with this additional constraint. [1]
e. The two-stage simplex method is to be used to solve this modified LP problem. Formulate the additional constraint and define
the new objective function. Define each variable that you use. [3]
16. Three products, A, B and C are to be made.
Three supplements are included in each product. Product A has 10 g per kg of supplement X, 5 g per kg of supplement Y and 5 g per kg of
supplement Z.
Product B has 5 g per kg of supplement X, 5 g per kg of supplement Y and 3 g per kg of supplement Z.
Product C has 12 g per kg of supplement X, 7 g per kg of supplement Y and 5 g per kg of supplement Z.
There are 12 kg of supplement X available, 12 kg of supplement Y, and 9 kg of supplement Z.
Product A will sell at £7 per kg and costs £3 per kg to produce. Product B will sell at £5 per kg and costs £2 per kg to produce. Product C
will sell at £4 per kg and costs £3 per kg to produce.
The profit is to be maximised.
a. Explain how the initial feasible tableau shown in Fig. 3 models this problem [6]
b. Use the simplex algorithm to solve this problem, and interpret the solution [8]
c. In the solution, one of the basic variables appears at a value of 0. Explain what this means. [1]
d. There is a contractual requirement to provide at least 500 kg of product A. Show how to incorporate this constraint into the initial
tableau ready for an application of the two-stage simplex method. Briefly describe how the method works. You are not required to
perform the iterations. [5]
17. The following LP problem is to be solved.
Maximise P = 3x + y + 2z
subject to x + 2y ≤ 30
2x + y + z ≥ 14
2x + z ≤ 20
x, y, z ≥ 0
a. Complete the initial tableau below so that the two-stage simplex method may be used to solve this problem.
Show how the constraints have been made into equations using slack variables, surplus variables and artificial variables.
Show how the rows for the two objective functions are formed. [7]
b. Perform one iteration of the two-stage simplex method and explain why your answer shows that the first stage has been
completed. [5]
c. Using the tableau in above as the starting point for the second stage. Reduce the tableau so that the second stage can be started
and carry out the first iteration of the second stage of the two-stage simplex method, using an entry in the s2 column as the pivot
element. [3]
d. State which variables are now basic after this first iteration of the second stage of the two-stage simplex method. [1]
e. The final tableau is shown below:
Give the maximum value of P, and the corresponding values of x, y and z. [2]
1 i B1 i = 2 row OK
i B1 i = 3 row OK FT
i B1 comparisons
swaps
Examiner's Comments
ii
further swaps 6 B1 cao
i
Total 8
Examiner's Comments
2 i B1
Most succeeded in answering the
question, which included a
requirement to state how many
boxes had been used.
i 3 boxes B1
sorted increasing
Examiner's Comments
ii B1
Examiner's Comments
ii
A1
i
6332222
Optimal:
correctly doing it
Examiner's Comments
i
A1 Most candidates found this
v
challenging. It is to their credit that
they realisedwhat was needed, but
many generated large random sets
of weights, and hoped. Few
thought it through to minimalist
sets such as 3, 3, 3, 3, 2, 2, 2, 2.
Examiner's Comments
v A1
Total 10
3 i B1 Dijkstra – C correct
i B1 order of labelling
i B1 labels
i B1 first 4 pairs
second 4 pairs
Examiner's Comments
ii Turn distances to times throughout the network. E1 Explanations needed, not answers
Total 8
all correct
ii A1 (dependent on 3 Ms)
(can cross all rows)
26 (miles)
cao
Examiner's Comments
ii B1
Total 8
i A1 identified – OK if by length)
i B1 min connector
ii B1 min connector
ii
Total length = 72 km. B1cao 27 + 30
i
ii
B1 + 15 for the pass
i
Examiner's Comments
Total 8
6 i M1 activity on arc
i A1 A, B, C OK
i A1 D, F, I OK
i A1 rest OK
i A1 FT
cao
Examiner's Comments
ii A1 A, B, C OK
ii A1 D, F, I OK
ii A1[5] rest OK
ii A1 FT
ii A1 FT
Examiner's Comments
(If L omitted in (i) ignore omission here.) diagram like this or attempted
i
M1 cascade … no more than 1 omitted
v
activity
i
A1 precedences correct
v
i Examiner's Comments
A1
v
There were candidates, when
answering part (iv,) who tried to
schedule all non-critical activities to
start at time 0. There were those
who, whilst scheduling correctly,
failed to show who was doing
what.
Total 16
M1 Activity on arc
7 i A1 E (precedences)
Examiner's Comments
critical activities – A, B, E, F, G
i B1 The CPA network was generally
(or ABEG + ABEF)
well constructed. The most
common error was to have
activities F and G share the same i
node and same j node.
M1 Activity on arc
ii A1 E (precedences)
Examiner's Comments
critical activities – A, B, E, F, G
ii B1
(or ABEG + ABEF) The forward and backward passes
were also well done. The common
error was to have a late time of 6
at C’s j-node / D’s i-node.
not ft
Examiner's Comments
B1
ii
Some candidates failed to answer
i
B1 the question in this part. Schedules
Needs to be clear what is done by whom.
and cascade diagrams were seen,
This doesn’t necessarily require people
but without indication of who was
being labelled ... but might.
doing what. In some cases that
might have been due to candidates
attempting to use colouring, or
other shading, which could not be
seen on scanned scripts.
i
8.0 hours or delay 0.5 hours B1 cao ISW if needed
v
i
A, C, D B1 cao
v
Examiner's Comments
Total 16
A, B, C, G and I
B1 −1 for 1 or 2 wrong rows
8 i
B3 −2 for 3 or 4 wrong rows
−3 for 5 or 6 wrong rows
activity on arc
M1 immediate predecessors A, B, C, I,
ii A1 G
A1 immediate predecessors D (A),
E(B), F(C,I,)
ii M1 forward pass
ii A1√
ii M1 backward pass
ii A1√
ii
Same as for (ii)
i
eg
Examiner's Comments
Examiner’s Comments
B1
(AO1.1)
b
(i) [Capacity of cut α is] 97 Examiner’s Comments
[1]
This part was answered extremely
well by the majority of candidates
with nearly all giving the correct
answer of 97.
B1
(AO1.1)
b
(ii) [Capacity of cut β is] 161
[1]
Examiner’s Comments
Understandably this part was not
answered as well as (b)(i) with
many candidates not including all
the arcs that went in the direction
from the source set of nodes to the
sink set (which were AD(23),
AE(18), SB(26), CB(28), FB(17),
GE(18) and GT(31) giving the
correct answer of 161). Some
candidates incorrectly included arc
BG. As this arc was directed from
the sink to source, it should not
have been included in the
calculation of the capacity of that
particular cut.
Follow
through their
least from
(b)(i) and (ii)
B1ft
c Maximum possible flow is 97 (AO2.2a Examiner’s Comments
)
Many candidates correctly applied
the maximum flow-minimum cut
theorem in this part and realised
that the least value from parts (b)(i)
and (ii) would be the maximum
possible flow through the network.
Consistent
flow pattern
(flow in = flow
M1 out at each
(AO2.1) node) – one
number on
each arc GE
blank/0,
FB = 17, AD =
23, DE = 16
Condone
incorrect flow
d across one
vertex for the
M mark
Condone GE
blank
A1
(AO2.2a
)
Examiner’s Comments
[2]
The most common
misunderstanding in this part was
by some candidates who only
showed the flow in one particular
path from S to T rather than the
flow through the entire network
(subject to the conditions given in
the question). There are two main
points that candidates must
consider when tackling this type of
question. They are the feasibility
condition (which says that the flow
along each arc must not exceed
the capacity of that arc) and the
conservation condition (which says
that apart from the source (S) and
sink (T) nodes the total flow into a
node must equal the total flow out
of that node).
Total 6
B1 (AO
1.1)
A supersource with arcs SS1 and SS2.
[2]
B1 (AO
Capacity of cut = 15 + 35 + 60 + 40 + 60 + 10 + 10 + 10 + 35 1.1)
b
= 275 gallons per hour
[1]
B1 (AO
2.4)
The maximum flow out of F is 95 (along arcs FT1, FT2 and FC).
[1]
M1 (AO
Consistent
2.1) flow pattern
(flow in = flow
out at each
node) – one
number on
each arc.
Furthermore
as the
capacity of
the arcs
leading into
the three
d
sinks is 235
and both FT1
and FT2
cannot both
be saturated
one of these
two arcs must
be reduced
for this mark
to be
A1 (AO awarded.
2.2a)
A correct
answer with
flow = 230
[2]
E1 (AO
3.1b)
The capacity of the cut which partitions the vertices into the sets
{S1, S2, A, B, C, E}, {D, F, G, T1, T2, T3} is 30 + 35 + 40 + 20 + 65
+ 40 = 230 ∴ min. cut ≤ 230
e E1 (AO
By the maximum flow–minimum cut theorem the maximum flow is
2.1)
equal to the minimum cut and so therefore the maximum flow
through the system is 230 gallons per hour
[2]
Total 8
1
i e.g.
1
i x + y ≤ 600 B1
i 1.1x ≤ y B1
i B1 FT horizontal line
i B1 FT vertical line
i B1 FT positive slope line
i B1 x + y = 600
Examiner's Comments
ii 27500 at (250,350)
ii
or more B1 cao (allow etc)
i
Total 16
1 Let x be the number of (10s of) litres of stew and y be the number of “number of”, referring to soup &
i B1
2 (10s of) litres of soup that Ian makes. stew
i B1 −1 each scaling or
Carrots: 0.15x + 0.1y < 100, i.e. 3x + 2y < 2000
equalities
Examiner's Comments
i B1
Tomatoes: 0.15x + 0.15y < 110, i.e. 3x + 3y < 2200 Many candidates failed to get to
grips with the underlying variables,
confusing stew and soup with
carrots, beans and tomatoes. To
add to their confusion there were
both litres and tens of litres to
handle … too much for many to
make sense of.
line 1
line 2
line 3 all √ subject to negative
gradients
B1
shading giving feasible
quadrilateral bounded by axes …
B1
ii or identified by vertices
B1
B1
Examiner's Comments
B1
ii
So make 533.33 litres of stew and 200 litres of soup, A1 stew and soup (cao)
i
profit (cao)
Examiner's Comments
ii
giving a profit of £3466.67 (3375 – 3560). A1 The usual optimisation requirement
i
had a sting in the tail for those who
had chosen their variables to
represent tens of litres of the
products … they had to do some
interpreting … not 20 litres of soup,
but 200. Keeping in touch with
reality might have helped!
i
Best solution now at (0, 933.3)…profit £3733.33 (£373.33) M1
v
i
So best new solution uses 30 kg extra tomatoes (140 kg total) A1 30kg (allow 140 new total) cao
v
i Examiner's Comments
Extra profit is £(3733.33 – 3466.67 – 30*2.5) = £191.67 A1
v
A challenging last part question. A
few candidates succeeded with it.
Total 16
M1
1
i 3 widths + waste
3
A1
ii
2x + y > 20 B1
i
i
y + 3z > 24 B1√
v
v Use of z = 20 − x − y M1
v
Cut 10m according to plan × and 10m according to plan z. M1 z =10
i
Gives …
v
i
20m of material with width 47cm
v
30m of material with width 32cm A1 both
i
v
1m2 of waste. A1 waste
i
Examiner's Comments
Total 16
1
i materials 15b + 6c + 2f ≤ 100 B1 cao
4
cao
Examiner's Comments
ii B1 objective … cao
ii B1 rest … cao
ii
B1 pivot
i
ii
M1 first iteration
i
ii
A1 cao
i
ii
B1 pivot
i
ii
M1 second iteration
i
ii
A1 cao
i
ii
B1 resources and income cao
i
Examiner's Comments
Examiner's Comments
v B1 new objective
v B1 bowls ≤ 4
v B1 bowls ≥ 4
v OR or
v B1 objective
Examiner's Comments
v B1 bowls ≥ 4
v There might be another solution with less income, but even less
B1
ii expenditure.
Total 20
[5]
B1(AO1.
1) Negative
b Eg There is still a negative entry in the objective row and so entry in the
(i)
z can still be increased objective row
[1]
M1(AO3
.4)
Pivot
A1(AO1.
b 1) Any non basic
variable
(ii) column
correct
A1(AO1.
1) All correct
[3]
B1(AO3.
2a)
c
(i) 15 junior prizes, 5 intermediate prizes and 30 senior prizes
[1]
B1(AO3.
2a)
c
(ii) £975
[1]
E1(AO3.
Eg The simplex algorithm can only be used to solve constraints of
5b)
d the less than or equal to form and the new constraint is
y ≥ 10
[1]
B1(AO3.
1a)
B1(AO2.
5)
e s4 is a surplus variable, a1 is an artificial variable
B1(AO3.
A + y − s4 = 10 where A is the new objective function to be
5c)
minimised
[3]
Total 15
1
i Let a be the number of kg of A… B1 variable defs.
6
i Line 1 ⇔ max (7–3)a+(5–2)b+(4–3)c ⇔ 4a+3b+c B1 objective
i B1 (7 − 3)…
≤ + RHS (available)
Examiner's Comments
ii B1 Pivot
ii M1A1
ii B1 Pivot √
ii M1
ii A1 cao
Examiner's Comments
ii at a profit of £7200 with 1.8kg of Z left B1 The simplex was done well.
However, the interpretation was
often incomplete or had units
missing, which were vital in this
question.
ii
or…It means that product A is in the solution, but at zero value. B1
i
ii Examiner's Comments
(Candidates may refer to degeneracy, which will earn the mark.)
i
Again, interpretations were often
incomplete.
i
B1 new objective
v
i
B1 surplus+artificial
v
i
B1 new constraint
v
i
Minimise Q until 0 (if feasible).
v
i
Then drop Q and f and proceed to optimum. B1
v
i
B1
v
Examiner's Comments
i
Allow up to 3 out of 5 for big M.
v The question asked for
incorporation into initial tableau, but
candidates often lost marks by
failing to do this.
Total 20
First two
equations
Three rows
correct
following
through their
B1 equations (all
boxes
(AO1.1)
complete in
x + 2y ≤ 30 ⇒ x + 2y + s1 = 30 each row)
B1
2x + z ≤ 20 ⇒ 2x + z + s3 = 20 (AO3.1a
P = 3x + y + 2z ⇒ P – 3x – y – 2z = 0 )
Examiner’s Comments
B1
2x + y + z ≥ 14 ⇒ 2x + y + z – s2 + a1 = 14 (AO3.1a
It is vital in questions like this that
)
the candidate reads the entire
Q = a1 ⇒ Q + 2x + y + z – s2 = 14 B1
question carefully before beginning
(AO3.1a
as a number of candidates only
1 Where s1, s3 are slack variables, s2 is a surplus variable and a1 is an )
a completed the initial tableau and
7 artificial variable B1
did not show the constraints (as
(AO2.5)
equations) or show how the two
Q P x y z s1 s2 s3 a1 RHS objective functions were formed. It
was clear that candidates were
1 0 2 1 1 0 –1 0 0 14
much more confident in adding
0 1 –3 –1 –2 0 0 0 0 0 M1
slack variables to the two ‘less than
(AO3.3)
0 0 1 2 0 1 0 0 0 30 or equal to’ constraints and re-
0 0 2 1 1 0 –1 0 1 14 writing the P objective function than
A1
0 0 2 0 1 0 0 1 0 20 adding the surplus and artificial
(AO1.1)
variables to the ‘greater than or
equal to’ constraint and forming the
[7]
second (Q) objective function.
Condone no
positive
values in the
Q row
B1 Examiner’s Comments
(AO1.2)
Again, in this part the number of
B1 marks on offer should have
b
(AO1.2) indicated the fact that there were
two points that needed to be made
(The solution is feasible since) Q = 0 when discussing whether the first
[2] stage had been completed. The
first was that the solution was
(The solution is optimal since) there are no non-artifical positive feasible at this stage as Q = 0 and
numbers in the Q row (so therefore the first stage is complete) the second was that the solution
was optimal since there were no
non-artificial positive numbers in
the Q row. A number of candidates
misunderstood the demand here
and gave a response based on the
pivot column or which variables
were now basic.
Condone
inclusion of P
Examiner’s Comments
B1
(AO1.1)
Pmax = 55 and
B1 Examiner’s Comments
e
(AO1.1)
x = 0, y =15, z = 20
Nearly all candidates who
[2] attempted this part correctly stated
the maximum value of P as 55 –
many candidates however stated x
incorrectly as 21 rather than 0.
Or substitute
values from
(e) into 2x + y
+z
k = 35
SC B1 k = 35
M1
The bottom row says that the surplus variable s2 = 21 with no
(AO3.4) working
This implies that that the constraint
f 2x + y + z ≥ 14 is being underused by 21 and therefore the solution
A1
to the LP problem would be no different if this constraint was
(AO3.5a
replaced by 2x + y + z ≥ 35 Examiner’s Comments
)
Total 17