August 2004
Intermediate to advanced
656 pages
15h 28m
English
Selecting the best alternative uses the same algorithm as a software routine that finds the maximum value in a collection of numbers—successive comparisons against the current best are done on a pair-wise basis. The algorithm is described in terms of a “current best” and a “candidate,” where the current best refers to the alternative that's been found to be the best so far, and the candidate refers to the alternative that's being compared with the current best. The selection algorithm is as follows:
Assume the first alternative is the current best for j = 2 to the number of alternatives Consider the jth alternative to be the candidate Compare the candidate to the current best if the candidate is better than ...
Read now
Unlock full access