Question 4 (25 marks)

This question is about spanning trees (Unit 5 Section 2.2.2), minimum spanning trees and Prim’s algorithm (Unit 5 Section 2.4) and assesses your skills in clear and succinct communication, which are required for the last question in the exam. Moreover, explaining a topic to others is a good way to consolidate one’s own learning.

Write a report that explains what the minimum spanning tree problem is and how it can be solved with Prim’s algorithm and Kruskal’s algorithm. Kruskal’s algorithm is not taught on M269 so you will need to find out about it yourself (remember you can use Library resources to do this e.g. Finding resources for your assignment). Your report must have this structure:

  1. A suitable title.
  2. An introductory paragraph explaining what a spanning tree is, then what a minimum spanning tree (MST) is, and the problem of finding it.
  3. One or two paragraphs explaining how Prim’s algorithm solves the MST problem with an example.
  4. One or two paragraphs explaining how Kruskal’s algorithm solves the MST problem with the same example, but showing how Kruskal’s algorithm arrives at this solution in a different way.
  5. A concluding paragraph explaining what the greedy algorithm technique is and why these are examples of it.
  6. A bibliography section with all sources that you consulted, apart from the M269 materials.
  7. At the end of the report note the number of words that you used for points 1 to 5. Please aim for 700 words. If you find yourself writing more, you are probably not explaining clearly, and if you have written a lot less, you probably have not explained well enough.

You may create your own figures or use someone else’s, as long as you acknowledge them, to support your explanation and reduce the need for text. Figure captions and text in the figures count towards the word limit, i.e. select all your text and figures and apply your word processor’s word count tool.

The report is aimed at students of M269. Assume they have studied up to and including Unit 5, Section 2.2.1 i.e. they have just learnt about the graph data type.

Make sure that you explain everything in your own words. The OU uses software to detect text plagiarised from articles and web pages. Omitting or replacing some words, changing the order of sentences, or copying from multiple sources does not fool the software. Detected cases will be passed to the OU’s plagiarism team.

Before writing your first draft, you may wish to look back at TMA 01 Question 2: skim Joe’s report, your feedback to him, and your tutor’s feedback on your feedback. This will help you avoid making the same mistakes as Joe.

Your report will be marked against the following criteria:

  • a.Content (points 2 to 5): Is the explanation clear and complete? Will the reader understand Minimum Spanning Trees and the differences between Prim’s and Kruskal’s algorithms as a way to solve them? Will they understand how these are both examples of greedy algorithms?

(15 marks)

  • b.Writing (all points): Is the title descriptive? Does your report follow the structure above? Does it follow the Checklist with advice on writing and the OU Harvard guide to citing references (both in the TMA questions and guidance page)? Have you kept to the word limit?

(10 marks)

Note that the checklist mentioned is generic and not specific to this TMA. In particular, your report needs no headings other than the title.

After completing and revising your answers, upload your TMA as a single .zip file to the eTMA system. The zip archive should include 4 files only:

  • your Solution Document;
  • TMA02_Q1.py;
  • TMA02_Q2.py;
  • TMA02_Q3.py.

Make sure that you:

  • have not changed the names of the code files;
  • have pasted the methods and functions that you changed or added as text (not as an image) into the Solution Document, so that your tutor can give inline feedback;
  • have not included the test files in the archive.