Lec8Perf

# 8 how about g n gn 1 9 2 18 3 35 4 68 1000 5 131 100

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ght line, so f is polynomial, but what is its leading term? What is f’s degree? 1000000" n f(n) n2 n3 n4 1 2 1 1 1 2 12 4 8 16 3 36 9 27 81 4 80 16 64 256 5 150 25 125 625 7 400 49 343 2401 10 1100 100 1000 10000 12 1872 144 1728 20736 Compare with n, n2,n3,n4 100000" 10000" f" n*n" 1000" n*n*n" n*n*n*n" 100" 10" 1" 1" 10" 100" f is degree 3, no multiplicative factor (no shift up): f(n)=n3+.. We usually only worry about the leading term. 8 How about g? n g(n) 1 9 2 18 3 35 4 68 1000" 5 131 100" 7 520 10" 10 4106 12 16396 g" 100000" 10000" g" 1" 0" 2" 4" 6" 8" 10" 12" 14" g is linear on semi log plot so exponential what base: compare to 2n, 3n How about g? n g(n) 2n 3n 1000000" 1 9 2 3 2 18 4 9 3 35 8 27 4 68 16 81 1000" 5 131 32 2...
View Full Document

## This note was uploaded on 02/12/2014 for the course CS 475 taught by Professor Staff during the Fall '08 term at Colorado State.

Ask a homework question - tutors are online