Encontrar constantes positivas c e n tais que 20n 2

Info icon This preview shows pages 9–17. Sign up to view the full content.

View Full Document Right Arrow Icon
O que fazer? Encontrar  constantes  positivas c e n 0  tais que 20n 2  + 10n     cn 2  para  todo n   n 0 f(n) = O(n 3 ) ? f(n) = O(n 4 ) ? f(n) = O(n n) ? f(n) = O(n lg n) ?
Image of page 9

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

View Full Document Right Arrow Icon
Nota çã Dada fun çã o g(n) (g(n))  é  um conjunto de fun çõ es (g(n)) = {f(n) : existem constantes positivas c e n 0  tais que                      0  cg(n)   f(n) para todo n   n 0 } f(n)    (g(n)) se existem c e n 0  de forma que f(n) nunca supere cg(n) f(n) =  (g(n))  é  sin ô nimo para f(n)    (g(n)) Nota çã  oferece um limite assint ó tico inferior para f(n)
Image of page 10
Nota çã
Image of page 11

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

View Full Document Right Arrow Icon
Nota çã Exemplo: mostar que f(n) = (1/20)n 2  - 10n    (n 2 ) O que fazer? Encontrar  constantes  positivas c e n 0  tais que cn 2    (1/20)n 2  - 10n para  todo n   n 0 f(n) =  (n 3 ) ? f(n) =  (n 4 ) ? f(n) =  (n n) ? f(n) =  (n lg n) ?
Image of page 12
Nota çã o assint ó tica Teorema 3.1: para duas fun çõ es quaisquer f(n) e g(n), tem- se que f(n) =  Θ (g(n)) se e somente se f(n) = O(g(n)) e   f(n)= (g(n)). Demonstra çã Demonstra çã Demonstra çã
Image of page 13

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

View Full Document Right Arrow Icon
Nota çã o assint ó tica em equa çõ es e  desiguladades O que significa 2n 2  + 3n +1 = 2n 2  +  Θ (n)? Em geral, em equa çõ es/desigualdades a nota çã o representa uma  fun çã o an ô nima Nesse caso, uma fun çã o f(n)    Θ (n) 2n 2  + 3n +1 = 2n 2  + f(n) Como existe a igualdade, f(n) = 3n + 1. Note que f(n)    Θ (n) T(n) = 2T(n/2) +  Θ (n) Θ (n) representa fun çã o que n ã o se conhece exatamente É  conhecido seu comportamento assint ó tico
Image of page 14
Nota çã o assint ó tica em equa çõ es e  desiguladades Σ i=1..n [O(i)] O n ú mero de fun çõ es an ô nimas  é  o n ú mero de vezes que a nota çã aparece Nesse caso, uma vez (fun çã o de i) Que  é  diferente de O(1) + O(2) + ... + O(n)  2n 2  +  Θ (n) =  Θ (n 2 ) S ã o escolhidas fun çõ es f(n)    Θ (n) e g(n)    Θ (n 2 ) que satisfazem a  equa çã o para todo n 2n 2  + 3n + 1 = 2n 2  +  Θ (n) =  Θ (n 2 )
Image of page 15

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

View Full Document Right Arrow Icon
Nota çã o o Dada fun çã
Image of page 16
Image of page 17
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern