0% found this document useful (0 votes)
9 views

Quiz #8: O G (N) F (N) O (G) G F (N) N Log (N

The document contains solutions to a quiz with two questions. The first question asks to estimate the big-O of two functions, one is O(n^2) and the other is O(n^3). The second question shows that d^2x^2 - xe = Θ(x^2) by bounding the expression between positive constants.

Uploaded by

hahue
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Quiz #8: O G (N) F (N) O (G) G F (N) N Log (N

The document contains solutions to a quiz with two questions. The first question asks to estimate the big-O of two functions, one is O(n^2) and the other is O(n^3). The second question shows that d^2x^2 - xe = Θ(x^2) by bounding the expression between positive constants.

Uploaded by

hahue
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Quiz #8

SOLUTIONS

1. { 6 points } Give a big-O estimate for each of these functions. For the function
g(n) in your estimate that f (n) is O(g), use a simple function g of the smallest
order.
n2
(a) f (n) = n log(n4 + 1) + log n

   
n2 n2
f (n) = O(n log n) + O =O = O(n2 )
log n log n

2n
(b) f (n) = (n log n + n)2 + n!


f (n) = [O(n log n)]2 + O(1) = O n2 (log n)2 = O(n3 )

2. { 4 points } Show that


d2x2 − xe = Θ(x2 )

For x > 1 we have that


x2 x2 + x2 − x 2x2 − x d2x2 − xe 2x2
1= ≤ = ≤ ≤ =2
x2 x2 x2 x2 x2
d2x2 −xe
Thus, x2 is bounded by positive constants from below and above
which proves that d2x2 − xe = Θ(x2 ).

You might also like