0% found this document useful (0 votes)
35 views8 pages

2410 CCP6214 Assignment (Dynamic)

Uploaded by

Marwah Al-Helali
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)
35 views8 pages

2410 CCP6214 Assignment (Dynamic)

Uploaded by

Marwah Al-Helali
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/ 8

CCP6214: ALGORITHM DESIGN AND ANALYSIS TERM 2410

This assessment is the fulfilment of the following course learning objective of CCP6214: Algorithm Design
and Analysis:
CLO3 Write efficient algorithms in terms of space and time complexities (Cognitive level:6)

Instruction Section
1 This is a group assignment with the minimum of 3 persons to maximum 4 persons per group.
2 Deadlines
• Assignment deliverables submission: 14 June 2024 (Friday), 11:59pm
• Presentation: Week 13 (17 June – 21 June 2024) – Week 14 (24 June – 28 June 2024)
3 Implement the assignment using C++ language or other programming languages that you (all group
members) are confident with. Implementation using other languages is up to own discretion. The code
should be able to generate the sample set of data described within question descriptions and implement
algorithms accordingly.
4 Write a report to describe the algorithms implemented, step-by-step algorithm illustrations, results of
the experiments, screenshots, code parts, discussions with reasoning for the results obtained and a
conclusion on the algorithms such as suitability, possible improvements etc. Include all the citations
and references in APA style in your report on the final page of the report.
5 Group leader shall zip the submission (one report in docx / pdf, coding or cpp file(s) in respective
folders for each question, input files, output files, one presentation slides file). Start the assignment as
soon as possible. No extension of submission deadline will be made. To make testing easier and save
time during presentation, your program shall never clear the computer screen and store output to output
file(s) such as txt files.
6 You are required to follow algorithms and formats based on the given dataset generation.
For first dataset generation, the seed number is group leader student id.
For second dataset generation, the seed number is summation of members’ student id.
7 All members must present to explain the algorithms, demonstrate the working programs, present the
experimental results, conclude the findings, and etc. No mark will be given to the sleeping member or
any instruction is not followed. Book the interview date, time and venue with your lecturer. There will
be an interview and Q&A session for the assignment to validate your work.
8 Assessment criterions stated in marking rubrics section are applicable to evaluation of all deliverables:
report, codes, presentation slides and presentation session (interview and Q&A).
9 You are reminded that no plagiarism is allowed in any means. If any plagiarism is found, zero mark
will be awarded.
Do not share your code with anyone. If detected, all groups involved will be penalized with zero marks.

Recommendation Section
1 You are to distribute the programming tasks among the group members and meet at least 2 times a
week to report your progress and discuss the problems you are facing with other group members. You
can try to divide the programming tasks accordingly:
• Algorithm 1 (dataset 1 and 2 generation) implementation and reporting and other questions
• Algorithm 2 (Heap and Selection Sort) implementation and reporting and other questions
• Algorithm 3 (Dijkstra’s and Kruskal’s) implementation and reporting and other questions
• Algorithm 4 (Dynamic Programming) implementation and reporting and other questions
2 You are also advised to integrate your program from the beginning and only share the bug-free program
with other members whenever you make changes to the program.
3 You are also advised to keep your program version properly and store your backup somewhere safe
(i.e., pen drive or external drive or cloud).
4 You should add comments whenever possible describing the purpose of a variable or a block of code.
A properly commented program can make the maintenance easy and readable.
CCP6214: ALGORITHM DESIGN AND ANALYSIS TERM 2410

Assignment Questions Section


1 Dataset 1 (For implementation in Q2)
Write an algorithm to generate 6 sets of data with random numeric seeding. Use group leader’s ID as
the random seed reference to generate dataset of size(s) as follows:
Set 1: 100
Set 2: 1,000
Set 3: 10,000
Set 4: 100,000
Set 5: 500,000
Set 6: 1,000,000

Example of usage of group leader’s ID as random seed reference (e.g. ID 1234000001)


Dataset 1:
423 100 101 123 321 32 13 14 222 …

Store random seeded dataset(s)/input(s) in e.g. txt file(s).

Dataset 2 (For implementation in Q3 and Q4)


You are assigned to assist in designing locations of stars with values of each star should hold for a star
conquer quest. In order to ensure the feasibility for participants to win the conquer quest with designed
stars’ locations, theoretical analyses need to be conducted.

Write an algorithm to generate dataset for 20 locations of stars (vertices) with 54 routes (edges) that
connect between the stars. Each star needs to at least connect to 3 other stars. Use the sum of other
group members’ ID number to generate data consisting of values for star name, x-coordinate, y-
coordinate, z-coordinate, weight and profit. The weight and profit refer to the points to be collected
from conquering the star.

Example of usage of sum of other group members’ ID number as random seed reference (e.g.
1234000002 +1234000003 + 1234000004 = 3702000009 )
Dataset 2:
Name x y z weight profit
Star A 370 9 72 23 90

**Example of usage student ID that has letters within the ID, as random seed reference (e.g.
241UC2407F)
Refer to ASCII value for each letter in student ID and take the last digit: U = 085, C = 067, F = 070
Thus, the student ID 241UC2407F, will be 2415724070

Use the following equation to calculate the distance between connected stars:
𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑖,𝑗 = √(𝑥𝑗 − 𝑥𝑖 )2 + (𝑦𝑗 − 𝑦𝑖 )2 + (𝑧𝑗 − 𝑧𝑖 )2
Draw the designed stars with routes with details of star(s)’ name as example shown in Figure 1:
CCP6214: ALGORITHM DESIGN AND ANALYSIS TERM 2410

Figure 1: Example of star location design with routes.

Store random seeded dataset(s)/input(s) in e.g. txt file(s).


2 Use Dataset 1 for implementation of Heap Sort and Selection Sort Algorithms.
Heap Sort
Store the data in a priority queue using a heap. Store sorted dataset(s)/output(s) in e.g. txt file(s).
Record the time to insert all data into the priority queue. Dequeue the data to test the timing of the
priority queue. Plot the graph of timing vs dataset size and discuss about the time and space complexity
of the algorithm.
Selection Sort
Sort the dataset(s) using selection sort. Store sorted dataset(s)/output(s) in e.g. txt file(s). Record the
time to complete sorting of data. Plot the graph of timing vs dataset size and discuss about the time and
space complexity of the algorithm.
3 Use Dataset 2 for the implementation of Dijkstra’s and Kruskal’s Algorithm.
Shortest Paths
Write a program to identify the shortest paths from Star A to the other stars using Dijkstra’s Algorithm.
Then display the shortest distance to each star (store the output(s) in e.g. txt file(s)). Draw the graph
representing the shortest paths. Discuss about the time and space complexity of the algorithm.
Minimum Spanning Tree
Write a program to identify the Minimum Spanning Tree using Kruskal’s Algorithm. Display the edges
of the tree and draw the graph representing the Minimum Spanning Tree (store the output(s) in e.g. txt
file(s)). Discuss about the time and space complexity of the algorithm.
4 Use Dataset 2 for the implementation of 0/1 Knapsack Algorithm.
Dynamic Programming
Assume that each participant travels in a spaceship which have maximum capacity of conquering
800kg of stars. Write a program to identify the set of star(s) to visit without returning to beginning star
location using the 0/1 Knapsack Algorithm (assume that once the participant reach a star, participant
has to conquer and plunder the full weight of that star). Draft out the resulting matrix and the list of
stars to visit, with the weights and profits from each star to be winner of the star conquer quest (store
the output(s) in e.g. txt file(s)). Discuss about the time and space complexity of the algorithm.

Deliverables Section
Report
• Cover page consisting a table which remarks each member’s contribution. Example of the table
as follows:
CCP6214: ALGORITHM DESIGN AND ANALYSIS TERM 2410
Num Student ID Student Name Task descriptions Percentage %
1 1234000001 Mark Kelly (group leader) Q1: Dataset 1 and 2 25
2 1234000002 Norlan Jimmie Q2: Heap and Merge Sort 25
3 1234000003 Joey Lane Q3: Dijkstra’s and Kruskal 25
4 1234000004 Rita Bane Q4: 0/1 Knapsack 25

• Dataset generation for Dataset 1 and Dataset 2 – algorithms and programs.


• Heap Sort and Selection Sort – algorithm, programs for algorithm implementation,
experimental results and discussions.
• Shortest Paths and Minimum Spanning Tree – algorithm, programs for algorithm
implementation, experimental results and discussions.
• Dynamic Programming – algorithm, programs for algorithm implementation, experimental
results and discussions.
Programs (Input and Output files, Executables, Program Listing and Relevant System Files)
• Compressed (zipped) coding project folder
Presentation
• Presentation slides
• Each member to present a question. All members must be able to explain how the algorithms
were implemented and experimental results.
• Q&A and Interview is applicable within presentation session. Each member is expected to be
able to heed at least one of the questions addressed by lecturer.
• In any case of student could not address any questions by lecturer or provided vague /
questionable answers during presentation, but produced correct reporting and codes, further
investigation of plagiarism will be conducted by the lecturer.

Assessments Evaluation Section


Components Elements Weight Rate (0-5) Total
Question 1: Dataset 1 5
Question 1: Dataset 2 5
Report,
Question 2: Heap Sort 5
Programs
Question 2: Selection Sort 5
and
Question 3: Shortest Path 5
Presentation
Question 3: Minimum Spanning Tree 5
Question 4: Dynamic Programming 5
Individual Elaborations, Interview and Q&A session 5
Total (40%)
CCP6214: ALGORITHM DESIGN AND ANALYSIS TERM 2410

Rubrics Section
Criteria No Attempt (0) Very Weak (1) Weak (2) Average (3) Good (4) Excellent (5)
Part 1 dataset No attempt made or Algorithm Algorithm Algorithm Algorithm Algorithm
generation algorithm, implementation is implemented poorly implemented with implemented with implemented without implemented
implementations and similar with other with minimal datasets major defects and minor defects and defect and datasets effectively and
discussions group(s) with no produced and most of some datasets were some datasets were were produced with datasets were
justification(s). the explanations were produced with brief produced with good explanations produced with detailed
not of own words. explanations of own sufficient explanations accompanied with explanations
Implied lack of ability words. Implied lack of of own words. Implied own ideas. Implied accompanied by own
to identify rightful ability to depict lack of ability to ability of designing ideas or examples.
algorithm as solution. rightful algorithm as manipulate rightful rightful algorithm as Implied ability of
solution. algorithm as solution. solution. constructing rightful
algorithm as solution.
Part 2 dataset No attempt made or Algorithm Algorithm Algorithm Algorithm Algorithm
generation algorithm, implementation and implemented poorly or implemented with implemented with implemented without implemented
implementations. station design are resultant station major defects and minor defects and defect and station effectively and unique
station design and similar with other design similar to other minimal station design sufficient station design is unique with station design is
discussions group(s) with no group(s) with produced with brief design produced with good explanations produced with detailed
justification(s). justifications and most explanations of own acceptable accompanied with explanations
of the explanations words. Implied lack of explanations of own own ideas. Implied accompanied by own
were not of own ability to depict words. Implied lack of ability of designing ideas or examples.
words. Implied lack of rightful algorithm as ability to manipulate rightful algorithm as Implied ability of
ability to identify solution. rightful algorithm as solution. constructing rightful
rightful algorithm as solution. algorithm as solution.
solution.
Heap Sort No attempt made or Algorithm Algorithm Algorithm Algorithm Algorithm
implementation, implementation, implemented poorly implemented with implemented with implemented without implemented
results and discussions experimental results with minimal results major defects and minor defects and defect and results effectively and results
and discussions are produced and most of some results were sufficient results were were produced with were produced with
similar with other the explanations were produced with brief produced with good explanations
detailed explanations
group(s), with no not of own words. explanations of own acceptable accompanied with
accompanied by own
justification(s). Implied lack of ability words. Implied lack of explanations of own own ideas. Implied ideas or examples.
to reproduce from ability to comprehend words. Implied lack of ability of associating
Implied ability of
learnt concepts. learnt concepts. ability to operate learnt concepts for integrating learnt
learnt concepts for real-world solutions.
concepts for real-
real-world solutions. world solutions.
Selectiom Sort No attempt made or Algorithm Algorithm Algorithm Algorithm Algorithm
implementation, implementation, implemented poorly implemented with implemented with implemented without implemented
CCP6214: ALGORITHM DESIGN AND ANALYSIS TERM 2410
results and discussions experimental results with minimal results major defects and minor defects and defect and results effectively and results
and discussions are produced and most of some results were sufficient results were were produced with were produced with
similar with other the explanations were produced with brief produced with good explanations detailed explanations
group(s), with no not of own words. explanations of own acceptable accompanied with accompanied by own
justification(s). Implied lack of ability words. Implied lack of explanations of own own ideas. Implied ideas or examples.
to reproduce from ability to comprehend words. Implied lack of ability of associating Implied ability of
learnt concepts. learnt concepts. ability to operate learnt concepts for integrating learnt
learnt concepts for real-world solutions. concepts for real-
real-world solutions. world solutions.
Shortest path No attempt made or Algorithm Algorithm Algorithm Algorithm Algorithm
implementation, implementation, implemented poorly implemented with implemented with implemented without implemented
results and discussions experimental results with minimal results major defects and minor defects and defect and results effectively and results
and discussions are produced and most of some results were sufficient results were were produced with were produced with
similar with other the explanations were produced with brief produced with good explanations detailed explanations
group(s), with no not of own words. explanations of own acceptable accompanied with accompanied by own
justification(s). Implied lack of ability words. Implied lack of explanations of own own ideas. Implied ideas or examples.
to reproduce from ability to comprehend words. Implied lack of ability of associating Implied ability of
learnt concepts. learnt concepts. ability to operate learnt concepts for integrating learnt
learnt concepts for real-world solutions. concepts for real-
real-world solutions. world solutions.
Minimum spanning No attempt made or Algorithm Algorithm Algorithm Algorithm Algorithm
tree implementation, implementation, implemented poorly implemented with implemented with implemented without implemented
results and discussions experimental results with minimal results major defects and minor defects and defect and results effectively and results
and discussions are produced and most of some results were sufficient results were were produced with were produced with
similar with other the explanations were produced with brief produced with good explanations detailed explanations
group(s), with no not of own words. explanations of own acceptable accompanied with accompanied by own
justification(s). Implied lack of ability words. Implied lack of explanations of own own ideas. Implied ideas or examples.
to reproduce from ability to comprehend words. Implied lack of ability of associating Implied ability of
learnt concepts. learnt concepts. ability to operate learnt concepts for integrating learnt
learnt concepts for real-world solutions. concepts for real-
real-world solutions. world solutions.
Dynamic No attempt made or Algorithm Algorithm Algorithm Algorithm Algorithm
programming implementation, implemented poorly implemented with implemented with implemented without implemented
implementation, experimental results with minimal results major defects and minor defects and defect and results effectively and results
results and discussions and discussions are produced and most of some results were sufficient results were were produced with were produced with
similar with other the explanations were produced with brief produced with good explanations detailed explanations
group(s), with no not of own words. explanations of own acceptable accompanied with accompanied by own
justification(s). Implied lack of ability words. Implied lack of explanations of own own ideas. Implied ideas or examples.
to reproduce from ability to comprehend words. Implied lack of ability of associating Implied ability of
learnt concepts. learnt concepts. ability to operate learnt concepts for integrating learnt
CCP6214: ALGORITHM DESIGN AND ANALYSIS TERM 2410
learnt concepts for real-world solutions. concepts for real-
real-world solutions. world solutions.
Individual: No attempt made or Redundant Brief explanations Moderate explanations Good explanations Detailed explanations,
Elaborations, reading from slide or explanations without with brief highlight of with acceptable with highlights of creatively highlighting
Interview and Q&A report during highlighting main main discussion points highlights of main main discussion points main discussion points
session presentation and did discussion points in in presentation and discussion points in in presentation and in presentation and
not present own inputs presentation and when addressing presentation and when when addressing when addressing
during Q&A session. addressing questioned further questions in addressing further further questions of further questions of
Implied no assignment area. assignment area. questions of assignment area. assignment area.
understanding on Implied lack of ability Implied lack of ability assignment area. Implied ability of Implied ability of
completed work. to relate implemented to illustrate learnt Implied lack of ability associating learnt integrating learnt
algorithm with learnt concepts. to demonstrate learnt concepts to be part of concepts to propose
concepts. concepts. solution of real solutions to real
problems raised. problems raised.
CCP6214: ALGORITHM DESIGN AND ANALYSIS TERM 2410

You might also like