Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Asymptotic Notation - Algorithm - Study Notes, Study notes of Algorithms and Programming

Key points of this note are: Asymptotic, Notation, Bound, Big O, Omega, Time, Upper, Lower, Hypothesis, Limit Rule, Constants.

Typology: Study notes

2011/2012

Uploaded on 10/25/2012

ramprasad
ramprasad 🇮🇳

4.3

(22)

123 documents

1 / 5

Toggle sidebar

Related documents


Partial preview of the text

Download Asymptotic Notation - Algorithm - Study Notes and more Study notes Algorithms and Programming in PDF only on Docsity! Design and Analysis of Algorithms Chapter 2 Asymptotic Notation You may be asking that we continue to use the notation Θ() but have never defined it. Let’s remedy this now. Given any function g(n), we define Θ(g(n)) to be a set of functions that asymptotically equivalent to g(n). Formally: Θ(g(n)) = {f(n) | there exist positive constants c1, c2 and n0 such that 0 ≤ c1g(n) ≤ f(n) ≤ c2g(n) for all n ≥ n0} This is written as “f(n) ∈ Θ(g(n))” That is, f(n) and g(n) are asymptotically equivalent. This means that they have essentially the same growth rates for large n. For example, functions like • 4n2, • (8n2 + 2n − 3), • (n2/5 + √n − 10 log n) • n(n − 3) are all asymptotically equivalent. As n becomes large, the dominant (fastest growing) term is some constant times n2. Consider the function f(n) = 8n2 + 2n − 3 Our informal rule of keeping the largest term and ignoring the constant suggests that f(n) ∈ Θ(n2). Let’s see why this bears out formally. We need to show two things for f(n) = 8n2 + 2n − 3 Lower bound f(n) = 8n2 + 2n − 3 grows asymptotically at least as fast as n2, 23
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved