{"id":3137,"date":"2026-03-30T12:31:19","date_gmt":"2026-03-30T12:31:19","guid":{"rendered":"https:\/\/www.mathros.net.ua\/en\/?p=3137"},"modified":"2026-05-16T06:33:42","modified_gmt":"2026-05-16T06:33:42","slug":"exhaustive-search-method","status":"publish","type":"post","link":"https:\/\/www.mathros.net.ua\/en\/exhaustive-search-method.html","title":{"rendered":"Exhaustive Search Method: Theoretical Foundations and Practical Applications"},"content":{"rendered":"<p>The exhaustive search method is one of the simplest approaches used in numerical methods for minimizing a function of one variable. For that reason, it is often a convenient starting point when studying direct minimization methods. What is the basic idea behind it? In essence, the search interval is examined step by step by evaluating the function at equally spaced points, after which the subinterval containing the minimum point is identified.<\/p>\n<p>This approach is also clear and easy to follow in practice. It does not require the derivative of the function to be computed, which is especially important in many applied problems. In what follows, we will examine what kind of problem this method solves, under what conditions it is appropriate to use, and how the procedure for obtaining an approximate minimum is carried out.<\/p>\n<h2>Exhaustive Search Method: Problem Statement and the Meaning of Minimization<\/h2>\n<p>Suppose we need to find the smallest value of a function of one variable on a given interval. In other words, we consider a function \\( f(x) \\) on the interval \\( [a_0,b_0] \\) and seek a point \\( x^* \\) at which the function attains its minimum value. This is written as<\/p>\n<p>\\[<br \/>\nf(x^*)=\\min_{x\\in[a_0,b_0]} f(x).<br \/>\n\\]<\/p>\n<p>What does this notation mean? It means that among all points in the interval \\( [a_0,b_0] \\), there exists a point \\( x^* \\) at which the function takes its smallest value.<\/p>\n<p>In numerical optimization problems, it is very common to assume that the function is unimodal on the interval under consideration. This assumption is important because it ensures that the search for the minimum produces a reliable result. Recall that a function is called unimodal on the interval \\( [a_0,b_0] \\) if it has exactly one minimum point \\( x^* \\) on that interval, is strictly decreasing to the left of that point, and strictly increasing to the right.<\/p>\n<p>If the function behaves in this way, then we can confidently narrow the search region. Why does this matter so much? Because numerical methods do not always determine the exact value of \\( x^* \\) immediately. More often, they produce an approximate solution that becomes more accurate at each step.<\/p>\n<p>In this topic, we are concerned with direct minimization methods. These are methods that use only the values of the function at selected points and do not require the derivative to be calculated. This approach is especially useful when:<\/p>\n<ul>\n<li>The derivative of the function is unknown.<\/li>\n<li>The function is given in tabular form.<\/li>\n<li>The analytical expression is too complicated.<\/li>\n<li>Calculating the derivative is inconvenient or unnecessary.<\/li>\n<\/ul>\n<p>The exhaustive search method belongs to this class of methods. It is simple in construction, easy to explain, and well suited to an introductory study of numerical minimization.<\/p>\n<h2>Direct Minimization Methods: Why the Exhaustive Search Method Is So Simple<\/h2>\n<p>Let us now turn to the core idea of the method itself. It is indeed very simple. The initial interval of uncertainty \\( [a_0,b_0] \\), on which the minimum is sought, is divided into several equal parts. The values of the function are then computed at the division points and compared with one another.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"size-full wp-image-3143 aligncenter\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/03\/exhaustive-search-method1.jpg\" alt=\"Illustration of the exhaustive search method\" width=\"600\" height=\"350\" srcset=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/03\/exhaustive-search-method1.jpg 600w, https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/03\/exhaustive-search-method1-300x175.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Let the interval \\( [a_0,b_0] \\) be divided into \\( n \\) equal parts. Then the step size is given by<\/p>\n<p>\\[<br \/>\nh=\\frac{b_0-a_0}{n}.<br \/>\n\\]<\/p>\n<p>Next, we construct the sequence of points<\/p>\n<p>\\[<br \/>\nx_i=a_0+i\\cdot h, \\qquad i=0,1,2,\\dots,n.<br \/>\n\\]<\/p>\n<p>What happens after that? At each of these points, we evaluate the function:<\/p>\n<p>\\[<br \/>\nf(x_0), f(x_1), f(x_2), \\dots, f(x_n).<br \/>\n\\]<\/p>\n<p>We then identify the smallest value among all those obtained. Suppose this minimum is attained at the point \\( x_k \\). Then we have<\/p>\n<p>\\[<br \/>\nf(x_k)=\\min_{0\\leq i\\leq n} f(x_i).<br \/>\n\\]<\/p>\n<p>This result provides important information for the next stage of the search. If the function is unimodal, then the true minimum point \\( x^* \\) must lie near \\( x_k \\). Therefore, within this approach, we conclude that the desired minimum point belongs to the interval<\/p>\n<p>\\[<br \/>\nx^* \\in [x_{k-1},x_{k+1}].<br \/>\n\\]<\/p>\n<p>In other words, after one pass, we no longer search for the minimum over the entire original interval. Instead, we move to a much narrower interval that contains the minimum point.<\/p>\n<p>At this point, a natural question arises: why is this method called exhaustive? Because all test points are placed at the same step size. Thus, the interval is examined in a consistent and uniform way, without any complicated rules for selecting new points.<\/p>\n<p>At the same time, one important feature should be kept in mind. If the step is chosen too small, the number of calculations becomes large. If the step is too large, the accuracy of the search becomes insufficient. Therefore, the efficiency of the method is directly related to the choice of the number of divisions \\( n \\).<\/p>\n<h2>Narrowing the Interval: How an Approximate Solution Is Formed<\/h2>\n<p>Let us now consider how the approximate solution is obtained. After comparing the values of the function at the points \\( x_0,x_1,\\dots,x_n \\), we identify the point \\( x_k \\) at which the function takes the smallest value among all tested points. This point can then be taken as the first approximation to the desired minimum point:<\/p>\n<p>\\[<br \/>\nx^* \\approx x_k.<br \/>\n\\]<\/p>\n<p>In practice, however, the process usually does not stop there. Instead, we take a new interval of uncertainty,<\/p>\n<p>\\[<br \/>\n[a_1,b_1]=[x_{k-1},x_{k+1}],<br \/>\n\\]<\/p>\n<p>and repeat the same procedure on this narrower interval.<\/p>\n<p>Thus, the method proceeds step by step:<\/p>\n<p>\\[<br \/>\n[a_0,b_0]\\rightarrow [a_1,b_1]\\rightarrow [a_2,b_2]\\rightarrow \\dots \\rightarrow [a_m,b_m].<br \/>\n\\]<\/p>\n<p>At each new step, the interval becomes shorter, and the approximation to the minimum point becomes more accurate. Eventually, we obtain an interval whose length satisfies the required accuracy. This is expressed by the condition<\/p>\n<p>\\[<br \/>\nb_m-a_m&lt;\\varepsilon,<br \/>\n\\]<\/p>\n<p>where \\( \\varepsilon \\) is a prescribed tolerance chosen in advance.<\/p>\n<p>What does this mean in practice? It means that the minimum point has already been localized with sufficient accuracy. Therefore, the approximate solution may be taken either as the point at which the smallest function value was found or as the midpoint of the final interval. For example, one often uses one of the following expressions:<\/p>\n<p>\\[<br \/>\nx^* \\approx x_k<br \/>\n\\]<\/p>\n<p>or<\/p>\n<p>\\[<br \/>\nx^* \\approx \\frac{a_m+b_m}{2}.<br \/>\n\\]<\/p>\n<p>Accordingly, the exhaustive search method may be regarded as a step-by-step refinement procedure. First, we determine roughly where the minimum lies. Next, we narrow that region. We then repeat the same process until the required accuracy has been achieved.<\/p>\n<p>Thus, the main logic of the method is as follows: first, the interval is examined uniformly; then the most promising subinterval is selected; after that, the refinement is repeated on the new interval. It is precisely this structure that makes the method easy to understand and especially suitable for educational examples.<\/p>\n<h2>Practical Part: How the Exhaustive Search Method Works on a Specific Problem<\/h2>\n<p>Let us now turn to the practical side. The theoretical scheme is already clear, but how does it work in actual calculations? A simple example shows very clearly how the interval is narrowed step by step and how the approximate minimum of a function is found progressively.<\/p>\n<h3 class=\"example\">Example 1. Find the minimum value of the function \\( f(x)=(x-2)^2+1 \\) on the interval \\( [1,4] \\) with accuracy \\( \\varepsilon=0.1 \\) using the exhaustive search method<\/h3>\n<p>Consider the function \\( f(x)=(x-2)^2+1 \\) on the interval \\( [1,4] \\). On this interval, it is unimodal, since it has only one minimum point at \\( x=2 \\). Therefore, the exhaustive search method can be applied correctly in this case.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-3146 aligncenter\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/03\/exhaustive-search-method2.jpg\" alt=\"Graph of the function f(x)=(x-2)^2+1 on the interval [1,4]\" width=\"601\" height=\"350\" srcset=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/03\/exhaustive-search-method2.jpg 601w, https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/03\/exhaustive-search-method2-300x175.jpg 300w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/p>\n<p>We begin with the interval<\/p>\n<p>\\[<br \/>\n[a_0,b_0]=[1,4].<br \/>\n\\]<\/p>\n<p>For simplicity, at each step we divide the current interval into four equal parts. For the first step, this gives<\/p>\n<p>\\[<br \/>\nh_0=\\frac{b_0-a_0}{4}=\\frac{4-1}{4}=0.75.<br \/>\n\\]<\/p>\n<p>We then construct the division points:<\/p>\n<p>\\[<br \/>\n\\begin{gathered}<br \/>\nx_0=1,\\qquad x_1=1.75,\\qquad x_2=2.5,\\qquad x_3=3.25,\\qquad x_4=4.<br \/>\n\\end{gathered}<br \/>\n\\]<\/p>\n<p>Now we evaluate the function at these points:<\/p>\n<p>\\[<br \/>\n\\begin{gathered}<br \/>\nf(x_0)=(1-2)^2+1=2,<br \/>\n\\\\[6pt]<br \/>\nf(x_1)=(1.75-2)^2+1=1.063,<br \/>\n\\\\[6pt]<br \/>\nf(x_2)=(2.5-2)^2+1=1.25,<br \/>\n\\\\[6pt]<br \/>\nf(x_3)=(3.25-2)^2+1=2.563,<br \/>\n\\\\[6pt]<br \/>\nf(x_4)=(4-2)^2+1=5.<br \/>\n\\end{gathered}<br \/>\n\\]<\/p>\n<p>The smallest value is obtained at the point \\( x_1=1.75 \\). Therefore, we take the new interval of uncertainty to be<\/p>\n<p>\\[<br \/>\n[a_1,b_1]=[x_0,x_2]=[1,2.5].<br \/>\n\\]<\/p>\n<p>We now repeat the same procedure on the new interval. Its length is \\( 2.5-1=1.5 \\), so the step size becomes<\/p>\n<p>\\[<br \/>\nh_1=\\frac{b_1-a_1}{4}=\\frac{2.5-1}{4}=0.375.<br \/>\n\\]<\/p>\n<p>We construct the points:<\/p>\n<p>\\[<br \/>\n\\begin{gathered}<br \/>\nx_0=1,\\qquad x_1=1.375,\\qquad x_2=1.75,\\qquad x_3=2.125,\\qquad x_4=2.5.<br \/>\n\\end{gathered}<br \/>\n\\]<\/p>\n<p>Evaluating the function, we obtain<\/p>\n<p>\\[<br \/>\n\\begin{gathered}<br \/>\nf(x_0)=(1-2)^2+1=2,<br \/>\n\\\\[6pt]<br \/>\nf(x_1)=(1.375-2)^2+1=1.391,<br \/>\n\\\\[6pt]<br \/>\nf(x_2)=(1.75-2)^2+1=1.063,<br \/>\n\\\\[6pt]<br \/>\nf(x_3)=(2.125-2)^2+1=1.016,<br \/>\n\\\\[6pt]<br \/>\nf(x_4)=(2.5-2)^2+1=1.25.<br \/>\n\\end{gathered}<br \/>\n\\]<\/p>\n<p>Now the smallest value is attained at the point \\( x_3=2.125 \\). Hence, we narrow the interval to<\/p>\n<p>\\[<br \/>\n[a_2,b_2]=[x_2,x_4]=[1.75,2.5].<br \/>\n\\]<\/p>\n<p>Next,<\/p>\n<p>\\[<br \/>\nh_2=\\frac{b_2-a_2}{4}=\\frac{2.5-1.75}{4}=0.188.<br \/>\n\\]<\/p>\n<p>Thus, the division points are<\/p>\n<p>\\[<br \/>\n\\begin{gathered}<br \/>\nx_0=1.75,\\qquad x_1=1.938,\\qquad x_2=2.125,\\qquad x_3=2.313,\\qquad x_4=2.5.<br \/>\n\\end{gathered}<br \/>\n\\]<\/p>\n<p>The corresponding function values are<\/p>\n<p>\\[<br \/>\n\\begin{gathered}<br \/>\nf(x_0)=(1.75-2)^2+1=1.063,<br \/>\n\\\\[6pt]<br \/>\nf(x_1)=(1.938-2)^2+1=1.004,<br \/>\n\\\\[6pt]<br \/>\nf(x_2)=(2.125-2)^2+1=1.016,<br \/>\n\\\\[6pt]<br \/>\nf(x_3)=(2.313-2)^2+1=1.098,<br \/>\n\\\\[6pt]<br \/>\nf(x_4)=(2.5-2)^2+1=1.25.<br \/>\n\\end{gathered}<br \/>\n\\]<\/p>\n<p>The smallest of these values is now attained at the point \\( x_1=1.938 \\). Therefore, we take the new interval<\/p>\n<p>\\[<br \/>\n[a_3,b_3]=[x_0,x_2]=[1.75,2.125].<br \/>\n\\]<\/p>\n<p>Its length is \\( 2.125-1.75=0.375 \\), and the step size is<\/p>\n<p>\\[<br \/>\nh_3=\\frac{b_3-a_3}{4}=\\frac{0.375}{4}=0.094.<br \/>\n\\]<\/p>\n<p>We construct the points:<\/p>\n<p>\\[<br \/>\n\\begin{gathered}<br \/>\nx_0=1.75,\\qquad x_1=1.844,\\qquad x_2=1.938,\\qquad x_3=2.031,\\qquad x_4=2.125.<br \/>\n\\end{gathered}<br \/>\n\\]<\/p>\n<p>The function values are<\/p>\n<p>\\[<br \/>\n\\begin{gathered}<br \/>\nf(x_0)=(1.75-2)^2+1=1.063,<br \/>\n\\\\[6pt]<br \/>\nf(x_1)=(1.844-2)^2+1=1.024,<br \/>\n\\\\[6pt]<br \/>\nf(x_2)=(1.938-2)^2+1=1.004,<br \/>\n\\\\[6pt]<br \/>\nf(x_3)=(2.031-2)^2+1=1.001,<br \/>\n\\\\[6pt]<br \/>\nf(x_4)=(2.125-2)^2+1=1.016.<br \/>\n\\end{gathered}<br \/>\n\\]<\/p>\n<p>Again, the smallest value is attained at the point \\( x_3=2.031 \\). Therefore, the new interval becomes<\/p>\n<p>\\[<br \/>\n[a_4,b_4]=[x_2,x_4]=[1.938,2.125].<br \/>\n\\]<\/p>\n<p>Its length is \\( b_4-a_4=2.125-1.938=0.187 \\). Since this value is still not smaller than the prescribed accuracy \\( \\varepsilon=0.1 \\), we perform one more step. We have<\/p>\n<p>\\[<br \/>\nh_4=\\frac{b_4-a_4}{4}=\\frac{0.187}{4}=0.047.<br \/>\n\\]<\/p>\n<p>We construct the points:<\/p>\n<p>\\[<br \/>\n\\begin{gathered}<br \/>\nx_0=1.938,\\qquad x_1=1.985,\\qquad x_2=2.032,\\qquad x_3=2.079,\\qquad x_4=2.125.<br \/>\n\\end{gathered}<br \/>\n\\]<\/p>\n<p>Now we evaluate the function:<\/p>\n<p>\\[<br \/>\n\\begin{gathered}<br \/>\nf(x_0)=(1.938-2)^2+1=1.004,<br \/>\n\\\\[6pt]<br \/>\nf(x_1)=(1.985-2)^2+1=1,<br \/>\n\\\\[6pt]<br \/>\nf(x_2)=(2.032-2)^2+1=1.001,<br \/>\n\\\\[6pt]<br \/>\nf(x_3)=(2.079-2)^2+1=1.006,<br \/>\n\\\\[6pt]<br \/>\nf(x_4)=(2.125-2)^2+1=1.016.<br \/>\n\\end{gathered}<br \/>\n\\]<\/p>\n<p>The smallest value is now obtained at the point \\( x_1=1.985 \\). Therefore, the new interval of uncertainty is<\/p>\n<p>\\[<br \/>\n[a_5,b_5]=[x_0,x_2]=[1.938,2.032].<br \/>\n\\]<\/p>\n<p>We now check the accuracy: \\( b_5-a_5=2.032-1.938=0.094&lt;0.1 \\). Thus, the required accuracy condition is satisfied. As an approximate value of the minimum point, we may take<\/p>\n<p>\\[<br \/>\nx^*\\approx 1.985,<br \/>\n\\]<\/p>\n<p>and the corresponding minimum value of the function is<\/p>\n<p>\\[<br \/>\nf_{\\min}\\approx f(1.985)=1.<br \/>\n\\]<\/p>\n<p>This result agrees with the exact solution, since for the function \\( f(x)=(x-2)^2+1 \\), the minimum is indeed attained at \\( x=2 \\), and the smallest value is \\( 1 \\). Thus, the exhaustive search method produces a close approximation and clearly demonstrates how the minimum point can be approached through the successive narrowing of the interval.<\/p>\n<h2>Additional Topics: What Is Worth Exploring Next<\/h2>\n<p>Now that the main idea of the exhaustive search method has become clearer, it is natural to move on to other minimization methods. What is worth reading after this topic? Below are several directions that provide a useful continuation of the study of <a title=\"What is a numerical method\" href=\"https:\/\/en.wikipedia.org\/wiki\/Numerical_method\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">numerical methods<\/a>.<\/p>\n<ol>\n<li><a title=\"Dichotomy method\" href=\"https:\/\/www.mathros.net.ua\/en\/dichotomous-search-method.html\">Dichotomy Method: How the Interval Is Narrowed Step by Step<\/a> \u2014 This article discusses finding a minimum by gradually reducing the interval and comparing the values of the function at nearby points.<\/li>\n<li><a title=\"Newton\u2019s method\" href=\"https:\/\/www.mathros.net.ua\/en\/newtons-method-minimum-of-a-function.html\">Newton\u2019s Method: How to Use the Curvature of a Function<\/a> \u2014 This article shows how a minimum can be found using derivatives and explains what the rate of convergence depends on.<\/li>\n<li><a title=\"Coordinate descent\" href=\"https:\/\/www.mathros.net.ua\/en\/coordinate-descent-method.html\">Coordinate Descent: How to Search for a Minimum in Several Directions<\/a> \u2014 This article examines the problem of minimizing a function of several variables by considering one coordinate at a time.<\/li>\n<\/ol>\n<h2>Exhaustive Search Method in Code: Create Your Own Program for Finding a Minimum<\/h2>\n<p>Now look at the flowchart below not merely as an illustration, but as a ready-made foundation for a small educational project. Why not use it to write a small program in your favorite programming language that determines the minimum value of a unimodal function using the exhaustive search method? Such work clearly shows how a mathematical idea is transformed into an understandable algorithm and then into program code that can be tested on different examples. In addition, it is a good opportunity to make sure that you understand the method well not only in theory, but also in practical programming.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-3151 aligncenter\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/03\/exhaustive-search-method3.jpg\" alt=\"A flowchart of the algorithm showing step by step how the minimum value of a unimodal function is found using the exhaustive search method\" width=\"600\" height=\"510\" srcset=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/03\/exhaustive-search-method3.jpg 600w, https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/03\/exhaustive-search-method3-300x255.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The exhaustive search method is one of the simplest approaches used in numerical methods for minimizing a function of one<\/p>\n","protected":false},"author":1,"featured_media":3155,"comment_status":"open","ping_status":"closed","sticky":false,"template":"template-centered.php","format":"standard","meta":{"footnotes":""},"categories":[484],"tags":[493,486,488,134,487],"class_list":["post-3137","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-finding-maximum-and-minimum-values-of-a-function","tag-exhaustive-search-method","tag-function-minimization","tag-minimum-search","tag-numerical-methods","tag-optimization-method"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/posts\/3137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/comments?post=3137"}],"version-history":[{"count":16,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/posts\/3137\/revisions"}],"predecessor-version":[{"id":3657,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/posts\/3137\/revisions\/3657"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/media\/3155"}],"wp:attachment":[{"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/media?parent=3137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/categories?post=3137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/tags?post=3137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}