In a graph with
N nodes, where each node represents a house and is labeled from
N-1, an adjacency matrix
graph[i][j] indicates the distance from node
i to node
Consider a list of tuples
[[init_1, target_1], ..., [init_k, target_k]], representing delivery requests. Each tuple, like
[[1, 2], [2, 3], [5, 3]], requires a delivery person to transport food from
target_i (e.g., from houses 1, 2, 5 to houses 2, 3). Each delivery person can carry an unlimited amount of items/orders at same time.
There is also a list of delivery personnel
[v1, v2, ..., vn], where each
vi indicates the current location (node) of the
i-th delivery person. Assuming all personnel move at the same speed and ignore the stopping time at each node, how can one assign a route to each (a list of houses for pickup and delivery) to minimize the maximum time taken by any delivery person?