Lec8Perf

# Which function may be polynomial which exponential

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: 14000&quot; 12000&quot; 10000&quot; f&quot; g&quot; 8000&quot; h&quot; 6000&quot; 4000&quot; 2000&quot; 0&quot; 0&quot; 2&quot; 4&quot; 6&quot; 8&quot; 10&quot; 12&quot; 14&quot; Do you get a better idea now? Which function may be polynomial, which exponential? Still, not all clear (order, base…), h(n) may spike up later… 3 Straight Lines We get the most information from straight lines! ¨༊  We n༆  can easily recognize a straight line (y = ax+b) The slope (a) and y intercept (b) tells us all. ¨༊  So we need to turn our data sets into straight lines. ¨༊  This is easiest done using log-s, because they turn a multiplicative factor into a shift up (y axis crossing b) , and an exponential into a multiplicative factor (slope a) Exponential functions n༆  log(2n) = n log2 n༆  log(3n) = n log 3 n༆  log(4.3n) linear in n angle of the line: base of log = n log3 + log4 n༆  log((3n)/4) = n log3 – log4 *4 shifts it up /4 shifts it down 4 Exponentials: semi-log plot n 2n 3n 20*3n 0 1 1 20 1 2 3 60 2 4 9 180 3 8 27 540 4 16 81 1620 5 32 243 4860 7 128 2087 41740 10 1024 56349 1126980 10000000&quot; 1000000&quot; 1...
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