running the program it will eventually find suitable answerbut you might not have the patience to wait for it to do so roughly how many guesses will it have to makethe step size will be and the square root of is around this means that the program will have to make in the neighborhood of , , guesses to find satisfactory answer we could try to speed it up by starting closer to the answerbut that presumes that we know the answer the time has come to look for different way to attack the problem we need to choose better algorithm rather than fine tune the current one but before doing solet' look at problem thatat first blushappears to be completely different from root finding consider the problem of discovering whether word starting with given sequence of letters appears in some hard-copy dictionary of the english language exhaustive enumeration wouldin principlework you could start at the first word and examine each word until either you found word starting with the sequence of letters or you ran out of words to examine if the dictionary contained wordsit wouldon averagetake / probes to find the word if the word were not in the dictionaryit would take probes of coursethose who have had the pleasure of actually looking word up in physical (rather than onlinedictionary would never proceed in this way fortunatelythe folks who publish dictionaries go to the trouble of putting the words in lexicographical order this allows us to open the book to page where we think the word might lie ( near the middle for words starting with the letter mif the sequence of letters lexicographically precedes the first word on the pagewe know to go backwards if the sequence of letters follows the last word on the pagewe know to go forwards otherwisewe check whether the sequence of letters matches word on the page now let' take the same idea and apply it the problem of finding the square root of suppose we know that good approximation to the square root of lies somewhere between and max we can exploit the fact that numbers are totally ordered that is to sayfor any pair of distinct numbersn and either sowe can think of the square root of as lying somewhere on the line max and start searching that interval since we don' necessarily know where to start searchinglet' start in the middle guessmax if that is not the right answer (and it won' be most of the time)ask whether it is too big or too small if it is too bigwe know that the answer must lie to the left if it is too smallwe know that the answer must lie to the right we then repeat the process on the smaller interval figure contains an implementation and test of this algorithm