CSCI203 – Data Structures and Algorithm 2024 S3SPSS

Java Python CSCI203 – Data Structures and Algorithm, 2024 S3

Assignment 3 (15% of total marks)

Due date: 29 August 2024, Thursday by 9:00 pm Singapore time Scope:

The tasks in this exercise consist of activities in the areas of Data Structures and Algorithms, in particular, algorithm design  strategies  -  Greedy Algorithm, Branch and Bound, backtracking and Divide and Conquer. The exercises cover the topics discussed in topics 5, 6, and 7.

Marks:

Total mark: 100

Weightage: 15% of total subject mark

Assessment criteria:

Marks will be awarded for:

•    Correct,

•    Comprehensive, and

•    Appropriate

application of the materials covered in this subject.

Assignment Specification:

Question 1 (30.0 marks)

a.  Show the steps that a quicksort with middle-of-three (mean) pivot selection takes when sorting the array, shown below, in ascending order. Note the parameters to determine the mid position are as follow: low  = 0, high = n - 1, and mid  = , where n  is the number of data in the array. (15.0 marks)

46

77

68

57

34

110

104

52

b.  Show the steps that a heapsort takes when sorting the array in ascending order.

Note, you can choose to start the first node as node 0 or node 1. It is up to you. (15.0 marks)

46

77

68

57

34

110

104

52

Unsorted list

Question 2 (15.0 marks)

a)  Given the following undirected graph:

Represent the graph as:

(i)   Adjacency matrix (5.0 marks)

(ii)   Adjacency list (5.0 marks)

(iii)  Incidence matrix (5.0 marks)

Question&nb CSCI203 – Data Structures and Algorithm, 2024 S3SPSS sp;3 (25.0 marks)

Consider the following network. With the indicated link costs, use Dijkstra’s shortest-path algorithm to compute the shortest path from A to all network nodes.

a) Show how the algorithm works by computing a table like the one discussed in class. (20.0 marks)

b) Show all the paths from A to all other network nodes. (5.0 marks)

Question 4 (30.0 marks)

Consider the following search problem, represented as a graph. Each node is label by a capital letter and the value of a heuristic function is shown in maroon. Each edge is labelled by the cost to traverse that edge. The start state is ‘A’ and the only goal state is ‘G’ . Perform. the A* search to find the shortest path from node S to node G.

i.    Is the heuristics specified in the problem (shown below) admissible? Justify your answer.  If the heuristics  is admissible, proceed to answer part (ii). If the heuristics is not admissible, correct it with a sensible value of your choice and proceed to answer part (ii). (10.0 marks)

ii.     Perform the A* search to find the shortest path from the start state (S) to the goal state (G). (20.0 marks)

Submissions

This assignment is due by 29 August 2024, Thursday by 9:00 pm Singapore time.

•       Type your answer for each question in MS Word or equivalent document format and save it in a pdf formatted file, name your file as PUID-A3-Sol.pdf where PUID is your Partner University Identification Number (That is, UOW student number). Alternatively, you can also hand-written your answer on a piece of paper, scan it and save it in pdf formatted file.

•       All assignments that do not satisfy the submission requirements listed above will not be evaluated and will be returned to the students with 0 marks.

Submit the files PUID-A3-Sol.pdf through Moodle in the following way:

1) Access Moodle at http://moodle.uowplatform.edu.au/

2)   To login use a Login link located in the right upper corner the Web page or in the middle of the bottom of the Web page

3)   When successfully logged in, select a site CSCI203 (SP324) Algorithms and Data Structures

4)   Scroll down to a section Submissions of Assignments

5)   Click at Submit your Assignment 3 here link.

6)   Click at a button Add Submission

7)   Move a file, for example, PUID-A3-Sol.pdf into an area. You can drag and drop files here to add them. You can also use a link Add…

8)   Click at a button Save changes,

9)   Click at a button Submit assignment,

10) Click at the checkbox with a text attached: By checking this box, I confirm

that this submission is my own work, … in order to confirm authorship of your submission,

11) Click at a button Continue         

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值