A bus driver has a job to show a group of tourists around different cities. All edges denote the pairs of cities connected by two-way roads. Each pair of neighboring cities on each edge has a bus service that runs between two cities. Each edge has a particular limit on the maximum number of passengers it can carry and the driver wants to take as many tourists as possible on each trip from departure city to the destination city. Note that the bus is big enough it can take any number of passengers as long as the roads permit. For the following road map of seven cities and the number on each edge indicates the passenger limit. For this specific example, the best route to take is 1 - 2 - 4 - 7 when 1 is the departure city and 7 is the destination city. Describe the pseudocode of your algorithm to find the best route (1-2-4-7 in our example) for any road graph to carry most tourists on a trip. Your description should be general, and not tied to a specific example. You must justify your answer but you do not need to provide formal proof.
A bus driver has a job to show a group of tourists around different cities. All edges denote the pairs of cities connected by two-way roads. Each pair of neighboring cities on each edge has a bus service that runs between two cities.
Each edge has a particular limit on the maximum number of passengers it can carry and the driver wants to take as many tourists as possible on each trip from departure city to the destination city. Note that the bus is big enough it can take any number of passengers as long as the roads permit. For the following road map of seven cities and the number on each edge indicates the passenger limit.
For this specific example, the best route to take is 1 - 2 - 4 - 7 when 1 is the departure city and 7 is the destination city.
Describe the pseudocode of your
Trending now
This is a popular solution!
Step by step
Solved in 2 steps