Algorithm portfolio 2026-11-05
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]
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 is
Discarding 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]
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 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]
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.