Candidate: You must prepare your solution to this programming exercise in advance. The designated platform, on which your solution must be demonstrated and on which it will be marked, is the `gcc' compiler running on `Linux'. If you develop a solution on another platform, it is your responsibility to ensure that it works correctly on the designated platform. Read the information under the [prac' guide], [on C and code modularity], [missed pracs] and [plagiarism] links on the [home page]. It is better to have a program that does only part of the prac' but that compiles and runs than to have a more complex program that crashes or, even worse, does not compile. So keep copies of old working partial solutions.
Unless otherwise noted, you must write all the code yourself, and may not use any external library routines, the usual I/O (e.g. printf) and mathematical (e.g. log) routines excepted.
Prac's are marked on the performance of your program and on your understanding of it. I.e. Perfect program with zero understanding => zero marks! ``Forgetting'' is not an acceptable explanation for lack of understanding.
The on-line versions of the prac's may include [links], corrections and supplementary material and are to be taken as the reference documents.
Demonstrators: Are not obliged to mark programs that do not compile or that crash. Time allowing, they will try to help in tracking down errors, but they are not required to mark programs in such a state, particularly those that do not compile. Therefore keep backup copies of working partial-solutions (also see above).
NB. Recall that each week's prac' groups are set their own specific problems. Make sure that you do the correct problem for your week! You will get zero marks if you solve the wrong problem.
The exam, and the prac' work (1--5), are both hurdles (half-marks) for CSE2304. If you fail one, or the other, or both, the highest mark that you can get for the subject is 44%(N).
Objectives: Graph algorithms.
You need your solution to the previous prac'.
Consider the m×m adjacency-matrix calculated by your previous program.
It is the adjacency matrix of a directed(D) graph,
but it can be made undirected(U) by using
dU(x,y) =
dU(y,x) =
(dD(x,y) + dD(y,x))/2
Extend your program to use Prim's algorithm to calculate the minimum spanning tree (MST) of the undirected graph of m DNA sequences and print the MST in some simple, non-graphical, way.
(Recall that m<<100 and that a DNA sequence might contain millions of bases. [sample data (click)])
You need your solution to the previous prac'.
Consider the m×m (directed) adjacency-matrix of a graph TG over m texts as calculated by your previous program.
(Recall that m<<100. [sample data (click)])