# Full Algorithm Solution

Content type
User Generated
Subject
Computer Science
Type
Homework
Rating
Showing Page:
1/3
Question 1:
a) We have that
lg375


is a floor function which means the smallest integer that does not
exceed
lg375
. Therefore, we have
( )
lg 375 8.551=
since
8
2 256 375=
and
9
2 512 375=
. Now, we take
lg375 8=


and thus
lg375
8
2 2 256


==
.
b) Since


is an upper floor function, which means the greatest integer that exceeds
.
Since
267 266.8 266
, by definition, it follows that
266.8 266 =


.
c) We have that
lg1028


is a floor function which means the smallest integer that does not
exceed
. Therefore, we have
lg1028 10.006=
since
10.006
2 1028=
. Moreover, we
have
3.012
10 1024 1028=
and
11
2 2056 1028=
. Now, we have
lg1028 10=


.
d) We have
( )
( )
4 8 12 396 400
4 4 2 4 3 4 99 4 100
4 1 2 3 99 100
100 100 1
4
2
4 5050
20200
+ + + + + =
= + + + + +
= + + + + +
+
=
=
=
e) Since
, we can write the expression in logarithm as
( )
( )
( )
5 6666622222
6666622222
lg 32 lg 2 5 6666622222 33333111110= = =
Now,
Question 2:
We use the following identities to rank the given functions

Showing Page:
2/3
( )
( )
lg
lglg
2 lg
lg
2lg 2/lg
1/lg
**
lg
4
2
2
1
lg lg lg 1 1
n
n
n
n
nn
n
nn
n
n
n
n
n n for n
=
=
=
=
=
=
Also, the Stirling’s formula indicating that equations for asymptotic bound are
( )
( ) ( )
( ) ( )
( )
1/2
lg 1/2
lg
!
lg ! lg
lg ! lg
nn
n
n
n n e
n n n
n n e
+−
+
=
=
=
ANSWER: Now, we can rank the given functions, where
means
as follow
( )
( ) ( )
( )
25 25 11 14 14
3 3 3
5
2 1 2 0 1
lg ! 2
2 2 3 lg lg
5.5 5.43ln lg lg lg
n
nn
n n n n n n where
n n n n
n n n n
n n n n
+
+ +
+
+
Question 3:
(a) The equation
( )
22
35n n n
−=
is true because for all
1n
, we have
2 2 2
3 5 3n n n n
>
Therefore, with
( )
2
12
, 1, 3f n n C C= = =
, where
1
C
and
2
C
are constants independent of
n
,
we have that
( )
1
C f n
is a lower bound of
2
35nn
and
( )
2
C f n
is an upper bound of
2
35nn
.
Hence,
( )
22
35n n n
−=
is true.
(b) The equation
( )
2
7n n O n+=
is not true. We will prove this by contradiction. Suppose that
there exists
C
which is a constant independent of
n
satisfying
Cn
is an upper bound of
2
7nn+
.
Then,
2
7n n Cn+
for all
n
( )
2
2
7
7
7
n Cn n
n C n
nC

Showing Page:
3/3

Unformatted Attachment Preview
Question 1: a) We have that lg375 is a floor function which means the smallest integer that does not exceed lg 375 . Therefore, we have lg  375  8.551 since 28  256  375 and 29  512  375 . Now, we take lg375  8 and thus 2lg375  28  256 . b) Since   is an upper floor function, which means the greatest integer that exceeds 266.8 . Since 267  266.8  266 , by definition, it follows that 266.8  266 . c) We have that lg1028 is a floor function which means the smallest integer that does not exceed lg1028 . Therefore, we have lg1028  10.006 since 210.006  1028 . Moreover, we have 103.012  1024  1028 and 211  2056  1028 . Now, we have lg1028  10 . d) We have 4  8  12   396  400   4  4  2  4  3   ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

### Review

Anonymous
Awesome! Perfect study aid.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4