Question: This question is a bit involved in its ideas. The goal is to have you break those ideas down and build a step by step

This question is a bit involved in its ideas. The goal is to have you break those ideas down and build a step by step procedure. So there is no need to implement it fully. Just work it out in pseudocode.
A medical lab wants to distribute a new medical product in Greater Cairo. They get an updated map with all locations of pharmacies, as well as the new roads and infrastructure of new bridges in order to accurately plan their distribution strategy. The goal is to hire the least amount of needed representatives. They ask you to help them with this task, so you will do the following:
First you will check if the pharmacies are connected to each other, i.e. you check for every two pharmacies whether there is a route that connects them. A route does not have to be a direct road, it can be a sequence of roads and bridges that help you reach from one pharmacy to another.
Then you want to divide the map into some zones. So you compute the shortest route from any pharmacy to any other pharmacy on the map that is connected to it. If the shortest route is less than 5 km, you save the distance. Otherwise, the route is considered too long and you delete it from the options (making two pharmacies that were originally connected no longer connected).
Finally, you try to group pharmacies that are connected with each other and hire one representative per zone and help them plan their best route through the list of pharmacies they should visit per day, such that no representative drives more than 100 km every day.

first, apply problem reduction and graph modeling then find the matched graph problem that can be solved using one of the graph algorithms based on the matching objectives between the constructed graph of the problem and the graph algorithm. write simple psudocode

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!