This preview shows page 1. Sign up to view the full content.
228
Solutions to Exercises
(c) There exists a positive integer
no
such that for all
n
~
no,
I
~i~?

LI
<
1 and hence
I
~i~?
I 
ILl <
1 (using the fact that
lalIbl
~
la

bl
for any real numbers
a
and
b).
Thus, for
n
~
no,
I
~f~~
I < ILl
+
1 so, with
c
=
ILl
+
1 we see that
f
=
0(9).
We now must show that 9 is also
0(1).
But from the theory of limits, limn
+
oo
J~~~
=
±
(since
L
# 0). So the argument which
showed
f
=
0(9)
also shows that
9
=
0(1).
Exercises 8.3
1. (a) [BB] Since
n
=
9 # 1, we set m
=
l~J
=
4. Since 2
=
x
~
a4
=
4, we set
n
=
m
=
4 and
change the list to 1,2,3,4.
Since 4
=
n
# 1, we set
m
=
l
~
J
=
2. Since 2
=
x
~
a2
=
2 we set
n
=
m
=
2 and change
the list to 1,2.
Since 2
=
n
# 1, we set
m
=
r~l
=
1. Since 2
=
x>
al
=
1, we replace
n
by
n
 m
=
1 and
change the list to 2.
Since
n
=
1 and
x
=
aI,
we output "true" and stop.
This search required four comparisons of
x
with an element in the list; a linear search would have
used two comparisons.
(b) Since
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 11/08/2010 for the course MATH discrete m taught by Professor Any during the Summer '10 term at FSU.
 Summer '10
 any
 Real Numbers, Graph Theory

Click to edit the document details