Gn translation an asymptotically non negative

This preview shows page 9 - 18 out of 43 pages.

given an asymptotically non-negative fn. g(n), Translation : An asymptotically non-negative function f(n) belongs to the set Θ( γ (ν 2929 ιφ τηερε εξιστ ποσιτιωε χονσταντσ χ1 ανδ χ2 συχη τηατ φ(ν29 χαν βε σανδϖιχηεδ βετϖεεν χ1γ (ν29 ανδ χ2γ (ν 29, σχαλεδ ωερσιονσ οφ γ (ν29 , φορ συφφιχιεντλψ λαργ ε ν . Convention : } ) ( ) ( ) ( 0 such that 0 ) , , ( : ) ( { )) ( ( 0 2 1 0 2 1 n n n g c n f n g c n c c n f n g 2200 5 = Θ ( ) ( ( )) means ( ) ( ( )) f n g n f n g n = Θ ∈Θ
Image of page 9

Subscribe to view the full document.

Asymptotic Notation Definitions : given an asymptotically non-negative fn. g(n), } ) ( ) ( ) ( 0 such that 0 ) , , ( : ) ( { )) ( ( 0 2 1 0 2 1 n n n g c n f n g c n c c n f n g 2200 5 = Θ 0 0 O( ( )) { ( ) : ( , ) 0 such that 0 ( ) ( ) } g n f n c n f n cg n n n = 5 2200 0 0 ( ( )) { ( ) : ( , ) 0 such that 0 ( ) ( ) } g n f n c n cg n f n n n = 5 2200
Image of page 10
Asymptotic Notation n0 c1g(n) c2g(n) f(n) f(n) c g(n) n0 f(n) c g(n) n0 )) ( ( ) ( n g n f Θ = )) ( ( O ) ( n g n f = )) ( ( ) ( n g n f =
Image of page 11

Subscribe to view the full document.

Example Show that Must find positive constants c1 , c2 , n0 such that Hint: consider one side of the inequality at a time: for n0 =7 we have c1 1/14 for n0 =6 we have c2 >1/2; works for larger n0 =7 as well Divide through by n 2 to get This proof is constructive 2 2 1 3 ( ) 2 n n n - ∈Θ 0 2 2 2 2 1 3 2 1 n n n c n n n c 2200 - 0 2 1 3 2 1 n n c n c 2200 -
Image of page 12
Another Example
Image of page 13

Subscribe to view the full document.

Other proof types? § Induction § Example on HW #1 § Deduction § Others!
Image of page 14
Duality ( ) ( ( )) if and only if ( ) ( ( )) f n g n g n O f n ∈Ω
Image of page 15

Subscribe to view the full document.

Duality g(n) in O(f(n)) means all instances of size n are solvable within c1f(n) time. f(n) in (g(n)) means at least one instance of size n is solvable in c2g(n) time. … for worst case performance. ( ) ( ( )) if and only if ( ) ( ( )) f n g n g n O f n ∈Ω
Image of page 16
Duality Suppose t(n) models worst case behavior of an algorithm. Then t(n) = O(n!) means every instance of size n is solvable in factorial time.
Image of page 17

Subscribe to view the full document.

Image of page 18
You've reached the end of this preview.
  • Spring '08
  • Jones,M
  • TA, Analysis of algorithms, n-bit integers

{[ 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