Chapter 3 Growth of Functions Lee, Hsiu-Hui

Slides:



Advertisements
Similar presentations
Introduction to Algorithms
Advertisements

 The running time of an algorithm as input size approaches infinity is called the asymptotic running time  We study different notations for asymptotic.
CS Section 600 CS Section 002 Dr. Angela Guercio Spring 2010.
Chapter 3 Growth of Functions
Asymptotic Growth Rate
Cutler/HeadGrowth of Functions 1 Asymptotic Growth Rate.
Growth of Functions CIS 606 Spring 2010.
1 Data Structures A program solves a problem. A program solves a problem. A solution consists of: A solution consists of:  a way to organize the data.
25 June 2015Comp 122, Spring 2004 Asymptotic Notation, Review of Functions & Summations.
Chapter 2: Fundamentals of the Analysis of Algorithm Efficiency
3.Growth of Functions Hsu, Lih-Hsing.
Data Structures and Algorithms1 Basics -- 2 From: Data Structures and Their Algorithms, by Harry R. Lewis and Larry Denenberg (Harvard University: Harper.
CSE 373 Data Structures and Algorithms Lecture 4: Asymptotic Analysis II / Math Review.
Introduction to Algorithms (2 nd edition) by Cormen, Leiserson, Rivest & Stein Chapter 3: Growth of Functions (slides enhanced by N. Adlai A. DePano)
Time Complexity Dr. Jicheng Fu Department of Computer Science University of Central Oklahoma.
1 Computer Algorithms Lecture 3 Asymptotic Notation Some of these slides are courtesy of D. Plaisted, UNC and M. Nicolescu, UNR.
Chapter 2 Mathematical preliminaries 2.1 Set, Relation and Functions 2.2 Proof Methods 2.3 Logarithms 2.4 Floor and Ceiling Functions 2.5 Factorial and.
Asymptotic Analysis-Ch. 3
CMPT 438 Algorithms Chapter 3 Asymptotic Notations.
3.Growth of Functions Asymptotic notation  g(n) is an asymptotic tight bound for f(n). ``=’’ abuse.
Algorithms Growth of Functions. Some Notation NNatural numbers RReal numbers N + Positive natural numbers R + Positive real numbers R * Non-negative real.
1 o-notation For a given function g(n), we denote by o(g(n)) the set of functions: o(g(n)) = {f(n): for any positive constant c > 0, there exists a constant.
Growth of Functions. 2 Analysis of Bubble Sort 3 Time Analysis – Best Case The array is already sorted – no swap operations are required.
Time Complexity of Algorithms
Chapter 2 Computational Complexity. Computational Complexity Compares growth of two functions Independent of constant multipliers and lower-order effects.
Relations Over Asymptotic Notations. Overview of Previous Lecture Although Estimation but Useful It is not always possible to determine behaviour of an.
Asymptotics and Recurrence Equations Prepared by John Reif, Ph.D. Analysis of Algorithms.
ADVANCED ALGORITHMS REVIEW OF ANALYSIS TECHNIQUES (UNIT-1)
CSE 373: Data Structures and Algorithms Lecture 4: Math Review/Asymptotic Analysis II 1.
13 February 2016 Asymptotic Notation, Review of Functions & Summations.
Asymptotic Notation Faculty Name: Ruhi Fatima
1 Chapter 2 Algorithm Analysis All sections. 2 Complexity Analysis Measures efficiency (time and memory) of algorithms and programs –Can be used for the.
DR. Gatot F. Hertono, MSc. Design and Analysis of ALGORITHM (Session 2)
1 Chapter 2 Algorithm Analysis Reading: Chapter 2.
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 2.
Comparing Functions. Notes on Notation N = {0,1,2,3,... } N + = {1,2,3,4,... } R = Set of Reals R + = Set of Positive Reals R * = R + U {0}
Mathematical Foundations (Growth Functions) Neelima Gupta Department of Computer Science University of Delhi people.du.ac.in/~ngupta.
Asymptotic Complexity
Chapter 2 Algorithm Analysis
Relations, Functions, and Matrices
Introduction to Algorithms: Asymptotic Notation
nalisis de lgoritmos A A
Asymptotic Notations Algorithms perform f(n) basic operations to accomplish task Identify that function Identify size of problem (n) Count number of operations.
Asymptotic Analysis.
Introduction to Algorithms (2nd edition)
Growth of functions CSC317.
The Growth of Functions
Analysis of Algorithms: Methods and Examples
Asymptotic Notations Algorithms perform f(n) basic operations to accomplish task Identify that function Identify size of problem (n) Count number of operations.
Asymptotic Growth Rate
BIG-OH AND OTHER NOTATIONS IN ALGORITHM ANALYSIS
Asymptotic Analysis.
Fundamentals of Algorithms MCS - 2 Lecture # 9
Chapter 2: Fundamentals of the Analysis of Algorithm Efficiency
CS 3343: Analysis of Algorithms
Advanced Analysis of Algorithms
Ch 3: Growth of Functions Ming-Te Chi
Asymptotic Notations Algorithms perform f(n) basic operations to accomplish task Identify that function Identify size of problem (n) Count number of operations.
Intro to Data Structures
Advanced Algorithms Analysis and Design
At the end of this session, learner will be able to:
Design and Analysis of Algorithms
Chapter 3 Growth of Functions
Algorithms CSCI 235, Spring 2019 Lecture 3 Asymptotic Analysis
Advanced Analysis of Algorithms
Analysis of Algorithms Big-Omega and Big-Theta
Big Omega, Theta Defn: T(N) = (g(N)) if there are positive constants c and n0 such that T(N)  c g(N) for all N  n0 . Lingo: “T(N) grows no slower than.
CS 2604 Data Structures and File Management
An Upper Bound g(n) is an upper bound on f(n). C++ Review EECE 352.
Presentation transcript:

Chapter 3 Growth of Functions Lee, Hsiu-Hui Ack: This presentation is based on the lecture slides from Hsu, Lih-Hsing, as well as various materials from the web.

3.1 Asymptotic notation Θ-notation  g(n) is an asymptotic tight bound for f(n). ``=’’ abuse 20070928 chap03 Hsiu-Hui Lee

The definition of requires that every member be asymptotically nonnegative. 20070928 chap03 Hsiu-Hui Lee

EXAMPLE: 20070928 chap03 Hsiu-Hui Lee

Why ? In general, 20070928 chap03 Hsiu-Hui Lee

O-notation (big –oh; Asymptotic Upper Bound) EXAMPLE: 2n2= O(n3) 20070928 chap03 Hsiu-Hui Lee

Ω-notation (big –omega; Asymptotic Lower Bound) EXAMPLE: 20070928 chap03 Hsiu-Hui Lee

Theorem 3.1 For any two functions f(n) and g(n), if and only if and . 20070928 chap03 Hsiu-Hui Lee

O-notation (little-oh) An upper bound that is not asymptotically tight . 20070928 chap03 Hsiu-Hui Lee

ω-notation (little-omega) An lower bound that is not asymptotically tight . 20070928 chap03 Hsiu-Hui Lee

Relational properties Transitivity Reflexivity Symmetry 20070928 chap03 Hsiu-Hui Lee

Transpose symmetry 20070928 chap03 Hsiu-Hui Lee

Trichotomy Although any two real numbers can be compared, not all functions are asymptotically comparable. a < b, a = b, or a > b. It may be the case that neither nor holds. e.g., are not comparable 20070928 chap03 Hsiu-Hui Lee

3.2 Standard notations and common functions Monotonicity: A function f is monotonically increasing if m  n implies f(m)  f(n). A function f is monotonically decreasing if m  n implies f(m)  f(n). A function f is strictly increasing if m < n implies f(m) < f(n). A function f is strictly decreasing if m > n implies f(m) > f(n). 20070928 chap03 Hsiu-Hui Lee

Floor and ceiling 20070928 chap03 Hsiu-Hui Lee

Modular arithmetic For any integer a and any positive integer n, the value a mod n is the remainder (or residue) of the quotient a/n : a mod n =a -a/nn. If (a mod n) = (b mod n). We write a  b (mod n) and say that a is equivalent to b, modulo n. We write a ≢ b (mod n) if a is not equivalent to b modulo n. 20070928 chap03 Hsiu-Hui Lee

Polynomials Polynomial in n of degree d ≧ 0 If a≧ 0, is monotonically increasing. If a≦0, is monotonically decreasing. A function is polynomial bounded if for some constant k . 20070928 chap03 Hsiu-Hui Lee

Exponentials Any positive exponential function with a base greater than 1 grows faster than any polynomial function. 20070928 chap03 Hsiu-Hui Lee

Logarithms A function f(n) is polylogarithmically bounded if   A function f(n) is polylogarithmically bounded if for any constant a > 0. Any positive polynomial function grows faster than any polylogarithmic function. 20070928 chap03 Hsiu-Hui Lee

Factorials Stirling’s approximation   where 20070928 chap03 Hsiu-Hui Lee

Function iteration For example, if , then 20070928 chap03 Hsiu-Hui Lee

The iterative logarithm function 20070928 chap03 Hsiu-Hui Lee

Since the number of atoms in the observable universe is estimated to be about , which is much less than , we rarely encounter a value of n such that . 20070928 chap03 Hsiu-Hui Lee

Fibonacci numbers 20070928 chap03 Hsiu-Hui Lee

Homework-1 Problem 3-1, 3-2 Due: 10/5/2007 20070928 chap03 Hsiu-Hui Lee