Binary Search Root Error: Estimating Accuracy

This means that as long as the rounding error and truncation error are both within the specified bounds, the estimated error of the output will also be within the specified accuracy.
  • #1
c299792458
71
0
I have written a computer program that uses binary search to find the root to f(x) = 0, where f is an arbitrary (user-defined) function.

If the rounding error [itex]\leq \epsilon[/itex] and the truncation error [itex]\leq \delta[/itex], what is the estimated accuracy of the output?

Would the following reasoning be correct?
Let [itex]r[/itex] be s.t. [itex]f(r) = 0[/itex]. Then [itex]f(x) = f(r) + (x-r)f'(r) + O((x-r)^2)[/itex]. So the estimated error is [itex]|x-r| \approx |\frac{f(x)}{f'(r)}| = \frac{\epsilon+\delta}{|f'(r)|}[/itex]?

Thanks.

Edited: I meant expanded till the divisor is NOT 0.
 
Last edited by a moderator:
Technology news on Phys.org
  • #2
Yes, that reasoning is correct. In fact, since the binary search method only requires two evaluations of the function f(x) (one at the lower bound and one at the upper bound), the accuracy of the output can be estimated as $\frac{\epsilon+\delta}{|f'(r)|}$, where $r$ is the root found using the binary search method.
 

What is a binary search root error?

A binary search root error is an error that occurs when estimating the accuracy of a binary search algorithm. It refers to the difference between the estimated root and the actual root of a given function.

How is the accuracy of a binary search algorithm estimated?

The accuracy of a binary search algorithm is typically estimated using a tolerance value, which is the maximum acceptable difference between the estimated root and the actual root. The algorithm continues to iterate until the estimated root is within this tolerance value of the actual root.

What factors can affect the accuracy of a binary search algorithm?

There are several factors that can impact the accuracy of a binary search algorithm, including the initial guess for the root, the choice of the function being searched, and the number of iterations performed. Additionally, rounding errors and machine precision can also contribute to the overall accuracy.

How can the accuracy of a binary search algorithm be improved?

One way to improve the accuracy of a binary search algorithm is to reduce the tolerance value, which will result in more iterations being performed until a more precise estimate of the root is found. Another approach is to use more sophisticated techniques, such as Newton's method, which can provide a more accurate estimate of the root.

What are some common applications of binary search algorithms?

Binary search algorithms are commonly used in computer science and mathematics for tasks such as finding the square root of a number, solving equations, and optimizing functions. They are also frequently used in data structures, such as binary search trees, to efficiently search and retrieve data.

Similar threads

  • Differential Equations
Replies
1
Views
665
  • Calculus
Replies
13
Views
1K
  • Differential Equations
Replies
1
Views
770
  • Programming and Computer Science
Replies
5
Views
913
Replies
3
Views
1K
Replies
1
Views
629
Replies
7
Views
1K
  • Topology and Analysis
Replies
11
Views
945
Replies
24
Views
2K
Back
Top