Official Frontpage of this assessment

Coursework Part 1

1.1) Write Python/SymPy code that solves the following logic puzzle.

A family wants to go on a holiday but they have difficulty deciding where.

Who is going on the trip and where?

1.2) Write Python/SymPy code that implements two recursive functions according to the following description:

A triangular number is the number of dots in an equilateral triangle evenly filled with dots. The nth triangular number is equivalent to the sum of the integers from 1 to n. (For example, the first 5 triangular numbers are 1, 3, 6, 10, 15). Write a recursive function that calculates the nth triangular number.

A tetrahedral number is the number of dots in a pyramid with a triangular base and three sides that is evenly filled with dots. The nth tetrahedral number is the sum of the first n triangular numbers. (For example, the first 5 tetrahedral numbers are 1, 4, 10, 20, 35). Write a recursive function that calculates the nth tetrahedral number (using the function for triangular numbers).

Coursework Part 2

2.1) Data analysis: download these two files: author.csv and coauthor.csv and analyse them as described below.
(This data was derived from the list of publications of the Centre of Distributed Computing & Security. The author.csv file contains author names and the years in which they published papers. The coauthor.csv file contains authors and their co-authors. The author on the left is the first author of a paper; the one on the right is a co-author.)

2.1.1) Using Excel, calculate measures of central tendency (mode, median, arithmetic mean, geometric mean) and of dispersion (variance, standard deviation) for the author.csv data. The data may require some preprocessing, e.g. calculation of frequencies, first. Calculate only those measures that are appropriate and meaningful for the type of data. Also, produce a chart (diagram) of the data. For your answer, provide the values and print the chart.

2.1.2) Using NetworkX, calculate the PageRanks for both data sets and determine whether any of the two data sets is a small-world network. Your answer should include the code; the nodes with the highest PageRank and an answer to the question about small-world networks.

2.1.3) Produce a gif file for the non-bipartite graph using NetworkX and a concept lattice for the bipartite graph using ConExp. Choose a good layout for the gif file and make sure that there are not any overlapping nodes/labels in the concept lattice. Print the pictures.

2.2) Write a one page explanation for the data analysis in exercise 2.1. Examples of topics that you can discuss:

  • The types of the graphs/data.
  • Whether there is a normal distribution involved.
  • Which values are most central.
  • Which graphical representations are most interesting/appropriate.
  • How can the results be explained.

    How to submit your work/Deadlines

    Code hand-in: Monday in Week 12, March 29, 15:00: Coursework demos: in addition to handing in the printed code, you also need to show your code to the module leader. You can demonstrate your code during any practical before the deadlines given below. For the demonstration, you only need to show that you have implemented something which runs without errors and produces a result. This should only take a few minutes.

    Asking for help and Safeguarding your work

    You are NOT allowed to post questions relating to the coursework on the internet or discuss the coursework with other people. If you need help you may ask the module leader during the practicals, in particular if you have problems getting started or cannot understand some aspect of this coursework.

    You should change the permission of your files on the server (by using chmod 600 filename) so that others can't read them.

    Deadline Extensions

    Module leaders are not allowed to give extensions. Losing your code because you didn't make backups or having problems with the Napier server are not reasons for extensions. If you know that you cannot come to the practical in the last week of the deadline, you need to demonstrate your work in an earlier week.

    If you have mitigating circumstances, you should discuss this with your Programme Leader who might give you an extension. But extensions of more than 2 weeks are not accepted by the module leader, even if your Programme Leader signs this. If you have severe mitigating circumstances then you must go through the official mitigating circumstances process and submit your coursework at the resit diet.

    Marking Scheme

    If you submit your coursework late (up to 5 working days after the deadline), the mark will be capped at 40%. After that your coursework will be marked as "fail".

    If you don't demonstrate a Part of your coursework, the mark for that Part will be capped at 40%.

    You can reach a total of 50 points for the coursework. This is 100% of your final mark. The points will be distributed as follows:

    1.1 logic10 points
    1.2 recursive function10 points
    2.1.1 statistical measures7 points
    2.1.2 PageRank/small-world7 points
    2.1.3 pictures6 points
    2.2 written page10 points