In the design and analysis of algorithms for combinatorial optimization, parametric search is a technique invented by Nimrod Megiddo in 1983 for transforming a decision algorithm (does this optimization problem have a solution with quality better than some given threshold?) into an optimization algorithm (find the best solution). It is frequently used for solving optimization problems in computational geometry.
Technique The basic idea of parametric search is to simulate a test algorithm that takes as input a numerical parameter X, as if it were being run with the (unknown) optimal solution value X∗ as its input. This test algorithm is assumed to behave discontinuously when X=X∗, and to operate on its parameter X only by simple comparisons of X with other computed values, or by testing the sign of low-degree polynomial functions of X. To simulate the algorithm, each of these comparisons or tests needs to be simulated, even though the X of the simulated algorithm is unknown. To simulate each comparison, the parametric search applies a second algorithm, a decision algorithm, that takes as input another numerical parameter Y, and that determines whether Y is above, below, or equal to the optimal solution value X∗. Since the decision algorithm itself necessarily behaves discontinuously at X∗, the same algorithm can also be used as the test algorithm. However, many applications use other test algorithms (often, comparison sorting algorithms). Advanced versions of the parametric search technique use a parallel algorithm as the test algorithm, and group the comparisons that must be simulated into batches, in order to significantly reduce the number of instantiations of the decision algorithm.
Sequential test algorithm In the most basic form of the parametric search technique, both the test algorithm and the decision algorithms are sequential (non-parallel) algorithms, possibly the same algorithm as each other. The technique simulates the test algorithm step by step, as it would run when given the (unknown) optimal solution value as its parameter X. Whenever the simulation reaches a step in which the test algorithm compares its parameter X to some other number Y, it cannot perform this step by doing a numerical comparison, as it does not know what X is. Instead, it calls the decision algorithm with parameter Y, and uses the result of the decision algorithm to determine the output of the comparison. In this way, the time for the simulation ends up equalling the product of the times for the test and decision algorithms. Because the test algorithm is assumed to behave discontinuously at the optimal solution value, it cannot be simulated accurately unless one of the parameter values Y passed to the decision algorithm is actually equal to the optimal solution value. When this happens, the decision algorithm can detect the equality and save the optimal solution value for later output. If the test algorithm needs to know the sign of a polynomial in X, this can again be simulated by passing the roots of the polynomial to the decision algorithm in order to determine whether the unknown solution value is one of these roots, or, if not, which two roots it lies between. One example concerns a system of an odd number of particles, all moving rightward at different constant speeds along the same line. The median of the particles, also, will have a rightward motion, but one that is piecewise linear rather than having constant speed, because different particles will be the median at different times. Initially the particles, and their median, are to the left of the origin of the line, and eventually they and their median will all be to the right of the origin. The problem is to compute the time t0 at which the median lies exactly on the origin. A linear time decision algorithm is easy to define: for any time t, one can compute the position of each particle at time t and count the number of particles on each side of the origin. If there are more particles on the left than on the right, then t<t0, and if there are more particles on the right than on the left, then t>t0. Each step of this decision algorithm compares the input parameter t to the time that one of the particles crosses the origin. Using this decision algorithm as both the test algorithm and the decision algorithm of a parametric search leads to an algorithm for finding the optimal time t0 in quadratic total time. To simulate the decision algorithm for parameter t0, the simulation must determine, for each particle, whether its crossing time is before or after t0, and therefore whether it is to the left or right of the origin at time t0. Answering this question for a single particle – comparing the crossing time for the particle with the unknown optimal crossing time t0 – can be performed by running the same decision algorithm with the crossing time for the particle as its parameter. Thus, the simulation ends up running the decision algorithm on each of the particle crossing times, one of which must be the optimal crossing time. Running the decision algorithm once takes linear time, so running it separately on each crossing time takes quadratic time. Megiddo remarks that, for this specific problem, there exists a simple linear time algorithm that does not involve parametric search: just determine the time at which each particle crosses the origin and return the median of these times. However, he explains that parametric search often matches the best known running time or gives the fastest known algorithm for more advanced problems.
… excerpt ends here. Continue reading the full article.
