Processing math: 100%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

16.6: Binary Searches

( \newcommand{\kernel}{\mathrm{null}\,}\)

Definition: Binary Search Tree

a tree in which every node has degree 1 or 3, except for a single node of degree 2

Definition: Initial Node

the unique node of degree 2 in a binary search tree

Definition: Terminal Node

a node of degree 1 in a binary search tree

Definition: Binary Search

the construction of a binary search tree through a series of “either-or” decisions

Example 16.6.1

Estimate the root of f(x)=4x3+6x2+3x1 that lies in (0,1) to 2 decimal places.

Solution

The Intermediate Value Theorem from first-year calculus says that if f is continuous on the closed interval [a,b] and f(a),f(b) are nonzero and opposite signs, then f has a root in the open interval (a,b). We have f(0)=1<0 and f(1)=12>0, so there is indeed a root in (0,1). The graph in Figure 16.6.1 was obtained by performing a binary search by splitting into subintervals.

clipboard_e7a11e8c1e40ea08fd1b78e3da4b2c9ab.png
Figure 16.6.1: A binary search tree search for the root of a polynomial.

Since f(0.225)>0, the root must be in the subinterval (0.22,0.225). This tells us to round down to 0.22 instead of rounding up to 0.23, so we conclude that the root is approximately 0.22.


This page titled 16.6: Binary Searches is shared under a GNU Free Documentation License 1.3 license and was authored, remixed, and/or curated by Jeremy Sylvestre via source content that was edited to the style and standards of the LibreTexts platform.

  • Was this article helpful?

Support Center

How can we help?