\headline={\bf Math 4606, Summer 2003:\it \hskip .1in Binary Searches\hfill\rm\howmany} \def\howmany{Page \folio\ of 2} \def\p#1{{\bf #1:}} \def\pos{\hbox{\bb P}} \def\dable{differentiable} \def\dably{differentiability} \def\dve{derivative} \def\th{\theta} {\bf Introduction} \gap ``Binary Search'' really refers to a \sla{method} for finding a number with a desired property, or else demonstrating that such a number does not exist. For example, how does we find a needle in a haystack? Maybe we'd have a strong magnet, knowing that the needle is made of steel, and we'd need permission to dismantle the haystack. But we'd have to reassemble it, I suppose. First, we'd divide the stack in half, then use the magnet to find out which half the needle is in. If we could not tell, we'd divide both halves in half. If we could, we'd divide the half with the needle in half again, use the magnet, and keep on until we find it. That's the whole idea. \gap We'll use the Binary Search Method in some examples. \gap {\bf Finding the supremum and infimum of a non-empty bounded set} \gap Let $S$ denote our nonempty bounded set. We are given that \te numbers $A$ and $B$ that bound the set $S.$ That is, for every $x$ in $S,$ $B\le x\le A.$ Let's assume that $BP$ then for all $n$ sufficiently large, $0\le R_nx$ because $L_n\to P$ (the argument is the same one we used when $y$ was bigger than $P,$ but we used the numbers $R-n$ there). But then, since there must be a point of $S$ in $[L_n,\,R_n],$ \tE a point of $S$ that exceeds $x.$ These two conditions are the conditions that need to be true for a number to be the sup of a set. \gap {\bf Exercise: } Decide what has to be changed in the proof so far in order to find the infimum of $S,$ then make the changes and check that you have a proof. \gap {\bf Showing that every real number is the limit of a \seq of rational numbers} \gap We suppose that $x_0$ is a given rational number. We want to find a \seq of rational numbers that converges to $x_0.$ We may as well assume that $x_0$ is an irrational number. Otherwise, we could let our \seq $\{x_0,\,x_0,\,x_0,\,\dots,\,x_0,\,\dots\}.$ We will actually construct a \seq of \sla{dyadic} rational numbers $r_n$ that converge to $x_0$ (the dyadic rational n umbers are those whose denominators are powers of $2.$ We may also assume that $x_0>0$ (why?). We know \tE a natural number $n_0$ larger than $x_0$ (why?). This means that $x_0\in I_0:=[0,\,n_0].$ We divide $I_0$ in half. One of the halves contains $x_0.$ Both halves cannot, since then $x_0$ would be the average of two rational numbers, which is a rational number, and we assumed that $x_0$ is irrational. We choose as $I_1$ the half of $I_0$ that contains $x_0.$ Both endpoints of $I_1$ are dyadic rationals, since each endpoint is either one of the original endpoints or is $n_0/2.$ \gap We now repeat this process, dividing our chosen intervals in half. Since the chosen intervals contain $x_0,$ one of the halves of each chosen interval contains $x_0$ (why?). {\bf We will always choose as our next interval the half that contains $x_0.$} In this way, we get a \seq of intervals $[L_n,\,R_n].$ As before, the \seq $\{R_n\}$ is a decreasing \seq \bdd\ below by $0$ and $\{L_n\}$ is an increasing \seq \bdd\ above by $n_0.$ Moreover, $R_n-L_n=2n_0/2^n\to 0,$ so (again) both \seqnd s converge, and they converge to the same limit. By the Squeeze Principle, since $L_n0$ be given. We need to show that $(y-\del,\,y+\del)$ contains a point of $S$ that is different than $y.$ \gap Since $\{L_n\}$ is an increasing \seq that converges to $y,$ we know that $L_n\le y$ \fA $n.$ Similarly, $y\le R_n$ \fA $n.$ \gap We now let $\del$ play the r\^ole of $\ep$ in the definition of convergence of $\{L_n\}$ to $y.$ We know \tE $N_1\in\nat$ \st $n\ge N_1\impl |L_n-y|=y-L_n<\del.$ Similarly, \tE $N_2\in\nat$ \st $n\ge N_2\impl |R_n-y|=R_n-y<\del.$ We now select $N:=\max\{N_1,\,N_2\}.$ \gap By our ``construction'' of the intervals $I_n,$ we know that $I_N=[L_N,\,R_N]$ contains infinitely many points of $S.$ We will show that $[L_N,\,R_N]\sub (y-\del,\,y+\del).$ Once we do so, we will know that $(y-\del,\,y+\del)$ contains infinitely many points of $S,$ hence must contain two points of $S$ that are different from each other. At least one of them must be unequal to $y.$ This will complete the proof. \gap To show that $[L_N,\,R_N]\sub (y-\del,\,y+\del)$ we will show that $L_N>y-\del$ and show that $R_Ny-\del.$ \gap {\bf Exercise: } Complete the proof by showing that $R_N