Page 1 of 1

QUESTION 2 [30 MARKS] You are given the arrival and departure times of trains reaching to a particular station. You need

Posted: Fri Jul 01, 2022 5:52 am
by answerhappygod
Question 2 30 Marks You Are Given The Arrival And Departure Times Of Trains Reaching To A Particular Station You Need 1
Question 2 30 Marks You Are Given The Arrival And Departure Times Of Trains Reaching To A Particular Station You Need 1 (73.95 KiB) Viewed 54 times
QUESTION 2 [30 MARKS] You are given the arrival and departure times of trains reaching to a particular station. You need to find minimum number of platforms required to accommodate the trains at any point of time. Trains arrival [9:00, 9:40, 9:50, 11:00, 15:00, 18:00] Trains departure = [9:10, 12:00, 11:20, 11:30, 19:00, 20:00] The situation can be solved by using few algorithms. However, it will reflect the complexity of the solution. You are required to solve the problem using, (a) Brute Force Algorithm i) Produce the complete algorithm ii) Calculate the minimum number of platforms based on algorithm in (a)(i) and show the process. (b) Greedy Algorithm [10 Marks] i) Produce the complete algorithm ii) Calculate the minimum number of platforms based on algorithm in (b)(i) and show the process. [12 Marks] (c) Determine the complexity for both Brute Force and Greedy Algorithm for particular problem based on the processes. Justify your answers. TO