Computer Science, asked by ss7904, 8 months ago

Engagement Ring Problem Description Sejal was on a month-long vacation to Europe and has a return trip to India from Lisbon, a city in south west part of Europe. However, a day before the return flight she realizes that she lost her engagement ring. After much contemplation, she decides to go to all the cities she visited to find her ring. She maps all the cities she visited on a graph with Lisbon being at point (0,0). She then makes a route plan to visit all the cities and return to Lisbon by taking the shortest possible distance. She does not remember having her ring even in the first city she visited so there are high chances that she may have lost her ring in the initial part of her trip also. In case there are more than one routes which have the shortest possible distance, she picks that route in which the first city she visited, comes first. For example, if she visited cities 2,5,7,1,8,3 in that order and routes 0,1,8,3,2,5,7,0 and 0,8,3,1,5,2,7,0 (0 being Lisbon) have the same shortest possible distance then she will choose route 0,1,8,3,2,5,7,0 because she visited city 1 before city 8. Her travel guide, Harry also offers to help Sejal. Sejal asks him to travel separately on the same route, but in reverse direction such that each city is visited only once. They plan to travel 20 Kms in each city on taxi to search the ring. Inter-city travel is done on trains only. A secret service officer knows the coordinates of the city that Sejal visited during her the trip in that order. He also knows the city in which the ring is lost but will inform Sejal or Harry only when one of the two is in that city. He knows the path that Sejal has drawn to visit all the cities and return to Lisbon. With Sejal and Harry following that path and either one of them reaching the city where the ring is lost, the secret service officer will inform the person in that city, that the ring will be 10 km away from their current location. They will travel back 10 km in the same city, to catch the train back to Lisbon. Calculate the total distance traveled by Sejal in her search and her return to Lisbon from that city. If the ring is found by Sejal, she goes back to Lisbon from that city. If the ring is found by Harry, he informs Sejal on call at that point. If Sejal is in a city (searching in taxi) she returns to Lisbon via train from that city (without searching any further in that city). If Sejal is on train, she will need to complete the journey and then return from that other city. If the call comes at the exact point she is taking a train, she can return from that city itself. Each unit in the graph is equal to 1 Km. Assume the speed of all trains and taxis is same. Do not consider the decimal values while calculating the distance between two cities, ie. distance will be the floor of the calculated distance.

ADD ANSWER


Log in to add comment
mallampatiraji is waiting for your help.
Add your answer and earn points.
The Brain
The Brain Helper
Not sure about the answer?
SEE NEXT ANSWERS
Newest Questions
#include <stdio.h>int main() { int a=100; printf ("%%d"+1,a); return 0;}output?​
Q: Joey has developed an application for a vehicle management companyThe application has three classes, Vehicles, Cars, and Trucks, wherethe Cars and
arnold is planning to follow a diet suggested by his Nutritionist. The Nutritionist prescribed him the total protein, carbohydrates and fats, he shou
A laptop computer is a type of micro computer (true/False).
Radial gradient changes colour in a circular outward direction starting from the focal point true or false​
Codu wants to create a shopping application. The application would sell only SHIRT and SHOE and have a cost that can be modified based on market needs
Lego Tower Problem Description Rahul and his friends are making LEGO towers out of their LEGO bricks. His friends arrive at different times and join t
Def resolveLowercase(infile,outfile): output=file(outfile, 'w') for line in file(infile): if not line[0] in 'abcdefghijklmnopqrstuvw
What do you mean by software ????​
War between Republic and Separatist is escalating. The Separatist are on a new offensive. They have started blocking the path between the republic pla
Previous
Next
Ask your question
WE'RE IN THE KNOW
This site is using cookies under cookie policy. You can specify conditions of storing and accessing cookies in your browser

Answers

Answered by akhilrai20
0

Answer:

Rahul and his friends are making LEGO towers out of their LEGO bricks. His friends arrive at different times and join t

Def resolveLowercase(infile,outfile): output=file(outfile, 'w') for line in file(infile): if not line[0] in 'abcdefghijklmnopqrstuvw

What do you mean by software ????

War between Republic and Separatist is escalating. The Separatist are on a new offensive. They have started blocking the path between the republic pla

Previous

Next

Ask your question

WE'RE IN THE KNOW

This site is using cookies under cookie policy. You can specify conditions of storing and accessing cookies in your browser

Similar questions