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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 53 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply