(Solved) : Suppose Working Travel Agency Organizes Trekking Vacations Tourists Provided Map N Cities Q42702866 . . .

Suppose that you are working in a travel agency that organizestrekking vacations for tourists. You are provided a map of n citiesthat are connected by direct trekking routes. A trekking routebetween city u to city v has a distance of d(u, v) and cost ofstaying in city v is c(v) for one night. You are given with thefollowing information:

• Starting city s,

• Destination city e,

• Vacation duration t,

• Daily maximum walking distance u(k), where k ∈ [1, t].

Your duty in the agency is to plan a trekking vacation thatlasts exactly t days such that people will not stay in the samecity for two sequential nights and cannot walk more than u(k) onday k. People can walk through more than one cities on a given day.In other words, there does not have to be a direct trekking routebetween the city assigned on day k and day k + 1. You are alsowanted to minimize the total cost of the staying at the cities.

(a) Give an algorithm that generates a t-day (s = v0,v1, …, e = vt) city tour with the minimumcost Σc(vi) and d(vi−1, vi) ≤u(i).

(b) Analyze the complexity of your algorithm.

(Hint: Create a directed acyclic graph H with n(t + 1) nodeswhere each node vip represents the option of staying at city i onday p and add edges (vi(p−1), vjp) whichcorresponds to people can walk from city i to city j. Do not forgetto consider the daily walking limit while adding edges.Furthermore, you are also wanted to figure out how to relate andassign the costs to the graph H for the problem.)

Language –> C++

Expert Answer

Answer to Suppose that you are working in a travel agency that organizes trekking vacations for tourists. You are provided a map o…

Leave a Comment


We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us