Provide a greedy algorithm to get all these n people


BELOW IS A GREEDY ALGORITHMS' QUESTION -->

There is a group of n people with speeds s1, ..., sn. They have a conference that starts soon and they must all cross a bridge to get there. All n people begin on the same side of the bridge. It is nighttime and there is only one flashlight. 
A maximum of two people can cross at one time.
Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be walked back and forth, it cannot be thrown. A pair must walk together at the rate of the slower man's race.
1) Provide a greedy algorithm to get all these n people across the bridge in a fastest way. 
2) Describe the algorithm briefly
3) Prove the correctness 
4) Give the optimal substructure 
5) Analyze the time cost of your schedule

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Provide a greedy algorithm to get all these n people
Reference No:- TGS0136159

Expected delivery within 24 Hours