Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
DESCRIPTION OF COURSEWORK
Course Code |
AIT206 |
Course Name |
Data Structure |
Academic Session |
2024/09 |
Assessment Title |
Assignment 2: Graph |
A. Introduction/ Situation/ Background Information
This assignment is to evaluate the ability of students in solving problems using graph.
B. Course Learning Outcomes (CLO) covered
At the end of this assessment, students are able to:
CLO 4 Perform the skills of solving problems involving data structures.
C. University Policy on Academic Misconduct
1. Academic misconduct is a serious offense in Xiamen University Malaysia. It can be defined as any of the following:
i. Plagiarism is submitting or presenting someone else’s work, words, ideas, data or information as your own intentionally or unintentionally. This includes incorporating published and unpublished material, whether in manuscript, printed or electronic form into your work without acknowledging the source (the person and the work).
ii. Collusion is two or more people collaborating on a piece of work (in part or whole) which is intended to be wholly individual and passed it off as own individual work.
iii. Cheating is an act of dishonesty or fraud in order to gain an unfair advantage in an assessment. This includes using or attempting to use, or assisting another to use materials that are prohibited or inappropriate, commissioning work from a third party, falsifying data, or breaching any examination rules.
2. All assessments submitted must be the student’s own work, without any materials generated by AI tools, including direct copying and pasting of text or paraphrasing. Any form of academic misconduct, including using prohibited materials or inappropriate assistance, is a serious offense and will result in a zero mark for the entire assessment or part of it. If there is more than one guilty party, such as in case of collusion, all parties involved will receive the same penalty.
D. Instruction to Students
This is an individual assignment. You are required to answer assignment in section F. Submission shall be done online in Moodle. You are required to submit 2 files: (1) runnable C/python file. (2) assignment report (pdf) (please attach marking schema at the end of it (you may find the cover page of the assignment in the attached files)). Please name the files with your student ID. The deadline of this assignment is on
E. Evaluation Breakdown
No. |
Component Title |
Percentage (%) |
1. |
Give suggestion |
20 |
2. |
Quality of implementation |
10 |
3. |
Report Format |
10 |
4. |
Effort on the code |
10 |
|
TOTAL |
50 |
F. Task(s)
Consider the graph in Figure 1, each vertex is representing a place to visit and each edge is representing the cost from/to the Adjacent vertex.
Figure 1 : The graph
I. Coding:
1. Represent the graph using adjacency matrix.
2. Print the sequence the visited places using BFS and DFS (following the cost and start with anyplace selected by the user).
3. Print the sequence of DFS user preference and BFS user preference where, the sequence of visited places starting by any place selected by the user and the next placeshall be based on the BDF or DFS traversal. If there is more than one options, ask the user to select one of them then continue until there is no more segregation. Do this process using DFS and BFS separately.
So, your welcome screen shall print matrix representation for the graph, then asked the user to select between DFS Basic or BFS Basic or DFS user preference or BFS user preference. Then ask the user to select the start point. If the user chooses the Basic version, show the traversal sequence starting from the start point (selected by the user) based on the cost. If the user chooses the user preference version, you are going to show suggestion what is the next place to visit (or to enqueue) and its cost. If there is more than one suggestion at the same time, allow the user to select one of the possible suggestions and continue until all the places has been visited and there is no more suggestion. At the end, print the traversal order sequence based on the selected method.
II. Report:
In your report, show the following:
1- Show screenshot for the output of your matrix representation of the graph.
2- Show screenshots for two complete examples, one using DFS (User preference) and another one using BFS (User preference).
Example:
(after print the matrix representation) Which method you want to use:
1- DFS sequence (Basic)
2- BFS sequence (Basic)
3- DFS sequence (User preference)
4- BFS sequence (User preference)
User choose: 3
Please Select your start point:
User choose: KLIA
Please what place you want to visit after KLIA:
1- KLCC (12)
2- Melaka (50)
3- TBS (10)
User choose: 1
Output:
Based on DFS(User preference) , after visiting KLCC you may visit next:
1- TBS (5)
2- Batu Caves (30)
3- Aquaria KLCC(2)
User input: 2
Output: after visiting Batu Caves you may visit next:
1- Genting Highland (15)
2- Colmar Malaysia (10)
…. Until visiting all the places and there is no more suggestion
Final Output:
The sequence of visited places based on DFS and your preference is:
KLIA, KLCC, Batu Caves, … … ..