The Quest for Efficiency

Size: px
Start display at page:

Download "The Quest for Efficiency"

Transcription

1 CST8130: Data Structures Algorithm Efficiecy ad the Big-O Created by Rex Woollard Use PageUp ad PageDow to move from scree to scree. Olie use arrow buttos. Click o speaker to play soud. The Quest for Efficiecy Why does it matter? Click o each speaker. How do you compare differet algorithms? How do you measure? 1

2 Liear Loops: Case 1 Coutig by 1 for (it i = 0; i < 1000; i++) Liear Loops: Case 1: Doublig Coutig by 1 for (it i = 0; i < 2000; i++) Absolute Measure of Efficiecy: f() = Value of Program Effort (Iteratios) Effect of Doublig Twice Effort Twice Effort 2

3 Liear Loops: Case 2 Coutig by 2 for (it i = 0; i < 1000; i = i + 2) Liear Loops: Case 2: Doublig Coutig by 2 for (it i = 0; i < 2000; i = i + 2) Absolute Measure of Efficiecy: f() = Value of Program Effort (Iteratios) Effect of Doublig Twice Effort Twice Effort 3

4 Big-O Priciple Big-O measures the effect as you scale to larger values of. We do t care that a loop required 1000 iteratios. We do care that the loop required twice as may iteratios whe we doubled. Thus, the previous two cases are deemed to have the same Big-O. Logarithmic Loops: Multiply Double o Each Iteratio for (it i = 1; i <= 1000; i = i * 2) Iteratio exit Value of i

5 Logarithmic Loops: Multiply: Doublig Double o Each Iteratio for (it i = 1; i <= 2000; i = i * 2) Absolute Measure of Efficiecy: f() = log 2 Value of Program Effort (Iteratios) Effect of Doublig Logarithmic Loops: Divide Divide i Half o Each Iteratio for (it i = 1000; i >= 1; i = i / 2) Iteratio exit Value of i

6 Logarithmic Loops: Divide: Doublig Divide i Half o Each Iteratio for (it i = 2000; i >= 1; i = i / 2) Absolute Measure of Efficiecy: f() = log 2 Value of Program Effort (Iteratios) Effect of Doublig So What? Loop goes from 1000 to 1. Obviously, loop that subtracts 1 takes loger tha a loop that divides by 2. Loops are doig differet thigs! Right! Wrog! Same goal for both. Move from 1000 to 1. Algorithm is differet for each loop, but goal is the same. 6

7 So What? Cosider a commo problem. Coil a rope. Coilig Rope: Two Solutios Two differet approaches (algorithms): 1: Loop the rope aroud your arm, oe coil at a time. 2: Divide the rope i half agai ad agai. 7

8 Coilig Rope: Two Solutios: Effort Assume 100 metre rope. Each loop i coil about 1 metre. 1: Loop rope aroud arm: 100 iteratios. 2: Divide rope i half: 6 or 7 iteratios. Radically Differet Efficiecies Same goal. Differet algorithms. Differet efficiecies. 8

9 Nested Loops: Quadratic: Doublig for (it i = 0; i < 1000; i++) for (it j = 0; j < 1000; j++) Absolute Measure of Efficiecy: f() = 2 Value of Program Effort (Iteratios) 1,000,000 4,000,000 16,000,000 64,000, ,000,000 1,024,000,000 Effect of Doublig 4 times effort 4 times effort 4 times effort 4 times effort 4 times effort Nested Loops: Quadratic: Triplig for (it i = 0; i < 1000; i++) for (it j = 0; j < 1000; j++) Absolute Measure of Efficiecy: f() = 2 Value of Program Effort (Iteratios) 1,000,000 9,000,000 81,000, ,000,000 6,561,000,000 Effect of Triplig 9 times effort 9 times effort 9 times effort 9 times effort 9

10 Nested Loops: Quadratic: Quadruplig for (it i = 0; i < 1000; i++) for (it j = 0; j < 1000; j++) Absolute Measure of Efficiecy: f() = 2 Value of Program Effort (Iteratios) 1,000,000 16,000, ,000,000 4,096,000,000 Effect of Quadruplig 16 times effort 16 times effort 16 times effort Calculatig Efficiecy with Nestig Each sigle iteratio through outer loop requires complete set of iteratios of ier loop. Outer loop had efficiecy of. Ier loop had efficiecy of. Combied efficiecy: multiply each ested loop, thus 2. 10

11 Nested Loops: Liear Logarithmic for (it i = 0; i < 1000; i++) for (it j = 1000; j >= 1; j = j / 2) Outer loop has efficiecy of, sice it is a simple coutig loop. Ier loop has efficiecy of log 2, sice it is a divide by 2 loop. Multiply the two efficiecies because of the estig. Absolute Measure of Efficiecy: f() = log 2 Dealig with Icreasig Complexity Simple examples so far. Cosider somethig more complex. Depedet Quadratic for (it i = 1; i <= 10; i++) for (it j = 1; j <= i; j++) Cotrol of ier loop is depedet o value of outer loop variable. 11

12 Nested Loops: Depedet Quadratic for (it i = 1; i <= 10; i++) for (it j = i; j <= i; j++) = 55 Absolute Measure of Efficiecy: f() = ( ( + 1 ) / 2 ) Need to simplify i order to compare algorithms The Big-O What really matters i measurig efficiecy? Order of Magitude Efficiecy: f() = 2 Writte i Big-O: O( 2 ) 12

13 The Big-O: Simplifyig: 1 Commoly Used Big-O Values to Express Algorithm Performace Raked from Best (Fastest) to Worst (Slowest) O(1) O(log 2 ) O() O( log 2 ) O( 2 ) O( 3 )... O( k ) O(2 ) O(!) I each term, set coefficiet of term to 1. Keep largest term ad discard others. How would you simplify Depedet Quadratic? Absolute Measure of Efficiecy: f() = ( ( + 1 ) / 2 ) The Big-O: Simplifyig: 2 How would you simplify Depedet Quadratic? Expad to express all terms without paretheses. Absolute Measure of Efficiecy: f() = ( ( + 1 ) / 2 ) ( ( + 1 ) / 2 ) 13

14 The Big-O: Simplifyig: 3 How would you simplify Depedet Quadratic? Expad to express all terms without paretheses. Absolute Measure of Efficiecy: f() = ( ( + 1 ) / 2 ) ( ( + 1 ) / 2 ) ( / / 2 ) The Big-O: Simplifyig: 4 How would you simplify Depedet Quadratic? Expad to express all terms without paretheses. Absolute Measure of Efficiecy: f() = ( ( + 1 ) / 2 ) ( ( + 1 ) / 2 ) ( / / 2 ) / / 2 14

15 The Big-O: Simplifyig: 5 How would you simplify Depedet Quadratic? Expad to express all terms without paretheses. Absolute Measure of Efficiecy: f() = ( ( + 1 ) / 2 ) ( ( + 1 ) / 2 ) ( / / 2 ) / / 2 2 / 2 + / 2 The Big-O: Simplifyig: 6 I each term, set coefficiet of term to 1. Keep largest term ad discard others. Absolute Measure of Efficiecy: f() = ( ( + 1 ) / 2 ) 2 / 2 + / 2 15

16 The Big-O: Simplifyig: 7 I each term, set coefficiet of term to 1. Keep largest term ad discard others. Absolute Measure of Efficiecy: f() = ( ( + 1 ) / 2 ) 2 / 2 + / The Big-O: Simplifyig: 8 I each term, set coefficiet of term to 1. Keep largest term ad discard others. Absolute Measure of Efficiecy: f() = ( ( + 1 ) / 2 ) 2 / 2 + / Big-O: O( 2 ) 16

17 The Big-O: Practice Simplifyig: 1 Try simplifyig the followig measure of efficiecy to its correspodig Big-O. Absolute Measure of Efficiecy: f() = The Big-O: Practice Simplifyig: 2 Try simplifyig the followig measure of efficiecy to its correspodig Big-O. Absolute Measure of Efficiecy: f() = 6 log

18 Fidig the Big-O: 1 Fid the Big-O for the followig pseudocode algorithm. i = 1 while (i <= ) { j = 1 while (j <= ) { prit (i, j) j = j + 1 i = i + 1 Icremet Loop: Icremet Loop: k = while (k > 0) { prit (k) k = k / 2 Divide by 2 Loop: log 2 Step 1: Fid efficiecy of each loop. Fidig the Big-O: 2 Fid the Big-O for the followig pseudocode algorithm. i = 1 while (i <= ) { j = 1 while (j <= ) { prit (i, j) j = j + 1 i = i + 1 Icremet Loop: Icremet Loop: k = while (k > 0) { prit (k) k = k / 2 Divide by 2 Loop: log 2 Step 1: Fid efficiecy of each loop. Step 2: Combie: Multiply ested, add sequetial. + log 2 18

19 Fidig the Big-O: 3 Fid the Big-O for the followig pseudocode algorithm. i = 1 while (i <= ) { j = 1 while (j <= ) { prit (i, j) j = j + 1 i = i + 1 Icremet Loop: Icremet Loop: k = while (k > 0) { prit (k) k = k / 2 Divide by 2 Loop: log 2 Step 1: Fid efficiecy of each loop. Step 2: Combie: Multiply ested, add sequetial. Step 3: Simplify. + log log 2 Fidig the Big-O: 4 Fid the Big-O for the followig pseudocode algorithm. i = 1 while (i <= ) { j = 1 while (j <= ) { prit (i, j) j = j + 1 i = i + 1 Icremet Loop: Icremet Loop: k = while (k > 0) { prit (k) k = k / 2 Divide by 2 Loop: log 2 Step 1: Fid efficiecy of each loop. Step 2: Combie: Multiply ested, add sequetial. Step 3: Simplify. + log log 2 2 O( 2 ) 19

20 Big-O Graph Curves Processig Steps Needed to Complete Task (Liear Scale) O(2 ) O( 2 ) O( log 2 ) O() O(log 2 ) O(1) Number of Items i Data Set (Liear Scale) Algorithm Efficiecy for of 10,000 Efficiecy Big-O Iteratios Estimated Time Logarithmic O(log 2 ) 14 microsecods Liear O() 10, secods Liear Logarithmic O( log 2 ) 140,000 2 secods Quadratic O( 2 ) 10, miutes Polyomial O( k ) 10,000 k hours Expoetial O(2 ) 2 10,000 itractable Factorial O(!) 10,000! itractable 20

21 Algorithm Efficiecy for of 10,000 Efficiecy Big-O Iteratios Estimated Time Logarithmic O(log 2 ) 14 microsecods Liear O() 10, secods Liear Logarithmic O( log 2 ) 140,000 2 secods Quadratic O( 2 ) 10, miutes Polyomial O( k ) 10,000 k hours Expoetial O(2 ) 2 10,000 itractable Factorial O(!) 10,000! itractable Expoetial case with equal to oly 1,000 (ot 10,000) would take 3.39e+288 years. The age of the uiverse is estimated to be 1.5e+10 years. 21

Advanced Course of Algorithm Design and Analysis

Advanced Course of Algorithm Design and Analysis Differet complexity measures Advaced Course of Algorithm Desig ad Aalysis Asymptotic complexity Big-Oh otatio Properties of O otatio Aalysis of simple algorithms A algorithm may may have differet executio

More information

Analysis of Algorithms. Introduction. Contents

Analysis of Algorithms. Introduction. Contents Itroductio The focus of this module is mathematical aspects of algorithms. Our mai focus is aalysis of algorithms, which meas evaluatig efficiecy of algorithms by aalytical ad mathematical methods. We

More information

Chapter 22 Developing Efficient Algorithms

Chapter 22 Developing Efficient Algorithms Chapter Developig Efficiet Algorithms 1 Executig Time Suppose two algorithms perform the same task such as search (liear search vs. biary search). Which oe is better? Oe possible approach to aswer this

More information

Algorithm Analysis. Chapter 3

Algorithm Analysis. Chapter 3 Data Structures Dr Ahmed Rafat Abas Computer Sciece Dept, Faculty of Computer ad Iformatio, Zagazig Uiversity arabas@zu.edu.eg http://www.arsaliem.faculty.zu.edu.eg/ Algorithm Aalysis Chapter 3 3. Itroductio

More information

In algebra one spends much time finding common denominators and thus simplifying rational expressions. For example:

In algebra one spends much time finding common denominators and thus simplifying rational expressions. For example: 74 The Method of Partial Fractios I algebra oe speds much time fidig commo deomiators ad thus simplifyig ratioal epressios For eample: + + + 6 5 + = + = = + + + + + ( )( ) 5 It may the seem odd to be watig

More information

P1 Chapter 8 :: Binomial Expansion

P1 Chapter 8 :: Binomial Expansion P Chapter 8 :: Biomial Expasio jfrost@tiffi.kigsto.sch.uk www.drfrostmaths.com @DrFrostMaths Last modified: 6 th August 7 Use of DrFrostMaths for practice Register for free at: www.drfrostmaths.com/homework

More information

Math 21, Winter 2018 Schaeffer/Solis Stanford University Solutions for 20 series from Lecture 16 notes (Schaeffer)

Math 21, Winter 2018 Schaeffer/Solis Stanford University Solutions for 20 series from Lecture 16 notes (Schaeffer) Math, Witer 08 Schaeffer/Solis Staford Uiversity Solutios for 0 series from Lecture 6 otes (Schaeffer) a. r 4 +3 The series has algebraic terms (polyomials, ratioal fuctios, ad radicals, oly), so the test

More information

Zeros of Polynomials

Zeros of Polynomials Math 160 www.timetodare.com 4.5 4.6 Zeros of Polyomials I these sectios we will study polyomials algebraically. Most of our work will be cocered with fidig the solutios of polyomial equatios of ay degree

More information

Properties and Tests of Zeros of Polynomial Functions

Properties and Tests of Zeros of Polynomial Functions Properties ad Tests of Zeros of Polyomial Fuctios The Remaider ad Factor Theorems: Sythetic divisio ca be used to fid the values of polyomials i a sometimes easier way tha substitutio. This is show by

More information

SNAP Centre Workshop. Basic Algebraic Manipulation

SNAP Centre Workshop. Basic Algebraic Manipulation SNAP Cetre Workshop Basic Algebraic Maipulatio 8 Simplifyig Algebraic Expressios Whe a expressio is writte i the most compact maer possible, it is cosidered to be simplified. Not Simplified: x(x + 4x)

More information

MAT 271 Project: Partial Fractions for certain rational functions

MAT 271 Project: Partial Fractions for certain rational functions MAT 7 Project: Partial Fractios for certai ratioal fuctios Prerequisite kowledge: partial fractios from MAT 7, a very good commad of factorig ad complex umbers from Precalculus. To complete this project,

More information

CSI 2101 Discrete Structures Winter Homework Assignment #4 (100 points, weight 5%) Due: Thursday, April 5, at 1:00pm (in lecture)

CSI 2101 Discrete Structures Winter Homework Assignment #4 (100 points, weight 5%) Due: Thursday, April 5, at 1:00pm (in lecture) CSI 101 Discrete Structures Witer 01 Prof. Lucia Moura Uiversity of Ottawa Homework Assigmet #4 (100 poits, weight %) Due: Thursday, April, at 1:00pm (i lecture) Program verificatio, Recurrece Relatios

More information

The Binomial Theorem

The Binomial Theorem The Biomial Theorem Robert Marti Itroductio The Biomial Theorem is used to expad biomials, that is, brackets cosistig of two distict terms The formula for the Biomial Theorem is as follows: (a + b ( k

More information

Northwest High School s Algebra 2/Honors Algebra 2 Summer Review Packet

Northwest High School s Algebra 2/Honors Algebra 2 Summer Review Packet Northwest High School s Algebra /Hoors Algebra Summer Review Packet This packet is optioal! It will NOT be collected for a grade et school year! This packet has bee desiged to help you review various mathematical

More information

Recurrence Relations

Recurrence Relations Recurrece Relatios Aalysis of recursive algorithms, such as: it factorial (it ) { if (==0) retur ; else retur ( * factorial(-)); } Let t be the umber of multiplicatios eeded to calculate factorial(). The

More information

COMM 602: Digital Signal Processing

COMM 602: Digital Signal Processing COMM 60: Digital Sigal Processig Lecture 4 -Properties of LTIS Usig Z-Trasform -Iverse Z-Trasform Properties of LTIS Usig Z-Trasform Properties of LTIS Usig Z-Trasform -ve +ve Properties of LTIS Usig Z-Trasform

More information

3.2 Properties of Division 3.3 Zeros of Polynomials 3.4 Complex and Rational Zeros of Polynomials

3.2 Properties of Division 3.3 Zeros of Polynomials 3.4 Complex and Rational Zeros of Polynomials Math 60 www.timetodare.com 3. Properties of Divisio 3.3 Zeros of Polyomials 3.4 Complex ad Ratioal Zeros of Polyomials I these sectios we will study polyomials algebraically. Most of our work will be cocered

More information

Math 2784 (or 2794W) University of Connecticut

Math 2784 (or 2794W) University of Connecticut ORDERS OF GROWTH PAT SMITH Math 2784 (or 2794W) Uiversity of Coecticut Date: Mar. 2, 22. ORDERS OF GROWTH. Itroductio Gaiig a ituitive feel for the relative growth of fuctios is importat if you really

More information

Apply change-of-basis formula to rewrite x as a linear combination of eigenvectors v j.

Apply change-of-basis formula to rewrite x as a linear combination of eigenvectors v j. Eigevalue-Eigevector Istructor: Nam Su Wag eigemcd Ay vector i real Euclidea space of dimesio ca be uiquely epressed as a liear combiatio of liearly idepedet vectors (ie, basis) g j, j,,, α g α g α g α

More information

Quadratic Functions. Before we start looking at polynomials, we should know some common terminology.

Quadratic Functions. Before we start looking at polynomials, we should know some common terminology. Quadratic Fuctios I this sectio we begi the study of fuctios defied by polyomial expressios. Polyomial ad ratioal fuctios are the most commo fuctios used to model data, ad are used extesively i mathematical

More information

Linearly Independent Sets, Bases. Review. Remarks. A set of vectors,,, in a vector space is said to be linearly independent if the vector equation

Linearly Independent Sets, Bases. Review. Remarks. A set of vectors,,, in a vector space is said to be linearly independent if the vector equation Liearly Idepedet Sets Bases p p c c p Review { v v vp} A set of vectors i a vector space is said to be liearly idepedet if the vector equatio cv + c v + + c has oly the trivial solutio = = { v v vp} The

More information

14.2 Simplifying Expressions with Rational Exponents and Radicals

14.2 Simplifying Expressions with Rational Exponents and Radicals Name Class Date 14. Simplifyig Expressios with Ratioal Expoets ad Radicals Essetial Questio: How ca you write a radical expressio as a expressio with a ratioal expoet? Resource Locker Explore Explorig

More information

CIS 121 Data Structures and Algorithms with Java Spring Code Snippets and Recurrences Monday, February 4/Tuesday, February 5

CIS 121 Data Structures and Algorithms with Java Spring Code Snippets and Recurrences Monday, February 4/Tuesday, February 5 CIS 11 Data Structures ad Algorithms with Java Sprig 019 Code Sippets ad Recurreces Moday, February 4/Tuesday, February 5 Learig Goals Practice provig asymptotic bouds with code sippets Practice solvig

More information

Further Exploration of Patterns

Further Exploration of Patterns Further Exploratio of Patters Abstract Quadratic Patters a+b+c 4a+b+c 9a+3b+c 16a+4b+c 5a+5b+c 1 st chage 3a+b 5a+b 7a+b 9a+b d chage a a a 1 Coefficiet of is ( a) a. Costat secod chage, therefore it is

More information

REGRESSION (Physics 1210 Notes, Partial Modified Appendix A)

REGRESSION (Physics 1210 Notes, Partial Modified Appendix A) REGRESSION (Physics 0 Notes, Partial Modified Appedix A) HOW TO PERFORM A LINEAR REGRESSION Cosider the followig data poits ad their graph (Table I ad Figure ): X Y 0 3 5 3 7 4 9 5 Table : Example Data

More information

Revision Topic 1: Number and algebra

Revision Topic 1: Number and algebra Revisio Topic : Number ad algebra Chapter : Number Differet types of umbers You eed to kow that there are differet types of umbers ad recogise which group a particular umber belogs to: Type of umber Symbol

More information

1 Generating functions for balls in boxes

1 Generating functions for balls in boxes Math 566 Fall 05 Some otes o geeratig fuctios Give a sequece a 0, a, a,..., a,..., a geeratig fuctio some way of represetig the sequece as a fuctio. There are may ways to do this, with the most commo ways

More information

The Growth of Functions. Theoretical Supplement

The Growth of Functions. Theoretical Supplement The Growth of Fuctios Theoretical Supplemet The Triagle Iequality The triagle iequality is a algebraic tool that is ofte useful i maipulatig absolute values of fuctios. The triagle iequality says that

More information

3. Z Transform. Recall that the Fourier transform (FT) of a DT signal xn [ ] is ( ) [ ] = In order for the FT to exist in the finite magnitude sense,

3. Z Transform. Recall that the Fourier transform (FT) of a DT signal xn [ ] is ( ) [ ] = In order for the FT to exist in the finite magnitude sense, 3. Z Trasform Referece: Etire Chapter 3 of text. Recall that the Fourier trasform (FT) of a DT sigal x [ ] is ω ( ) [ ] X e = j jω k = xe I order for the FT to exist i the fiite magitude sese, S = x [

More information

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis Recursive Algorithms Recurreces Computer Sciece & Egieerig 35: Discrete Mathematics Christopher M Bourke cbourke@cseuledu A recursive algorithm is oe i which objects are defied i terms of other objects

More information

4.3 Growth Rates of Solutions to Recurrences

4.3 Growth Rates of Solutions to Recurrences 4.3. GROWTH RATES OF SOLUTIONS TO RECURRENCES 81 4.3 Growth Rates of Solutios to Recurreces 4.3.1 Divide ad Coquer Algorithms Oe of the most basic ad powerful algorithmic techiques is divide ad coquer.

More information

1 Last time: similar and diagonalizable matrices

1 Last time: similar and diagonalizable matrices Last time: similar ad diagoalizable matrices Let be a positive iteger Suppose A is a matrix, v R, ad λ R Recall that v a eigevector for A with eigevalue λ if v ad Av λv, or equivaletly if v is a ozero

More information

MEI Casio Tasks for Further Pure

MEI Casio Tasks for Further Pure Task Complex Numbers: Roots of Quadratic Equatios. Add a ew Equatio scree: paf 2. Chage the Complex output to a+bi: LpNNNNwd 3. Select Polyomial ad set the Degree to 2: wq 4. Set a=, b=5 ad c=6: l5l6l

More information

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES Read Sectio 1.5 (pages 5 9) Overview I Sectio 1.5 we lear to work with summatio otatio ad formulas. We will also itroduce a brief overview of sequeces,

More information

Design and Analysis of ALGORITHM (Topic 2)

Design and Analysis of ALGORITHM (Topic 2) DR. Gatot F. Hertoo, MSc. Desig ad Aalysis of ALGORITHM (Topic 2) Algorithms + Data Structures = Programs Lessos Leared 1 Our Machie Model: Assumptios Geeric Radom Access Machie (RAM) Executes operatios

More information

Polynomial Functions and Their Graphs

Polynomial Functions and Their Graphs Polyomial Fuctios ad Their Graphs I this sectio we begi the study of fuctios defied by polyomial expressios. Polyomial ad ratioal fuctios are the most commo fuctios used to model data, ad are used extesively

More information

Math 475, Problem Set #12: Answers

Math 475, Problem Set #12: Answers Math 475, Problem Set #12: Aswers A. Chapter 8, problem 12, parts (b) ad (d). (b) S # (, 2) = 2 2, sice, from amog the 2 ways of puttig elemets ito 2 distiguishable boxes, exactly 2 of them result i oe

More information

Root Finding COS 323

Root Finding COS 323 Root Fidig COS 323 Remider Sig up for Piazza Assigmet 0 is posted, due Tue 9/25 Last time.. Floatig poit umbers ad precisio Machie epsilo Sources of error Sesitivity ad coditioig Stability ad accuracy

More information

Math 312 Lecture Notes One Dimensional Maps

Math 312 Lecture Notes One Dimensional Maps Math 312 Lecture Notes Oe Dimesioal Maps Warre Weckesser Departmet of Mathematics Colgate Uiversity 21-23 February 25 A Example We begi with the simplest model of populatio growth. Suppose, for example,

More information

FLC Ch 8 & 9. Evaluate. Check work. a) b) c) d) e) f) g) h) i) j) k) l) m) n) o) 3. p) q) r) s) t) 3.

FLC Ch 8 & 9. Evaluate. Check work. a) b) c) d) e) f) g) h) i) j) k) l) m) n) o) 3. p) q) r) s) t) 3. Math 100 Elemetary Algebra Sec 8.1: Radical Expressios List perfect squares ad evaluate their square root. Kow these perfect squares for test. Def The positive (pricipal) square root of x, writte x, is

More information

Permutations, Combinations, and the Binomial Theorem

Permutations, Combinations, and the Binomial Theorem Permutatios, ombiatios, ad the Biomial Theorem Sectio Permutatios outig methods are used to determie the umber of members of a specific set as well as outcomes of a evet. There are may differet ways to

More information

Introduction to Signals and Systems, Part V: Lecture Summary

Introduction to Signals and Systems, Part V: Lecture Summary EEL33: Discrete-Time Sigals ad Systems Itroductio to Sigals ad Systems, Part V: Lecture Summary Itroductio to Sigals ad Systems, Part V: Lecture Summary So far we have oly looked at examples of o-recursive

More information

7.1 Finding Rational Solutions of Polynomial Equations

7.1 Finding Rational Solutions of Polynomial Equations Name Class Date 7.1 Fidig Ratioal Solutios of Polyomial Equatios Essetial Questio: How do you fid the ratioal roots of a polyomial equatio? Resource Locker Explore Relatig Zeros ad Coefficiets of Polyomial

More information

Math 120 Answers for Homework 23

Math 120 Answers for Homework 23 Math 0 Aswers for Homewor. (a) The Taylor series for cos(x) aroud a 0 is cos(x) x! + x4 4! x6 6! + x8 8! x0 0! + ( ) ()! x ( ) π ( ) ad so the series ()! ()! (π) is just the series for cos(x) evaluated

More information

NUMERICAL METHODS FOR SOLVING EQUATIONS

NUMERICAL METHODS FOR SOLVING EQUATIONS Mathematics Revisio Guides Numerical Methods for Solvig Equatios Page 1 of 11 M.K. HOME TUITION Mathematics Revisio Guides Level: GCSE Higher Tier NUMERICAL METHODS FOR SOLVING EQUATIONS Versio:. Date:

More information

TEACHER CERTIFICATION STUDY GUIDE

TEACHER CERTIFICATION STUDY GUIDE COMPETENCY 1. ALGEBRA SKILL 1.1 1.1a. ALGEBRAIC STRUCTURES Kow why the real ad complex umbers are each a field, ad that particular rigs are ot fields (e.g., itegers, polyomial rigs, matrix rigs) Algebra

More information

Math 113 Exam 3 Practice

Math 113 Exam 3 Practice Math Exam Practice Exam will cover.-.9. This sheet has three sectios. The first sectio will remid you about techiques ad formulas that you should kow. The secod gives a umber of practice questios for you

More information

Chapter 4. Fourier Series

Chapter 4. Fourier Series Chapter 4. Fourier Series At this poit we are ready to ow cosider the caoical equatios. Cosider, for eample the heat equatio u t = u, < (4.) subject to u(, ) = si, u(, t) = u(, t) =. (4.) Here,

More information

Support vector machine revisited

Support vector machine revisited 6.867 Machie learig, lecture 8 (Jaakkola) 1 Lecture topics: Support vector machie ad kerels Kerel optimizatio, selectio Support vector machie revisited Our task here is to first tur the support vector

More information

6.003 Homework #3 Solutions

6.003 Homework #3 Solutions 6.00 Homework # Solutios Problems. Complex umbers a. Evaluate the real ad imagiary parts of j j. π/ Real part = Imagiary part = 0 e Euler s formula says that j = e jπ/, so jπ/ j π/ j j = e = e. Thus the

More information

Solutions to Homework 7

Solutions to Homework 7 Solutios to Homework 7 Due Wedesday, August 4, 004. Chapter 4.1) 3, 4, 9, 0, 7, 30. Chapter 4.) 4, 9, 10, 11, 1. Chapter 4.1. Solutio to problem 3. The sum has the form a 1 a + a 3 with a k = 1/k. Sice

More information

Is mathematics discovered or

Is mathematics discovered or 996 Chapter 1 Sequeces, Iductio, ad Probability Sectio 1. Objectives Evaluate a biomial coefficiet. Expad a biomial raised to a power. Fid a particular term i a biomial expasio. The Biomial Theorem Galaxies

More information

CS 332: Algorithms. Linear-Time Sorting. Order statistics. Slide credit: David Luebke (Virginia)

CS 332: Algorithms. Linear-Time Sorting. Order statistics. Slide credit: David Luebke (Virginia) 1 CS 332: Algorithms Liear-Time Sortig. Order statistics. Slide credit: David Luebke (Virgiia) Quicksort: Partitio I Words Partitio(A, p, r): Select a elemet to act as the pivot (which?) Grow two regios,

More information

Math 451: Euclidean and Non-Euclidean Geometry MWF 3pm, Gasson 204 Homework 3 Solutions

Math 451: Euclidean and Non-Euclidean Geometry MWF 3pm, Gasson 204 Homework 3 Solutions Math 451: Euclidea ad No-Euclidea Geometry MWF 3pm, Gasso 204 Homework 3 Solutios Exercises from 1.4 ad 1.5 of the otes: 4.3, 4.10, 4.12, 4.14, 4.15, 5.3, 5.4, 5.5 Exercise 4.3. Explai why Hp, q) = {x

More information

INTEGRATION BY PARTS (TABLE METHOD)

INTEGRATION BY PARTS (TABLE METHOD) INTEGRATION BY PARTS (TABLE METHOD) Suppose you wat to evaluate cos d usig itegratio by parts. Usig the u dv otatio, we get So, u dv d cos du d v si cos d si si d or si si d We see that it is ecessary

More information

Math 155 (Lecture 3)

Math 155 (Lecture 3) Math 55 (Lecture 3) September 8, I this lecture, we ll cosider the aswer to oe of the most basic coutig problems i combiatorics Questio How may ways are there to choose a -elemet subset of the set {,,,

More information

Summary: CORRELATION & LINEAR REGRESSION. GC. Students are advised to refer to lecture notes for the GC operations to obtain scatter diagram.

Summary: CORRELATION & LINEAR REGRESSION. GC. Students are advised to refer to lecture notes for the GC operations to obtain scatter diagram. Key Cocepts: 1) Sketchig of scatter diagram The scatter diagram of bivariate (i.e. cotaiig two variables) data ca be easily obtaied usig GC. Studets are advised to refer to lecture otes for the GC operatios

More information

Problem 4: Evaluate ( k ) by negating (actually un-negating) its upper index. Binomial coefficient

Problem 4: Evaluate ( k ) by negating (actually un-negating) its upper index. Binomial coefficient Problem 4: Evaluate by egatig actually u-egatig its upper idex We ow that Biomial coefficiet r { where r is a real umber, is a iteger The above defiitio ca be recast i terms of factorials i the commo case

More information

Curve Sketching Handout #5 Topic Interpretation Rational Functions

Curve Sketching Handout #5 Topic Interpretation Rational Functions Curve Sketchig Hadout #5 Topic Iterpretatio Ratioal Fuctios A ratioal fuctio is a fuctio f that is a quotiet of two polyomials. I other words, p ( ) ( ) f is a ratioal fuctio if p ( ) ad q ( ) are polyomials

More information

P.3 Polynomials and Special products

P.3 Polynomials and Special products Precalc Fall 2016 Sectios P.3, 1.2, 1.3, P.4, 1.4, P.2 (radicals/ratioal expoets), 1.5, 1.6, 1.7, 1.8, 1.1, 2.1, 2.2 I Polyomial defiitio (p. 28) a x + a x +... + a x + a x 1 1 0 1 1 0 a x + a x +... +

More information

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 + 62. Power series Defiitio 16. (Power series) Give a sequece {c }, the series c x = c 0 + c 1 x + c 2 x 2 + c 3 x 3 + is called a power series i the variable x. The umbers c are called the coefficiets of

More information

Chapter 6: Numerical Series

Chapter 6: Numerical Series Chapter 6: Numerical Series 327 Chapter 6 Overview: Sequeces ad Numerical Series I most texts, the topic of sequeces ad series appears, at first, to be a side topic. There are almost o derivatives or itegrals

More information

Data Structures and Algorithm. Xiaoqing Zheng

Data Structures and Algorithm. Xiaoqing Zheng Data Structures ad Algorithm Xiaoqig Zheg zhegxq@fudaeduc What are algorithms? A sequece of computatioal steps that trasform the iput ito the output Sortig problem: Iput: A sequece of umbers

More information

SOLUTIONS TO PRISM PROBLEMS Junior Level 2014

SOLUTIONS TO PRISM PROBLEMS Junior Level 2014 SOLUTIONS TO PRISM PROBLEMS Juior Level 04. (B) Sice 50% of 50 is 50 5 ad 50% of 40 is the secod by 5 0 5. 40 0, the first exceeds. (A) Oe way of comparig the magitudes of the umbers,,, 5 ad 0.7 is 4 5

More information

CS:3330 (Prof. Pemmaraju ): Assignment #1 Solutions. (b) For n = 3, we will have 3 men and 3 women with preferences as follows: m 1 : w 3 > w 1 > w 2

CS:3330 (Prof. Pemmaraju ): Assignment #1 Solutions. (b) For n = 3, we will have 3 men and 3 women with preferences as follows: m 1 : w 3 > w 1 > w 2 Shiyao Wag CS:3330 (Prof. Pemmaraju ): Assigmet #1 Solutios Problem 1 (a) Cosider iput with me m 1, m,..., m ad wome w 1, w,..., w with the followig prefereces: All me have the same prefereces for wome:

More information

We are mainly going to be concerned with power series in x, such as. (x)} converges - that is, lims N n

We are mainly going to be concerned with power series in x, such as. (x)} converges - that is, lims N n Review of Power Series, Power Series Solutios A power series i x - a is a ifiite series of the form c (x a) =c +c (x a)+(x a) +... We also call this a power series cetered at a. Ex. (x+) is cetered at

More information

Math 113 Exam 3 Practice

Math 113 Exam 3 Practice Math Exam Practice Exam 4 will cover.-., 0. ad 0.. Note that eve though. was tested i exam, questios from that sectios may also be o this exam. For practice problems o., refer to the last review. This

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms Desig ad Aalysis of Algorithms CSE 53 Lecture 9 Media ad Order Statistics Juzhou Huag, Ph.D. Departmet of Computer Sciece ad Egieerig Dept. CSE, UT Arligto CSE53 Desig ad Aalysis of Algorithms Medias ad

More information

Intermediate Math Circles November 4, 2009 Counting II

Intermediate Math Circles November 4, 2009 Counting II Uiversity of Waterloo Faculty of Mathematics Cetre for Educatio i Mathematics ad Computig Itermediate Math Circles November 4, 009 Coutig II Last time, after lookig at the product rule ad sum rule, we

More information

The Method of Least Squares. To understand least squares fitting of data.

The Method of Least Squares. To understand least squares fitting of data. The Method of Least Squares KEY WORDS Curve fittig, least square GOAL To uderstad least squares fittig of data To uderstad the least squares solutio of icosistet systems of liear equatios 1 Motivatio Curve

More information

Measuring Scales. Measuring Scales

Measuring Scales. Measuring Scales Measurig Scales To measure a legth, a metre scale is geerally used, which is graduated to cetimeter ad millimeter, ad is oe metre i legth. For the measuremet of a legth with a metre scale we adopt the

More information

Math 234 Test 1, Tuesday 27 September 2005, 4 pages, 30 points, 75 minutes.

Math 234 Test 1, Tuesday 27 September 2005, 4 pages, 30 points, 75 minutes. Math 34 Test 1, Tuesday 7 September 5, 4 pages, 3 poits, 75 miutes. The high score was 9 poits out of 3, achieved by two studets. The class average is 3.5 poits out of 3, or 77.5%, which ordiarily would

More information

Ch3. Asymptotic Notation

Ch3. Asymptotic Notation Ch. Asymptotic Notatio copyright 006 Preview of Chapters Chapter How to aalyze the space ad time complexities of program Chapter Review asymptotic otatios such as O, Ω, Θ, o for simplifyig the aalysis

More information

Injections, Surjections, and the Pigeonhole Principle

Injections, Surjections, and the Pigeonhole Principle Ijectios, Surjectios, ad the Pigeohole Priciple 1 (10 poits Here we will come up with a sloppy boud o the umber of parethesisestigs (a (5 poits Describe a ijectio from the set of possible ways to est pairs

More information

Model of Computation and Runtime Analysis

Model of Computation and Runtime Analysis Model of Computatio ad Rutime Aalysis Model of Computatio Model of Computatio Specifies Set of operatios Cost of operatios (ot ecessarily time) Examples Turig Machie Radom Access Machie (RAM) PRAM Map

More information

Sequences III. Chapter Roots

Sequences III. Chapter Roots Chapter 4 Sequeces III 4. Roots We ca use the results we ve established i the last workbook to fid some iterestig limits for sequeces ivolvig roots. We will eed more techical expertise ad low cuig tha

More information

Ma 530 Introduction to Power Series

Ma 530 Introduction to Power Series Ma 530 Itroductio to Power Series Please ote that there is material o power series at Visual Calculus. Some of this material was used as part of the presetatio of the topics that follow. What is a Power

More information

How to Maximize a Function without Really Trying

How to Maximize a Function without Really Trying How to Maximize a Fuctio without Really Tryig MARK FLANAGAN School of Electrical, Electroic ad Commuicatios Egieerig Uiversity College Dubli We will prove a famous elemetary iequality called The Rearragemet

More information

(ii) Two-permutations of {a, b, c}. Answer. (B) P (3, 3) = 3! (C) 3! = 6, and there are 6 items in (A). ... Answer.

(ii) Two-permutations of {a, b, c}. Answer. (B) P (3, 3) = 3! (C) 3! = 6, and there are 6 items in (A). ... Answer. SOLUTIONS Homewor 5 Due /6/19 Exercise. (a Cosider the set {a, b, c}. For each of the followig, (A list the objects described, (B give a formula that tells you how may you should have listed, ad (C verify

More information

v = -!g(x 0 ) Ûg Ûx 1 Ûx 2 Ú If we work out the details in the partial derivatives, we get a pleasing result. n Ûx k, i x i - 2 b k

v = -!g(x 0 ) Ûg Ûx 1 Ûx 2 Ú If we work out the details in the partial derivatives, we get a pleasing result. n Ûx k, i x i - 2 b k The Method of Steepest Descet This is the quadratic fuctio from to that is costructed to have a miimum at the x that solves the system A x = b: g(x) = - 2 I the method of steepest descet, we

More information

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Statistics

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Statistics ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER 1 018/019 DR. ANTHONY BROWN 8. Statistics 8.1. Measures of Cetre: Mea, Media ad Mode. If we have a series of umbers the

More information

MATH 304: MIDTERM EXAM SOLUTIONS

MATH 304: MIDTERM EXAM SOLUTIONS MATH 304: MIDTERM EXAM SOLUTIONS [The problems are each worth five poits, except for problem 8, which is worth 8 poits. Thus there are 43 possible poits.] 1. Use the Euclidea algorithm to fid the greatest

More information

Measures of Spread: Standard Deviation

Measures of Spread: Standard Deviation Measures of Spread: Stadard Deviatio So far i our study of umerical measures used to describe data sets, we have focused o the mea ad the media. These measures of ceter tell us the most typical value of

More information

PH 425 Quantum Measurement and Spin Winter SPINS Lab 1

PH 425 Quantum Measurement and Spin Winter SPINS Lab 1 PH 425 Quatum Measuremet ad Spi Witer 23 SPIS Lab Measure the spi projectio S z alog the z-axis This is the experimet that is ready to go whe you start the program, as show below Each atom is measured

More information

September 2012 C1 Note. C1 Notes (Edexcel) Copyright - For AS, A2 notes and IGCSE / GCSE worksheets 1

September 2012 C1 Note. C1 Notes (Edexcel) Copyright   - For AS, A2 notes and IGCSE / GCSE worksheets 1 September 0 s (Edecel) Copyright www.pgmaths.co.uk - For AS, A otes ad IGCSE / GCSE worksheets September 0 Copyright www.pgmaths.co.uk - For AS, A otes ad IGCSE / GCSE worksheets September 0 Copyright

More information

Chapter Vectors

Chapter Vectors Chapter 4. Vectors fter readig this chapter you should be able to:. defie a vector. add ad subtract vectors. fid liear combiatios of vectors ad their relatioship to a set of equatios 4. explai what it

More information

Last time, we talked about how Equation (1) can simulate Equation (2). We asserted that Equation (2) can also simulate Equation (1).

Last time, we talked about how Equation (1) can simulate Equation (2). We asserted that Equation (2) can also simulate Equation (1). 6896 Quatum Complexity Theory Sept 23, 2008 Lecturer: Scott Aaroso Lecture 6 Last Time: Quatum Error-Correctio Quatum Query Model Deutsch-Jozsa Algorithm (Computes x y i oe query) Today: Berstei-Vazirii

More information

14.1 Understanding Rational Exponents and Radicals

14.1 Understanding Rational Exponents and Radicals Name Class Date 14.1 Uderstadig Ratioal Expoets ad Radicals Essetial Questio: How are radicals ad ratioal expoets related? Resource Locker Explore 1 Uderstadig Iteger Expoets Recall that powers like are

More information

Sorting Algorithms. Algorithms Kyuseok Shim SoEECS, SNU.

Sorting Algorithms. Algorithms Kyuseok Shim SoEECS, SNU. Sortig Algorithms Algorithms Kyuseo Shim SoEECS, SNU. Desigig Algorithms Icremetal approaches Divide-ad-Coquer approaches Dyamic programmig approaches Greedy approaches Radomized approaches You are ot

More information

The Simplex algorithm: Introductory example. The Simplex algorithm: Introductory example (2)

The Simplex algorithm: Introductory example. The Simplex algorithm: Introductory example (2) Discrete Mathematics for Bioiformatics WS 07/08, G. W. Klau, 23. Oktober 2007, 12:21 1 The Simplex algorithm: Itroductory example The followig itroductio to the Simplex algorithm is from the book Liear

More information

Polynomials with Rational Roots that Differ by a Non-zero Constant. Generalities

Polynomials with Rational Roots that Differ by a Non-zero Constant. Generalities Polyomials with Ratioal Roots that Differ by a No-zero Costat Philip Gibbs The problem of fidig two polyomials P(x) ad Q(x) of a give degree i a sigle variable x that have all ratioal roots ad differ by

More information

Stochastic Matrices in a Finite Field

Stochastic Matrices in a Finite Field Stochastic Matrices i a Fiite Field Abstract: I this project we will explore the properties of stochastic matrices i both the real ad the fiite fields. We first explore what properties 2 2 stochastic matrices

More information

Subject: Differential Equations & Mathematical Modeling-III

Subject: Differential Equations & Mathematical Modeling-III Power Series Solutios of Differetial Equatios about Sigular poits Subject: Differetial Equatios & Mathematical Modelig-III Lesso: Power series solutios of differetial equatios about Sigular poits Lesso

More information

Math 113, Calculus II Winter 2007 Final Exam Solutions

Math 113, Calculus II Winter 2007 Final Exam Solutions Math, Calculus II Witer 7 Fial Exam Solutios (5 poits) Use the limit defiitio of the defiite itegral ad the sum formulas to compute x x + dx The check your aswer usig the Evaluatio Theorem Solutio: I this

More information

Kinetics of Complex Reactions

Kinetics of Complex Reactions Kietics of Complex Reactios by Flick Colema Departmet of Chemistry Wellesley College Wellesley MA 28 wcolema@wellesley.edu Copyright Flick Colema 996. All rights reserved. You are welcome to use this documet

More information

U8L1: Sec Equations of Lines in R 2

U8L1: Sec Equations of Lines in R 2 MCVU U8L: Sec. 8.9. Equatios of Lies i R Review of Equatios of a Straight Lie (-D) Cosider the lie passig through A (-,) with slope, as show i the diagram below. I poit slope form, the equatio of the lie

More information

ECONOMIC OPERATION OF POWER SYSTEMS

ECONOMIC OPERATION OF POWER SYSTEMS ECOOMC OEATO OF OWE SYSTEMS TOUCTO Oe of the earliest applicatios of o-lie cetralized cotrol was to provide a cetral facility, to operate ecoomically, several geeratig plats supplyig the loads of the system.

More information

First, note that the LS residuals are orthogonal to the regressors. X Xb X y = 0 ( normal equations ; (k 1) ) So,

First, note that the LS residuals are orthogonal to the regressors. X Xb X y = 0 ( normal equations ; (k 1) ) So, 0 2. OLS Part II The OLS residuals are orthogoal to the regressors. If the model icludes a itercept, the orthogoality of the residuals ad regressors gives rise to three results, which have limited practical

More information

11. FINITE FIELDS. Example 1: The following tables define addition and multiplication for a field of order 4.

11. FINITE FIELDS. Example 1: The following tables define addition and multiplication for a field of order 4. 11. FINITE FIELDS 11.1. A Field With 4 Elemets Probably the oly fiite fields which you ll kow about at this stage are the fields of itegers modulo a prime p, deoted by Z p. But there are others. Now although

More information

Homework 3 Solutions

Homework 3 Solutions Math 4506 Sprig 04 Homework 3 Solutios. a The ACF of a MA process has a o-zero value oly at lags, 0, ad. Problem 4.3 from the textbook which you did t do, so I did t expect you to metio this shows that

More information