Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(50 pts.) A Planning Problem Suppose you are given a weighted undirected graph G=(V, E) encoding places on a map and the possible movements between
(50 pts.) A Planning Problem Suppose you are given a weighted undirected graph G=(V, E) encoding places on a map and the possible movements between them (the weights being the corresponding distances), a starting position s EV, and an ending position 1 V. You are also given a list of checkpoints c1, ..., CL V which must be visited in increasing order: for example, if you visit C3, you cannot later visit cy or cz (but visiting them before you got to cz is fine, and passing through non-checkpoint vertices along the way is also fine). Describe an efficient algorithm which, given some k {1,...,l}, finds the shortest path from s to t which visits exactly k of the checkpoints, in an allowed order (or detects that no such path exists). (Note: you can't just try all possible choices of k checkpoints, since if there are n vertices and l = n/2 for example, then there are (172) = 20(n) such choices. Make your algorithm as fast as you can it should take no more than O(na) time for some small d, e.g. 3 or 4) (50 pts.) A Planning Problem Suppose you are given a weighted undirected graph G=(V, E) encoding places on a map and the possible movements between them (the weights being the corresponding distances), a starting position s EV, and an ending position 1 V. You are also given a list of checkpoints c1, ..., CL V which must be visited in increasing order: for example, if you visit C3, you cannot later visit cy or cz (but visiting them before you got to cz is fine, and passing through non-checkpoint vertices along the way is also fine). Describe an efficient algorithm which, given some k {1,...,l}, finds the shortest path from s to t which visits exactly k of the checkpoints, in an allowed order (or detects that no such path exists). (Note: you can't just try all possible choices of k checkpoints, since if there are n vertices and l = n/2 for example, then there are (172) = 20(n) such choices. Make your algorithm as fast as you can it should take no more than O(na) time for some small d, e.g. 3 or 4)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started