Skip Navigation

The Computer Journal 1983 26(2):154-163; doi:10.1093/comjnl/26.2.154
© 1983 by British Computer Society
This Article
Right arrow Full Text (PDF)
Right arrow Alert me when this article is cited
Right arrow Alert me if a correction is posted
Services
Right arrow Email this article to a friend
Right arrow Similar articles in this journal
Right arrow Similar articles in ISI Web of Science
Right arrow Alert me to new issues of the journal
Right arrow Add to My Personal Archive
Right arrow Download to citation manager
Right arrowRequest Permissions
Google Scholar
Right arrow Articles by Lesuisse, R.
Right arrow Search for Related Content
Social Bookmarking
 Add to CiteULike   Add to Connotea   Add to Del.icio.us  
What's this?

Some Lessons Drawn from the History of the Binary Search Algorithm

R. Lesuisse *

Institut d'Informatique, Rue Grandgagnage, Namur, Belgium

The paper's aim is to study the behaviour of 26 programmers who designed a binary search algorithm; for each of them, we try to point out the correct or erroneous reasoning, that yielded the algorithm. To do this, we first analyse 4 typical correct algorithms in an informal and intuitive way, discussing the probable reasons why the programmers developed the algorithms as they did; these are, namely: (1) a uniform binary search algorithm on a monotonically increasing sequence of T terms, T=2n–1, n≥1; (2) a uniform binary search algorithm on a monotonically increasing sequence of T terms; (3) a binary search algorithm with ‘two-way tests’ on a monotonically increasing sequence of T terms, T≥1; (4) a general binary search algorithm on a monotonically increasing sequence of T terms. Then, the important errors found in the 26 published algorithms are pointed out, with an attempt at discussing why these errors were made. Three lessons can be drawn from the history of the binary search algorithm, which we believe are applicable to many other algorithms, namely (1) there is a continuous progression by programmers towards a highest possible degree of generality; (2) programs built with optimization concerns in mind have no better mean execution time than the most general ones; (3) the distribution of errors among families of algorithms is not uniform.


Received July 1982.

* Institut d'Informatique, Rue Grandgagnage 21, B-5000 Namur, Belgium


Add to CiteULike CiteULike   Add to Connotea Connotea   Add to Del.icio.us Del.icio.us    What's this?




Disclaimer:
Please note that abstracts for content published before 1996 were created through digital scanning and may therefore not exactly replicate the text of the original print issues. All efforts have been made to ensure accuracy, but the Publisher will not be held responsible for any remaining inaccuracies. If you require any further clarification, please contact our Customer Services Department.