OCR D1 2009 January — Question 4 12 marks

Exam BoardOCR
ModuleD1 (Decision Mathematics 1)
Year2009
SessionJanuary
Marks12
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicLinear Programming
TypeFormulation from word problem
DifficultyEasy -1.2 This is a straightforward D1 question testing basic understanding of linear programming formulation. Part (i) requires simple reasoning about baking time constraints (60 minutes รท 12 minutes per batch = 5 batches maximum, but preparation time reduces this to 4). The constraint formulation is given rather than derived. This is routine application of standard Decision Maths content with minimal problem-solving required.
Spec7.03h Best/worst/typical case: run-time analysis7.03i Order hierarchy: O(n^k), O(a^n), O(log n), O(n!)7.03j Sorting: bubble sort and shuttle sort

4 Answer this question on the insert provided. The list of numbers below is to be sorted into decreasing order using shuttle sort. $$\begin{array} { l l l l l l l l l } 21 & 76 & 65 & 13 & 88 & 62 & 67 & 28 & 34 \end{array}$$
  1. How many passes through shuttle sort will be required to sort the list? After the first pass the list is as follows. $$\begin{array} { l l l l l l l l l } 76 & 21 & 65 & 13 & 88 & 62 & 67 & 28 & 34 \end{array}$$
  2. State the number of comparisons and the number of swaps that were made in the first pass.
  3. Write down the list after the second pass. State the number of comparisons and the number of swaps that were used in making the second pass.
  4. Complete the table in the insert to show the results of the remaining passes, recording the number of comparisons and the number of swaps made in each pass. You may not need all the rows of boxes printed. When the original list is sorted into decreasing order using bubble sort there are 30 comparisons and 17 swaps.
  5. Use your results from part (iv) to compare the efficiency of these two methods in this case. Katie makes and sells cookies. Each batch of plain cookies takes 8 minutes to prepare and then 12 minutes to bake. Each batch of chocolate chip cookies takes 12 minutes to prepare and then 12 minutes to bake. Each batch of fruit cookies takes 10 minutes to prepare and then 12 minutes to bake. Katie can only bake one batch at a time. She has the use of the kitchen, including the oven, for at most 1 hour.
    [0pt]
  6. Each batch of cookies must be prepared before it is baked. By considering the maximum time available for baking the cookies, explain why Katie can make at most 4 batches of cookies. [2] Katie models the constraints as $$\begin{gathered} x + y + z \leqslant 4 \\ 4 x + 6 y + 5 z \leqslant 24 \\ x \geqslant 0 , y \geqslant 0 , z \geqslant 0 \end{gathered}$$ where \(x\) is the number of batches of plain cookies, \(y\) is the number of batches of chocolate chip cookies and \(z\) is the number of batches of fruit cookies that Katie makes.
  7. Each batch of cookies that Katie prepares must be baked within the hour available. By considering the maximum time available for preparing the cookies, show how the constraint \(4 x + 6 y + 5 z \leqslant 24\) was formed.
  8. In addition to the constraints, what other restriction is there on the values of \(x , y\) and \(z\) ? Katie will make \(\pounds 5\) profit on each batch of plain cookies, \(\pounds 4\) on each batch of chocolate chip cookies and \(\pounds 3\) on each batch of fruit cookies that she sells. Katie wants to maximise her profit.
  9. Write down an expression for the objective function to be maximised. State any assumption that you have made.
  10. Represent Katie's problem as an initial Simplex tableau. Perform one iteration of the Simplex algorithm, choosing to pivot on an element from the \(x\)-column. Show how each row was obtained. Write down the number of batches of cookies of each type and the profit at this stage. After carrying out market research, Katie decides that she will not make fruit cookies. She also decides that she will make at least twice as many batches of chocolate chip cookies as plain cookies.
  11. Represent the constraints for Katie's new problem graphically and calculate the coordinates of the vertices of the feasible region. By testing suitable integer-valued coordinates, find how many batches of plain cookies and how many batches of chocolate chip cookies Katie should make to maximise her profit. Show your working.

Question 4:
Part (i)
AnswerMarks Guidance
\(8\)B1 cao
Part (ii)
AnswerMarks Guidance
1 comparison and 1 swapB1 1 and 1
Part (iii)
AnswerMarks Guidance
76 65 21 13 88 62 67 28 34; 2 comparisons and 1 swapB1, B1 Correct list (complete); 2 and 1
Part (iv)
AnswerMarks Guidance
Passes 3 & 4 with correct underlined values; Passes 5 & 6 following through; Passes 7 & 8 with cao; Comparisons: 1 4 3 5 3 4; Swaps: 0 4 2 4 2 3M1, M1, A1, M1, A1, A1 Underlined values correct in 3rd and 4th passes; Similarly for 5th and 6th passes; Similarly for 7th and 8th passes; Reasonable attempt at comparisons and swaps; cao in figures; cao in figures
Part (v)
AnswerMarks Guidance
Shuttle sort uses 23 comparisons and 17 swaps; Shuttle sort is more efficient because although it uses the same number of swaps as bubble sort it uses fewer comparisonsM1, A1 Choosing shuttle sort with a reason; Correct reason stated (comparisons and swaps both compared, in words)
# Question 4:

## Part (i)
| $8$ | B1 | cao | [1] |

## Part (ii)
| 1 comparison and 1 swap | B1 | 1 and 1 | [1] |

## Part (iii)
| 76 65 21 13 88 62 67 28 34; 2 comparisons and 1 swap | B1, B1 | Correct list (complete); 2 and 1 | [2] |

## Part (iv)
| Passes 3 & 4 with correct underlined values; Passes 5 & 6 following through; Passes 7 & 8 with cao; Comparisons: 1 4 3 5 3 4; Swaps: 0 4 2 4 2 3 | M1, M1, A1, M1, A1, A1 | Underlined values correct in 3rd and 4th passes; Similarly for 5th and 6th passes; Similarly for 7th and 8th passes; Reasonable attempt at comparisons and swaps; cao in figures; cao in figures | [3] |

## Part (v)
| Shuttle sort uses 23 comparisons and 17 swaps; Shuttle sort is more efficient because although it uses the same number of swaps as bubble sort it uses fewer comparisons | M1, A1 | Choosing shuttle sort with a reason; Correct reason stated (comparisons and swaps both compared, in words) | [2] |

---
4 Answer this question on the insert provided.
The list of numbers below is to be sorted into decreasing order using shuttle sort.

$$\begin{array} { l l l l l l l l l } 
21 & 76 & 65 & 13 & 88 & 62 & 67 & 28 & 34
\end{array}$$

(i) How many passes through shuttle sort will be required to sort the list?

After the first pass the list is as follows.

$$\begin{array} { l l l l l l l l l } 
76 & 21 & 65 & 13 & 88 & 62 & 67 & 28 & 34
\end{array}$$

(ii) State the number of comparisons and the number of swaps that were made in the first pass.\\
(iii) Write down the list after the second pass. State the number of comparisons and the number of swaps that were used in making the second pass.\\
(iv) Complete the table in the insert to show the results of the remaining passes, recording the number of comparisons and the number of swaps made in each pass. You may not need all the rows of boxes printed.

When the original list is sorted into decreasing order using bubble sort there are 30 comparisons and 17 swaps.\\
(v) Use your results from part (iv) to compare the efficiency of these two methods in this case.

Katie makes and sells cookies.

Each batch of plain cookies takes 8 minutes to prepare and then 12 minutes to bake. Each batch of chocolate chip cookies takes 12 minutes to prepare and then 12 minutes to bake. Each batch of fruit cookies takes 10 minutes to prepare and then 12 minutes to bake.

Katie can only bake one batch at a time. She has the use of the kitchen, including the oven, for at most 1 hour.\\[0pt]
(i) Each batch of cookies must be prepared before it is baked. By considering the maximum time available for baking the cookies, explain why Katie can make at most 4 batches of cookies. [2]

Katie models the constraints as

$$\begin{gathered}
x + y + z \leqslant 4 \\
4 x + 6 y + 5 z \leqslant 24 \\
x \geqslant 0 , y \geqslant 0 , z \geqslant 0
\end{gathered}$$

where $x$ is the number of batches of plain cookies, $y$ is the number of batches of chocolate chip cookies and $z$ is the number of batches of fruit cookies that Katie makes.\\
(ii) Each batch of cookies that Katie prepares must be baked within the hour available. By considering the maximum time available for preparing the cookies, show how the constraint $4 x + 6 y + 5 z \leqslant 24$ was formed.\\
(iii) In addition to the constraints, what other restriction is there on the values of $x , y$ and $z$ ?

Katie will make $\pounds 5$ profit on each batch of plain cookies, $\pounds 4$ on each batch of chocolate chip cookies and $\pounds 3$ on each batch of fruit cookies that she sells. Katie wants to maximise her profit.\\
(iv) Write down an expression for the objective function to be maximised. State any assumption that you have made.\\
(v) Represent Katie's problem as an initial Simplex tableau. Perform one iteration of the Simplex algorithm, choosing to pivot on an element from the $x$-column. Show how each row was obtained. Write down the number of batches of cookies of each type and the profit at this stage.

After carrying out market research, Katie decides that she will not make fruit cookies. She also decides that she will make at least twice as many batches of chocolate chip cookies as plain cookies.\\
(vi) Represent the constraints for Katie's new problem graphically and calculate the coordinates of the vertices of the feasible region. By testing suitable integer-valued coordinates, find how many batches of plain cookies and how many batches of chocolate chip cookies Katie should make to maximise her profit. Show your working.

\hfill \mbox{\textit{OCR D1 2009 Q4 [12]}}