Euclidean TSP
Time limit1sMemory limit256 MB
Pick c to minimize the sum of the approximation runtime and the lengthened tour flight time, and print the best time and c.
- Level
Medium4 of 10
- Topics
- Binary search, Math
- Solved
- No attempts yet
Problem
Sanjeev Arora and Joseph S. B. Mitchell discovered the Arora-Mitchell approximation algorithm for the Euclidean travelling salesman problem independently in 1998. In dimensions it approximates the length of an optimal tour within a factor of , and it runs in time
where is the number of nodes in the tour.
Miroslava works for a computer security company, and the shared cryptographic key of many data centres across Europe is due for renewal. She rents a private jet and delivers the key to employees waiting at every major European airport. She wants to be back as soon as possible.
Her company has a computer that executes operations per second. Europe is approximated by a two-dimensional plane, so on that computer the algorithm runs for exactly
seconds and produces the -approximation of the optimal tour.
The parameter is Miroslava's to choose, and both extremes hurt her. A small makes the algorithm finish quickly but leaves a long tour to fly. A large shortens the tour but keeps her waiting in front of the computer.
From a previous job Miroslava knows that the optimal tour of all major European airports is meters long, but she was not ranked high enough to learn the tour itself. The jet flies at meters per second, so flying the tour that the algorithm produces with parameter takes seconds. Landing, leaving a copy of the key and taking off again take no time at all.
Compute how long it takes Miroslava to first run the algorithm and then distribute all the keys, assuming she chooses the parameter that minimizes the total time.
Input
One line with four numbers:
- an integer (), the number of airports;
- a real number (), the number of billions of operations the computer executes per second;
- a real number (), the length of the optimal tour of all European airports in meters;
- a real number (), the speed of the private jet in meters per second.
Every real number has at most 10 digits after the decimal point.
Output
Print on one line the shortest possible time in seconds needed to distribute the keys, then the parameter that achieves it, separated by one space. Print both numbers rounded to exactly 6 digits after the decimal point.
The total time is strictly convex in for , so the minimum and the parameter that attains it are unique.