0% found this document useful (0 votes)
60 views15 pages

COMP 1828 Coursework - 2024-25

Uploaded by

covetgreatness
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views15 pages

COMP 1828 Coursework - 2024-25

Uploaded by

covetgreatness
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

COMP1828 Advanced Algorithms and Faculty Contribution:

Data Structures Header ID: 50% of course


Module Leader: Designing, developing & Deadline Date: Mon 11.30pm
Dr IK SOO LIM testing a journey planner 18/Nov/2024, UK (GMT)
This coursework should take an average student who is up-to-date with tutorial work
approximately 30 hours

Feedback and grades are normally made available within 3 calendar weeks of the
coursework deadline (not counting holidays)
Learning Outcomes:
1 Select and employ data structures and algorithms appropriate to a variety of problems.
2 Formulate models using appropriate algorithms and data structures.
3 Obtain programmatic solutions using appropriate software, including a high level
programming language.
4 Describe and discuss the efficiency, complexity, accuracy and limitations of algorithms.

Plagiarism is presenting somebody else's work as your own. It includes: copying


information directly from the Web or books without referencing the material;
submitting joint coursework as an individual effort; copying another student's
coursework; stealing coursework from another student and submitting it as your
own work. Suspected plagiarism will be investigated and if found to have
occurred will be dealt with according to the procedures set down by the
University. Please see your student handbook for further details of what is / isn't
plagiarism.

All material copied or amended from any source (e.g. internet, books) must be
referenced correctly according to the reference style you are using.

Your work will be submitted for plagiarism checking. Any attempt to bypass our
plagiarism detection systems will be treated as a severe Assessment Offence.

Coursework Submission Requirements

• An electronic copy of your work for this coursework must be fully uploaded on or
before the deadline date using the link on the coursework Moodle page for
COMP1828.
• For this coursework you must submit a single PDF document. In general, any text in
the document must not be an image (i.e. must not be scanned) and would normally
be generated from other documents (e.g. MS Office using "Save As .. PDF"). For
mathematical notation, you can use MS Word equation tools
https://support.microsoft.com/en-us/office/write-an-equation-or-formula-4f799df7-
4ca4-4670-afd3-6135768b01d0 .
• For this coursework you must also upload the source code and any additional
supporting work as a single ZIP file.
• There are limits on the file size (see the relevant course Moodle page).
• Make sure that any files you upload are virus-free and not protected by a password
or corrupted otherwise they will be treated as null submissions.
• All coursework must be submitted as above. Under no circumstances can they be
accepted in any other form by the academic staff.

The University website has details of the current Coursework Regulations, including details
of penalties for late submission, procedures for Extenuating Circumstances, and penalties
for Assessment Offences. See http://www2.gre.ac.uk/current-students/regs
• Grading Criteria

Each member must make a significant individual contribution to the technical development work as well as contributing to the overall team
effort. The allocation of marks will reflect the quality of the work produced and will be based on the breakdown provided by the team. For
example, in a team of three members A, B, and C if the breakdown provided by the team is A=100%, B=100%, and C=50%. Then for an overall
project mark of 60% this will mean that A is awarded 60%, B is awarded 60%, and C is awarded 30%. If the team do not provide any breakdown
or if any nonsensible breakdown is provided by the team, then the marker will allocate the same mark to each team member.

Criteria for 80-100 70-79 60-69 50-59 40-49 30-39 0-29


Assessment
Content, knowledge Demonstrates Demonstrates an There is a very good Has demonstrated a Has demonstrated a A poor Little or no
and understanding exceptional systematic excellent systematic systematic good understanding satisfactory level of understanding of understanding of
understanding of understanding of understanding of problem solving, understanding of one or more of the one or more of the
problem solving, problem solving, problem solving, computer programming problem solving, following - problem following - problem
computer programming computer programming computer programming and algorithmic computer solving, computer solving, computer
and algorithmic and algorithmic and algorithmic performance. There is programming and programming and programming and
performance. There is performance. There is performance. There is also some good algorithmic algorithmic algorithmic
exceptional evidence of also excellent evidence also some very good evidence of engagement performance. There performance. performance.
engagement with all of engagement with all evidence of engagement with most key elements are a few notable There is insufficient There is very little
key elements. key elements. with all key elements. with some omission of omissions and there is evidence of evidence of
detail. limited evidence of engagement with engagement with
engagement with all the key elements. the key elements.
key elements. Overall Overall an Overall a very
a satisfactory attempt unsatisfactory unsatisfactory
at this criteria. attempt. attempt.
Cognitive/Intellectual Demonstrates Demonstrates an Demonstrates a very Demonstrates some Has shown some Has shown little use Has shown little or
Skills exceptional use of a excellent use of a good use of a critical good critical analysis of satisfactory level of of techniques to no use of techniques
critical analysis of critical analysis of analysis of information information leading to critical analysis of undertake a critical to undertake a
information leading to information leading to leading to the proposal the proposal of a information. There is analysis of critical analysis of
the proposal of a robust the proposal of a robust of a detailed solution. detailed solution. There evidence of reflection information. The information. The
and detailed solution. and detailed solution. There is also some very are some exposed and judgement based reflection and reflection and
There is exceptional There is also excellent good evidence of weaknesses of cognitive on the interpretation judgement based on judgement based on
evidence of reflection evidence of reflection reflection and skills. There is also of the results obtained the interpretation of the interpretation of
that identifies the and judgement based judgement based on the some good evidence of at a threshold pass results is weak and results is very weak
strengths and weakness on the interpretation of interpretation of the reflection and level. lacks detail. and lacks detail.
of the approaches the results obtained. results obtained. judgement based on the
undertaken. interpretation of the
results obtained.
Communication, Demonstrates Demonstrates excellent Demonstrates a very There is good use of The use of argument The use of The use of argument
Organisation and exceptional use of use of argument and good use of argument argument and language and language which argument and and language which
Presentation argument and language language which and language which which communicates communicates language which communicates
which effectively effectively effectively information to the target information to the communicates information to the
communicates communicates communicates audience. The structure target audience is information to the target audience is at
Graduate information to the target information to the information to the target and flow of the report is mostly acceptable target audience is a substandard level.
Employability and audience. The structure target audience. The audience. The structure mostly coherent and with some mostly at a The structure and
Application of Skills and flow of the report is structure and flow of and flow of the report is overall is good. There shortcomings in the substandard level. flow of the report is
clear and of an the report is clear and clear and overall is very is also some good grammar. The The structure and unacceptable with
exceptional quality. of an excellent quality. good. There is also evidence of the qualities structure and flow of flow of the report is significant
There is exceptional There is excellent very good evidence of of transferrable skills the report is barely unacceptable with presentation issues.
evidence of the qualities evidence of the the qualities of necessary for acceptable with some some presentation There may also be
of transferrable skills qualities of transferrable skills employment. presentation issues. issues. There may little/no evidence of
necessary for transferrable skills necessary for There is also some also be little the qualities of
employment that necessary for employment that evidence of the evidence of the transferrable skills
required personal employment that required personal qualities of qualities of necessary for
judgement and required personal judgement and mostly transferrable skills transferrable skills employment.
successful judgement and successful necessary for necessary for
experimentation. successful experimentation. employment. employment.
experimentation.
Referencing, The exceptional use of The excellent use of The use of references The use of references The use of references The use of Little or no cited
sourcing, appropriate references appropriate references reflects a very good reflects a good reflects a satisfactory references reflects a work. The
acknowledging and reflects clear and reflects clear and understanding of the understanding of the understanding of the poor understanding references may not
detailed understanding detailed understanding cited work and its cited work and its cited work and its of the cited work be appropriate or
coverage
of the referenced works of the referenced works contents. Some contents. Some contents. Some and its contents. the most recent.
and its contents from a and its contents references may not be references may not be references may not be The references may
variety of sources. referenced works. the most recent. the most recent or are appropriate or the not be sufficient or
taken from a narrow most recent or are appropriate or the
range of sources. taken from a narrow most recent or are
range of sources. taken from a narrow
range of sources.
Designing, developing and testing solutions for the London
Underground system
Group work:

This coursework requires collaborative group efforts, and effective communication among
group members to be successful. The demonstration of teamwork accounts for up to 20% of
the overall coursework grade. This portion of the grade can be achieved relatively easy,
regardless of the actual coursework completion. Securing this 20% could be crucial for
students on the threshold of passing.

Documentation of weekly communications between group members is required, including:

1. Weekly email exchanges


2. A record of a weekly Teams meeting
3. Details of each member's cumulative contribution percentage

If a member's cumulative contribution credit reaches 100%, that member's individual grade
will match the group's overall grade. Members with contributions under 100% will receive a
proportional percentage of the group grade.

Any disagreements concerning contribution percentages or other issues should be resolved


within the group. The resolution process may be included in the final report if necessary.

Further instructions and guidelines will be provided in due course.

Data:

The London Underground comprises an extensive network of stations across Greater London.
A standard map of this system is available in PDF format from the Transport for London (TfL)
website at https://tfl.gov.uk/maps/track/tube . Accompanying this is an Excel spreadsheet
titled "London Underground Data.xlsx", which contains the journey times in minutes between
adjacent stations, based on previously collected data. Please note:

1. While this data set may contain errors or omissions, you should assume it to be
correct for the purposes of this assignment.
2. The provided times do not include waiting periods at stations, or the time taken for
passengers to board or alight from trains.
Mandatory Use of Library Code:

• For specific subtasks outlined later in the coursework specification, you must use the Python
library code available at https://mitp-content-
server.mit.edu/books/content/sectbyfn/books_pres_0/11599/clrsPython.zip .
• For example, if your application code requires a binary search algorithm, you must use or
call the binary search function from this library code only.
• This library is structured according to the chapter numbers from one of the required course
textbooks, "Introduction to Algorithms" (4th edition). You can easily navigate and identify
code for specific algorithms within the library using the book content, whose online copy is
available from the library
(https://ebookcentral.proquest.com/lib/gre/detail.action?docID=6925615 ) or its table of
contents (https://mitp-content-
server.mit.edu/books/content/sectbyfn/books_pres_0/11599/4e_toc.pdf ), which lists
chapters and sections.
• For these subtasks, using any other library code, including code you've written yourself, is
strictly prohibited.
• Please note: Failure to comply with this requirement may result in your maximum score
being limited to 50%.
• This mandatory use is a result of the School's directive to limit potential AI misuse and other
challenges in coursework design. Without this requirement, the coursework specification
would not be approved during the moderation process.
• In professional software development, using pre-existing libraries for data structures and
algorithms is common practice, often resulting in faster and more reliable outcomes. Your
focus should be on selecting the most appropriate data structures and algorithms for the
project at hand.
TASKS
TASK 1:

Journey Planner Based on Minutes

Your group is tasked with developing a Python programme for the London Underground
tube system's route planner. It should determine the shortest journey duration in minutes
between specified starting and destination stations.

Given a pair of starting (x) and destination (y) stations, your programme should provide:
1. A detailed list of stations indicating the journey from x to y.
2. The total duration of the journey in minutes.

(1a)
Manual versus code-based execution of the same algorithm:

[For this specific subtask, use the previously mentioned Python library by calling its
functions within your application code.] [It is advisable to copy the library code from each
chapter folder into a single directory to facilitate easier searching of dependent files. For
example, you may need to use library code for the binary search tree, which might depend
on or require code from another chapter folder. Having all the library code files in the same
directory, sorted by name, may simplify the process of locating necessary files.]

- Select an appropriate data structure and algorithm for the task. Consider choosing
from those covered in the lectures.

- Create a simple (and artificial) data set representing a tube network with only a few
stations (e.g., 5 stations named A, B, C, D, and E) and journey durations in minutes
between adjacent stations.

- Manually apply the chosen algorithm to this simple data set. Choose a pair of
stations and determine the shortest path in terms of journey duration in minutes,
executing the algorithm using pen and paper.

- Utilise the corresponding library code to complete the Python implementation for
finding the shortest path and total duration. Run the code with the simple data
created above.

- Verify that the manual computation and the code-based execution of the same
algorithm produce identical outcomes for the given pair of stations. Explain any
discrepancies if they occur.

- Repeat this comparison between the manual and code-based approaches for various
pairs of stations in the data set created above.
(1b)
Empirical measurement of time complexity:

- Develop or source Python code to generate an artificial tube network data set with n
stations, including journey durations in minutes between adjacent stations. If you
have sourced an existing code, provide a proper reference.

- For a given tube network of n stations, employ your Python code from subtask 1a to
determine the path and journey duration in minutes between station pairs. Measure
the execution time in milliseconds or any other appropriate time unit.

- Calculate the average execution time by repeating the measurement for various
station pairs within the n-station network.

- Perform this average execution time calculation for networks of different sizes: n =
100, 200, ..., 900, and 1000.

- Plot a graph with the average execution time on the vertical axis and network size n
on the horizontal axis. Compare this empirical graph with the algorithm's theoretical
time complexity (in Big-O notation) to assess their alignment. Explain any
discrepancies observed.
TASK 2:

Journey Planner Based on Number of Stops

Your group is tasked with repeating Task 1, with one key difference: instead of measuring
journey duration in minutes, you will now calculate it based on the number of stops (or
stations) between the specified starting and destination points.

(2a)
Manual versus Code-Based Execution of the Algorithm:

- Replicate subtask 1a, but use the number of stops as the measure of journey duration.
Utilise the same network data as in subtask 1a, adjusting only the journey duration
between adjacent stations to reflect the number of stops. This should involve minimal
changes to the data whilst using the same algorithm.

- Select a pair of stations and compare:


o The shortest path based on journey time in minutes (from subtask 1a).
o The shortest path based on the number of stops (from this task).
o Analyse whether these paths are identical or different.

(2b)
Empirical measurement of time complexity:

- Repeat subtask 1b, but instead of using journey duration in minutes, use the number
of stops. Perform this for n = 1100, 1200, ..., 1900, and 2000.
TASK 3:

Histograms of Journey Duration

Based on the work completed for TASKs 1 and 2, your group now has the tools and capabilities
to determine journey durations (either in minutes or number of stops) between any pair of
starting and destination stations in the London Underground network.

One application of these tools is to generate a histogram of journey durations for the entire
Underground network. A histogram summarises data by displaying its distribution across a
range, providing more insights than a simple average value. The horizontal axis represents
ranges of data values, while the vertical axis shows the frequency of each range. For example,
a histogram of exam marks for a module in a particular year would show the distribution of
those marks.

(3a)
Journey Duration Histograms and Longest Path (in Minutes)

- Import the London Underground network data from the provided spreadsheet
(‘London Underground Data.xlsx’) into your Python code. You may use any method for
this, including manual input or automated import using an application or code from
external sources. Please specify your chosen method of data importation.

- Utilising the code you developed with the mandatory library code for Task 1, calculate
the journey duration in minutes for every possible pair of stations. If the London
Underground network comprises n stations, you must compute at least n*(n-1)/2
journey duration values, as there are n*(n-1)/2 pairs of starting and destination
stations.

o For example, in a network of 100 stations, each station has 99 potential


destinations, necessitating 99 journey duration calculations per station. This
results in a total of 9,900 (=100*99) journey durations. You may choose to
exclude duplicate journeys, as the duration from station 'A' to 'B' is identical to
that from 'B' to 'A'. Thus, 4,950 (=100*99/2) unique journey durations would
suffice for the histogram. For simplicity, you may retain the duplicates and use
all 9,900 durations. Please indicate whether you have removed or retained
duplicates.
o You may use any method to plot the histogram, either through your own
coding or by using an application or code from external sources. Please specify
your chosen method for histogram plotting.

- Identify the longest journey duration in minutes and detail its path (i.e., starting
station, destination station, and intermediate stops).

(3b)
Journey Duration Histograms and Longest Path (by Number of Stops)

- Repeat the process from subtask 3a, but measure journey durations by the number
of stops.
o Create a histogram of journey durations based on the number of stops.
o Identify the longest journey in terms of the number of stops and detail its path.
TASK 4:

(4a)
[For this specific subtask, use the previously mentioned Python library by calling its
functions within your application code.] [It is advisable to copy the library code from each
chapter folder into a single directory to facilitate easier searching of dependent files. For
example, you may need to use library code for the binary search tree, which might depend
on or require code from another chapter folder. Having all the library code files in the same
directory, sorted by name, may simplify the process of locating necessary files.]

- Imagine the government is considering closing as many line sections as possible


between adjacent stations in the London Underground system. However, the closure
must adhere to the following requirements:
o Travel between any two stations must remain possible. For example, even if
the line section between adjacent stations Piccadilly Circus and Green Park is
closed, journeys between any pair of stations should still be feasible
(potentially using a different route).
o Note that we are not closing any stations. We are only considering closing line
sections between adjacent stations.

- Select an appropriate algorithm for this task and use the corresponding library code.
List the affected routes by naming the adjacent stations of each closed line section;
for example, if the line section between adjacent stations Piccadilly Circus and Green
Park is to be closed (but journeys between any two stations would still be possible),
specify it as "Piccadilly Circus -- Green Park".

(4b)
- Repeat the process from task 3a using the reduced network from task 4a, where
certain line sections have been closed.
o Create a histogram of journey durations in minutes for the reduced London
Underground system.
o Determine the longest path in minutes for the reduced London Underground
system.

- Compare the histogram created before the line section closures (as in subtask 3a) with
the histogram after the closures (as in subtask 4b). By contrasting these histograms,
draw specific insights, such as key differences between them.

- Compare the longest path and its journey duration before the line section closures (as
in subtask 3a) with the longest path and its journey duration after the closures (as in
subtask 4b). Analyse the differences and draw insights from this comparison.
DELIVERABLES

Deliverable 1: PDF Report

- Use the provided template: GroupX_ID1_ID2_ID3_ID4_ID5.doc.

- Replace 'X' in the filename with your group number and 'ID1', 'ID2', etc. with your
group members' student ID numbers.

- Save or export the report as a PDF before submission. This PDF will be your main
coursework document.

The report should adhere to the structure of the supplied template. Refer to the template for
specific content requirements. The marking scheme is as follows:

- Task 1: 20 marks
- Task 2: 20 marks
- Task 3: 20 marks
- Task 4: 20 marks
- Weekly progress journal: 20 marks

Total: 100 marks

The weekly progress journal should include dated entries, evidence of regular group
communication, and other relevant details; see the report template

Properly cite any content in your report that is not your own original work. A reference list
alone is insufficient; you must clearly indicate within the text where and how each reference
is used. Failure to properly cite sources may result in an academic misconduct investigation.

Additional coursework guidance may be provided separately.


Deliverable 2: Well-Commented Python Source Code

- Please upload the fully functional source code as a ZIP file.

- Ensure the code is well-commented and self-contained, meaning it should run without
any additional downloads.

- After unzipping, executing the main code files should produce the outputs mentioned
in the report.

- The ZIP file for Deliverable 2 should be uploaded separately from the report.

- Note: Failing to submit the source code might limit your maximum score to 50%.

Your solution should be crafted using the Python language. Where the usage of the library
code is not mandatory, you are free to use supplementary resources. However, always credit
any resource not created by your team. Failing to cite external materials might lead to an
academic misconduct investigation.

It's highly recommended to start this coursework promptly once it is accessible. Should any
instructions be unclear, reach out to the Module Leader. You can use email, visit during office
or lab hours, or schedule an appointment at your earliest convenience.

You might also like