The basic idea of parametric search is to simulate a test algorithm that takes as input a numerical parameter , as if it were being run with the (unknown) optimal solution value as its input. This test algorithm is assumed to behave discontinuously when , and to operate on its parameter only by simple comparisons of with other computed values, or by testing the sign of low-degree polynomial functions of . To simulate the algorithm, each of these comparisons or tests needs to be simulated, even though the 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 , and that determines whether is above, below, or equal to the optimal solution value .
Since the decision algorithm itself necessarily behaves discontinuously at , 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 . Whenever the simulation reaches a step in which the test algorithm compares its parameter to some other number , it cannot perform this step by doing a numerical comparison, as it does not know what is. Instead, it calls the decision algorithm with parameter , 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 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 , 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.
An example considered both by Megiddo (1983) and van Oostrum & Veltkamp (2002) 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 at which the median lies exactly on the origin.
A linear time decision algorithm is easy to define: for any time , one can compute the position of each particle at time 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 , and if there are more particles on the right than on the left, then . Each step of this decision algorithm compares the input parameter 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 in quadratic total time. To simulate the decision algorithm for parameter , the simulation must determine, for each particle, whether its crossing time is before or after , and therefore whether it is to the left or right of the origin at time . Answering this question for a single particle – comparing the crossing time for the particle with the unknown optimal crossing time – 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.
Parallel test algorithm
As Megiddo (1983) already observed, the parametric search technique can be substantially sped up by replacing the simulated test algorithm by an efficient parallel algorithm, for instance in the parallel random-access machine (PRAM) model of parallel computation, where a collection of processors operate in synchrony on a shared memory, all performing the same sequence of operations on different memory addresses. If the test algorithm is a PRAM algorithm uses processors and takes time (that is, steps in which each processor performs a single operation), then each of its steps may be simulated by using the decision algorithm to determine the results of at most numerical comparisons. By finding a median or near-median value in the set of comparisons that need to be evaluated, and passing this single value to the decision algorithm, it is possible to eliminate half or nearly half of the comparisons with only a single call of the decision algorithm. By repeatedly halving the set of comparisons required by the simulation in this way, until none are left, it is possible to simulate the results of numerical comparisons using only calls to the decision algorithm. Thus, the total time for parametric search in this case becomes (for the simulation itself) plus the time for calls to the decision algorithm (for batches of comparisons, taking calls per batch). Often, for a problem that can be solved in this way, the time-processor product of the PRAM algorithm is comparable to the time for a sequential decision algorithm, and the parallel time is polylogarithmic, leading to a total time for the parametric search that is slower than the decision algorithm by only a polylogarithmic factor.
In the case of the example problem of finding the crossing time of the median of moving particles, the sequential test algorithm can be replaced by a parallel sorting algorithm that sorts the positions of the particles at the time given by the algorithm's parameter, and then uses the sorted order to determine the median particle and find the sign of its position.
The best choice for this algorithm (according to its theoretical analysis, if not in practice) is the sorting network of Ajtai, Komlós, and Szemerédi (1983). This can be interpreted as a PRAM algorithm in which the number of processors is proportional to the input length , and the number of parallel steps is logarithmic. Thus, simulating this algorithm sequentially takes time for the simulation itself, together with batches of comparisons, each of which can be handled by calls to the linear-time decision algorithm. Putting these time bounds together gives total time for the parametric search. This is not the optimal time for this problem – the same problem can be solved more quickly by observing that the crossing time of the median equals the median of the crossing times of the particles – but the same technique can be applied to other more complicated optimization problems, and in many cases provides the fastest known strongly polynomial algorithm for these problems.
Because of the large constant factors arising in the analysis of the AKS sorting network, parametric search using this network as the test algorithm is not practical. Instead, van Oostrum & Veltkamp (2002) suggest using a parallel form of quicksort (an algorithm that repeatedly partitions the input into two subsets and then recursively sorts each subset). In this algorithm, the partition step is massively parallel (each input element should be compared to a chosen pivot element) and the two recursive calls can be performed in parallel with each other. The resulting parametric algorithm is slower in the worst case than an algorithm based on the AKS sorting network. However, van Oostrum and Veltkamp argue that if the results of past decision algorithms are saved (so that only the comparisons unresolved by these results will lead to additional calls to the decision algorithm) and the comparison values tested by the simulated test algorithm are sufficiently evenly distributed, then as the algorithm progresses the number of unresolved comparisons generated in each time step will be small. Based on this heuristic analysis, and on experimental results with an implementation of the algorithm, they argue that a quicksort-based parametric search algorithm will be more practical than its worst-case analysis would suggest.
Desynchronized sorting
Cole (1987) further optimized the parametric search technique for cases (such as the example) in which the test algorithm is a comparison sorting algorithm. For the AKS sorting network and some other sorting algorithms that can be used in its place, Cole observes that it is not necessary to keep the simulated processors synchronized with each other: instead, one can allow some of them to progress farther through the sorting algorithm while others wait for the results of their comparisons to be determined. Based on this principle, Cole modifies the simulation of the sorting algorithm, so that it maintains a collection of unresolved simulated comparisons that may not all come from the same parallel time step of the test algorithm. As in the synchronized parallel version of parametric search, it is possible to resolve half of these comparisons by finding the median comparison value and calling the decision algorithm on this value. Then, instead of repeating this halving procedure until the collection of unresolved comparisons becomes empty, Cole allows the processors that were waiting on the resolved comparisons to advance through the simulation until they reach another comparison that must be resolved.
Using this method, Cole shows that a parametric search algorithm in which the test algorithm is sorting may be completed using only a logarithmic number of calls to the decision algorithm, instead of the calls made by Megiddo's original version of parametric search. Instead of using the AKS sorting network, it is also possible to combine this technique with a parallel merge sort algorithm of Cole (1988), resulting in time bounds with smaller constant factors that, however, are still not small enough to be practical. A similar speedup can be obtained for any problem that can be computed on a distributed computing network of bounded degree (as the AKS sorting network is), either by Cole's technique or by a related technique of simulating multiple computation paths (Fernández-Baca 2001).
Goodrich & Pszona (2013) combine Cole's theoretical improvement with the practical speedups of van Oostrum & Veltkamp (2002). Instead of using a parallel quicksort, as van Oostrum and Veltkamp did, they use boxsort, a variant of quicksort developed by Reischuk (1985) in which the partitioning step partitions the input randomly into smaller subproblems instead of only two subproblems. As in Cole's technique, they use a desynchronized parametric search, in which each separate thread of execution of the simulated parallel sorting algorithm is allowed to progress until it needs to determine the result of another comparison, and in which the number of unresolved comparisons is halved by finding the median comparison value and calling the decision algorithm with that value. As they show, the resulting randomized parametric search algorithm makes only a logarithmic number of calls to the decision algorithm with high probability, matching Cole's theoretical analysis. An extended version of their paper includes experimental results from an implementation of the algorithm, which show that the total running time of this method on several natural geometric optimization problems is similar to that of the best synchronized parametric search implementation (the quicksort-based method of van Oostrum and Veltkamp): a little faster on some problems and a little slower on some others. However, the number of calls that it makes to the decision algorithm is significantly smaller, so this method would obtain greater benefits in applications of parametric searching where the decision algorithm is slower.
On the example problem of finding the median crossing time of a point, both Cole's algorithm and the algorithm of Goodrich and Pszona obtain running time . In the case of Goodrich and Pszona, the algorithm is randomized, and obtains this time bound with high probability.
Comparison with binary search and randomized search
The bisection method (binary search) can also be used to transform decision into optimization. In this method, one maintains an interval of numbers, known to contain the optimal solution value, and repeatedly shrinks the interval by calling the decision algorithm on its median value and keeping only the half-interval above or below the median, depending on the outcome of the call. Although this method can only find a numerical approximation to the optimal solution value, it does so in a number of calls to the decision algorithm proportional to the number of bits of precision of accuracy for this approximation, resulting in weakly polynomial algorithms.
Instead, when applicable, parametric search finds strongly polynomial algorithms, whose running time is a function only of the input size and is independent of numerical precision. However, parametric search leads to an increase in time complexity (compared to the decision algorithm) that may be larger than logarithmic. Because they are strongly rather than weakly polynomial, algorithms based on parametric search are more satisfactory from a theoretical point of view. In practice, binary search is fast and often much simpler to implement, so algorithm engineering efforts are needed to make parametric search practical. Nevertheless, van Oostrum & Veltkamp (2002) write that "while a simple binary-search approach is often advocated as a practical replacement for parametric search, it is outperformed by our [parametric search] algorithm" in the experimental comparisons that they performed.
When only concerned with expected performance, a randomized optimization technique (Chan 1998) can be used in place of parametric search. This method only incurs a constant factor increase in time complexity while still giving a strongly polynomial algorithm.
Applications
Parametric search has been applied in the development of efficient algorithms for optimization problems, particularly in computational geometry (Agarwal, Sharir & Toledo 1994).
They include the following:
A centerpoint of a point set in a Euclidean space is a point such that any half-space containing the centerpoint also contains a constant fraction of the input points. For -dimensional spaces, the optimal fraction that can be achieved is always at least . Parametric-search based algorithms for constructing two-dimensional centerpoints were later improved to linear time using other algorithmic techniques. However, this improvement does not extend to higher dimensions. In three dimensions, parametric search can be used to find centerpoints in time (Cole 1987).
In computer graphics, the ray shooting problem (determining the first object in a scene that is intersected by a given line of sight or light beam) can be solved by combining parametric search with a data structure for a simpler problem, testing whether any of a given set of obstacles occludes a given ray (Agarwal & Matoušek 1993).
The biggest stick problem involves finding the longest line segment that lies entirely within a given polygon. It can be solved in time , for -sided polygons and any , using an algorithm based on parametric search (Agarwal, Sharir & Toledo 1994).
The annulus that contains a given point set and has the smallest possible width (difference between inner and outer radii) can be used as a measure of the roundness of the point set. Again, this problem can be solved in time , for -sided polygons and any , using an algorithm based on parametric search (Agarwal, Sharir & Toledo 1994).
The Hausdorff distance between translates of two polygons, with the translation chosen to minimize the distance, can be found using parametric search in time , where and are the numbers of sides of the polygons (Agarwal, Sharir & Toledo 1994).
For points in the Euclidean plane, moving at constant velocities, the time at which the points obtain the smallest diameter (and the diameter at that time) can be found using a variation of Cole's technique in time . Parametric search can also be used for other similar problems of finding the time at which some measure of a set of moving points obtains its minimum value, for measures including the size of the minimum enclosing ball or the weight of the maximum spanning tree (Fernández-Baca 2001).
2012 single by MGK featuring Ester DeanInvincibleSingle by MGK featuring Ester Deanfrom the album Lace Up ReleasedApril 24, 2012 (2012-04-24)Recorded2011GenreConscious hip hopR&BLength3:07LabelBad BoyInterscopeSongwriter(s)Colson Baker, Ester DeanProducer(s)Alex da KidMGK singles chronology Wild Boy (2011) Invincible (2012) Hold On (Shut Up) (2012) Ester Dean singles chronology Love Suicide(2011) Invincible(2012) I Can't Make You Love Me(2013) Music videoInvincible ...
A Daughter's a Daughter Ilustrasi edisi Inggris pertamaPengarangMary Westmacott (pseudonim Agatha Christie)NegaraBritania RayaBahasaInggrisGenreTragediDiterbitkan1952 (Heinemann)Jenis mediaCetak (sampul keras & sampul kertas)Halaman200 halamanDidahului olehThey Do It with Mirrors Diikuti olehAfter the Funeral A Daughter's a Daughter adalah sebuah novel yang ditulis oleh Agatha Christie dan pertama kali diterbitkan di Inggris oleh Heinemann pada 24 November 1952. ...
Brandão Informasi pribadiNama lengkap Evaeverson BrandãoTanggal lahir 16 Juni 1980 (umur 43)Tempat lahir São Paulo, BrasilTinggi 1,89 m (6 ft 2+1⁄2 in)Posisi bermain PenyerangInformasi klubKlub saat ini Saint-ÉtienneNomor 14Karier senior*Tahun Tim Tampil (Gol)1998–2000 Galo Maringá 18 (5)2000–2001 União Bandeirante 26 (7)2001–2002 Iraty 20 (7)2002 → São Caetano (pinjaman) 23 (10)2002–2009 Shakhtar 220 (91)2009–2012 Marseille 90 (24)2011 → Cruzei...
Amsal 27Kitab Amsal lengkap pada Kodeks Leningrad, dibuat tahun 1008.KitabKitab AmsalKategoriKetuvimBagian Alkitab KristenPerjanjian LamaUrutan dalamKitab Kristen20← pasal 26 pasal 28 → Amsal 27 (disingkat Ams 27) adalah bagian dari Kitab Amsal dalam Alkitab Ibrani dan Perjanjian Lama di Alkitab Kristen.[1][2] Teks Naskah sumber utama: Masoretik, Septuaginta dan Naskah Laut Mati. Pasal ini terdiri dari 27 ayat. Berisi amsal-amsal raja Salomo bin Daud yang dikumpulk...
Leccocomune Lecco – VedutaPanorama dai Piani d'Erna LocalizzazioneStato Italia Regione Lombardia Provincia Lecco AmministrazioneSindacoMauro Gattinoni (indipendente di centro-sinistra) dal 6-10-2020 TerritorioCoordinate45°51′12.02″N 9°23′25.73″E / 45.85334°N 9.39048°E45.85334; 9.39048 (Lecco)Coordinate: 45°51′12.02″N 9°23′25.73″E / 45.85334°N 9.39048°E45.85334; 9.39048 (Lecco) Altitudine211 m s....
British political economist (1766–1834) Malthus redirects here. For the demon Halphas, sometimes called Malthus, see Halphas. The ReverendThomas Robert MalthusFRSMalthus in 1834Born13/14 February 1766Westcott, Surrey, EnglandDied29 December 1834(1834-12-29) (aged 68)Bath, Somerset, EnglandEducationJesus College, Cambridge (MA)Spouse Harriet Eckersall (m. 1804)Children3Academic careerFieldDemographymacroeconomicsSchool ortraditionClassical economicsIn...
Indian musician Aadesh ShrivastavaShrivastav with Vijeyta Pandit at the special screening of Bol Bachchan 21Born(1964-09-04)4 September 1964Jabalpur, Madhya Pradesh, IndiaDied5 September 2015(2015-09-05) (aged 51)Mumbai, Maharashtra, IndiaNationalityIndianOccupationsComposersingermusic arrangermusic producerYears active1990–2015SpouseVijayta Pandit Aadesh Shrivastava (4 September 1964 – 5 September 2015) was a music composer and singer of Indian music. Initially, he had worked a...
FK Ruch L'vivCalcio Segni distintivi Uniformi di gara Casa Trasferta Colori sociali Giallo, nero Dati societari Città Leopoli Nazione Ucraina Confederazione UEFA Federazione UAF Campionato Premjer-liha Fondazione 2003 Presidente Hrihorij Kozlovs'kyj Allenatore Vitalij Pomomar'ov Stadio Arena L'viv(34 915 posti) Sito web fcrukh.com Palmarès Si invita a seguire il modello di voce Il Futbol'nyj Klub Ruch L'viv (in ucraino Футбольний клуб Рух Львів?, trasl...
Keadaan transisi (Inggris: transition state) sebuah reaksi kimia merujuk pada konfigurasi tertentu pada koordinat reaksi. Ia didefinisikan sebagai sebuah keadaan yang memiliki energi tertinggi di sepanjang koordinat reaksi. Pada titik ini, dengan berasumsi bahwa reaksi yang sedang berjalan adalah reaksi takreversibel, penabrakan molekul reaktan akan selalu menghasilkan produk.[1] Keadaan transisi yang diperlihatkan di bawah ini terjadi selama reaksi SN2 dari bromoetana dengan anio...
Robert Gucher Gucher con la maglia del Frosinone nel 2014 Nazionalità Austria Altezza 183 cm Peso 77 kg Calcio Ruolo Centrocampista Squadra Lucchese Carriera Giovanili 1998-???? TuS Paldau????-2005 LAZ Weiz2005-2007 Grazer AK Squadre di club1 2007-2008 Grazer AK II15 (3)2007-2008 Grazer AK6 (1)2008-2010 Frosinone11 (0)2010→ Genoa0 (0)2010-2011 Frosinone7 (0)2011-2012→ Kapfenberger21 (1)2012-2017 Frosinone106 (7)[1]2017 V...
Prime Minister Margaret Thatcher pictured in 1987 The 1987 Dissolution Honours List was gazetted on 30 July 1987 following the advice of the Prime Minister, Margaret Thatcher.[1] The recipients are shown below as they were styled before their new honour. Life Peers Conservative Rt Hon. Sir Humphrey Edward Gregory Atkins KCMG, Member of Parliament for Merton and Morden 1955–70; Spelthorne 1970–87. Lord Privy Seal and Deputy Foreign Secretary 1981–82. Secretary of State, Northern...
Allegation of genocide committed against Israelis Allegations of genocide in the 2023 Hamas-led attack on IsraelPart of the Israel–Hamas warBlood stains in the kitchen of a house following the Be'eri massacreLocationGaza envelope, Southern District, IsraelDate7–8 October 2023TargetIsraelisAttack typeMass shooting, immolation, genocidal rape (alleged)Deaths1,163 killed[1]Accused Hamas Palestinian Islamic Jihad PRC PFLP DFLP al-Aqsa Martyrs' Brigades Pa...
Contractual agreement not to disclose specified information Many banking institutions maintain client privacy through confidentiality agreements. Some, akin to attorney–client privilege, offer banker–client privilege. A non-disclosure agreement (NDA), also known as a confidentiality agreement (CA), confidential disclosure agreement (CDA), proprietary information agreement (PIA), or secrecy agreement (SA), is a legal contract or part of a contract between at least two parties that outlines...
Lockheed Martin Atlas III adalah kendaraan peluncuran orbital Amerika, digunakan antara 2000 dan 2005.[1] Ini adalah anggota pertama dari keluarga Atlas sejak Atlas A untuk fitur metode pementasan normal, dibandingkan dengan anggota keluarga Atlas sebelumnya, yang dilengkapi dengan mesin jettisonable pada tahap pertama (penopang). Referensi ^ Atlas IIIA. Encyclopedia Astronautica. Artikel bertopik astronomi ini adalah sebuah rintisan. Anda dapat membantu Wikipedia dengan mengem...
Taxation in the United States Federal taxation Alternative Minimum Tax Capital gains tax Corporate tax Estate tax Excise tax Payroll tax Revenue Gift tax Income tax Internal Revenue Service IRS Code IRS Forms History Constitutional Authority Taxpayer standing Court vte A Qualified Intermediary refers to a person that acts as an intermediary qualified under certain sections of the U.S. Internal Revenue Code (IRC) to undertake specified activities. IRC §1031 Qualified Intermediary A §1031 Qua...
Parque nacional terrestre de Saba Saba National Land Park Categoría UICN II (parque nacional) SituaciónPaís Países BajosDivisión SabaCoordenadas 17°38′20″N 63°14′00″O / 17.63888889, -63.23333333Datos generalesFecha de creación 1999Superficie 0,43 km² Parque nacional terrestre de Saba Ubicación en Antillas Menores.[editar datos en Wikidata] El Parque nacional terrestre de Saba[1] es el nombre que recibe un área prot...
This article uses bare URLs, which are uninformative and vulnerable to link rot. Please consider converting them to full citations to ensure the article remains verifiable and maintains a consistent citation style. Several templates and tools are available to assist in formatting, such as reFill (documentation) and Citation bot (documentation). (August 2022) (Learn how and when to remove this message) Sord Computer CorporationIndustryPeripheralsFounded1970; 54 years ago (197...