This preview shows page 1. Sign up to view the full content.
226
Solutions to Exercises
some constant c and all sufficiently large
n.
Now clog
n
=
log
n
C
and log is an increasing function,
so log
(An
+
B)
~
clogn
~
An
+
B
~
nCo
But
An
+
B
~
(A
+
B)n
~
n
2
for
n
>
A
+
B
so
c
=
2, works.
23. Since
n
=
ab
with 1
<
a, b
<
n
implies either
a
~
..;n
or
b
~
..;n,
n
is prime if does not have
a proper factor less than or equal to
..;n.
So, for each integer
k,
1
<
k
<
r
Vnl,
use the Euclidean
algorithm to determine if gcd
(k, n)
=
1. As shown in Problem 19, this algorithm requires
0
(In
k) =
O(ln.
.;n)
=
O(ln
n)
divisions. The integer
n
is prime if and only if gcd(k,
n)
=
1 for all such
k.
The
entire procedure is
0
(
..;n
In
n).
24. [BB] Since
n!
=
n(n

1)(n

2) .
.
·3·2.1
<
nn,
logn!
~
n
log
n.
With c
=
1,
no
=
1 in
Definition 8.2.1, we see that logn!
=
O(n
log
n)
as required.
25. (a)
If
a
=
(akakl
...
a2alaoh,
then the base 2 digits
ao,
al,
... ,
ak
are the remainders given by the
following process of successive divisions by 2:
a
2qo
+
ao
qo
2ql
+
al
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
 Graph Theory

Click to edit the document details