Unformatted text preview: cf ( n ) , and so this means at least one instance (the worst case) is Ω( f ( n )) . 3.21 If an algorithm is Θ( f ( n )) in the average case, then by de f nition it must be O ( f ( n )) in the average case. Therefore, the average case cost for an instance of the problem requires at most cf ( n ) time for some constant c . By the pigeonhole principle, some instance (the best case) must therefore cost at most cf ( n ) time. Therefore, the best case must be O ( f ( n )) ....
View Full Document
- Fall '08
- Analysis of algorithms, Computational complexity theory, average case