Definition

binary search (dichotomizing search)

Part of the Computing fundamentals glossary:

A binary search, also called a dichotomizing search, is a digital scheme for locating a specific object in a large set. Each object in the set is given a key. The number of keys is always a power of 2. If there are 32 items in a list, for example, they might be numbered 0 through 31 (binary 00000 through 11111). If there are, say, only 29 items, they can be numbered 0 through 28 (binary 00000 through 11100), with the numbers 29 through31 (binary 11101, 11110, and 11111) as dummy keys.

To conduct the search, the keys are listed in tabular form. The position of the desired object is compared with the halfway point in the list (which lies between the two keys in the center of the list). If the key of the desired object is smaller than the halfway point value, then the first half of the list is accepted and the second half is rejected. If the key of the desired object is larger than the halfway point value, then the second half of the list is accepted and the first half is rejected. The process is repeated, each time selecting half of the list and rejecting the other half, until only one object remains. This is the desired object.

The following list shows an example of a binary search to choose the fifth object in a set of 13 objects. Keys are denoted X; the desired key is denoted by +. Dummy keys are denoted O.

XXXX+XXXXXXXXOOO (initial list)
XXXX+XXX (first half accepted)
+XXX (second half accepted)
+X (first half accepted)
+ (first half accepted)

This was last updated in March 2011
Posted by: Margaret Rouse

Related Terms

Definitions

  • disruptive technology

    - A disruptive technology is one that displaces an established technology and shakes up the industry. Harvard Business School professor Clayton M. Christensen coined the term.  In his 1997 best-sell... (WhatIs.com)

  • application program interface (API)

    - An application program interface (API) is code that allows two software programs to communicate with each other. Typically, APIs are released for third-party development as part of a software devel... (SearchExchange.com)

  • Microsoft Windows Control Panel

    - The Microsoft Windows Control Panel is a management tool for the Windows operating system (OS) that allows end users to change settings and manage tasks within the OS.  (SearchWindowsServer.com)

Glossaries

  • Computing fundamentals

    - Terms related to computer fundamentals, including computer hardware definitions and words and phrases about software, operating systems, peripherals and troubleshooting.

  • Internet applications

    - This WhatIs.com glossary contains terms related to Internet applications, including definitions about Software as a Service (SaaS) delivery models and words and phrases about web sites, e-commerce ...

Ask a Question About binary search (dichotomizing search)Powered by ITKnowledgeExchange.com

Get answers from your peers on your most technical challenges

Tech TalkComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.