16.6: Binary Searches
( \newcommand{\kernel}{\mathrm{null}\,}\)
a tree in which every node has degree 1 or 3, except for a single node of degree 2
the unique node of degree 2 in a binary search tree
a node of degree 1 in a binary search tree
the construction of a binary search tree through a series of “either-or” decisions
Estimate the root of f(x)=4x3+6x2+3x−1 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.

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.