Mid1solns - CMPS 101 Algorithms and Abstract Data Types Summer 2009 Midterm Exam 1 Solutions 1(20 Points Prove that n g n f n g n f ⋅ Ω = Ω ⋅

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: CMPS 101 Algorithms and Abstract Data Types Summer 2009 Midterm Exam 1 Solutions 1. (20 Points) Prove that )) ( ) ( ( )) ( ( )) ( ( n g n f n g n f ⋅ Ω = Ω ⋅ Ω . In other words, if )) ( ( ) ( 1 n f n h Ω = and )) ( ( ) ( 2 n g n h Ω = , then )) ( ) ( ( ) ( ) ( 2 1 n g n f n h n h ⋅ Ω = ⋅ . Proof: Assume )) ( ( ) ( 1 n f n h Ω = and )) ( ( ) ( 2 n g n h Ω = . Then there exist positive constants 2 1 2 1 , , , n n c c such that for all 1 n n ≥ : ) ( ) ( 1 1 n h n f c ≤ ≤ , and for all 2 n n ≥ : ) ( ) ( 2 2 n h n g c ≤ ≤ . Let ) , max( 2 1 n n n = . Then for all n n ≥ , we can multiply the above inequalities to get ) ( ) ( ) ( ) ( 2 1 2 1 n h n h n g n f c c ≤ ≤ . Now let 2 1 c c c = . Observe that c , and n are positive, and for all n n ≥ : ) ( ) ( ) ( ) ( 2 1 n h n h n g n cf ≤ ≤ , showing that )) ( ) ( ( ) ( ) ( 2 1 n g n f n h n h ⋅ Ω = ⋅ , as required. /// 2. (20 Points) Use Stirling’s formula to prove that ) log ( ) ! log( n n n Θ = ....
View Full Document

This note was uploaded on 12/03/2009 for the course CS CS101 taught by Professor Agoreback during the Spring '09 term at American College of Gastroenterology.

Page1 / 3

Mid1solns - CMPS 101 Algorithms and Abstract Data Types Summer 2009 Midterm Exam 1 Solutions 1(20 Points Prove that n g n f n g n f ⋅ Ω = Ω ⋅

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