The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998 The.Algorithm.Design.Manual.Springer-Verlag.1998

18.04.2013 Views

CD-ROM Installation ● Have an installed sound device configured for use on your system. If you have ever heard sound coming from your machine, this likely has already been done. If not, you will have to acquire and install a sound device, such as Sound Blaster for PCs or the Macintosh standard sound system. Consult your sound device manual and the documentation for your operating system. ● Configure your browser to recognize sound files in an HTML document. In particular, the Netscape Navigator will have to launch an application to play the sound files. If Netscape attempts to save the audio file when you click on a sound link, this means that your sound application has not be properly installed. About the Postscript Lecture Notes All the Lecture Notes are provided in Postscript format as well. To view Postscript files on Unix, use ghostview. Macintosh users: use the program DropPS 1.1.4, by Barebones Software. Windows-95 and NT users: use the program RoPS 32 file:///E|/WEBSITE/INFO/BROWSERS.HTM (3 of 3) [19/1/2003 1:34:07]

Binary Search in Action Binary Search in Action Binary search is a fast algorithm for searching in a sorted array of keys. To look up a name in a telephone book with n names, you start by comparing the name that you want with the middle or (n/2) nd name, say onroe, Marilyn . Regardless of whether what you are looking someone before this middle name ( Dean, James ) or after it ( Presley, Elvis ), after this first comparison you can forever disregard one half of all the names in the book. The number of steps the algorithm takes equals the number of times we can halve n until only one name is left. Thus twenty comparisons suffice to find any name in the million-name Manhattan phone book! The power of binary search and logarithms is one of the most fundamental idea in the analysis of algorithms. This power becomes apparent if we imagine living in a world with only unsorted telephone books. The following animation of the first two stages of binary search is provided for your amusement. The full video tapes are also available. file:///E|/WEBSITE/IMAGES/BINARY/INDEX.HTM (1 of 5) [19/1/2003 1:34:09]

Binary Search in Action<br />

Binary Search in Action<br />

Binary search is a fast algorithm for searching in a sorted array of keys. To look up a name in a telephone<br />

book with n names, you start by comparing the name that you want with the middle or (n/2) nd name, say<br />

onroe, Marilyn . Regardless of whether what you are looking someone before this middle name ( Dean,<br />

James ) or after it ( Presley, Elvis ), after this first comparison you can forever disregard one half of all<br />

the names in the book. <strong>The</strong> number of steps the algorithm takes equals the number of times we can halve<br />

n until only one name is left. Thus twenty comparisons suffice to find any name in the million-name<br />

Manhattan phone book! <strong>The</strong> power of binary search and logarithms is one of the most fundamental idea<br />

in the analysis of algorithms. This power becomes apparent if we imagine living in a world with only<br />

unsorted telephone books.<br />

<strong>The</strong> following animation of the first two stages of binary search is provided for your amusement. <strong>The</strong> full<br />

video tapes are also available.<br />

file:///E|/WEBSITE/IMAGES/BINARY/INDEX.HTM (1 of 5) [19/1/2003 1:34:09]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!