An algorithm portfolio combines several candidate algorithms or algorithm runs to exploit differences in their performance. It includes a policy for choosing or allocating work, rather than merely naming a collection. A parallel algorithm portfolio runs candidates concurrently; a sequential algorithm portfolio allocates time on one processor. The original 2001 study compared these approaches and restart strategies on specified distributions of search problems.[ref]
Algorithm portfolios by Carla P. Gomes and Bart Selman. Abstract and sections 4–5, portfolio policies and empirical comparisons
Consider invented runtimes seconds and seconds on two equally likely instance types. Either algorithm alone has mean seconds. Perfect per-instance algorithm selection would take one second before selection overhead. Running both on independent full-speed processors and stopping at the first answer also takes one second under this model, but uses two processors.
For a different policy, run for at most five seconds, then start if needed. The two completion times become and seconds, giving mean seconds. This invented sequential algorithm portfolio saves time relative to either fixed choice, without matching the two-processor wall time.
Complementary runtimes make these examples work. If all candidates are slow on the same instances, diversity in names supplies no such benefit. Compare wall time, total computing work and overhead separately, and test the allocation policy on new instances. The best completed run chosen retrospectively is a comparison bound, not automatically an implementable selector.
An algorithm portfolio schedule specifies how computational resources are assigned to members of an algorithm portfolio over time. For a sequential algorithm portfolio, it states which algorithm receives each time interval, whether interrupted work is resumed or discarded, and when computation stops. A parallel algorithm portfolio also needs a processor allocation and a rule for accepting and combining results. Listing candidate algorithms alone does not specify a schedule.
An original interleaving example makes the distinction between processor time and elapsed time explicit. Suppose algorithms A and B need respectively and seconds of processor time on a particular input. Give A one second, then B one second, repeating while preserving both states and stopping at the first accepted result. A receives its third second during elapsed interval , so the portfolio finishes at seconds. At that point A has used processor-seconds and B has used . With two dedicated processors, the corresponding parallel algorithm portfolio would finish at seconds. These calculations assume no algorithm portfolio switching overhead and no resource contention.
More generally, let be processor time supplied to candidate by elapsed time , and let be its required processor time. In the resumable, interference-free model, the completion time isDiscarding a state on every interruption changes this model: separate short runs do not necessarily accumulate into one longer run. The original portfolio study compared parallel, interleaved and restart execution precisely because these are different policies.[ref]
Algorithm portfolios by Carla P. Gomes and Bart Selman. Sections 4–5: allocation policies and empirical runtime profiles.
Choose an objective before comparing algorithm portfolio schedules: expected value of running time, probability of finishing by a deadline, and total computing work need not favor the same allocation. A schedule chosen using retrospective runtimes also requires evaluation on inputs that did not determine the schedule.
A sequential algorithm portfolio allocates one processor's time among candidate algorithms or runs. Its algorithm portfolio schedule determines which candidate runs, when to switch and whether an interrupted run is resumed or abandoned. The original portfolio study compared single-processor interleaving and restart policies with parallel execution.[ref]
Algorithm portfolios by Carla P. Gomes and Bart Selman. Sections 4–5, interleaved and restart portfolios
Consider original runtimes seconds and seconds on two equally likely input types. Either fixed choice has mean or seconds. Run for at most four seconds, then start if has not finished. The two completion times are and seconds, so the scheduled mean is seconds. The schedule succeeds because the candidates have complementary performance.
Algorithm portfolio switching overhead can erase that gain. If the switch costs seconds whenever it occurs, the second completion time becomes seconds and the mean becomes seconds, worse than always running . The cost must be charged to the actual switching events, rather than added equally to every instance.
A timeout also does not say that the interrupted candidate would never solve the input. Resuming preserves previous search work only if the implementation supports it; restarting begins a different run. Record budgets, state retention, random seeds and the final stopping rule when reporting a sequential portfolio's performance. A good schedule on measured inputs still needs evaluation on unused inputs.
Algorithm portfolio switching overhead is elapsed time or computing work spent changing the active member of an algorithm portfolio, beyond the useful work counted for the candidate algorithms. It can include a context switch, saving or restoring search state, rebuilding data structures and warming a processor's working data. The measured cost depends on the implementation and on what its runtime accounting already includes.
For an explicit model, give one candidate seconds of useful work, then spend seconds switching. Repeating equal intervals indefinitely gives useful-time fractionFor and , this is . Reducing the useful interval to with the same switch cost drops the fraction to . Small time slices improve responsiveness but can consume more of the budget in switching.
Terminal bookkeeping matters. In the illustrative algorithm portfolio schedule where A and B alternate one-second useful intervals, A completes after its third interval and B has received two. Four switches occur before completion. With per switch, elapsed time is ; there is no fifth switch after the stopping rule has fired. Comparing this with the zero-overhead trace isolates the stipulated switching cost.
The original portfolio experiments distinguish interleaving from parallel and restart execution.[ref]
Algorithm portfolios by Carla P. Gomes and Bart Selman. Sections 4–5, interleaved portfolios and restart comparisons.
Applying such policies requires distinguishing switching cost from algorithmic work that is abandoned. If a run is discarded and restarted, lost progress changes the completion process itself; treating it as a fixed additive switch cost can misrepresent the sequential algorithm portfolio. Report whether timings include initialization, state transfer and result checking, and measure the actual switching events.A parallel algorithm portfolio runs multiple candidate algorithms or randomized runs concurrently and combines their outcomes under a stopping policy. For a first-solution problem, an ideal policy stops all candidates when one returns an acceptable solution. The original portfolio study investigated how differing runtime distributions can make such combinations effective.[ref]
Algorithm portfolios by Carla P. Gomes and Bart Selman. Sections 4–5, parallel portfolios and runtime profiles
If candidates have dedicated processors, negligible coordination overhead and completion times , the first completion is . For independent completion times,The equation follows because every candidate must still be running for the minimum to exceed . Independence is an assumption about the runs, not a consequence of using different processor cores.
For an original two-point model, one randomized run finishes in one second with probability , otherwise in seconds. Its mean is seconds. Two independent runs are both slow with probability , so first-completion time has mean seconds. If their runtimes are perfectly correlated, the mean remains seconds. Repeating identical hard behavior offers no independent escape route.
Wall time and computing work differ: running two full-speed processors until the first completion uses twice that wall time in processor-seconds in this model. Shared memory, bandwidth contention and communication can further change actual timings. Report those resources and the answer-acceptance rule before interpreting a parallel speedup.
Articles by others on the same topic
There are currently no matching articles.