Assignment 4: Design and Analysis of Algorithm (CSC645)

You might also like

You are on page 1of 1

Design and Analysis of Algorithm (CSC645)

Assignment 4

Question 4.1
Explain how brute force idea can be applied in closest pair of point problem. Then, find
the shortest pair of point for the following list of points using brute force approach. [10
marks]

A(-1,2), B(3,2), C(3,-3), D(3,-5) and E(-1,-5)

Question 4.2
Given the following list of integers, sort them using quicksort algorithm to ascending
order. Trace the changes in the array. [10 marks]

[4, 45, 39, 6, 48, 16, 37, 27, 28, 3].

Question 4.3
Solve the following graph using Greedy ADT Minimum Spanning Tree. [10 marks]

Question 4.4
Solve the following graph using Greedy ADT: Single-Source Shortest Path. [10 marks]

Prepared by: Dr Khyrina Airin Fariza Binti Abu Samah


UiTM Kampus Jasin Melaka

You might also like