Dichotomic search

A graphical representation of the dichotomic search table for Morse code. An upward step represents a Dit (.), and a downward step represents a Dah (-). Where one lands indicates the letter for the code.  T –  | M – –  | O – – –  | CH – – – –

|
|
|

Ö – – – ·
G – – ·  | Q – – · –
Z – – · ·
N – ·  | K – · –  | Y – · – –
C – · – ·
D – · ·  | X – · · –
B – · · ·
E ·  | A · –  | W · – –  | J · – – –
P · – – ·
R · – ·  | Ä · – · –
L · – · ·
I · ·  | U · · –  | Ü · · – –
F · · – ·
S · · ·  | V · · · –
H · · · ·

In computer science, a dichotomic search is a search algorithm that operates by selecting between two distinct alternatives (dichotomies) at each step. It is a specific type of divide and conquer algorithm. A well-known example is binary search.[1]

Abstractly, a dichotomic search can be viewed as following edges of an implicit binary tree structure until it reaches a leaf (a goal or final state). This creates a theoretical tradeoff between the number of possible states and the running time: given k comparisons, the algorithm can only reach O(2k) possible states and/or possible goals.

Some dichotomic searches only have results at the leaves of the tree, such as the Huffman tree used in Huffman coding, or the implicit classification tree used in Twenty Questions. Other dichotomic searches also have results in at least some internal nodes of the tree, such as a dichotomic search table for Morse code. There is thus some looseness in the definition. Though there may indeed be only two paths from any node, there are thus three possibilities at each step: choose one onwards path or the other, or' stop at this node.

Dichotomic searches are often used in repair manuals, sometimes graphically illustrated with a flowchart similar to a fault tree.

## See also

* Binary search algorithm

## External links

* Python Program for Binary Search (Recursive and Iterative)
* Binary Search

## References

1. ↑ "Binary Search Implementation in Python: A Tutorial | Built In" (in en). https://builtin.com/data-science/binary-search-implementation-python.

* xlinux.nist.gov, Dictionary of Algorithms and Data Structures: Dichotomic search
* National Institute of Standards and Technology, Dictionary of Algorithms and Data Structures: Dichotomic search

This computer science article is a stub. You can help Wikipedia by expanding it.

|

* v
* t
* e

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Dichotomic search. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Dichotomic_search&oldid=226542"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template