Introduction to Algorithms









Appendix N: Derivation of the Logarithm Change of Base Formula

We take loga of each side of this equation which gives us loga by = loga x


MATHEMATICS 0110A CHANGE OF BASE Suppose that we have

So we get the following rule: Change of Base Formula: logb a = logc a logc b. Example 1. Express log3 10 using natural logarithms. log3 10 =.
Change of Base


6.2 Properties of Logarithms

The proofs of the Change of Base formulas are a result of the other properties studied in this section. If we start with bx logb(a) and use the Power Rule 
S&Z . & .


Logarithms – University of Plymouth

01/16/2001 7. Quiz on Logarithms. 8. Change of Bases ... following important rules apply to logarithms. ... Proof that loga MN = loga M + loga N.
PlymouthUniversity MathsandStats logarithms





Introduction to Algorithms

I can prove this using the definition of big-Omega: This tells us that every positive power of the logarithm of n to the base b where b ¿ 1
cs lect fall notes


Logarithms - changing the base

This leaflet gives this formula and shows how to use it. A formula for change of base. Suppose we want to calculate a logarithm to base 2. The formula states.
mc logs


Elementary Functions The logarithm as an inverse function

Each of these three properties is merely a restatement of a property of exponents. Smith (SHSU). Elementary Functions. 2013. 18 / 29. Changing the base.
. Logarithms (slides to )


Linear Regression Models with Logarithmic Transformations

03/17/2011 have other bases for instance the decimal logarithm of base 10. ... the change in Y for a one-unit change in X. No additional ...
logmodels





Lecture 4 : General Logarithms and Exponentials. For a > 0 and x

Using the change of base formula for Derivatives. From the above change of base formula for loga x we can easily derive the following differentiation.
. General Logarithm and Exponential


Logarithms

Examples. 6. 10. Exercises. 8. 11. Standard bases 10 and e log and ln using the rules of indices which tell us to add the powers 4 and 3 to give the new ...
mc ty logarithms


213247 Introduction to Algorithms

CS 5002: Discrete Structures Fall 2018

Lecture 9: November 8, 2018

1

Instructors: Adrienne Slaughter, Tamara BonaciDisclaimer:These notes have not been subjected to the usual scrutiny reserved for formal publications.

They may be distributed outside this class only with the permission of the Instructor.

Introduction to Algorithms

Readings for this week:

Rosen, Chapter 2.1, 2.2, 2.5, 2.6

Sets, Set Operations, Cardinality of Sets, Matrices9.1 Overview

Objective: Introduce algorithms.

1.

Review logarithms

2.

Asymptotic analysis

3.

Dene Algorithm

4.

Ho wto express or describ ean algorithm

5.

Run time, space (Resource usage )

6.

Determining Correctness

7.

In troducerepresen tativeproblems

1. fo o

9.2 Asymptotic Analysis

The goal with asymptotic analysis is to try to nd a bound, or an asymptote, of a function. This allows

us to come up with an \ordering" of functions, such that one function is denitely bigger than another,

in order to compare two functions. We do this by considering the value of the functions asngoes to innity, so for very large values ofn, as opposed to small values ofnthat may be easy to calculate. Once we have this ordering, we can introduce some terminology to describe the relationship of two functions. 9-1

9-2Lecture 9: November 8, 201823456781248163264128256512102420484096n!n

n2 nn

2nlog(n)log(n)n

pn

1Growth of Functions

From this chart, we see:

1lognpnnnlog(n)n22nn!nn(9.1)

ComplexityTerminology

(1)Constant (logn)Logarithmic (n)Linear (nlogn)Linearithmic nbPolynomial (bn) (whereb >1)Exponential (n!)Factorial

9.2.1 Big-O: Upper BoundDenition 9.1 (Big-O: Upper Bound)f(n) =O(g(n))means there exists some constantcsuch

thatf(n)cg(n), for large enoughn(that is, asn! 1).

We sayf(n) =O(g(n))

Example:I claim 3n2100n+ 6 =O(n2). I can prove this using the denition of big-O:

Lecture 9: November 8, 20189-3

f(n) = 3n2100n+ 6 (9.2) g(n) =n2(9.3) )3n2100n+ 6cn2for somec(9.4)

Ifc= 3 : 3n2100n+ 63n2(9.5)

To prove using Big-O:

Determinef(n) andg(n)

Write the equation based on the denition

Choose acsuch that the equation is true.

{If you can nd ad, thenf(n) =O(g(n)). If not, thenf(n)6=O(g(n)).

These statements are all true:

3n2100n+ 6 =O(n2) (9.6)

3n2100n+ 6 =O(n3) (9.7)

3n2100n+ 66=O(n) (9.8)

Proving

9.7 f(n) = 3n2100n+ 6 (9.9)

CS 5002: Discrete Structures Fall 2018

Lecture 9: November 8, 2018

1

Instructors: Adrienne Slaughter, Tamara BonaciDisclaimer:These notes have not been subjected to the usual scrutiny reserved for formal publications.

They may be distributed outside this class only with the permission of the Instructor.

Introduction to Algorithms

Readings for this week:

Rosen, Chapter 2.1, 2.2, 2.5, 2.6

Sets, Set Operations, Cardinality of Sets, Matrices9.1 Overview

Objective: Introduce algorithms.

1.

Review logarithms

2.

Asymptotic analysis

3.

Dene Algorithm

4.

Ho wto express or describ ean algorithm

5.

Run time, space (Resource usage )

6.

Determining Correctness

7.

In troducerepresen tativeproblems

1. fo o

9.2 Asymptotic Analysis

The goal with asymptotic analysis is to try to nd a bound, or an asymptote, of a function. This allows

us to come up with an \ordering" of functions, such that one function is denitely bigger than another,

in order to compare two functions. We do this by considering the value of the functions asngoes to innity, so for very large values ofn, as opposed to small values ofnthat may be easy to calculate. Once we have this ordering, we can introduce some terminology to describe the relationship of two functions. 9-1

9-2Lecture 9: November 8, 201823456781248163264128256512102420484096n!n

n2 nn

2nlog(n)log(n)n

pn

1Growth of Functions

From this chart, we see:

1lognpnnnlog(n)n22nn!nn(9.1)

ComplexityTerminology

(1)Constant (logn)Logarithmic (n)Linear (nlogn)Linearithmic nbPolynomial (bn) (whereb >1)Exponential (n!)Factorial

9.2.1 Big-O: Upper BoundDenition 9.1 (Big-O: Upper Bound)f(n) =O(g(n))means there exists some constantcsuch

thatf(n)cg(n), for large enoughn(that is, asn! 1).

We sayf(n) =O(g(n))

Example:I claim 3n2100n+ 6 =O(n2). I can prove this using the denition of big-O:

Lecture 9: November 8, 20189-3

f(n) = 3n2100n+ 6 (9.2) g(n) =n2(9.3) )3n2100n+ 6cn2for somec(9.4)

Ifc= 3 : 3n2100n+ 63n2(9.5)

To prove using Big-O:

Determinef(n) andg(n)

Write the equation based on the denition

Choose acsuch that the equation is true.

{If you can nd ad, thenf(n) =O(g(n)). If not, thenf(n)6=O(g(n)).

These statements are all true:

3n2100n+ 6 =O(n2) (9.6)

3n2100n+ 6 =O(n3) (9.7)

3n2100n+ 66=O(n) (9.8)

Proving

9.7 f(n) = 3n2100n+ 6 (9.9)
  1. log base change rule proof
  2. logarithm base switch rule proof