hw2 - f. (1 Point) ) ! lg( n ) lg( n n 2 5. (4 Points)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CMPS 101 Summer 2009 Homework Assignment 2 1. (1 Point) p.50: 3.1-1 Let ) ( n f and ) ( n g be asymptotically non-negative functions. Using the basic definition of Θ - notation, prove that ))) ( ), ( (max( ) ( ) ( n g n f n g n f Θ = + . 2. (1 Point) p.50: 3.1-3 Explain why the statement “The running time of algorithm A is at least ) ( 2 n O ” is meaningless. 3. (2 Points) p. 50: 3.1-4 Determine whether the following statements are true or false. a. (1 Point) ) 2 ( 2 1 n n O = + b. (1 Point) ) 2 ( 2 2 n n O = 4. (6 Points) p.58: 3-2abcdef Indicate, for each pair of expressions ( A , B ) in the table below, whether A is O , o , Ω , ω , or Θ of B . Assume that 1 k , 0 > ε , and 1 > c are constants. Place 'yes' or 'no' in each of the empty cells below, and justify your answers. A B O o Ω Θ a. (1 Point) n k lg n b. (1 Point) k n n c c. (1 Point) n n n sin d. (1 Point) n 2 2 / 2 n e. (1 Point) c n lg n c lg
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: f. (1 Point) ) ! lg( n ) lg( n n 2 5. (4 Points) p.58: 3-4cdeh Let ) ( n f and ) ( n g be asymptotically positive functions (i.e. ) ( > n f and ) ( > n g for sufficiently large n .) Prove or disprove the following statements. c. (1 Point) Assume 1 )) ( lg( n g and 1 ) ( n f for all sufficiently large n . Then )) ( ( ) ( n g O n f = implies ))) ( (lg( )) ( lg( n g O n f = . d. (1 Point) )) ( ( ) ( n g O n f = implies ) 2 ( 2 ) ( ) ( n g n f O = . e. (1 Point) ) )) ( (( ) ( 2 n f O n f = . h. (1 Point) )) ( ( )) ( ( ) ( n f n f o n f = + . 6. (1 Point) Let ) ( ) ( n n f = . Prove that ) ( ) ( 2 1 n i f n i = = . (See the hint at bottom of p.4 of the handout on asymptotic growth rates.)...
View Full Document

Page1 / 2

hw2 - f. (1 Point) ) ! lg( n ) lg( n n 2 5. (4 Points)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online