hw7-review - (f) If f ( n ) = ( g ( n )) and h ( n ) = ( g...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 173: Discrete Structures, Spring 2010 Review problems for second quiz You should do these problems to help prepare for the second quiz. Solutions will be posted but you don’t have to turn them in. 1. Big-O notation For each of the following pairs of functions state whether f ( n ) = O ( g ( n )) or f ( n ) = Ω( g ( n )) or f ( n ) = Θ( g ( n )) (a) f ( n ) = n 2 and g ( n ) = n 2 . (b) f ( n ) = ( log 10 ( n )) 2 and g ( n ) = n. (c) f ( n ) = n 2 n and g ( n ) = n n 2 (d) f ( n ) = n ! and g ( n ) = n n (e) f ( n ) = 2 n + n and g ( n ) = 3 n Determine whether each statement below is true or false.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (f) If f ( n ) = ( g ( n )) and h ( n ) = ( g ( n )) then f ( n ) h ( n ) = ( g ( n )). (g) If f ( n ) = ( g ( n )) and h ( n ) = ( g ( n )) then f ( n ) + h ( n ) = ( g ( n )). (h) If f ( n ) = O ( g ( n )) then g ( n ) = ( f ( n )). (i) If f ( n ) = ( g ( n )) then g ( n ) = ( f ( n )) (j) If f ( n ) = log a ( n ) for a > 2 then f ( n ) n = ( log 2 ( n )). 1...
View Full Document

Ask a homework question - tutors are online