# Pathway Introduction: Information Technology

Big-O & Asymptotic Analysis Big-O Big O : Implementation independent description of algorithm run time O for Omicron Technical: Function that by a constant factor, is

an upper bound for steps in particular algorithm Big-O Big O Practical def: Function that best describes how work grows in relation to problem size. Example:

n is a better match for the growth of 4n - 1 than n2 Functions Big-O Big O Practical def: Function that best describes how work grows

in relation to problem size. Other bounds Big Omega : function that is a lower bound by a constant factor Big Theta : function that can be either an upper bound or lower bound with right constant

Often mean Big-Theta when say Big-O Big-O Mathematical Definition Big O : Function that by a constant factor, is an upper bound for steps in particular algorithm if and only if There

f(n) is work done by your code g(n) is the function category you want to call it Algebra of Big-O Show: 4n 1 is O(n) Must pick c and k so that:

or 4n 1 Pick k = 0 and c = 5 Algebra of Big-O 4n 1 is O(n)

Important Idea 1 Constants dont matter in Big-O Can treat all constants as 1 Expression 5n 3n2 n2/20 log2(n) + 6

10 Category n : Linear n2 : Quadratic n2 : Quadratic log2(n) : Logarithmic 1 : Constant

Dominant Term Largest term drives growth curve n n2 + 20n n2 1

21 1 10 300

100 100 12,000 10,000 1000

1,020,000 1,000,000 10000 100,200,000

100,000,000 Example Show: 2n2 + 100n is O(n2) Must pick c and k so that: or 2n2 + 100n Pick k = 100 and c = 5

Example 2n2 + 100n is O(n2) Important Idea 2 For Big-O just report largest term Examples: 8n2 + 3n - 10 O(8n2) O(n2)

3log2n + 4n O(4n) O(n) 500 + 3n O(3n) O(n) BigO Limitations Asymptotic Analysis : focus on behavior for large values BigO Limitations BigO focuses on categories at scale

Results may not hold for small problem sizes BigO Limitations BigO focuses on categories at scale Other terms and constants may matter for algorithms in the same category Cases Algorithm may have different Big-O for

Best case Worst case Average case When in doubt, we describe the worst case

## Recently Viewed Presentations

• Arial Book Antiqua Default Design Learning Objectives To understand reasons why people explore the world To know how maps changed over time To recognise reasons why Tudor exploration increased during the reign of Elizabeth I Why do people explore the...
• Chapter 8 Individual Variation in Drug Responses Individual Variation in Drug Responses Factors that influence drug responses are Body weight and composition Age Gender Pathophysiology Drug Tolerance Decreased responsiveness to a drug due to repeated drug administration Three categories of...
• Emergency Management Developments at Harvard Since 9/11 Joe Griffin EH&S Director October 30, 2003 Responsibilities and Relationships Anthrax scare strengthened ties among HUPD, EH&S, UHS, Facilities, News Office, University Operations Center, schools and city Established teams at Executive, Operational Mgt....
• Most intrusive probing than scanning step. Techniques list user accounts list file shares identify applications Tools Null sessions DumpACL Sid2usre onSiteAdmin Showmount NAT legion Banner grabing with telnet or netcat, rpcinfo Gaining Access Based on the information gathered so far,...
• Crystalloid Colloid Crystalloid vs Colloid Type of particles (large or small) Fluids with small "crystalizable" particles like NaCl are called crystalloids Fluids with large particles like albumin are called colloids, these don't (quickly) fit through vascular pores, so they stay...
• A unit trust: is an express fixed trust because all the unit holders are known by name may be a public unit trust (with investments by the public) or a private unit trust may be a trading trust (where the...
• April 2001 Mark D. Baker Essential Measurements to be made at RHIC using the PHOBOS Detector Mark D. Baker Brookhaven National Laboratory for the PHOBOS Experiment Collaboration (Oct. 2004) Results from dAu - an update Results from dAu - an...
• Title: Our senses Author: Ninka Baumgartnerová Last modified by: Vlado15 Created Date: 1/5/2016 11:46:16 AM Document presentation format: Prezentácia na obrazovke (4:3)