2. Five workers, A, B, C, D and E, are available to complete four tasks, P, Q, R and S.
Each worker can be assigned to at most one task, and each task must be done by at most one worker.
Worker B cannot be assigned to task R.
The time, in minutes, that each worker takes to complete each task is shown in the table below.
P
Q
R
S
A
25
32
43
28
B
41
37
–
38
C
43
35
37
39
D
40
33
37
41
E
37
38
43
40
The Hungarian algorithm is to be used to find an allocation that minimises the total time to complete all four tasks.
(a) Explain how the table should be modified so that the Hungarian algorithm can be applied. (2)
(b) Use the Hungarian algorithm to obtain an allocation that minimises the total time. (6)
(c) Calculate the least total time to complete all four tasks. (1)
Mark scheme (a)
Scheme
Marks
AO
Add an additional dummy column with equal values (e.g. 0) to create a square array
B1
3.5c
Input a suitable large number (e.g. 100 but > 43) in cell BR
B1
1.1b
(2)
Notes
B1: Explain the need to add a dummy column to create a square array
B1: Input a large value in cell BR
Mark scheme (b)
Scheme
Marks
AO
e.g.
P
Q
R
S
X
A
25
32
43
28
0
B
41
37
100
38
0
C
43
35
37
39
0
D
40
33
37
41
0
E
37
38
43
40
0
B1
1.1b
Reducing (rows and) columns gives
P
Q
R
S
X
A
0
0
6
0
0
B
16
5
63
10
0
C
18
3
0
11
0
D
15
1
0
13
0
E
12
6
6
12
0
M1
1.1b
Three lines required to cover the zeros hence solution is not optimal (augment by 1)
P
Q
R
S
X
A
0
0
7
0
1
B
15
4
63
9
0
C
17
2
0
10
0
D
14
0
0
12
0
E
11
5
6
11
0
M1
1.1b
Four lines (e.g. A, Q, R and X) required to cover the zeros hence solution is not optimal (augment by 9)
e.g.
P
Q
R
S
X
A
0
9
16
0
10
B
6
4
63
0
0
C
8
2
0
1
0
D
5
0
0
3
0
E
2
5
6
2
0
M1 A1
1.1b 1.1b
Five lines required to cover the zeros hence solution is optimal
Allocation: A to P, B to S, C to R, and D to Q (E does no task)
A1ft
2.2a
(6)
Notes
(b) See Example for large number in dummy
B1: Mark awarded when both steps complete (addition of extra column with 0s in every cell and large value in cell BR) (Note may be implied by sight of table with (rows and) columns reduced)
M1: Simplifying the initial matrix by reducing columns
M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 3 lines needed to 4 lines needed
M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 4 lines needed to 5 lines needed
A1: CSO on final table (so must have scored all previous marks in this part with no errors)
A1ft: Deduction of the correct allocations following through their 5 line final table (must have scored all previous M marks)
Alternatives for (b) – after 4 lines may possibly see another 4 lines before 5 lines or two further 4 lines before 5 lines
The 3rd M mark in this case is only awarded when 5 lines are needed
e.g. (shaded in the printed scheme: rows A, C and D and column X)
P
Q
R
S
X
A
0
0
7
0
1
B
15
4
63
9
0
C
17
2
0
10
0
D
14
0
0
12
0
E
11
5
6
11
0
(shaded in the printed scheme: row A and columns Q, R and X)
P
Q
R
S
X
A
0
0
7
0
5
B
11
0
59
5
0
C
17
2
0
10
4
D
14
0
0
12
4
E
7
1
2
7
0
P
Q
R
S
X
A
0
5
12
0
10
B
6
0
59
0
0
C
12
2
0
5
4
D
9
0
0
7
4
E
2
1
2
2
0
or e.g. (shaded in the printed scheme: rows A and D and columns R and X)
P
Q
R
S
X
A
0
0
7
0
1
B
15
4
63
9
0
C
17
2
0
10
0
D
14
0
0
12
0
E
11
5
6
11
0
(shaded in the printed scheme: rows A, C and D and column X)
P
Q
R
S
X
A
0
0
9
0
3
B
13
2
63
7
0
C
15
0
0
8
0
D
14
0
2
12
2
E
9
3
6
9
0
(shaded in the printed scheme: row A and columns Q, R and X)
P
Q
R
S
X
A
0
0
9
0
5
B
11
0
61
5
0
C
15
0
0
8
2
D
14
0
2
12
4
E
7
1
4
7
0
P
Q
R
S
X
A
0
5
14
0
10
B
6
0
61
0
0
C
10
0
0
3
2
D
9
0
2
7
4
E
2
1
4
2
0
Example – Large Number in Dummy – (b) B1 M1 M1 M1 A1 A1
P
Q
R
S
X
A
25
32
43
28
100
B
41
37
100
38
100
C
43
35
37
39
100
D
40
33
37
41
100
E
37
38
43
40
100
P
Q
R
S
X
A
0
7
18
3
75
B
4
0
63
1
63
C
8
0
2
4
65
D
7
0
4
8
67
E
0
1
6
3
63
(shaded in the printed scheme: AP, BS, CR, DQ and EX)
1. Five workers, A, B, C, D and E, are each to be assigned to one of five tasks, J, K, L, M and N. Each task must be assigned to exactly one worker and each worker must do exactly one task.
Worker C cannot do task L and worker D cannot do task K.
The profit, in pounds, that each worker will make while assigned to each task is shown in the table below.
J
K
L
M
N
A
38
33
40
35
32
B
26
24
27
25
23
C
33
29
–
30
27
D
36
–
41
37
33
E
32
27
31
29
25
The Hungarian algorithm is to be used to find the maximum total profit that can be earned by the five workers.
(a) Explain how the contents of the table must be modified to allow the algorithm to be used. (2)
(b) Reducing rows first, use the Hungarian algorithm to obtain the maximum total profit. You should explain how any initial row and column reductions are made and also how you determine if the table is optimal at each stage. (7)
Mark scheme (a)
Scheme
Marks
AO
Subtract each entry from a constant, e.g. 50. Replace the two empty cells with a large number. e.g. 100.
B1 B1
1.1a 3.5c
(2)
Notes
a1B1: Correct statement.
a2B1: Correct statement. (Note the statements must be in the correct order so subtraction followed by large values – if order reversed B1 B0)
Mark scheme (b)
Scheme
Marks
AO
e.g.
J
K
L
M
N
A
12
17
10
15
18
B
24
26
23
25
27
C
17
21
100
20
23
D
14
100
9
13
17
E
18
23
19
21
25
B1
1.1b
Reduce each row by its minimum element and then in the revised matrix reduce each column by its minimum element.
B1
2.4
Reducing rows and columns gives
e.g.
J
K
L
M
N
A
2
4
0
3
4
B
1
0
0
0
0
C
0
1
83
1
2
D
5
88
0
2
4
E
0
2
1
1
3
M1
1.1b
Minimum of 3 lines required to cover zeros, hence solution is not optimal (augment by 1).
e.g.
J
K
L
M
N
A
2
3
0
2
3
B
2
0
1
0
0
C
0
0
83
0
1
D
5
87
0
1
3
E
0
1
1
0
2
Minimum of 4 lines required to cover zeros, hence solution is not optimal (augment by 1).
M1
1.1b
e.g.
J
K
L
M
N
A
1
2
0
1
2
B
2
0
2
0
0
C
0
0
84
0
1
D
4
86
0
0
2
E
0
1
2
0
2
M1
1.1b
5 lines required to cover zeros, hence solution is optimal.
dB1
2.4
Maximum profit is £161
A1
2.2a
(7)
(9 marks)
Notes
b1B1: Mark awarded when both steps complete (subtraction, replace blank cells with values > 41).
b2B1: Correct statement regarding row and column reduction. (If given in detail: Reduce row A by 10, reduce row B by 23, reduce row C by 17, reduce row D by 9, reduce row E by 18. No reduction in column J, reduce column K by 3. No reduction in column L, reduce column M by 2, reduce column N by 4.)
b1M1: Simplifying the initial matrix by reducing rows and then columns (condone one slip/error)
b2M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 3 lines needed to 4 lines needed.
b3M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 4 lines needed to 5 lines (so getting optimal table).
b3dB1: Correct statement regarding the minimum number of lines to cover zeros. (dependent on previous M mark)
b1A1: CSO on final table (so must have all previous marks in this part) + deduction of the correct total profit.
Special Case: Minimisation Max a) B1 B0 b) B0 B1 M1 M0 M1 B1 A0 5/9
J
K
L
M
N
A
38
33
40
35
32
B
26
24
27
25
23
C
33
29
100
30
27
D
36
100
41
37
33
E
32
27
31
29
25
J
K
L
M
N
A
6
1
8
3
0
B
3
1
4
2
0
C
6
2
73
3
0
D
3
67
8
4
0
E
7
2
6
4
0
e.g. (shaded in the printed scheme: columns J, K and N and row B)
4. Four workers, A, B, C and D, are to be assigned to four tasks, P, Q, R and S.
Each task must be assigned to just one worker and each worker can do only one task.
Worker B cannot be assigned to task Q and worker D cannot be assigned to task R.
The amount, in pounds, that each worker would earn when assigned to each task is shown in the table below.
P
Q
R
S
A
65
72
69
75
B
71
–
68
65
C
70
69
73
77
D
73
70
–
71
The Hungarian algorithm can be used to find the maximum total amount that would be earned by the four workers.
(a)
(i) Explain how to modify the table so that the Hungarian algorithm could be applied.
(ii) Modify the table as described in (a)(i). (3)
(b) Formulate the above situation as a linear programming problem. You must define the decision variables and make the objective function and constraints clear. (6)
Mark scheme (a)
Scheme
Marks
AO
(i) Subtracting each entry from a constant value e.g. \(\geqslant 77\) to convert from maximisation problem to minimisation
B1
3.5c
Add a sufficiently large number (\(> 12\)) to cells BQ and DR
B1: correct definition of the values that \(i\) and \(j\) can take
M1: Attempt at a 15 (or 16) term expression in terms of \(x\) (or their defined variable), coefficients ‘correct’, 2 ‘large’ values included, condone 2 slips. If more than 2 errors in (a) ft exactly their table for this mark only.
A1: CAO including ‘minimise’ (or equivalent 14 term expression with ‘maximise’)
M1: At least four equations, each in three or four variables, unit coefficients, equal to 1 Do not accept inequalities
2. A team of 5 players, A, B, C, D and E, competes in a quiz. Each player must answer one of 5 rounds, P, Q, R, S and T.
Each player must be assigned to exactly one round, and each round must be answered by exactly one player.
Player B cannot answer round Q, player D cannot answer round T, and player E cannot answer round R.
The number of points that each player is expected to earn in each round is shown in the table.
P
Q
R
S
T
A
32
40
35
41
37
B
38
–
40
27
33
C
41
28
37
36
35
D
35
33
38
36
–
E
40
38
–
39
34
The team wants to maximise its total expected score.
The Hungarian algorithm is to be used to find the maximum total expected score that can be earned by the 5 players.
(a) Explain how the table should be modified. (2)
(b)
(i) Reducing rows first, use the Hungarian algorithm to obtain an allocation which maximises the total expected score.
(ii) Calculate the maximum total expected score. (6)
Mark scheme (a)
Scheme
Marks
AO
Subtract each entry from a constant (e.g. 50) to convert from maximisation problem to minimisation
B1
1.1b
Add a large value (e.g. 100) to cells BQ, DT and ER so that they cannot be selected
B1
2.4
(2)
Notes
B1: Valid statement regarding converting a maximisation problem to a minimisation problem
B1: Explain the need to add a large value to avoid cells being selected – it must be clear which order the changes are applied
Mark scheme (b)
Scheme
Marks
AO
e.g.
P
Q
R
S
T
A
18
10
15
9
13
B
12
100
10
23
17
C
9
22
13
14
15
D
15
17
12
14
100
E
10
12
100
11
16
B1
1.1b
Reducing rows
P
Q
R
S
T
A
9
1
6
0
4
B
2
90
0
13
7
C
0
13
4
5
6
D
3
5
0
2
88
E
0
2
90
1
6
Reducing columns
P
Q
R
S
T
A
9
0
6
0
0
B
2
89
0
13
3
C
0
12
4
5
2
D
3
4
0
2
84
E
0
1
90
1
2
M1
1.1b
3 lines required (Row A, Columns P, R) so augment by 1
P
Q
R
S
T
A
10
0
7
0
0
B
2
88
0
12
2
C
0
11
4
4
1
D
3
3
0
1
83
E
0
0
90
0
1
M1
1.1b
4 lines required (e.g. Row A, E Column P, R) so augment by 1
P
Q
R
S
T
A
11
0
8
0
0
B
2
87
0
11
1
C
0
10
4
3
0
D
3
2
0
0
82
E
1
0
91
0
1
Alternatively 4 lines required (e.g. Row A, C, E Column R) so augment by 1
P
Q
R
S
T
A
10
0
8
0
0
B
1
87
0
11
1
C
0
11
5
4
1
D
2
2
0
0
82
E
0
0
91
0
1
M1
1.1b
Allocation A – T, B – R, C – P, D – S, E – Q
A1
2.2a
Maximum Score: 192
B1
2.2a
(6)
(8 marks)
Notes
B1: Mark awarded when both steps complete (subtraction and addition of large values) accept one slip in values
M1: Simplifying the initial matrix by reducing rows and then columns (accept one additional slip)
M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 3 lines needed to 4 lines needed
M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 4 lines needed to 5 lines needed (so getting to the optimal table)
A1: CSO on final table (so must have scored all previous marks in this part ) + deduction of the correct allocation (note there are different fully correct tables)
4. Four students, A, B, C and D, are to be allocated to four rounds, 1, 2, 3 and 4, in a competition. Each student is to take part in exactly one round and no two students may play in the same round.
Each student has been given an estimated score for each round. The estimated scores for each student are shown in the table below.
1
2
3
4
A
34
20
18
15
B
49
31
12
34
C
48
27
23
26
D
52
45
42
42
(a) Reducing rows first, use the Hungarian algorithm to obtain an allocation that maximises the total estimated score. You must make your method clear and show the table after each stage. (7)
(b) Find this total estimated score. (1)
Mark scheme (a)
Scheme
Marks
AO
Since maximising, subtract all elements from some value \(\geqslant 52\) e.g. \(\begin{bmatrix} 18 & 32 & 34 & 37 \\ 3 & 21 & 40 & 18 \\ 4 & 25 & 29 & 26 \\ 0 & 7 & 10 & 10 \end{bmatrix}\)
B1: converting correctly from a minimisation to maximisation
M1: simplifying the initial matrix by reducing rows and then columns (allow up to 2 independent slips)
A1: CAO
M1: develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 2 lines needed to 3 lines needed (lines may be implied). If lines are drawn they must be correct.
A1ft: CAO following on from row and column reduction from previous table (f/t from previous table with no further slips)
A1: CSO on final table (so must have scored all previous marks)
A1ft: correct allocation ft their optimal table (both previous M marks must have been awarded in (a)) (Must be fully written. Do not accept just indicated on zeroes on final matrix)
M1: simplifying the initial matrix by reducing rows and then columns (allow up to 2 independent slips)
A1: CAO
M1: develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 3 lines needed to 4 lines needed (lines may be implied). If lines are drawn they must be correct.
A1: CAO No further marks awarded
Mark scheme (b)
Scheme
Marks
AO
Total score = 18 + 34 + 48 + 45 = 145
B1
2.2a
(1)
(8 marks)
Notes
B1: CAO – solution of original problem (both previous M marks must have been awarded)
1. Five workers, A, B, C, D and E, are available to complete four tasks, P, Q, R and S.
Each worker can only be assigned to at most one task, and each task must be done by at most one worker.
Worker B cannot be assigned to task Q and worker E cannot be assigned to task S.
The time, in minutes, that each worker takes to complete each task is shown in the table below.
P
Q
R
S
A
38
39
37
37
B
39
–
39
40
C
41
44
40
42
D
40
41
39
38
E
36
39
41
–
The Hungarian algorithm is to be used to find the least total time to complete all four tasks.
(a) Explain how the table should be modified so that the Hungarian algorithm can be applied. (2)
(b)
(i) Use the Hungarian algorithm to obtain an allocation that minimises the total time.
(ii) Explain how you determined if the table was optimal at each stage. (6)
(c) Calculate the least total time to complete all four tasks. (1)
Mark scheme (a)
Scheme
Marks
AO
Add an additional dummy column with equal values (e.g. 0) to create a square array
B1
3.5c
Input a suitable large number (e.g. 100 but > 44) in cells BQ and ES
B1
1.1b
(2)
Notes
B1: Explain the need to add a dummy column (to create a square array) – must mention that it is a column being added (but ignore any mention of the values being added to this column)
B1: Input a large value in cells BQ and ES (just saying ‘input a large value in the empty (oe) cells’ is sufficient – we do not need to know at this stage what is meant by ‘large’)
Mark scheme (b)
Scheme
Marks
AO
e.g.
P
Q
R
S
X
A
38
39
37
37
0
B
39
100
39
40
0
C
41
44
40
42
0
D
40
41
39
38
0
E
36
39
41
100
0
B1
1.1b
Reducing (rows and) columns gives
P
Q
R
S
X
A
2
0
0
0
0
B
3
61
2
3
0
C
5
5
3
5
0
D
4
2
2
1
0
E
0
0
4
63
0
M1
1.1b
Three lines required to cover the zeros hence solution is not optimal
P
Q
R
S
X
A
2
0
0
0
1
B
2
60
1
2
0
C
4
4
2
4
0
D
3
1
1
0
0
E
0
0
4
63
1
M1
1.1b
Four lines required to cover the zeros hence solution is not optimal
e.g.
P
Q
R
S
X
A
2
0
0
0
2
B
1
59
0
1
0
C
3
3
1
3
0
D
3
1
1
0
1
E
0
0
4
63
2
or
P
Q
R
S
X
A
2
0
0
1
2
B
1
59
0
2
0
C
3
3
1
4
0
D
2
0
0
0
0
E
0
0
4
64
2
M1
1.1b
Five lines required to cover the zeros hence solution is optimal
B1
2.4
Allocation: A to Q, B to R, D to S, and E to P (C does no task)
A1
2.2a
(6)
Notes
B1: Mark awarded when both steps complete (addition of extra column and large values ( > 44) in cells BQ and ES)
M1: Simplifying the initial matrix by reducing (rows and) columns – allow at most 2 slips
M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 3 lines needed to 4 lines needed
M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 4 lines needed to 5 lines needed (so getting to the optimal table)
B1: Dependent on two augmentations taking place (3 to 4 lines and then 4 to 5 lines). Either a correct statement(s) regarding the minimum number of lines to cover the zeros at each stage or a general statement that covers all augmentations. In the first case, at each stage, they must state the number of lines (not just shown on the diagram), state whether it is optimal or not (so must use the word ‘optimal’) and mention ‘zeros’ at least once.
In the second case, they must state that until 5 lines cover the zeros then the solution is not optimal (or equivalent e.g. if there are 5 lines covering the zeros then the solution is optimal) – in this case they must show the lines. Accept a hybrid of the two e.g. at each stage they could say whether it requires five lines or not but they would still have to mention ‘zeros’ at least once and make it clear at each augmentation whether it is optimal or not. To award this mark we must see mention at least one mention of ‘zeros’ and the word ‘optimal’ being used.
A1: cso on final table + deduction of the correct allocation
Special case in (b) – if dashes are not replaced with larger values (e.g. values \(\leqslant 44\) or leaving dashes in place) then only the M marks are available in (b)
1. Four workers, A, B, C and D, are to be assigned to four tasks, 1, 2, 3 and 4. Each task must be assigned to just one worker and each worker must do only one task.
The cost of assigning each worker to each task is shown in the table below.
The total cost is to be minimised.
1
2
3
4
A
32
45
34
48
B
37
39
50
46
C
46
44
40
42
D
43
45
48
52
(a) Reducing rows first, use the Hungarian algorithm to obtain an allocation that minimises the total cost. You must make your method clear and show the table after each stage. (5)
A – 3, B – 1, C – 4, D – 2 or A – 3, B – 2, C – 4, D – 1
A1ft
2.2a
(5)
Notes
M1: simplifying the initial matrix by reducing rows and then columns. (Allow up to 2 independent slips).
A1: CAO
M1: develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 3 lines needed to 4 lines needed (lines may be implied). If lines are drawn they must be correct.
A1ft: CAO following on from row and column reduction final table. (f/t from previous table with no further slips).
A1ft: correct allocation ft their optimal table (both previous M marks must have been awarded in (a)) (Must be fully written. Do not accept just indicated on zeros on final matrix).
1. Four workers, A, B, C and D, are each to be assigned to one of four tasks, P, Q, R and S.
Each worker must be assigned to one task, and each task must be done by exactly one worker.
Worker C cannot be assigned to task Q and worker D cannot be assigned to task S.
The time, in minutes, that each worker takes to complete each task is shown in the table below.
P
Q
R
S
A
54
48
51
52
B
55
51
53
58
C
52
–
53
54
D
67
63
68
–
The Hungarian algorithm is to be used to find the minimum total time for the four workers to complete the tasks.
(a) Modify the table so that the Hungarian algorithm may be used. (1)
(b) Reducing rows first, use the Hungarian algorithm to obtain an allocation that minimises the total time. You should explain how any initial row and column reductions are made and also how you determine if the table is optimal at each stage. (6)
Mark scheme (a)
Scheme
Marks
AO
e.g.
P
Q
R
S
A
54
48
51
52
B
55
51
53
58
C
52
100
53
54
D
67
63
68
100
B1
1.1b
(1)
Notes
B1: Replace the blanks in cells CQ and DS with values > 68
Mark scheme (b)
Scheme
Marks
AO
Reduce row A by 48, reduce row B by 51, reduce row C by 52 and row D by 63 (or equivalent). No reduction for columns P and Q, reduce R by 1 and column S by 2
B1
2.4
Reducing rows and columns gives
e.g.
P
Q
R
S
A
6
0
3
4
B
4
0
2
7
C
0
48
1
2
D
4
0
5
37
followed by
P
Q
R
S
A
6
0
2
2
B
4
0
1
5
C
0
48
0
0
D
4
0
4
35
M1
1.1b
Two lines required to cover the zeros hence solution is not optimal (augment by 1)
e.g.
P
Q
R
S
A
5
0
1
1
B
3
0
0
4
C
0
49
0
0
D
3
0
3
34
M1
1.1b
Three lines required to cover the zeros hence solution is not optimal (augment by 1)
e.g.
P
Q
R
S
A
4
0
0
0
B
3
1
0
4
C
0
50
0
0
D
2
0
2
33
or e.g.
P
Q
R
S
A
4
0
1
0
B
2
0
0
3
C
0
50
1
0
D
2
0
3
33
M1
1.1b
Four lines required to cover the zeros hence solution is optimal
B1
2.4
A – S, B – R, C – P, D – Q
A1
2.2a
(6)
(7 marks)
Notes
B1: Correct statements regarding row and column reduction
M1: Simplifying the initial matrix by reducing rows and then columns – allow 2 independent slips
M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 2 lines needed to 3 lines needed
M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 3 lines needed to 4 lines needed (so getting to the optimal table)
B1: Dependent on two augmentations taking place (2 to 3 lines and then 3 to 4). Either a correct statement(s) regarding the minimum number of lines to cover the zeros at each stage or a general statement that covers all augmentations.
In the first case, at each stage, they must state the number of lines (not just shown on the diagram), state whether it is optimal or not (so must use the word ‘optimal’) and mention ‘zeros’ at least once.
In the second case, they must state that until 4 lines cover the zeros then the solution is not optimal (or equivalent e.g. if there are 4 lines covering the zeros then the solution is optimal) – in this case they must show the lines.
Accept a hybrid of the two e.g. at each stage they could say whether it requires four lines or not but they would still have to mention ‘zeros’ at least once and make it clear at each augmentation whether it is optimal or not.
To award this mark we must see mention at least one mention of ‘zeros’ and the word ‘optimal’ being used.
A1: CSO on final table + deduction of the correct allocation
1. Four workers, A, B, C and D, are to be assigned to three tasks, 1, 2 and 3. Each task must be assigned to just one worker and each worker can do one task only.
Worker A cannot do task 2 and worker D cannot do task 3
The cost of assigning each worker to each task is shown in the table below.
The total cost is to be minimised.
1
2
3
A
53
–
62
B
48
57
59
C
55
63
58
D
69
49
–
Formulate the above situation as a linear programming problem. You must define your decision variables and make the objective function and constraints clear. (6)
Mark scheme
Scheme
Marks
AO
Let \(x_{ij}\) be 0 or 1 \(\begin{cases} 1 & \text{if worker } (i) \text{ does task } (j) \\ 0 & \text{otherwise} \end{cases}\)
B1
3.3
where \(i \in \{\text{A, B, C, D}\}\) and \(j \in \{1, 2, 3, 4\}\)
B1: Correct definition of the values that \(i\) and \(j\) can take
M1: Attempt at 12 term expression, coefficients ‘correct’, 2 ‘large’ values included, condone 2 slips.
A1: cao including ‘minimise’
M1: At least four correct equations, each in three or four variables, unit coefficients, equal to 1
A1: cao (all eight equations)
No dummy column can score a maximum of B1B0M1A1M0A0 No ‘large’ values in A2 and D3 can score a maximum B1B1M0A0M1A1 No ‘large’ values or dummy column can score a maximum of B1B0M0A0M0A0
2. Four workers, A, B, C and D, are each to be assigned to one of four tasks, P, Q, R and S.
Each worker must be assigned to one task, and each task must be done by exactly one worker.
Worker C cannot be assigned to task Q.
The amount, in pounds, that each worker would earn when assigned to each task is shown in the table below.
P
Q
R
S
A
72
98
59
84
B
67
87
68
86
C
70
–
62
79
D
78
93
64
81
The Hungarian algorithm is to be used to find the maximum total amount that can be earned by the four workers.
(a) Explain how the table should be modified so that the Hungarian algorithm may be applied. (2)
(b) Modify the table so that the Hungarian algorithm may be applied. (1)
(c) Reducing rows first, use the Hungarian algorithm to obtain an allocation that maximises the total earnings. You should explain how any initial row and column reductions were made and also how you determined if the table was optimal at each stage. (6)
Mark scheme (a)
Scheme
Marks
AO
Subtract each entry from a constant (e.g. 98) to convert from maximisation problem to minimisation
B1
1.1a
Add an appropriate large value to cell CQ (e.g. twice the largest value) to make CQ unattractive
B1
3.5c
(2)
Notes
B1: Valid statement regarding converting a maximisation problem to a minimisation problem
B1: Explain the need to add an unattractive value to cell CQ
(note that candidates may first assign a negative value to the CQ entry and then subtract)
Mark scheme (b)
Scheme
Marks
AO
e.g.
P
Q
R
S
A
26
0
39
14
B
31
11
30
12
C
28
78
36
19
D
20
5
34
17
B1
1.1b
(1)
Notes
B1: Mark awarded when both steps complete (subtraction and addition of extra cell)
Mark scheme (c)
Scheme
Marks
AO
No reduction for row A, reduce row B by 11, reduce row C by 19 and row D by 5 (or equivalent). Reduce column P by 9 and column R by 17, no reduction in columns Q and S.
B1
2.4
Reducing rows and columns gives
P
Q
R
S
A
26
0
39
14
B
20
0
19
1
C
9
59
17
0
D
15
0
29
12
followed by
P
Q
R
S
A
17
0
22
14
B
11
0
2
1
C
0
59
0
0
D
6
0
12
12
M1
1.1b
Two lines required to cover the zeros hence solution is not optimal (augment by 1)
P
Q
R
S
A
16
0
21
13
B
10
0
1
0
C
0
60
0
0
D
5
0
11
11
M1
1.1b
Three lines required to cover the zeros hence solution is not optimal (augment by 5)
e.g.
P
Q
R
S
A
11
0
16
8
B
10
5
1
0
C
0
65
0
0
D
0
0
6
6
M1
1.1b
Four lines required to cover the zeros hence solution is optimal
B1
2.4
A – Q, B – S, C – R, D – P
A1
2.2a
(6)
(9 marks)
Notes
B1: Correct statements regarding row and column reduction
M1: Simplifying the initial matrix by reducing rows and then columns
M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 2 lines needed to 3 lines needed
M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 3 lines needed to 4 lines needed (so getting to the optimal table)
B1: Correct statements regarding the minimum number of lines to cover zeros
A1: CSO on final table (so must have scored all previous M (but not necessarily the B) marks in this part) + deduction of the correct allocation
1. Four workers, A, B, C and D, are to be assigned to four tasks, 1, 2, 3 and 4. Each worker must be assigned to exactly one task and each task must be done by exactly one worker.
Worker A cannot do task 3 and worker B cannot do task 4
The table below shows the profit, in pounds, that each worker would earn if assigned to each of the tasks.
1
2
3
4
A
29
20
–
23
B
32
30
28
–
C
35
32
34
25
D
29
31
27
30
(a) Reducing rows first, use the Hungarian algorithm to obtain an allocation that maximises the total profit. You must make your method clear and show the table after each stage. (7)
(b) Determine the resulting total profit. (1)
Mark scheme (a)
Scheme
Marks
AO
Subtracting each entry from a constant value \(\geqslant 35\) to convert from maximisation problem to minimisation
M1
1.1b
Add a sufficiently large number (\(> 15\)) to cells A3 and B4 e.g. \(\begin{bmatrix} 6 & 15 & 100 & 12 \\ 3 & 5 & 7 & 100 \\ 0 & 3 & 1 & 10 \\ 6 & 4 & 8 & 5 \end{bmatrix}\)
M1: convert from maximisation to minimisation (allow at most two errors)
B1: adding a large number (at least 16) to cells A3 and B4
M1: simplifying the initial matrix by reducing rows and then columns
A1ft: cao following on from their earlier subtraction
M1: develop an improved solution – need to see one double covered \(+e\); one uncovered \(-e\); and one single covered unchanged. 3 lines needed to 4 lines needed
A1ft: cao following on from row and column reduction final table
(b) B1ft: correct allocation ft their optimal table (all previous M marks must have been awarded in (a))
2. Four workers, Ted (T), Harold (H), James (J) and Margaret (M), are to be assigned to four tasks, 1, 2, 3 and 4. Each worker must be assigned to just one task and each task must be done by just one worker.
The profit, in pounds, resulting from allocating each worker to each task, is shown in the table below. The profit is to be maximised.
1
2
3
4
T
103
97
74
80
H
201
155
145
155
J
111
80
77
92
M
203
188
137
184
(a) Reducing rows first, use the Hungarian algorithm to obtain an allocation that maximises the total profit. You must make your method clear and show the table after each stage. (6)
(b) Determine the resulting total profit. (1)
Mark scheme (a)
Scheme
Marks
AO
Subtracting each entry from a value \(\geqslant 203\) e.g. \(\begin{bmatrix} 100 & 106 & 129 & 123 \\ 2 & 48 & 58 & 48 \\ 92 & 123 & 126 & 111 \\ 0 & 15 & 66 & 19 \end{bmatrix}\)
1M1: simplifying the initial matrix by reducing rows and then columns. Allow no more than a single error in row reduction together with no more than a single error in column reduction. May combine the two stages of converting from maximum to a minimum problem and row reduction which is acceptable.
1A1ft: CAO following on from their earlier conversion to maximising. If 1B1 awarded, the result of row and column reduction must be as in the main scheme. If 1B0 awarded, then row and column reduction must ft correctly from their attempt to convert to maximisation problem.
2M1: develops an improved solution – need to see one double covered \(+e\); one uncovered \(-e\); and one single covered unchanged. 3 lines needed to 4 lines needed
2A1ft: Improved solution following on from their previous table
3A1:CSO Correct allocation. Must have gained all previous marks in the question.
1M1: simplifying the initial matrix by reducing rows and then columns – all values ‘correct’
1A0: Must be maximising.
2M1: develops an improved solution – need to see one double covered \(+e\); one uncovered \(-e\); and one single covered unchanged. 3 lines needed to 4 lines needed
2A1ft: Improved solution following on from their previous table
3A0: CSO
1B0: Must be maximising
Mark scheme (b)
Scheme
Marks
AO
(£)559
1B1
1.1b
(1)
(7 marks)
Notes
1B1: CAO – solution of original problem (ignore units lack of or incorrect units)
1. Three workers, A, B and C, are each to be assigned to one of four tasks, P, Q, R and S.
Each worker must be assigned to at most one task, and each task must be done by at most one worker.
The amount, in pounds, that each worker will earn while assigned to each task is shown in the table below.
P
Q
R
S
A
32
40
37
42
B
29
32
35
41
C
37
33
39
40
The Hungarian algorithm is to be used to find the maximum total amount that can be earned by the three workers.
(a) Explain how the table should be modified. (2)
(b)
(i) Reducing rows first, use the Hungarian algorithm to obtain an allocation which maximises the total earnings.
(ii) Explain how any initial row and column reductions were made and also how you determined if the table was optimal at each stage. (7)
Mark scheme (a)
Scheme
Marks
AO
Subtract each entry from a constant (e.g. 42) to covert from maximisation problem to minimisation
B1
1.1a
Add an additional dummy row with equal values (e.g. 42, 0, etc.) to create a square array
B1
3.5c
(2)
Notes
B1: Valid statement regarding converting a maximisation problem to a minimisation problem – must imply subtracting each entry from a constant (although the value of this constant need not be stated)
B1: Explain the need to add a valid dummy row (to create a square array) e.g. allow mention of adding an additional worker or the need to have a square array
Mark scheme (b)
Scheme
Marks
AO
e.g.
P
Q
R
S
A
10
2
5
0
B
13
10
7
1
C
5
9
3
2
X
42
42
42
42
B1
1.1b
No reduction for row A, reduce row B by 1, reduce row C by 2 and row X by 42 (or equivalent). No reduction of columns
B1
2.4
Reducing rows and columns gives
P
Q
R
S
A
10
2
5
0
B
12
9
6
0
C
3
7
1
0
X
0
0
0
0
M1
1.1b
Two lines required to cover the zeros hence solution is not optimal (augment by 1)
P
Q
R
S
A
9
1
4
0
B
11
8
5
0
C
2
6
0
0
X
0
0
0
1
M1
1.1b
Three lines required to cover the zeros hence solution is not optimal (augment by 1)
e.g.
P
Q
R
S
A
8
0
3
0
B
10
7
4
0
C
2
6
0
1
X
0
0
0
2
or
P
Q
R
S
A
8
0
4
0
B
10
7
5
0
C
1
5
0
0
X
0
0
1
2
M1
1.1b
Four lines required to cover the zeros hence solution is optimal
B1
2.4
A – Q, B – S, C – R, (X – P)
A1
2.2a
(7)
(9 marks)
Notes
B1: Mark awarded when both steps complete (a valid subtraction and addition of a correct extra row)
B1: Correct statements regarding row and column reduction – if explicit values not stated then it must be clear that reduction is done by subtracting the least value in each row/column from each element of that row/column
M1: Simplifying the initial matrix by reducing rows and then columns – allow one error
M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 2 lines needed to 3 lines needed
M1: Develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 3 lines needed to 4 lines needed (so getting to the optimal table)
B1: Correct statement(s) regarding the minimum number of lines to cover zeros at each stage or a general statement that covers all augmentations (e.g. if we have an \(n\) by \(n\) array then if the minimum number of lines required to cover the zeros is less than \(n\) then the solution is not optimal but if the minimum number of lines to cover the zeros is \(n\) then it is optimal – as an absolute minimum allow mention that until there are 4 lines covering the zeros then the solution is not optimal (oe) – however, in all cases, there must have been two augmentations taking place (2 to 3 lines and then 3 to 4))
A1: CSO for the application of the Hungarian algorithm - so correct application of the algorithm from a correct initial matrix (so in (b) candidates must have scored at least B1B0M1M1M1B0) – together with the deduction of the correct allocation
Note that if array is not square or if the additional row is given entries of ‘infinity’ then only the second B mark in (b) can be awarded
1. Four workers, A, B, C and D, are to be assigned to four tasks, P, Q, R and S. Each worker must be assigned to exactly one task and each task must be done by only one worker. The time, in hours, that each worker takes to complete each task is shown in the table below.
P
Q
R
S
A
7.5
3.5
8
9.5
B
5
2
7
7.5
C
4
3.5
3.5
8
D
6
5
3.5
4
Reducing rows first, use the Hungarian algorithm to obtain an allocation which minimises the total time. You must explain your method and show the table after each stage. (5)
Mark scheme
Scheme
Marks
AO
Reducing rows
P
Q
R
S
A
4
0
4.5
6
B
3
0
5
5.5
C
0.5
0
0
4.5
D
2.5
1.5
0
0.5
and columns
P
Q
R
S
A
3.5
0
4.5
5.5
B
2.5
0
5
5
C
0
0
0
4
D
2
1.5
0
0
M1 A1
1.1b 1.1b
augment by 2.5
P
Q
R
S
A
1
0
2
3
B
0
0
2.5
2.5
C
0
2.5
0
4
D
2
4
0
0
M1 A1ft
1.1b 1.1b
A – Q, B – P, C – R, D – S
A1ft
2.2a
(5 marks)
Notes
M1: simplifying the initial matrix by reducing rows and then columns
A1: cao
M1: develop an improved solution – need to see one double covered +e; one uncovered –e; and one single covered unchanged. 3 lines to 4 lines needed
A1ft: allow follow through from one numerical slip only during row/column reduction
A1ft: dependent on all previous M marks and one A mark – to deduce the optimal allocation from the location of the zeros in the table
3. Five friends have rented a house that has five bedrooms. They each require their own bedroom. The table below shows how each friend rated the five bedrooms, A, B, C, D and E, where 0 is low and 10 is high.
A
B
C
D
E
Frank
5
0
7
3
4
Gill
5
3
8
10
1
Harry
4
3
7
9
0
Imogen
6
3
6
5
4
Jiao
0
2
7
3
2
Reducing rows first, use the Hungarian algorithm to obtain an allocation that maximises the total of all the ratings. You must make your method clear and show the table after each stage.
Mark scheme
Scheme
Marks
Since maximising, subtract all elements from some value \(\geqslant 10\)
Optimal allocation is F = E, G = D, H = B, I = A, J = C
A1
8 marks
Notes
1M1: Subtracting from some value which must be \(\geqslant 10\) or all values made negative and then adding a value which must be \(\geqslant 10\). Condone no more than two errors
2M1: Reducing rows and then columns – candidates may combine the two stages of converting from a maximum to a minimum problem and row reduction which is acceptable. (Condone two errors).
1A1: CAO
3M1: Double covered +e; one uncovered –e ; and one single covered unchanged. 3 lines to 4 lines needed
2A1ft: Follow through on their previous table – no errors
4M1: One double covered +e; one uncovered –e; and one single covered unchanged. 4 lines needed to 5 lines needed (so getting to an optimal table)
3A1: CSO on final table (so must have scored all previous marks)
4A1: CAO – this mark is dependent on all M marks being awarded. Allocation must be written clearly. Just labelling zeros in their table scores A0.
Special case: Minimising can score at most M0 M1 A1 (Row and column reduction) M0 A0 (Simplification: no 3 zero cover lines to 4). M1 A0 A0 (4 lines to 5). 3/8 marks
Figure 1 shows the possible allocations of six people, A, B, C, D, E and F, to six tasks, 1, 2, 3, 4, 5 and 6
(a) Write down the technical name given to the type of diagram shown in Figure 1. (1)
Figure 2 shows an initial matching.
(b) Starting from the given initial matching, use the maximum matching algorithm to find a complete matching. You should list the alternating paths you use and state your improved matching after each iteration. (6)
Mark scheme (a)
Scheme
Marks
Bipartite (graph)
B1
(1)
Notes
a1B1: CAO - but be charitable on spelling, award if phonetically close
Mark scheme (b)
Scheme
Marks
e.g. (see below for alternatives)
First alternating path: B – 6 = E – 5 = C – 4
M1
Change status to give: B = 6 – E = 5 – C = 4
A1
Improved matching: A = 3, B = 6, C = 4, (D unmatched), E = 5, F = 1
A1
Second alternating path: D – 3 = A – 5 = E – 1 = F – 2
M1
Change status to give: D = 3 – A = 5 – E = 1 – F = 2
A1
Complete matching: A = 5, B = 6, C = 4, D = 3, E = 1, F = 2
A1
(6)
7 marks
Notes
Possible 1st paths
A
B
C
D
E
F
Subsequent 2nd paths
B – 6 – E – 5 – C – 4
3
6
4
-
5
1
D – 3 – A – 5 – E – 1 – F – 2
B – 6 – E – 1 – F – 2
3
6
5
-
1
2
D – 3 – A – 5 – C – 4
D – 3 – A – 5 – C – 4
5
-
4
3
6
1
B – 6 – E – 1 – F – 2
b1M1: An alternating path (e.g. letter 1st set – number 2nd set – letter 1st set – …) from B to 4 (or vice-versa) or B to 2 (or vice-versa) or D to 4 (or vice-versa)
b1A1: CAO – a correct path including change status either stated (only accept ‘change (of) status’ or ‘c.s’ but not, e.g. ‘change state’) or shown (all symbols e.g. (… – … = … – …) interchanged (… = … – … = …)) chosen path clear
b2A1: CAO – improved matching - must follow from the correct stated path. Accept either stated or on a clear diagram (with five arcs only). Please check the top of the second page as many candidates will draw either the improved or complete matching on the nodes provided there
b2M1: An alternating path from D to 2 or D to 4 or B to 2 (or vice-versa in each case) (must be consistent with their first alternating path)
b3A1: CAO – a correct path including change status stated or shown. Chosen path clear
b4A1: CAO (complete matching) must follow from two correct stated paths (so both previous M marks must have been awarded). Accept on a clear diagram (with six arcs only)
SC for (b): some candidates are writing AP2 and AP3 from the first list next to each other with no improved matching and so it is not clear if they are applying the algorithm correctly e.g.
alternating path: B – 6 = E – 1 = F – 2; D – 3 = A – 5 = C = 4 Change status: B = 6 – E = 1 – F = 2; D = 3 – A = 5 – C = 4 Complete matching A = 5, B = 6, C = 4, D = 3, E = 1, F = 2
This would scored M1 A0 A0 M1 A0 A1 (neither chosen path is clear – are they choosing two APs from the first list or does one follow the other (reading across the page) – either way it is not clear)
Figure 3 shows the possible allocations of five workers, Cole (C), Dorothy (D), Harold (H), Richard (R) and Stephen (S), to five tasks, 1, 2, 3, 4 and 5.
In an initial matching, each of three workers is allocated to a different task.
For this initial matching, there are three possible alternating paths that start at C.
One alternating path is
C − 3 = S − 4 = D − 5
A second alternating path is
C − 1 = H − 2
(a) Use this information to deduce the initial matching. (1)
(b) Find the third alternating path that starts at C. (1)
(c) List the improved matching generated by using the alternating path C − 3 = S − 4 = D − 5 (1)
(d) Starting from the improved matching found in (c), use the maximum matching algorithm to obtain a complete matching. You must list the alternating path you use and the final matching. (3)
Mark scheme (a)
Scheme
Marks
Initial matching: (C unmatched), D = 4, H = 1, (R unmatched), S = 3
B1
(1)
Notes
a1B1: CAO (D = 4, H = 1, S = 3) – accept on a clear diagram (with three arcs only)
Mark scheme (b)
Scheme
Marks
Alternating path: C – 1 = H – 3 = S – 4 = D – 5
B1
(1)
Notes
b1B1: CAO (alternating path) – allow any unambiguous notation e.g. C – 1 – H – 3 – S – 4 – D – 5 but do not allow C – 1, H – 3, S – 4, D – 5 (as this is not a path but a matching)
Mark scheme (c)
Scheme
Marks
Improved matching: C = 3, D = 5, H = 1, (R unmatched), S = 4
B1
(1)
Notes
c1B1: CAO (C = 3, D = 5, H = 1, S = 4) – accept on a clear diagram (with four arcs only)
Mark scheme (d)
Scheme
Marks
Alternating path: R – 4 = S – 3 = C – 1 = H – 2
M1
Change status to give: R = 4 – S = 3 – C = 1 – H = 2
A1
Complete matching: C = 1, D = 5, H = 2, R = 4, S = 3
A1
(3)
(6 marks)
Notes
d1M1: An alternating path (e.g. letter 1st set – number 2nd set – letter 1st set – …) from R to 2 (or vice-versa)
d1A1: CAO – a correct path including change status either stated (only accept ‘change (of) status’ or ‘c.s’ but not, e.g.‘change state’) or shown (all symbols e.g. (… – … = … – …) interchanged (… = …. – … = …)) Chosen path clear
d2A1: CAO – complete matching - must follow from the correct stated path. Accept either stated or on a clear diagram (with five arcs only)
3. Five workers, A, B, C, D and E, are to be assigned to five tasks, 1, 2, 3, 4 and 5. Each worker must be assigned to only one task and each task must be done by only one worker.
The cost, in pounds, of assigning each worker to each task is shown in the table below. The cost of assigning worker D to task 4 is £\(x\), where \(x \gt 38\)
1
2
3
4
5
A
25
31
27
29
35
B
29
33
40
35
37
C
28
29
35
36
37
D
34
35
36
\(x\)
41
E
36
35
32
31
33
The total cost is to be minimised.
(a) Reducing rows first, use the Hungarian algorithm to obtain an allocation that minimises the cost. You must make your method clear and show the table after each stage. (8)
(b) Find the minimum total cost. (1)
Workers A and D decide that they do not like the task they have been allocated and are allowed to swap tasks with each other. The other three allocations are unchanged. The cost now of allocating the five workers to the five tasks is now £5 more than the minimum cost found in (b).
(c) Calculate the value of \(x\). You must show your working. (2)
Using three lines and augment by 1 to get \(\begin{pmatrix} 0 & 5 & 0 & 3 & 7 \\ 0 & 3 & 9 & 5 & 5 \\ 0 & 0 & 5 & 7 & 6 \\ 0 & 0 & 0 & x-35 & 4 \\ 6 & 4 & 0 & 0 & 0 \end{pmatrix}\)
M1 A1
Using four lines and augment by 3 to get \(\begin{pmatrix} 0 & 5 & 0 & 0 & 4 \\ 0 & 3 & 9 & 2 & 2 \\ 0 & 0 & 5 & 4 & 3 \\ 0 & 0 & 0 & x-38 & 1 \\ 9 & 7 & 3 & 0 & 0 \end{pmatrix}\)
M1 A1ft A1
So A = 4, B = 1, C = 2, D = 3, E = 5
A1
(8)
Notes
a1M1: Reducing rows and then columns (allow errors)
a1A1: CAO
a2M1: Double covered +e; one uncovered – e; and one single covered unchanged. 3 lines needed to 4 lines needed
a2A2: CAO
a3M1: One double covered +e; one uncovered – e; and one single covered unchanged. 4 lines needed to 5 lines needed (so getting to optimal table)
a3A1ft: Follow through on their previous table
a4A1: CSO on final table
a5A1: Correct allocation – dependent on all previous M marks – need not be stated but must be clear – allow if stated in (b)
In (b) if a candidate replaces the \(x\) with ‘> 38’ (or an equivalent general correct statement – but not a specific value greater than 38) and then after row reduction has ‘> 4’ etc. then this can possibly score full marks (as this is equivalent to \(x - 38\)). See below SC2 and SC3 for when \(x\) is replaced by a specific value
SC1: If attempt to maximise this can score M1A0M1A0M1A0A0A0 (3 out of 8 max. in (a)) mark (b) and (c) according to main scheme
SC2: If \(x\) given a value greater than 38 this can score M1A0M1A0M1A1ftA0A1 (5 out of 8 max. in (a)) mark (b) and (c) according to main scheme
SC3: If \(x\) given a value less than or equal to 38 then M1A0M1A0M0A0A0A0 (2 max.)
Mark scheme (b)
Scheme
Marks
(£)156
B1
(1)
Notes
b1B1: CAO – dependent on all previous M marks awarded in (a) – units not required
Mark scheme (c)
Scheme
Marks
\(29 + 29 + 27 + x + 33 = 156 + 5\)
M1
\(x = 43\)
A1
(2)
11 marks
Notes
c1M1: Their allocation with A and D interchanged = their (b) + 5 (oe) - not dependent on any previous mark
4. Four workers, A, B, C and D, are to be assigned to four tasks, 1, 2, 3 and 4. Each worker must be assigned to only one task and each task must be done by only one worker.
Worker A cannot do task 3 and worker D cannot do task 2
The cost, in pounds, of assigning each worker to each task is shown in the table below.
1
2
3
4
A
53
84
–
20
B
87
72
41
38
C
70
51
52
25
D
45
–
81
70
The total cost is to be minimised.
Formulate the above situation as a linear programming problem. You must define your decision variables and make the objective function and constraints clear.
You do not need to solve this problem.
Mark scheme
Scheme
Marks
1
2
3
4
A
53
84
-
20
B
87
72
41
38
C
70
51
52
25
D
45
-
81
70
Let \(x_{ij}\) be 0 or 1 \[\begin{cases} 1 \text{ if worker } (i) \text{ does task } (j) \\ 0 \text{ otherwise} \end{cases}\]
B1
where \(i \in \{A, B, C, D\}\) and \(j \in \{1, 2, 3, 4\}\)
subject to \[\begin{aligned} x_{A1}+x_{A2}+x_{A3}+x_{A4} &= 1 &&\text{ or } \textstyle\sum x_{Aj} = 1\\x_{B1}+x_{B2}+x_{B3}+x_{B4} &= 1 &&\text{ or } \textstyle\sum x_{Bj} = 1\\x_{C1}+x_{C2}+x_{C3}+x_{C4} &= 1 &&\text{ or } \textstyle\sum x_{Cj} = 1\\x_{D1}+x_{D2}+x_{D3}+x_{D4} &= 1 &&\text{ or } \textstyle\sum x_{Dj} = 1\\x_{A1}+x_{B1}+x_{C1}+x_{D1} &= 1 &&\text{ or } \textstyle\sum x_{i1} = 1\\x_{A2}+x_{B2}+x_{C2}+x_{D2} &= 1 &&\text{ or } \textstyle\sum x_{i2} = 1\\x_{A3}+x_{B3}+x_{C3}+x_{D3} &= 1 &&\text{ or } \textstyle\sum x_{i3} = 1\\x_{A4}+x_{B4}+x_{C4}+x_{D4} &= 1 &&\text{ or } \textstyle\sum x_{i4} = 1 \end{aligned}\]
M1 A1 A1
7 marks
Notes
1B1: Possible values of \(x_{ij}\) (not just \(x\)) defined. Must be clear that \(x_{ij}\) can take only the two values of 0 and 1 and 1 must be attributed to the worker doing the task (i and j do not need to be mentioned here) and 0 otherwise
2B1: Defining the set of values for i and j – { } not required – this mark is not dependent on the first B mark
1M1: Attempt at a ‘16’ term expression, coefficients ‘correct’, 2 ‘large’ values (must be at least 88) included, condone 2 slips (a slip here is an x missing from a term, an incorrect coefficient, ij confused in a single term or a missing/extra term)
1A1: CAO + minimise
2M1: Four equations with four variable terms, unit coefficients, = 1, allow x missing and ij confused but not using \(x_{11}\) etc.
2A1: Any four equations CAO
3A1: All eight equations only CAO (ignore mention of \(x_{ij} \geqslant 0\))
At a hotel, six guests, A, B, C, D, E and F, are to be allocated to six rooms, 1, 2, 3, 4, 5 and 6. Each room needs to be allocated to exactly one guest.
A bipartite graph showing their possible allocations is given in Figure 1. An initial matching is given in Figure 2.
(b) Starting from the initial matching given in Figure 2, apply the maximum matching algorithm to find an alternating path from F to 5. Hence find an improved matching. You must list the alternating path that you use and state your improved matching. (3)
Guest C now has room 5 added to his possible allocations.
(c) Starting with the improved matching found in (b), apply the maximum matching algorithm to obtain a complete matching. You must list the alternating path that you use and state your complete matching. (3)
Mark scheme (a)
Scheme
Marks
(i) A bipartite graph consists of two sets of vertices X and Y
B1
The edges only join vertices in X to vertices in Y, not vertices within a set
B1
(ii) A path from an unmatched vertex in one set to an unmatched vertex in the other set which alternately uses arcs not in/in the matching
B1 B1
(4)
Notes
ai1B1: Two sets of vertices – must contain the three words in bold – accept nodes for vertices but not points or any other non-technical language
ai2B1: (Edges) must go from one (set) into the other – candidates must give an indication of going from one set to the other – however, they do not need to use the word ‘set’ for this mark. Candidates do not need to mention that edges should not join vertices within a set but if a candidate does imply that a bipartite graph can join vertices within a set then withold this mark (no isw). If a candidate only says that you cannot connect nodes from the same set then this is B0. As an absolute minimum accept a statement along the lines of: ‘must go from one to the other’ – note that for this mark technical language may be absent or incorrect.
aii3B1: unmatched to unmatched (vertices do not need to be explicitly mentioned for this mark but B0 if arcs implied)
aii4B1: (alternate) arcs not in/in (not vertices/nodes) – must mention arcs/edges (not lines) and an understanding of what ‘alternating’ means in this context
Mark scheme (b)
Scheme
Marks
Alternating path: F – 1 = A – 3 = B – 4 = D – 6 = E – 5
M1
Change status: F = 1 – A = 3 – B = 4 – D = 6 – E = 5
A1
Improved matching: A = 3, B = 4, (C unmatched), D = 6, E = 5, F = 1
A1
(3)
Notes
SC: APs FROM F TO 2 AND FROM C TO EITHER 2 OR 5 - SEE NOTES
b1M1: An alternating path (e.g. letter 1st set – number 2nd set – letter 1st set – …) from F to 5 or vice-versa
b1A1: CAO – a correct path including change status either stated (only accept ‘change (of) status’ or ‘c.s’ but not, e.g.‘change state’) or shown (all symbols e.g. (… – … = … – …) interchanged (… = …. – … = …)) Chosen path clear
e.g.
F * 1 = A * 3 = B * 4 = D * 6 = E * 5 F = 1 * A = 3 * B = 4 * D = 6 * E = 5 scores M1A1 (change status shown)
change status F – 1 = A – 3 = B – 4 = D – 6 = E – 5 scores M1A1 (change status stated)
c.s. F – 1 = A – 3 = B – 4 = D – 6 = E – 5 scores M1A1 (change status stated)
F – 1 = A – 3 = B – 4 = D – 6 = E – 5 c.s. F = 1 – A = 3 – B = 4 – D = 6 – E = 5 scores M1A1 (change status stated and shown)
F – 1 = A – 3 = B – 4 = D – 6 = E – 5 F = 1, A = 3, B = 4, … scores M1A0 (no change status stated or shown)
b2A1: CAO – improved matching - must follow from the correct stated path. Accept either stated or on a clear diagram (with five arcs only). Please check the top of the second page as many candidates will draw either the improved or complete matching on the nodes provided there
Mark scheme (c)
Scheme
Marks
Alternating path: C – 5 = E – 6 = D – 4 = B – 2
M1
Change status: C = 5 – E = 6 – D = 4 – B = 2
A1
Complete matching: A = 3, B = 2, C = 5, D = 4, E = 6, F =1
A1
(3)
(10 marks)
Notes
c1M1: A second alternating path from C to 2 or vice-versa
c1A1: CAO – a correct path including change status stated or shown. Chosen path clear
c2A1: CAO (complete matching) must follow from two correct stated paths (so both previous M marks must have been awarded). Accept on a clear diagram (with six arcs only)
Special Cases for (b) and (c):Alternating path from F to 2
Candidates who find an alternating path from F to 2 can score in (b)
M1 for an alternating path from F to 2 (or vice-versa),
A1 for the correct alternating path (F – 1 = A – 3 = B – 2) and change of status (stated or shown)
A1 for the correct improved matching of A = 3, B = 2, D = 4, E = 6, F = 1 from the correct stated path
In (c) the alternating path is simply C – 5 and therefore no marks in (c) – so an alternating path from F to 2 can score a maximum of three marks (of the six available) in (b) and (c)
Alternating path from either C to 2 or C to 5
Candidates who find in (b) an alternating path from either C to 2 or C to 5 can score in (b)
M1 for an alternating path from either C to 2 or C to 5
A1 for either C – 3 = B – 2 or C – 3 = B – 4 = D – 6 = E – 5 together with the change of status (either stated or shown)
A0
In (c)
M1 for either F – 1 = A – 3 = C – 5 (following their path fom C to 2) or F – 1 = A – 3 = C – 5 = E – 6 = D – 4 = B – 2 (following their path from C to 5)
A0
A0
So both special cases can score a maximum of three marks (of the six available in (b) and (c))
3. Four pupils, Alexa, Ewan, Faith and Zak, are to be allocated to four rounds, 1, 2, 3 and 4, in a mathematics competition. Each pupil is to be allocated to exactly one round and each round must be allocated to exactly one pupil.
Each pupil has been given a score, based on previous performance, to show how suitable they are for each round. The higher the score the more suitable the pupil is for that round. The scores for each pupil are shown in the table below.
1
2
3
4
Alexa
61
50
47
23
Ewan
71
62
20
61
Faith
70
49
48
49
Zak
72
68
67
67
(a) Reducing rows first, use the Hungarian algorithm to obtain an allocation that maximises the total score. You must make your method clear and show the table after each stage. (8)
(b) State the maximum total score. (1)
Mark scheme (a)
Scheme
Marks
Since maximising, subtract all elements from some value \(\geqslant 72\) e.g \(\begin{bmatrix}11&22&25&49\\1&10&52&11\\2&23&24&23\\0&4&5&5\end{bmatrix}\)
a1M1: Subtracting from some value which must be \(\geqslant 72\) or all values made negative and then adding a value which must be \(\geqslant 72\). Condone no more than two errors
a2M1: Reducing rows and then columns – candidates may combine the two stages of converting from a maximum to a minimum problem and row reduction which is acceptable
a1A1: CAO
a3M1: Double covered +e; one uncovered –e ; and one single covered unchanged. 2 lines to 3 lines needed
a2A1ft: Follow through on their previous table – no errors
a4M1: One double covered +e; one uncovered –e; and one single covered unchanged. 3 lines needed to 4 lines needed (so getting to the optimal table)
a3A1: CSO on final table (so must have scored all previous marks)
a4A1: CAO – this mark is dependent on all M marks being awarded
Figure 1 shows the possible allocations of five people, Larry (L), Monisha (M), Nina (N), Phil (P) and Theo (T), to five activities, A, B, C, D and E.
Figure 2 shows an initial matching.
(b) Starting from this initial matching, use the maximum matching algorithm to find a complete matching. You should list the alternating path you use and state your complete matching. (3)
Mark scheme (a)
Scheme
Marks
A bipartite graph consists of two sets of vertices X and Y
B1
The edges only join vertices in X to vertices in Y, not vertices within a set
B1
(2)
Notes
a1B1: Two sets of vertices – must contain the three words in bold – accept nodes for vertices but not points or any other non-technical language
a2B1: (Edges) must go from one (set) into the other – candidates must give an indication of going from one set to the other – however, they do not need to use the word ‘set’ for this mark. Candidates do not need to mention that edges should not join vertices within a set but if a candidate does imply that a bipartite graph can join vertices within a set then withold this mark (no isw). As an absolute minimum accept a statement along the lines of: ‘must go from one to the other’ – note that for this mark technical language may be absent or incorrect
Mark scheme (b)
Scheme
Marks
Alternating path: P – A = N – E = T – D = L – C = M – B
M1
Change status: P = A – N = E – T = D – L = C – M = B
A1
Complete matching: L = C, M = B, N = E, P = A, T = D
A1
(3)
(5 marks)
Notes
b1M1: An alternating path (e.g. letter 1st set – letter 2nd set – letter 1st set – …) from P to B or vice – versa
b1A1: CAO – a correct path including change status either stated (only accept ‘change (of) status’ or ‘c.s’ but not, e.g.‘change state’) or shown (all symbols e.g. (… – … = … – …) interchanged (… = …. – … = …)) Chosen path clear
e.g.
P * A = N * E = T * D = L * C = M * B P = A * N = E * T = D * L = C * M = B scores M1A1 (change status shown)
change status P = A – N = E – T = D – L = C – M = B scores M1A1 (change status stated)
c.s. P = A – N = E – T = D – L = C – M = B scores M1A1 (change status stated)
P – A = N – E = T – D = L – C = M – B c.s. P = A – N = E – T = D – L = C – M = B scores M1A1 (change status stated and shown)
P – A = N – E = T – D = L – C = M – B P = A, N = E, T = D, … scores M1A0 (no change status stated or shown)
b2A1: CAO – must follow from the correct stated path. Accept either stated or on a clear diagram (with five arcs only)
A delivery firm has six vans, A, B, C, D, E and F, available for six deliveries, 1, 2, 3, 4, 5 and 6. Each van must be assigned to just one delivery.
The bipartite graph shown in Figure 1 shows the possible matchings and Figure 2 shows an initial matching.
A complete matching is required, starting from the given initial matching.
(a) Explain why it is necessary to use the maximum matching algorithm twice. (1)
There are three possible alternating paths that start at either D or B. One of these is
D – 2 = A – 3 = F – 6 = E – 5
(b) Find the other two alternating paths. (2)
(c) List the improved matching generated by using the alternating path
D – 2 = A – 3 = F – 6 = E – 5
(1)
(d) Starting from the improved matching found in (c), use the maximum matching algorithm to find a complete matching. You should list the alternating path that you use and your complete matching. (2)
Mark scheme (a)
Scheme
Marks
There are two unmatched vertices in each set (the algorithm matches only one vertex from one set to one vertex in the other set once per iteration)
B1
(1)
Notes
a1B1: CAO – an understanding that there are two unmatched vertices in each set. However, be generous, and see below examples that we would accept for B1
Both B and D (or 1 and 5) are unmatched
Two vertices in set X (or two in set Y) are unmatched
There are four unmatched nodes (or there are more than two unmatched nodes)
There are two pairs of nodes that are not matched (on one side of the graph)
There are two vans (or deliveries) that are not matched to deliveries (or vans)
There are two vertices on the left (or two on the right) that have not been matched
Two vertices in set X and Y are unmatched (bod)
Examples for B0:
There are two unmatched nodes
There are two sets of unmatched nodes
Ther are two unmatched arcs in each set
So accept poor terminology (for example, point for vertex, side for set, etc.) but not incorrect terminology (arc for vertex, etc.) and accept contextualised answers (‘vans’ rather than ‘vertices’)
Mark scheme (b)
Scheme
Marks
B – 4 = C – 5
M1
D – 2 = A – 3 = F – 6 = E – 1
A1
(2)
Notes
b1M1: One correct alternating path (accept any symbol connecting the vertices, for example, B – 4 – C – 5, or B4C5). Note that 5 – C = 4 – B and 1 – E = 6 – F = 3 – A = 2 – D (so paths from 5 to B and 1 to D) are fine
b1A1: Both paths correct (isw if more than two paths are stated)
Mark scheme (c)
Scheme
Marks
A = 3, (B unmatched), C = 4, D = 2, E = 5, F = 6
B1
(1)
Notes
c1B1: CAO – condone lack of B or 1 being stated as unmatched. The improved matching may be stated or drawn – do check carefully the top of the second page for the improved matching drawn there. Only accept a clear diagram with exactly five arcs
Mark scheme (d)
Scheme
Marks
Alternating path: B – 4 = C – 5 = E – 1 Change status: B = 4 – C = 5 – E =1
M1
Complete matching: A = 3, B = 4, C = 5, D = 2, E = 1, F = 6
A1
(2)
(6 marks)
Notes
d1M1: The correct alternating path from B to 1 (or vice-versa) and then either (i) or (ii)
(i) the ‘change status’ either stated in words (but only accept ‘change (of) status’ or ‘c.s.’ not ‘change state’ etc.) OR shown (all symbols e.g. (…-…=…-…) interchanged (…=…-…=…).
(ii) the correct complete matching either stated or drawn – only accept a clear diagram with exactly six arcs – do check carefully the top of the second page for the complete matching drawn there.
d1A1: CAO – all three parts – the correct alternating path and the change status either stated or shown and the complete matching either stated or drawn
6. Four workers, A, B, C and D, are to be assigned to four tasks, 1, 2, 3 and 4. Each worker must be assigned to just one task and each task must be done by just one worker.
Worker C cannot do task 4 and worker D cannot do task 1.
The cost of assigning each worker to each task is shown in the table below.
The total cost is to be minimised.
1
2
3
4
A
29
15
32
30
B
34
26
40
32
C
28
27
35
–
D
–
21
33
31
Formulate the above situation as a linear programming problem. You must define your decision variables and make the objective function and constraints clear. (7)
Mark scheme
Scheme
Marks
Let \(x_{ij}\) be 0 or 1 \(\begin{cases}1 & \text{if worker } (i) \text{ does task } (j)\\ 0 & \text{otherwise}\end{cases}\) where \(i \in \{\text{A, B, C, D}\}\) and \(j \in \{1, 2, 3, 4\}\)
1B1: Defining variables fully both ‘bits’ values and subscripts. Penalise poor variable choice, (AP etc.) here.
1M1: Attempt at a 16 term expression, coefficients ‘correct’, 2 ‘large’ values included, condone 2 slips.
1A1: CAO + minimise. Penalise reversed subscripts once only per question.
2M1: Four equations, each in four variables, unit coefficients, all 16 variables included, = 1, accept \(\leqslant 1, \geqslant 1\) here for this M only
2A1: Any 4 CAO.
3M1: All 8 equations, each in four variables, unit coefficients, all 16 variables included = 1.
Figure 1 shows the possible allocations of five employees, Ali (A), Campbell (C), Hugo (H), Janelle (J) and Polly (P), to five tasks 1, 2, 3, 4 and 5.
(a) Explain why it is not possible to find a complete matching. (2)
It is decided that one of the employees should be trained so that a complete matching becomes possible. There are only enough funds for one employee to be trained.
Two employees volunteer to undergo training. Janelle can be trained to do task 1 or Hugo can be trained to do task 5.
(b) Decide which employee, Janelle or Hugo, should undergo training. Give a reason for your answer. (2)
You may now assume that the employee you identified in (b) has successfully undergone training.
Figure 2 shows an initial matching.
(c) Starting from the given initial matching, use the maximum matching algorithm to find a complete matching. You should list the alternating path that you use, and state the complete matching. (3)
Mark scheme (a)
Scheme
Marks
e.g. Activities 1 and 3 both can only be done by Hugo
B2, 1, 0
(2)
Notes
a1B1: A statement with the correct employees and tasks that attempts a reason why a complete matching is not possible. BOD gets the mark here. Note e.g. ‘Hugo is the only one who can do both 1 and 3’ or ‘Hugo can only do 1 and 3’ are both B1 only.
a2B1: Fully correct, including all pertinent names and activities. No incorrect information given.
Mark scheme (b)
Scheme
Marks
J to 1 should be chosen
M1
e.g. J to 1 would release H to do 3. e.g. if H is retrained then tasks 1 and 3 can still only be done by H.
A1
(2)
Notes
b1M1: J to 1 selected with a reason given. One of H, 1 or 3 must be mentioned.
b1A1: A correct reason given – must explicitly explain why J with 1 allows a complete matching to occur e.g. H can now do 3, or the candidate explains that if Hugo is re-trained there are still two tasks, 1 and 3, that can only be done by one employee, H.
Mark scheme (c)
Scheme
Marks
A – 2 = P – 4 = C – 5 = J – 1 = H – 3
M1
Change status A = 2 – P = 4 – C = 5 – J = 1 – H = 3
A1
Complete matching: A = 2, C = 5, H = 3, J = 1 and P = 4
A1
(3)
(7 marks)
Notes
c1M1: An alternating path from A to 3 (or vice versa).
c1A1: CAO – a correct path including change status either stated or shown. Chosen path clear.
c2A1: CAO must follow from the correct stated path. Accept on a clear diagram (with five arcs only).
Six pupils, Ashley (A), Fran (F), Jas (J), Ned (N), Peter (P) and Richard (R), each wish to learn a musical instrument. The school they attend has six spare instruments; a clarinet (C), a trumpet (T), a violin (V), a keyboard (K), a set of drums (D) and a guitar (G). The pupils are asked which instruments they would prefer and their preferences are given in the table above. It is decided that each pupil must learn a different instrument and each pupil needs to be allocated to exactly one of their preferred instruments.
(a) Using Diagram 1 in the answer book, draw a bipartite graph to show the possible allocations of pupils to instruments. (1)
Initially Ashley, Fran, Jas and Richard are each allocated to their first preference.
(b) Show this initial matching on Diagram 2 in the answer book. (1)
(c) Starting with the initial matching from (b), apply the maximum matching algorithm once to find an improved matching. You must state the alternating path you use and give your improved matching. (3)
(d) Explain why a complete matching is not possible. (1)
Fran decides that as a third preference she would like to learn to play the guitar. Peter decides that as a second preference he would like to learn to play the drums.
(e)Starting with the improved matching found in (c), use the maximum matching algorithm to obtain a complete matching. You must state the alternating path you use and your complete matching. (3)
Mark scheme (a)
Scheme
Marks
B1
(1)
Notes
a1B1 CAO – condone the addition of an arc from F to G and/or one from P to D only.
Mark scheme (b)
Scheme
Marks
B1
(1)
Notes
b1B1 CAO – these four arcs and no additional ones.
Mark scheme (c)
Scheme
Marks
Alternating path either N – V = F – T = A – C = J – D or P – V = F – T = A – C = J – D
M1
Change status N = V – F = T – A = C – J = D or P = V – F = T – A = C – J = D
A1
Improved matching A = C, F = T, J = D, N = V, (P unmatched), R = G or A = C, F = T, J = D, (N unmatched), P = V, R = G
A1
(3)
Notes
c1M1 An alternating path (e.g. letter 1st set – letter 2nd set – letter 1st set - …) from either N or P to D – or vice versa.
c1A1 CAO – a correct path including change status either stated (only accept ‘change (of) status’ or ‘c.s.’) or shown (all symbols e.g. (…-…=…-…) interchanged (…=…-…=…). Chosen path clear.
e.g.
N – V = F – T = A – C = J – D N = V – F = T – A = C – J = D Scores M1A1 (change status shown)
change status N – V = F – T = A – C = J – D Scores M1A1 (change status stated)
c.s. N – V = F – T = A – C = J – D Scores M1A1 (change status stated)
N – V = F – T = A – C = J – D c.s. N = V – F = T – A = C – J = D Scores M1A1 (change status stated and shown)
N – V = F – T = A – C = J – D N = V, F = T, A = C, J = D, … Scores M1A0 (no change status stated or shown)
c2A1 CAO must follow from the correct stated path. Accept on a clear diagram (with five arcs only). Condone lack of P or N being stated as unmatched.
Mark scheme (d)
Scheme
Marks
e.g. both K and G can only be allocated to R e.g. N and P can only be allocated to V
B1
(1)
Notes
d1B1 CAO (completely correct statement) – do not accept a general statement (specific nodes must be referred to). Note that these need to be checked carefully e.g. V can only be allocated to N and P is B0.
Mark scheme (e)
Scheme
Marks
Alternating path P – D = J – C = A – T = F – G = R – K or N – V = P – D = J – C = A – T = F – G = R – K
M1
Change status P = D – J = C – A = T – F = G – R = K or N = V – P = D – J = C – A = T – F = G – R = K
A1
Complete matching A = T, F = G, J = C, N = V, P = D, R = K
A1
(3)
(9 marks)
Notes
e1M1 A second alternating path from either N (if P used in (c)) or P (if N used in (c)) to K (or vice-versa)
e1A1 CAO including change status (stated or shown), chosen path clear.
e2A1 CAO must follow from two correct stated paths (so both previous M marks must have been awarded). Accept on a clear diagram (with six arcs only).
1. Four workers, A, B, C and D, are to be assigned to four tasks, 1, 2, 3 and 4. Each worker must be assigned to just one task and each task must be done by just one worker.
Worker A cannot do task 4 and worker B cannot do task 2.
The amount, in pounds, that each worker would earn if assigned to the tasks, is shown in the table below.
1
2
3
4
A
19
16
23
–
B
24
–
30
23
C
18
17
25
18
D
24
24
26
24
Reducing rows first, use the Hungarian algorithm to obtain an allocation that maximises the total earnings. You must make your method clear and show the table after each stage. (10)
Mark scheme
Scheme
Marks
Since maximising, subtract all elements from some \(n \geqslant 30\) and insert large numbers in cells A4 and B2 e.g. \(\begin{bmatrix}21&24&17&100\\16&100&10&17\\22&23&15&22\\16&16&14&16\end{bmatrix}\)
1. Four workers, Chris (C), James (J), Katie (K) and Nicky (N), are to be allocated to four tasks, 1, 2, 3 and 4. Each worker is to be allocated to one task and each task must be allocated to one worker.
The profit, in pounds, resulting from allocating each worker to each task, is shown in the table below. The profit is to be maximised.
1
2
3
4
Chris
127
116
111
113
James
225
208
205
208
Katie
130
113
112
114
Nicky
228
212
203
210
(a) Reducing rows first, use the Hungarian algorithm to obtain an allocation that maximises the total profit. You must make your method clear and show the table after each stage. (8)
(b) State which worker should be allocated to each task and the resulting total profit made. (2)
Mark scheme (a)
Scheme
Marks
Subtracting all elements from some \(n \geqslant 228\)
1M1
Reducing rows and then columns to get
2M1
0
11
16
14
0
17
20
17
0
17
18
16
0
16
25
18
then
0
0
0
0
0
6
4
3
0
6
2
2
0
5
9
4
1A1
Using two lines and 2 to get
3M1
2
0
0
0
0
4
2
1
0
4
0
0
0
3
7
2
2A1
Using three lines and 1 to get
4M1
3
0*
0
0
0
3
1
0*
1
4
0*
0
0*
2
6
1
3A1ft 4A1
(8)
Notes
a1M1: Subtracting all elements from some \(n \geqslant 228\), condone up to 2 errors
a2M1: Reducing rows and then columns
a1A1: CAO
a3M1: Double covered +e; one uncovered – e; and one single covered unchanged. 2 lines needed to 3 lines needed.
a2A1: CAO
a4M1: One double covered +e; one uncovered – e; and one single covered unchanged. 3 lines needed to 4 lines needed.
b1M1: Their optimal allocation (of workers to tasks) and an attempt to calculate the profit – this mark is dependent on all M marks in (a) have been earned.
Figure 1 shows the possible allocations of six people, A, B, C, D, E and F, to six tasks, 1, 2, 3, 4, 5 and 6.
Figure 2 shows an initial matching.
(a) Starting from the given initial matching, use the maximum matching algorithm to find an improved matching. You should list the alternating path you used, and your improved matching. (3)
(b) Explain why it is not possible to find a complete matching. (1)
After training, task 4 is added to F’s possible allocation and task 6 is added to E’s possible allocation.
(c) Starting from the improved matching found in (a), use the maximum matching algorithm to find a complete matching. You should list the alternating path you used and your complete matching. (3)
Mark scheme (a)
Scheme
Marks
C – 5 = F – 2 = D – 6 change status to give C = 5 – F = 2 – D = 6
M1 A1
Improved matching is (A unmatched) B = 4, C = 5, D = 6, E = 1, F = 2
A1
(3)
Notes
a1M1 An alternating path (e.g. letter – number – letter – ...) from C to 6 or vice versa
a1A1 CAO – a correct path including change status either stated (only accept ‘change (of) status’ or ‘c.s.’) or shown (all symbols e.g. (...–... = ...) interchanged (... = ... – ...)). Chosen path clear.
a2A1 CAO must follow from the correct stated path. Accept on a clear diagram (with five arcs only).
Mark scheme (b)
Scheme
Marks
E.g. activities 3 and 4 can only be done by B E.g. both A and E can only do activity 1
B1
(1)
Notes
b1B1 A good, clear, complete, correct answer (all relevant nodes must be referred to and must be correct)
Mark scheme (c)
Scheme
Marks
A – 1 = E – 6 = D – 2 = F – 4 = B – 3
M1
Change status to give A = 1 – E = 6 – D = 2 – F = 4 – B = 3
A1
Complete matching is A = 1, B = 3, C = 5, D = 2, E = 6, F = 4
A1
(3)
(7 marks)
Notes
c1M1 An alternating path from A to 3 or vice versa.
c1A1 CAO including change status (stated or shown), chosen path clear.
c2A1 CAO must follow from two correct stated paths (so both previous M marks must have been awarded). Accept on a clear diagram (with six arcs only).
6. Three workers, Harriet, Jason and Katherine, are to be assigned to three tasks, 1, 2 and 3. Each worker must be assigned to just one task and each task must be done by just one worker.
The amount each person would earn, in pounds, while assigned to each task is shown in the table below.
Task 1
Task 2
Task 3
Harriet
251
243
257
Jason
244
247
255
Katherine
249
252
246
The total income is to be maximised.
(a) Modify the table so it can be used to find the maximum income. (1)
(b) Formulate the above situation as a linear programming problem. You must define your decision variables and make your objective function and constraints clear. (7)
Mark scheme (a)
Scheme
Marks
Since maximising subtract all elements from some \(n \geqslant 257\), say 260. \(\begin{bmatrix}9 & 17 & 3 \\ 16 & 13 & 5 \\ 11 & 8 & 14\end{bmatrix}\qquad\left(n = 257\ \begin{bmatrix}6 & 14 & 0 \\ 13 & 10 & 2 \\ 8 & 5 & 11\end{bmatrix},\quad n = 258\ \begin{bmatrix}7 & 15 & 1 \\ 14 & 11 & 3 \\ 9 & 6 & 12\end{bmatrix}\right)\)
B1
(1)
Notes
a1B1 CAO (o.e.)
Mark scheme (b)
Scheme
Marks
\(x_{ij} = \begin{cases}1 & \text{if worker } i \text{ does task } j\\ 0 & \text{otherwise}\end{cases}\)
1B1
Where \(x_{ij}\) indicates worker \(i\) being assigned to task \(j\) \(i \in \{H, K, J\}\) and \(j \in \{1, 2, 3\}\)
Figure 1 shows the possible allocations of six people, Alex (A), Ben (B), Harriet (H), Izzy (I), Leo (L) and Rowan (R), to six tasks, 1, 2, 3, 4, 5 and 6.
(a) Write down the technical name given to the type of diagram shown in Figure 1. (1)
Figure 2 shows an initial matching.
(b) Starting from the given initial matching, use the maximum matching algorithm to find a complete matching. You should list the alternating paths you use, and state your improved matching after each iteration. (6)
Mark scheme (a)
Scheme
Marks
Bipartite (graph)
B1
(1)
Notes
a1B1 CAO, but be charitable on spelling, award if phonetically close.
Mark scheme (b)
Scheme
Marks
e.g. (see below for alternatives)
First alternating path: B – 4 = L – 3 = H – 2
M1
Change status to give B = 4 – L = 3 – H = 2
A1
Improved matching: A = 1, B = 4, H = 2, (I unmatched), L = 3 R = 5
A1
Second alternating path: I – 1 = A – 3 = L – 5 = R – 6
M1
Changing status to give: I = 1 – A = 3 – L = 5 – R = 6
A1
Complete matching: A = 3, B = 4, H = 2, I = 1, L = 5, R = 6
A1
(6)
(7 marks)
Notes
Possible 1st paths
A
B
H
I
L
R
Subsequent 2nd paths
B – 4 – L – 3 – H – 2
1
4
2
-
3
5
I – 1 – A – 3 – L – 5 – R – 6
B – 4 – L – 5 – R – 6
1
4
3
-
5
6
I – 1 – A – 3 – H – 2
I – 1 – A – 3 – H - 2
3
-
2
1
4
5
B – 4 – L – 5 – R – 6
b1M1 An alternating path (e.g. letter – number – letter – ...) from either B to 2 or 6 or from I to 2 – or vice versa
b1A1 CAO – a correct path including change status either stated (only accept ‘change (of) status’ or ‘c.s.’) or shown (all symbols e.g. (...–... = ...) interchanged (... = ... – ...)). Chosen path clear.
b2A1 CAO must follow from the correct stated path. Accept on a clear diagram (with five arcs only).
b2M1 A second alternating path from the remaining (unused) I or B to the remaining (unused) 6 or 2 - or vice versa.
b3A1 CAO including change status (stated or shown), chosen path clear
b4A1 CAO must follow from two correct stated paths (so both previous M marks must have been awarded). Accept on a clear diagram (with six arcs only).
Figure 2 shows the possible allocations of six workers, Charlie (C), George (G), Jack (J), Nurry (N), Olivia (O) and Rachel (R), to six tasks, 1, 2, 3, 4, 5 and 6.
Figure 3 shows an initial matching.
(a) Starting from this initial matching, use the maximum matching algorithm to find an improved matching. You should give the alternating path you use and list your improved matching. (3)
(b) Explain why it is not possible to find a complete matching. (2)
After training, Charlie adds task 5 to his possible allocations.
(c) Taking the improved matching found in (a) as the new initial matching, use the maximum matching algorithm to find a complete matching. Give the alternating path you use and list your complete matching. (3)
Mark scheme (a)
Scheme
Marks
(i) C – 4 = N – 6 = J – 3 = R – 2 or (ii) O – 6 = J – 3 = R – 2
M1
Change status to give (i) C = 4 – N = 6 – J = 3 – R = 2 or (ii) O = 6 – J = 3 – R = 2
A1
Improved matching is:
C
G
J
N
O
R
(i)
4
5
3
6
2
(ii)
5
3
4
6
2
A1
(3)
Notes
a1M1 An alternating path (e.g. letter - number - letter - …) from C or O to 2 or vice versa.
a1A1 CAO – a correct path including change status either stated (only accept ‘change (of) status’ or ‘c.s.’) or shown (all symbols e.g. (… – … = …) interchanged (… = … – …)). Chosen path clear.
a2A1 CAO must follow from the correct stated path. Accept on a clear diagram (with five arcs only).
Mark scheme (b)
Scheme
Marks
E.g. Tasks 1 and 5 can only be done by George E.g. Charlie can only do task 4 and Olivia can only do task 6 which means that Nurry can’t be allocated a task as Nurry can only do tasks 4 and 6
B2, 1, 0
(2)
Notes
b1B1 Correct idea, may be imprecise or muddled (bod gets B1) all relevant nodes must be referred to and must be correct.
b2B1 Good, clear, complete, correct answer (this needs to be checked carefully e.g. G can only do tasks 1 and 5 is B1 only).
Mark scheme (c)
Scheme
Marks
O – 6 = N – 4 = C – 5 = G – 1 or C – 5 = G – 1
M1
Change status to give O = 6 – N = 4 – C = 5 – G = 1 or C = 5 – G = 1
A1
Maximum matching is: C = 5, G = 1, J = 3, N = 4, O = 6, R = 2
A1
(3)
(8 marks)
Notes
c1M1 A second alternating path from O or C to 1 (whichever letter (of O or C) that they didn’t use before) or vice versa.
c1A1 CAO including change status (stated or shown), chosen path clear.
c2A1 CAO must follow from two correct stated paths (so both previous M marks must have been awarded). Accept on a clear diagram (with six arcs only).
7. Four workers, A, B, C and D, are to be assigned to four tasks, P, Q, R and S. Each worker is to be assigned to exactly one task and each task must be assigned to just one worker. The cost, in pounds, of using each worker for each task is given in the table below. The total cost is to be minimised.
P
Q
R
S
A
23
41
34
44
B
21
45
33
42
C
26
43
31
40
D
20
47
35
46
Formulate the above situation as a linear programming problem. You must define your decision variables and make the objective function and constraints clear. (7)
Mark scheme
Scheme
Marks
Let \(x_{ij}\) be 0 or 1 \(\begin{cases}1 & \text{if worker } (i) \text{ does task } (j)\\ 0 & \text{otherwise}\end{cases}\) where \(i \in \{\text{A, B, C, D}\}\) and \(j \in \{\text{P, Q, R, S}\}\)
Figure 1 shows the possible allocations of five workers, Charles (C), David (D), Ellie (E), Freya (F) and Georgi (G), to five tasks, 1, 2, 3, 4 and 5.
Figure 2 shows an initial matching.
(a) Starting from this initial matching, use the maximum matching algorithm to find a complete matching. State clearly the alternating path that you use and list your final matching. (4)
(b) Find another solution starting from the given initial matching. You should state the alternating path and list the complete matching it gives. (3)
Mark scheme (a)
Scheme
Marks
Either (i) G – 3 = C – 2 = F – 1 = D – 4 or (ii) G – 5 = E – 4 or (iii) G – 5 = E – 1 = D – 4
M1 1A1
Change status Either (i) G = 3 – C = 2 – F = 1 – D = 4 or (ii) G = 5 – E = 4 or (iii) G = 5 – E = 1 – D = 4
2A1
Giving matchings:
C
D
E
F
G
(i)
2
4
5
1
3
(ii)
3
1
4
2
5
(iii)
3
4
1
2
5
3A1
(4)
Notes
Mark the candidates best attempt as part (a)
a1M1 Path from G to 4 - or vice versa
a1A1 CAO chosen path clear.
a2A1 Change status step clear stated or shown. [Only accept ‘change status’; ‘c.s.’; sight of the connectives being swapped]
a3A1 CAO must ft from stated path, diagram ok
Mark scheme (b)
Scheme
Marks
Gives another solution
M1 1A1 2A1
(3)
(7 marks)
Notes
b1M1 A second path from G to 4 (or vice versa)
b1A1 CAO including change status (stated or shown), chosen path clear.
1. Five workers, A, B, C, D and E, are to be assigned to five tasks, 1, 2, 3, 4 and 5. Each worker is to be assigned to one task and each task must be assigned to one worker.
The cost, in pounds, of assigning each person to each task is shown in the table below. The cost is to be minimised.
1
2
3
4
5
A
129
127
122
134
135
B
127
125
123
131
132
C
142
131
121
140
139
D
127
127
122
131
136
E
141
134
129
144
143
(a) Reducing rows first, use the Hungarian algorithm to obtain an allocation that minimises the cost. You must make your method clear and show the table after each stage. (8)
a1M1 Reducing rows and then columns – See special case
a1A1 CAO
a2M1 Double covered +e; one uncovered – e; and one single covered unchanged. 2 lines needed to 3 lines needed.
a2A1ft ft on their previous table.
a3M1 Double covered +e; one uncovered – e; and one single covered unchanged. 3 lines needed to 5 lines needed. Watch out for ‘slow Hungarian’ (e.g. 2 ‘iterations’ each subtracting 1), give M0 if seen.
a3A1ft ft on their previous table. Condone one ‘new’ error in table here.
Figure 3 shows the possible allocations of six people, Charles (C), Emily (E), George (G), Harriet (H), Jack (J) and Shen (S), to six tasks, 1, 2, 3, 4, 5 and 6.
Figure 4 shows an initial matching.
(c) Starting from this initial matching, use the maximum matching algorithm to find an improved matching. You should list the alternating path you use and state your improved matching. (3)
Emily has task 5 added to her possible allocations and Harriet has task 3 added to her possible allocations.
(d) Starting from the improved matching found in part (c), use the maximum matching algorithm to find a complete matching. You should list the alternating path you use and state your improved matching. (3)
Mark scheme (a)
Scheme
Marks
A bipartite graph consists of two sets of vertices X and Y. The edges only join vertices in X to vertices in Y, not vertices within a set.
B2,1,0
(2)
Notes
a1B1: 2 sets of vertices
a2B1: arcs must go from one set into the other.
Mark scheme (b)
Scheme
Marks
A Matching is the pairing of some or all of the elements of one set, X, with elements of a second set, Y.
B2,1,0
(2)
Notes
b1B1: pairing or one to one.
b2B1: element(s) from 1 set with element(s) of the other.
Mark scheme (c)
Scheme
Marks
Alternating path: J – 4 = E – 2 = C – 3
M1
Change status: J = 4 – E = 2 – C = 3
A1
C = 3, E = 2, G = 1, H = 6, J = 4, (S unmatched)
A1
(3)
Notes
c1M1: Path from J to 3 - or vice versa
c1A1: CAO including change status (stated or shown), chosen path clear.
c2A1: CAO unambiguous. Must ft from stated path, diagram ok
Mark scheme (d)
Scheme
Marks
Alternating path: S – 6 = H – 3 = C – 2 = E – 5
M1
Change status: S = 6 – H = 3 – C = 2 – E = 5
A1
C = 2, E = 5, G = 1, H = 3, J = 4, S = 6
A1
(3)
(10 marks)
Notes
d1M1: Path from S to 5 (or vice versa)
d1A1: CAO including change status (stated or shown), but only penalise once per question, chosen path clear.
d2A1: CAO unambiguous. Must ft from stated paths, diagram ok. Must have both M’s.
6. Three workers, P, Q and R, are to be assigned to three tasks, A, B and C. Each worker must be assigned to just one task and each task must be assigned to just one worker.
Table 1 shows the cost of using each worker for each task. The total cost is to be minimised.
Task A
Task B
Task C
Worker P
27
31
25
Worker Q
26
30
34
Worker R
35
29
32
Table 1
(a) Formulate the above situation as a linear programming problem. You must define your decision variables and make the objective and constraints clear. You are not required to solve the problem. (7)
Table 2 shows the profit gained by using each worker for each task. The total profit is to be maximised.
Task A
Task B
Task C
Worker P
33
37
31
Worker Q
32
36
40
Worker R
41
35
38
Table 2
(b) Modify Table 2 in the answer book so that the Hungarian Algorithm could be used to find the maximum total profit. You are not required to solve the problem. (2)
Mark scheme (a)
Scheme
Marks
Task A
Task B
Task C
Worker P
27
31
25
Worker Q
26
30
34
Worker R
35
29
32
Let \(x_{ij} = \begin{cases} 1 & \text{if worker does the task}\\ 0 & \text{otherwise}\end{cases}\)
B1
Where \(x_{ij}\) indicates worker i being assigned to task j, \(i \in \{P, Q, R\}\), \(j \in \{A, B, C\}\)
Figure 3 shows the possible allocations of five workers, Adam (A), Catherine (C), Harriet (H), Josh (J) and Richard (R) to five tasks, 1, 2, 3, 4 and 5.
Figure 4 shows an initial matching.
There are three possible alternating paths that start at A. One of them is
A – 3 = R – 4 = C – 5
(a) Find the other two alternating paths that start at A. (3)
(b) List the improved matching generated by using the alternating path A – 3 = R – 4 = C – 5. (1)
(c) Starting from the improved matching found in (b), use the maximum matching algorithm to obtain a complete matching. You must list the alternating path used and your final matching. (3)
Mark scheme (a)
Scheme
Marks
[Given A – 3 = R – 4 = C – 5 ] A – 1 = H – 2
M1 A1
A – 1 = H – 3 = R – 4 = C – 5
A1
(3)
Notes
(a)M1 Path from A to 2 or 5 - or vice versa
1A1 One correct path selected OR tree showing the missing two paths only.
Six workers, Anthony, Beth, David, Jacob, Kantola and Miri, are to be allocated to six tasks, 1, 2, 3, 4, 5 and 6.
Figure 3 shows the possible allocations of the workers, and an initial matching is shown in Figure 4.
(a) Write down the technical name given to the type of diagram shown in Figure 3. (1)
(b) Use the maximum matching algorithm once to find an improved matching. You must state the alternating path you use and your improved matching. (3)
Anthony now agrees to add task 6 to his possible allocations.
(c)Starting with your improved matching, use the maximum matching algorithm to obtain a complete matching. You must state the alternating path you use and your complete matching. (3)
Mark scheme (a)
Scheme
Marks
Bipartite graph
B1
Notes
1B1: Cao, but be charitable on spelling, award if phonetically close.
Mark scheme (b)
Scheme
Marks
e.g. J – 3 = B – 6 = K – 1
M1
Change status J = 3 – B = 6 – K = 1
A1
A = 2 B = 6 (D unmatched) J = 3 K = 1 M = 5
A1
(3)
Notes
1M1: Path from J to 1 or 4 (or vice versa)
1A1: CAO including change status (stated or shown), chosen path clear.
2A1: CAO must ft from stated path, diagram ok
Alternative answers (b)
Path
A B D J K M
J – 3 – B – 1
2 1 – 3 6 5
J – 3 – B – 6 – K – 1
2 6 – 3 1 5
J – 3 – B – 6 – K – 4
2 6 – 3 4 5
Mark scheme (c)
Scheme
Marks
e.g. D – 2 = A – 6 = B – 1 = K – 4
M1
Change status D = 2 – A = 6 – B = 1 – K = 4
A1
A = 6 B = 1 D = 2 J = 3 K = 4 M = 5
A1
(3)
(7 marks)
Notes
1M1: Path from D to 4 or 1 (or vice versa)
1A1: CAO including change status (stated or shown),but only penalise once per question, chosen path clear.
2A1: CAO must ft from stated paths, diagram ok. Must have both M’s.
Alternative answers (c)
Path
A B D J K M
D – 2 – A – 6 – K – 4 D – 5 – M – 2 – A – 6 – K – 4
6 1 2 3 4 5 6 1 5 3 4 2
D – 2 – A – 6 – B – 1 – K – 4 D–5–M– 2 – A – 6 – B – 1– K – 4
6 1 2 3 4 5 6 1 5 3 4 2
D – 2 – A – 6 – B – 1 D – 5 – M – 2 – A – 6 – B – 1
Figure 3 shows the possible allocations of six people, Amelia, Charlie, Ellie, Gemma, Jimmy and Saskia, to six tasks, 1, 2, 3, 4, 5 and 6. Figure 4 shows an initial matching.
(a) Use the maximum matching algorithm once to find an improved matching. You must state the alternating path used and your improved matching. (3)
(b) Explain why a complete matching is not possible. (2)
After training, Jimmy can be assigned to tasks 4 or 5 and Ellie to tasks 2, 3, 5 or 6.
(c)Starting with your current maximal matching, use the maximum matching algorithm to obtain a complete matching. You must state the alternating path used and your final matching. (3)
Mark scheme (a)
Scheme
Marks
e.g. G – 3 = E – 2 = A – 4 = S – 6
M1
Change status G = 3 – E = 2 – A = 4 – S = 6
A1
Improved matching A = 4 (C unmatched) E = 2 G = 3 J = 5 S = 6
A1
(3)
Notes
1M1: Path from G to 6 or 1
1A1: CAO including change status ( stated or shown), chosen path clear.
2A1: CAO must ft from stated path, diagram ok
Alternative
(a) G – 3 = E – 2 = A – 4 = S – 1 c.s. G = 3 – E = 2 – A = 4 – S = 1 A = 4, (C unmatched), E = 2, G = 3, J = 5, S = 1
Mark scheme (b)
Scheme
Marks
e.g. Both C and J can only be matched to 5 Both 1 and 6 can only be done by S
B2, 1, 0
(2)
Notes
1B1: Correct answer, may be imprecise or muddled (bod gets B1) all relevant nodes should be referred to and must be correct, but condone one (genuine) slip.
2B1: Good, clear, correct answer.
Mark scheme (c)
Scheme
Marks
C – 5 = J – 4 = A – 2 = E – 6 = S – 1
M1
Change status C = 5 – J = 4 – A = 2 – E = 6 – S = 1
A1
Complete matching A = 2 C = 5 E = 6 G = 3 J = 4 S = 1
A1
(3)
(8 marks)
Notes
1M1: Path from C to 1 or 6 [whichever they didn’t use before.]
1A1: CAO including change status ( stated or shown), chosen path clear. (Don’t penalise change status twice.)
2A1: CAO must ft from stated path, diagram ok
Alternative
(c) C – 5 = J – 4 = A – 2 = E – 6 c.s. C = 5 – J = 4 – A = 2 – E = 6 A = 2, C = 5, E = 6, G = 3, J = 4, S = 1
2. A team of four workers, Harry, Jess, Louis and Saul, are to be assigned to four tasks, 1, 2, 3 and 4. Each worker must be assigned to one task and each task must be done by just one worker.
Jess cannot be assigned to task 4.
The amount, in pounds, that each person would earn while assigned to each task is shown in the table below.
1
2
3
4
Harry
18
24
22
17
Jess
20
25
19
-
Louis
25
24
27
22
Saul
19
26
23
14
(a) Reducing rows first, use the Hungarian algorithm to obtain an allocation that maximises the total amount earned by the team. You must make your method clear and show the table after each stage. (8)
(b) State who should be assigned to each task and the total amount earned by the team. (2)
Mark scheme (a)
Scheme
Marks
Since maximising, subtract all elements from some \(n \geqslant 27\) \(\begin{bmatrix}12 & 6 & 8 & 13 \\ 10 & 5 & 11 & 60 \\ 5 & 6 & 3 & 8 \\ 11 & 4 & 7 & 16\end{bmatrix}\)
Figure 1 shows the possible allocation of six people, Alice (A), Brian (B), Christine (C), David (D), Elizabeth (E) and Freddy (F), to six tasks, 1, 2, 3, 4, 5 and 6.
An initial matching is Alice to task 1, Christine to task 3, David to task 4 and Elizabeth to task 5.
(a) Show this initial matching on Diagram 1 in the answer book. (1)
(b) Starting from this initial matching, use the maximum matching algorithm to find a complete matching. List clearly the alternating paths that you use, and give your final matching. (5)
Mark scheme (a)
Scheme
Marks
Initial map
B1
(1)
Notes
B1 cao preferably just 4 lines, but accept if unambiguous.
Mark scheme (b)
Scheme
Marks
E.g. Path 1 F-4-D-5-E-2
M1 A1
Path 2 B-3-C-6
M1 A1
Matching A : 1, B : 3, C : 6, D : 5, E : 2, F : 4
A1
(5)
(6 marks)
Notes
M1 attempt at a path from B or F to 2 or 6
A1 correct path – including change status
M1 attempt at a second path from F or B to 6 or 2
A1 correct path – including change status (do not penalise change status twice)
A1 correct matching; must follow from 2 correct paths
Figure 1 shows the possible allocations of six workers, Charlotte (C), Eleanor (E), Harry (H), Matt (M), Rachel (R) and Simon (S) to six tasks, 1, 2, 3, 4, 5 and 6.
Figure 2 shows an initial matching.
(a) List an alternating path, starting at H and ending at 4. Use your path to find an improved matching. List your improved matching. (3)
(b) Explain why it is not possible to find a complete matching. (1)
Simon (S) now has task 3 added to his possible allocation.
(c) Taking the improved matching found in (a) as the new initial matching, use the maximum matching algorithm to find a complete matching. List clearly the alternating path you use and your complete matching. (3)
Mark scheme (a)
Scheme
Marks
H – 2 = M – 5 = R – 4 change status to give
M1 A1
C = 3 (E unmatched) H = 2 M = 5 R = 4 S = 1
A1
(3)
Notes
(a) 1M1: Path from H to 4
1A1: correct path and change status
2A1: CAO must follow from correct path.
Mark scheme (b)
Scheme
Marks
e.g. C is the only person who can do 3 and the only person who can do 6
B1
(1)
Notes
(b) 1B1: CAO or e.g reference to E 5 M 2 H 1 S
Mark scheme (c)
Scheme
Marks
e.g. E – 5 = M – 2 = H – 1 = S – 3 = C – 6 change status to give
M1 A1
C = 6 E = 5 H = 1 M = 2 R = 4 S = 3
A1
(3)
(7 marks)
Notes
(c) 1M1: Path from E to 6
1A1: CAO do not penalise lack of change status a second time.
1. A company, Kleenitquick, has developed a new stain remover. To promote sales, three salespersons, Jess, Matt and Rachel, will be assigned to three of four department stores 1, 2, 3 and 4, to demonstrate the stain remover. Each salesperson can only be assigned to one department store.
The table below shows the cost, in pounds, of assigning each salesperson to each department store.
1
2
3
4
Jess
15
11
14
12
Matt
13
8
17
13
Rachel
14
9
13
15
(a) Explain why a dummy row needs to be added to the table. (1)
(b) Complete Table 1 in the answer book. (1)
(c) Reducing rows first, use the Hungarian algorithm to obtain an allocation that minimises the cost of assigning salespersons to department stores. You must make your method clear and show the table after each iteration. (6)
Figure 1 shows the possible allocations of six people, A, B, C, D, E and F, to six tasks, 1, 2, 3, 4, 5 and 6.
Figure 2 shows an initial matching.
(a) Starting from this initial matching, use the maximum matching algorithm to find an improved matching. You must list the alternating path used, and your improved matching. (3)
(b) Explain why it is not possible to find a complete matching. (2)
D now has task 2 added to their possible allocation.
(c) Using the improved matching found in part (a) as the new initial matching, use the maximum matching algorithm to find a complete matching. You must list the alternating path used and your complete matching. (3)
Mark scheme (a)
Scheme
Marks
Alternating path B – 3 = A – 5 change status B = 3 – A = 5
M1 A1
A = 5 B = 3 C = 2 D = 1 E = 6 F unmatched
A1
(3)
Notes
(a) 1M1: Path from B to 5.
1A1: Correct path including change status
2A1: CAO my matching, may be drawn but if so 5 lines only and clear.
Mark scheme (b)
Scheme
Marks
e.g. C is the only person able to do 2 and the only person able to do 4. Or D, E and F between them can only be allocated to 1 and 6.
B2, 1, 0
(2)
Notes
(b) 1B1: Close, a correct relevant, productive statement bod generous
2B1: A Good clear answer generous
Mark scheme (c)
Scheme
Marks
Alternating path F – 6 = E – 1 = D – 2 = C – 4 change status F = 6 – E = 1 – D = 2 – C = 4
M1 A1
A = 5 B = 3 C = 4 D = 2 E = 1 F = 6
A1
(3)
(8 marks)
Notes
(c) 1M1: Path from F to 4. No ft.
1A1: Correct path penalise lack of change status once only
2A1: CAO may be drawn but if so 6 lines only and clear
6. Four salespersons, Joe, Min-Seong, Olivia and Robert, are to attend four business fairs, \(A\), \(B\), \(C\) and \(D\). Each salesperson must attend just one fair and each fair must be attended by just one salesperson. The expected sales, in thousands of pounds, that each salesperson would make at each fair is shown in the table below.
\(A\)
\(B\)
\(C\)
\(D\)
Joe
48
49
42
42
Min-Seong
53
49
51
50
Olivia
51
53
48
48
Robert
47
50
46
43
(a) Use the Hungarian algorithm, reducing rows first, to obtain an allocation that maximises the total expected sales from the four salespersons. You must make your method clear and show the table after each stage. (10)
(b) State all possible optimal allocations and the optimal total value. (4)
Mark scheme (a)
Scheme
Marks
Since maximising, subtract all elements from some \(n \geqslant 53\) \(\begin{bmatrix}5&4&11&11\\0&4&2&3\\2&0&5&5\\6&3&7&10\end{bmatrix}\)
M1 A1 (2)
Reduce rows \(\begin{bmatrix}1&0&7&7\\0&4&2&3\\2&0&5&5\\3&0&4&7\end{bmatrix}\) then columns \(\begin{bmatrix}1&0&5&4\\0&4&0&0\\2&0&3&2\\3&0&2&4\end{bmatrix}\)
M1 A1ft (2)
Lines through the Min-Seong row and column B; Minimum element 1 \(\begin{bmatrix}0&0&4&3\\0&5&0&0\\1&0&2&1\\2&0&1&3\end{bmatrix}\)
M1 A1ft A1ft (3)
Lines through the Joe and Min-Seong rows and column B, or through columns A and B and the Min-Seong row
M1 A1ft A1ft (3)
(10)
Notes
The scheme shows the covering lines as sketches; they are described in words here.
Five tour guides, Alice, Emily, George, Rose and Weidi, need to be assigned to five coach trips, 1, 2, 3, 4 and 5. A bipartite graph showing their preferences is given in Figure 1 and an initial matching is given in Figure 2.
(a) Use the maximum matching algorithm, starting with vertex G, to increase the number of matchings. State the alternating path you used. (2)
(b) List the improved matching you found in (a). (1)
(c) Explain why a complete matching is not possible. (2)
Weidi agrees to be assigned to coach trip 3, 4 or 5.
(d)Starting with your current maximal matching, use the maximum matching algorithm to obtain a complete matching. (3)
Mark scheme (a)
Scheme
Marks
G – 5 = W – 3 change status G = 5 – W = 3
M1 A1
(2)
Notes
1M1: Path from G to 3
1A1: CAO including change status ( stated or shown), chosen path clear.
Mark scheme (b)
Scheme
Marks
A – no match E = 2 G = 5 R = 4 W = 3
A1
(1)
Notes
2A1: CAO must ft from stated path
Mark scheme (c)
Scheme
Marks
e.g. R is the only person who can do 1 and the only person who can do 4
B2, 1, 0
(2)
Notes
1B1: Correct answer, may be imprecise or muddled (bod gets B1) but all nodes refered to must be correct.
2B1: Good, clear, correct answer.
Mark scheme (d)
Scheme
Marks
A – 2 = E – 3 = W – 4 = R – 1 change status A = 2 – E = 3 – W = 4 – R = 1
M1 A1
A = 2 E = 3 G = 5 R = 1 W = 4
A1
(3)
(8 marks)
Notes
1M1: Path from A to 1
1A1: CAO including change status (stated or shown) but don’t penalise twice. Chosen path clear.
1A1: CAO must ft from stated path
Misread (remove last two A or B marks if earned.) A – 2 = E – 3 c.s. A=2 – E = 3 Matching A = 2, E = 3, R = 4 W = 5 Then G – 5 = W – 4 = R – 1 c.s. G = 5 – W = 4 – R =1 Matching A = 2, E = 3, G = 5, R = 1, W = 4
At a school fair, five teachers, \(A\), \(B\), \(C\), \(D\) and \(E\), are to supervise five stalls, 1, 2, 3, 4 and 5.
A bipartite graph showing their possible allocations is given in Figure 1. An initial matching is given in Figure 2.
(b) Use the maximum matching algorithm twice to obtain a complete matching. List clearly the alternating paths you use. (5)
Mark scheme (a)
Scheme
Marks
(i) A path from an unmatched vertex in one set to an unmatched vertex in the other set …
B1
… which alternately uses arcs not in / in the matching.
B1
(2)
(ii) A one-to-one pairing of
B1
some elements of one set with the other set
B1
(2)
Notes
i 1B1 Unmatched to unmatched
2B1 Alternate arcs not in/in [not vertices/nodes, not ‘zigzag’]
ii 3B1 One – to- one
4B1 Elements of one set with elements of the other.
Mark scheme (b)
Scheme
Marks
e.g. D – 3 = C – 5 change status D = 3 – C = 5
M1 A1
E – 2 = A – 1 change status E = 2 – A = 1
M1 A1
A = 1 B = 4 C = 5 D = 3 E = 2
A1
(5)
(9 marks)
Notes
(b) 1M1 ‘Path’ starting at D or E, finishing at 1 or 5 – or vice versa.
1A1 A correct path – including change status.
2M1 ‘Path’ from remaining unmatched (D/E) to unmatched (1/5) or v.v.
2A1 A second correct path – incl. c.s, but don’t’ penalise c.s. twice.
3A1 Complete matching, must follow through from two correct paths.
Possible alternating paths and matchings
Path 1
Path 2
A
B
C
D
E
D-3-C-1
E-2-A-1-C-5
1
4
5
3
2
D-3-C-1
E-4-B-1-C-5
2
1
5
3
4
D-3-C-5
E-2-A-1
1
4
5
3
2
D-3-C-5
E-4-B-1
2
1
5
3
4
D-3-C-4-B-1
E-2-A-1-B-3-D-4-C-5
1
3
5
4
2
D-3-C-4-B-1
E-2-A-1-B-4-C-5
1
4
5
3
2
D-3-C-4-B-1
E-4-C-5
2
1
5
3
4
D-4-B-1
E-2-A-1-B-3-C-5
1
3
5
4
2
D-4-B-1
E-2-A-1-B-4-D-3-C-5
1
4
5
3
2
D-4-B-1
E-4-D-3-C-5
2
1
5
3
4
D-4-B-3-C-1
E-2-A-1-C-5
1
3
5
4
2
D-4-B-3-C-1
E-4-D-3-B-1-C-5
2
1
5
3
4
D-4-B-3-C-5
E-2-A-1
1
3
5
4
2
D-4-B-3-C-5
E-4-D-3-B-1
2
1
5
3
4
E-2-A-1
D-3-C-5
1
4
5
3
2
E-2-A-1
D-4-B-3-C-5
1
3
5
4
2
E-4-B-1
D-3-C-5
2
1
5
3
4
E-4-B-1
D-4-E-2-A-1-B-3-C-5
1
3
5
4
2
E-4-B-3-C-1
D-3-B-1-C-5
2
1
5
3
4
E-4-B-3-C-1
D-3-B-4-E-2-A-1-C-5
1
4
5
3
2
E-4-B-3-C-1
D-4-E-2-A-1-C-5
1
3
5
4
2
E-4-B-3-C-5
D-3-B-1
2
1
5
3
4
E-4-B-3-C-5
D-3-B-4-E-2-A-1
1
4
5
3
2
E-4-B-3-C-5
D-4-E-2-A-1
1
3
5
4
2
(Corrected from the printed mark scheme: for Path 1 D-4-B-1 with Path 2 E-2-A-1-B-3-C-5 the matching is printed as A = 1, B = 4, C = 5, D = 3, E = 2; these paths give A = 1, B = 3, C = 5, D = 4, E = 2.)
3. To raise money for charity it is decided to hold a Teddy Bear making competition. Teams of four compete against each other to make 20 Teddy Bears as quickly as possible.
There are four stages: first cutting, then stitching, then filling and finally dressing.
Each team member can only work on one stage during the competition. As soon as a stage is completed on each Teddy Bear the work is passed immediately to the next team member.
The table shows the time, in seconds, taken to complete each stage of the work on one Teddy Bear by the members \(A\), \(B\), \(C\) and \(D\) of one of the teams.
cutting
stitching
filling
dressing
\(A\)
66
101
85
36
\(B\)
66
98
74
38
\(C\)
63
97
71
34
\(D\)
67
102
78
35
(a) Use the Hungarian algorithm, reducing rows first, to obtain an allocation that minimises the time taken by this team to produce one Teddy Bear. You must make your method clear and show the table after each iteration. (9)
(b) State the minimum time it will take this team to produce one Teddy Bear. (1)
Using the allocation found in (a),
(c) calculate the minimum total time this team will take to complete 20 Teddy Bears. You should make your reasoning clear and state your answer in minutes and seconds. (3)
reducing rows first \(\begin{bmatrix}30&65&49&0\\28&60&36&0\\29&63&37&0\\32&67&43&0\end{bmatrix}\) then columns \(\begin{bmatrix}2&5&13&0\\0&0&0&0\\1&3&1&0\\4&7&7&0\end{bmatrix}\) (lines through row B and the dressing column)
M1 A1
\(\begin{bmatrix}1&4&12&0\\0&0&0&1\\0&2&0&0\\3&6&6&0\end{bmatrix}\) (lines through rows B and C and the dressing column)
Six workers, Annie, Emma, Hannah, Jerry, Louis and Morand, are to be assigned to five tasks, 1,2,3,4 and 5.
For safety reasons, task 1 must be done by two people working together.
A bipartite graph showing the possible allocations of the workers is given in Figure 1 and an initial matching is given in Figure 2.
The maximum matching algorithm will be used to obtain a complete matching.
(a) Although there are five tasks, six vertices have been created on the right hand side of each bipartite graph. Explain why this is necessary when applying this algorithm. (2)
(b) Find an alternating path and the complete matching it gives. (3)
Hannah is now unable to do task 5 due to health reasons.
(c) Explain why a complete matching is no longer possible. (2)
Mark scheme (a)
Scheme
Marks
To obtain a complete matching the number of vertices on each side must be equal.
B2, 1, 0
(2)
Mark scheme (b)
Scheme
Marks
e.g. L – 3 = H – 5 = J – 1a = A – 4
M1 A1
c.s. L = 3 – H = 5 – J = 1a – A = 4
A = 4 H = 5 L = 3 E = 1b J = 1a M = 2
A1
(3)
Mark scheme (c)
Scheme
Marks
H and L can now both only do 3. So a complete matching is not possible (other answers possible)
Figure 1 shows the possible allocations of five people, Ellen, George, Jo, Lydia and Yi Wen to five tasks, 1, 2, 3, 4 and 5.
Figure 2 shows an initial matching.
(a) Find an alternating path linking George with 5. List the resulting improved matching this gives. (3)
(b) Explain why it is not possible to find a complete matching. (1)
George now has task 2 added to his possible allocation.
(c) Using the improved matching found in part (a) as the new initial matching, find an alternating path linking Yi Wen with task 1 to find a complete matching. List the complete matching. (3)
4. During the school holidays four building tasks, rebuilding a wall (\(W\)), repairing the roof (\(R\)), repainting the hall (\(H\)) and relaying the playground (\(P\)), need to be carried out at a Junior School.
Four builders, \(A\), \(B\), \(C\) and \(D\) will be hired for these tasks. Each builder must be assigned to one task. Builder \(B\) is not able to rebuild the wall and therefore cannot be assigned to this task.
The cost, in thousands of pounds, of using each builder for each task is given in the table below.
Cost
\(H\)
\(P\)
\(R\)
\(W\)
\(A\)
3
5
11
9
\(B\)
3
7
8
–
\(C\)
2
5
10
7
\(D\)
8
3
7
6
(a) Use the Hungarian algorithm, reducing rows first, to obtain an allocation that minimises the total cost. State the allocation and its total cost. You must make your method clear and show the table after each stage. (9)
(b) State, with a reason, whether this allocation is unique. (2)
Mark scheme (a)
Scheme
Marks
Adding \(n \geqslant 20\) to table to give
H
P
R
W
A
3
5
11
9
B
3
7
8
\(n\)
C
2
5
10
7
D
8
3
7
6
B1
Reducing rows first \(\begin{bmatrix}0&2&8&6\\0&4&5&n-3\\0&3&8&5\\5&0&4&3\end{bmatrix}\) then columns \(\begin{bmatrix}0&2&4&3\\0&4&1&n-6\\0&3&4&2\\5&0&0&0\end{bmatrix}\) (lines through column H and row D)
M1 A1 (3)
Either \(\begin{bmatrix}0&1&3&2\\0&3&0&n-7\\0&2&3&1\\6&0&0&0\end{bmatrix}\) (lines through column H and rows B and D) or \(\begin{bmatrix}0&1&3&2\\0&3&0&n-7\\0&2&3&1\\6&0&0&0\end{bmatrix}\) (lines through columns H and R and row D)
2. Three workers, \(P\), \(Q\) and \(R\), are to be assigned to three tasks, 1, 2 and 3. Each worker is to be assigned to one task and each task must be assigned to one worker. The cost, in hundreds of pounds, of using each worker for each task is given in the table below. The cost is to be minimised.
Cost (in £100s)
Task 1
Task 2
Task 3
Worker \(P\)
8
7
3
Worker \(Q\)
9
5
6
Worker \(R\)
10
4
4
Formulate the above situation as a linear programming problem, defining the decision variables and making the objective and constraints clear. (7)
Mark scheme
Scheme
Marks
Let \(x_{ij} = 1\) if worker does task, 0 otherwise
B1
where \(x_{ij}\) indicates the arc from node \(i\) to node \(j\) i.e \(i \in \{P, Q, R\}\), \(j \in \{1, 2, 3\}\)
The bipartite graph in Figure 1 shows the films that six customers wish to hire this Saturday evening. The shop has only one copy of each film. The bold lines indicate an initial matching.
(b) Starting from this initial matching use the maximum matching algorithm twice to obtain a complete matching. You should clearly state the alternating paths you use. (5)
Mark scheme (a)
Scheme
Marks
A path from an unmatched vertex in \(X\) to an unmatched vertex in \(Y\), which alternately uses arcs in/not in the matching. (where \(X\) and \(Y\) are distinct sets of vertices.)
B2,1,0
(2)
Notes
B2 A good, complete answer
B1 Partially correct – unmatched to unmatched or arcs in/not in the matching are enough. ‘bod’ gets B1
Mark scheme (b)
Scheme
Marks
e.g. \(R - B = A - P\) c.s. \(R = B - A = P\)
M1 A1 (2)
\(S - F = M - C = D - K\) c.s. \(S = F - M = C - D = K\)
M1 A1
\(\therefore\ A = P\quad D = K\quad H = Y\quad M = C\quad R = B\quad S = F\)
A1 (3)
(5)
(7 marks)
Notes
M1 Path from/to \(R\)/\(S\) to/from \(K\)/\(P\)
A1 c.a.o. incl c.s.
M1 Second path from remaining LH vertex to remaining RH vertex (depends on the first M1)
1. A theme park has four sites, A, B, C and D, on which to put kiosks. Each kiosk will sell a different type of refreshment. The income from each kiosk depends upon what it sells and where it is located. The table below shows the expected daily income, in pounds, from each kiosk at each site.
Hot dogs and beef burgers (H)
Ice cream (I)
Popcorn, candyfloss and drinks (P)
Snacks and hot drinks (S)
Site A
267
272
276
261
Site B
264
271
278
263
Site C
267
273
275
263
Site D
261
269
274
257
Reducing rows first, use the Hungarian algorithm to determine a site for each kiosk in order to maximise the total income. State the site for each kiosk and the total expected income. You must make your method clear and show the table after each stage. (13)
Mark scheme
Scheme
Marks
To maximise, subtract all entries from \(n \geqslant 278\)
M1
e.g. \(\begin{bmatrix}11&6&2&17\\14&7&0&15\\11&5&3&15\\17&9&4&21\end{bmatrix}\)
A1 (2)
Reduce rows \(\begin{bmatrix}9&4&0&15\\14&7&0&15\\8&2&0&12\\13&5&0&17\end{bmatrix}\) then columns \(\begin{bmatrix}1&2&0&3\\6&5&0&3\\0&0&0&0\\5&3&0&5\end{bmatrix}\)
M1 A1ft A1ft (3)
Lines through row C and column P; Min element = 1 \(\begin{bmatrix}0&1&0&2\\5&4&0&2\\0&0&1&0\\4&2&0&4\end{bmatrix}\)
M1 A1ft A1 (3)
Lines through columns H and P and row C; Min element = 1 \(\begin{bmatrix}0&0&0&1\\5&3&0&1\\1&0&2&0\\4&1&0&3\end{bmatrix}\) or lines through rows A and C and column P; Min element = 2 \(\begin{bmatrix}0&1&2&2\\3&2&0&0\\0&0&3&0\\2&0&0&2\end{bmatrix}\)
M1 A1ft A1ft (3)
then lines through rows A and C and column P; min element 1 \(\begin{bmatrix}0&0&1&1\\4&2&0&0\\1&0&3&0\\3&0&0&2\end{bmatrix}\) optimal
So A – H, B – P, C – S, D – I or A – H, B – S, C – I, D – P (both £1077)
M1 A1 (2)
(13 marks)
Notes
The scheme shows the covering lines as small sketches; they are described in words here (rows A–D are the sites, columns H, I, P, S the kiosks).
A taxi firm has six taxis \(A\), \(B\), \(C\), \(D\), \(E\) and \(F\), available for six journeys, 1, 2, 3, 4, 5 and 6, which are booked for 9 a.m. tomorrow.
The bipartite graph shown in Figure 1 shows the possible matchings.
Initially \(A\), \(B\), \(C\) and \(D\) are matched to 5, 2, 3 and 6 respectively, as indicated in Figure 2.
(a) Explain why it is necessary to perform the maximum matching algorithm twice in order to try to obtain a complete matching. (1)
(b) Use the maximum matching algorithm twice to obtain a complete matching. List clearly the alternating paths you use. (6)
Mark scheme (a)
Scheme
Marks
There are 2 unmatched vertices on each side – the algorithm only matches one on each side per iteration.
B1
(1)
Mark scheme (b)
Scheme
Marks
e.g. \(E - 3 = C - 1\) c.s. \(E = 3 - C = 1\)
M1 A1 (2)
\(F - 5 = A - 6 = D - 2 = B - 4\) c.s. \(F = 5 - A = 6 - D = 2 - B = 4\)
M1 A1 (2)
\(A = 6\quad B = 4\quad C = 1\quad D = 2\quad E = 3\quad F = 5\)
M1 A1 (2)
(6)
(7 marks)
Notes
c.s. = change status. Each M1 depends on the previous M1.
(Corrected from the printed mark scheme: the second change of status is printed as \(F = 5 - A = 6 - D = 2 = B - 4\).)
5. Four salesperson \(A\), \(B\), \(C\) and \(D\) are to be sent to visit four companies 1, 2, 3 and 4. Each salesperson will visit exactly one company, and all companies will be visited.
Previous sales figures show that each salesperson will make sales of different values, depending on the company that they visit. These values (in £10 000s) are shown in the table below.
1
2
3
4
Ann
26
30
30
30
Brenda
30
23
26
29
Connor
30
25
27
24
Dave
30
27
25
21
(a) Use the Hungarian algorithm to obtain an allocation that maximises the sales. You must make your method clear and show the table after each stage. (11)
(b) State the value of the maximum sales. (2)
(c) Show that there is a second allocation that maximises the sales. (2)
Mark scheme (a)
Scheme
Marks
To maximise, subtract all entries from \(n \geqslant 30\)
M1
e.g. \(\begin{bmatrix}4&0&0&0\\0&7&4&1\\0&5&3&6\\0&3&5&9\end{bmatrix}\)
A2, 1, 0 (3)
Lines through row \(A\) and column 1; minimum uncovered element is 1: so \(\begin{bmatrix}5&0&0&0\\0&6&3&0\\0&4&2&5\\0&2&4&8\end{bmatrix}\)
M1 A2ft1ft0 (3)
Lines through row \(A\), column 1 and column 4, min. el. = 2: \(\begin{bmatrix}7&0&0&2\\0&4&1&0\\0&2&0&5\\0&0&2&8\end{bmatrix}\) or lines through rows \(A\) and \(B\) and column 1, min. el. = 2: \(\begin{bmatrix}7&0&0&0\\2&6&3&0\\0&2&0&3\\0&0&2&6\end{bmatrix}\)
M1 A2ft1ft0 (3)
\(A - 2\quad B - 4\quad C - 3\quad D - 1\) \(A - 3\quad B - 4\quad C - 1\quad D - 2\)
M1 A1ft (2)
(11)
Notes
The scheme shows the covering lines as small sketches; they are described in words here.
A film critic, Verity, must see five films A, B, C, D and E over two days.
The films are being shown at five special critics’ preview times: 1 (Monday 4 pm), 2 (Monday 7 pm), 3 (Tuesday 1 pm), 4 (Tuesday 4 pm), 5 (Tuesday 7 pm).
The bipartite graph in Figure 3 shows the times at which each film is showing.
Initially Verity intends to see
Film A on Monday at 4 pm, Film B on Tuesday at 4 pm, Film C on Tuesday at 1 pm, Film D on Monday at 7 pm.
This initial matching is shown in Figure 4.
Using the maximum matching algorithm and the given initial matching,
(a) find two distinct alternating paths and complete the matchings they give. (6)
Verity’s son is very keen to see film D, but he can only go with his mother to the showing on Monday at 7 pm.
(b) Explain why it will not be possible for Verity to take her son to this showing and still see all five films herself. (2)
Mark scheme (a)
Scheme
Marks
\(E - 4 = B - 2 = D - 1 = A - 3 = C - 5\) change status to give
M1 A1
matching \(A = 3\quad B = 2\quad C = 5\quad D = 1\quad E = 4\)
A1 (3)
\(E - 4 = B - 2 = D - 3 = C - 5\) change status to give
M1 A1
matching \(A = 1\quad B = 2\quad C = 5\quad D = 3\quad E = 4\)
The bipartite graph in Figure 1 shows a mapping between six people, Andy (\(A\)), David (\(D\)), Joan (\(J\)), Preety (\(P\)), Sally (\(S\)) and Trevor (\(T\)), and six tasks 1, 2, 3, 4, 5 and 6.
The initial matching is \(A\) to 2, \(D\) to 1, \(J\) to 3 and \(P\) to 4.
(a) Indicate this initial matching in a distinctive way on the bipartite graph drawn in the answer book. (1)
(b) Starting from this initial matching, use the maximum matching algorithm to find a complete matching. List clearly the alternating paths you use. (5)
Mark scheme (a)
Scheme
Marks
B1
(1)
Mark scheme (b)
Scheme
Marks
e.g. \(S - 3 = J - 4 = P - 6\) c.s. \(S = 3 - J = 4 - P = 6\)
M1 A1 (2)
and \(T - 2 = A - 1 = D - 5\) c.s. \(T = 2 - A = 1 - D = 5\)
M1 A1
\(A = 1\quad D = 5\quad J = 4\quad P = 6\quad S = 3\quad T = 2\)
We'd like to use Google Analytics cookies to count visits and see which pages help most. They're optional, and the site works exactly the same either way. Privacy policy