Where’s the Winner? Max-Finding and Sorting with Metric Costs
Traditionally, a fundamental assumption in evaluating the performance of algorithms for sorting and selection has been that comparing any two elements costs one unit (of time, work, etc.); the goal of an algorithm is to minimize the total cost incurred. However, a body of recent work has attempted to find ways to weaken this assumption – in particular, new algorithms have been given for these basic problems of searching, sorting and selection, when comparisons between different pairs of elements have different associated costs.
In this paper, we further these investigations, and address the questions of max-finding and sorting when the comparison costs form a metric; i.e., the comparison costs c uv respect the triangle inequality c uv + c vw ≥ c uw for all input elements u,v and w. We give the first results for these problems – specifically, we present
An O(log n)-competitive algorithm for max-finding on general metrics, and we improve on this result to obtain an O(1)-competitive algorithm for the max-finding problem in constant dimensional spaces.
An O(log2 n)-competitive algorithm for sorting in general metric spaces.
KeywordsTriangle Inequality Maximum Element Competitive Ratio Online Algorithm Comparison Cost
Unable to display preview. Download preview PDF.
- 1.Knuth, D.E.: The art of computer programming. Sorting and searching, vol. 3. Addison- Wesley Publishing Co., Reading (1973)Google Scholar
- 2.Charikar, M., Fagin, R., Guruswami, V., Kleinberg, J., Raghavan, P., Sahai, A.: Query strategies for priced information. In: Proc. 32nd ACM STOC, pp. 582–591 (2000)Google Scholar
- 3.Gupta, A., Kumar, A.: Sorting and selection with structured costs. In: Proc. 42nd IEEE FOCS, pp. 416–425 (2001)Google Scholar
- 4.Kannan, S., Khanna, S.: Selection with monotone comparison costs. In: Proc. 14th ACM SIAM SODA, pp. 10–17 (2003)Google Scholar
- 5.Bartal, Y.: Probabilistic approximations of metric spaces and its algorithmic applications. In: Proc. 37th IEEE FOCS, pp. 184–193 (1996)Google Scholar
- 6.Fakcharoenphol, J., Rao, S., Talwar, K.: A tight bound on approximating arbitrary metrics by tree metrics. In: Proc. 35th ACM STOC, pp. 448–455 (2003)Google Scholar
- 7.Hartline, J., Hong, E., Mohr, A., Rocke, E., Yasuhara, K.: As reported in Google Scholar