You are on page 1of 38

POSTGRADUATE LECTURE

------ ------

Fundamentals of Algorithm
PART I CHAPTER 1

MATHEMATICAL BASICS
for: MSc students in Computer Science

14-Mar-14

N.P. Khu

1.0

CONTENTS

1. Complex Numbers
2. Complex Power Series

3. Generating Functions
4. Harmonic & Bernouilli Number 5. Asymptotic Behavior

N.P. Khu

1. COMPLEX NUMBERS
1. Definitions and Properties a. Field of Complex Numbers How we can nd a root of the equation What about a new number i that Complex numbers, ?

can be dened as pairs of real numbers

equipped with the addition: +


and the multiplication: . form a field, in which is an Abel group with element unit , and is also an Abel group with its unit element, and . distributed to + operation.
N.P. Khu

1. COMPLEX NUMBERS
1. Definitions and Properties b. Representations Facts:

So, can be though of as real numbers and we mean a combination of with coefficients .

Let us denote by i , then can be written as: .


From this, and are called the real and imaginary part, respectively. Identity : is reads as :

!
N.P. Khu

1. COMPLEX NUMBERS
1. Definitions and Properties c. Modulus and Argument Modulus of absolute value of Argument of Distance between is : is defined as:

is a number

such that :

N.P. Khu

1. COMPLEX NUMBERS
1. Definitions and Properties d. Euler formula Let it is obtained :

Euler formula then: Conjugate of for

is a triangle inequality:

. From this, we have:


N.P. Khu

1. COMPLEX NUMBERS
1. Definitions and Properties e. Some Properties Some basic properties of the conjugate, for any :

Identities satisfying for all

: -a rewrite of the triangle inequality, -this is a reverse triangle inequality that can be proved as an exercise, -this follows by induction.
N.P. Khu

1. COMPLEX NUMBERS
2. Limits - Continuous a. Limits Open disk with center a , radius r :

closed disk
A complex function: e.g. : A limit: is defined as

and boundary:

Note:

does not exist ! Because, on the real and imaginary


while
N.P. Khu

1. COMPLEX NUMBERS
2. Limits - Continuous b. Continuity If and exist, then:

In case of

then the function is continuous at if it is at every

. .

A function is continuous on a domain

If

is continuous at

and

then it is obtained:

N.P. Khu

1. COMPLEX NUMBERS
3. Derivatives a. Derivatives Suppose is a complex function and of . The derivative of at is dened as: or If this limit exists. Then is called differentiable at .. If the function is differentiable all points in an open disk centered at then is holomorphic or analytic at . The function is holomorphic on the open set if it is differentiable at every point . Functions which are differentiable in the whole complex plane are called entire. is entire, , it is holomorphic for any is nowhere differentiable due to does not exist
N.P. Khu

is an interior point

10

1. COMPLEX NUMBERS
3. Derivatives a. Derivatives Suppose and are differentiable at and is differentiable at : , and ,

and are open sets in , is a bijection, is the inverse function of , . . If f is differentiable at , , and is continuous at then is differentiable at with:

N.P. Khu

11

1. COMPLEX NUMBERS
3. Derivatives b. Cauchy-Riemann Equations If is differentiable at , then:

[Cauchy-Riemann]
Suppose is such that the partial derivatives and exist in an open disk centered at and are continuous at . If these partial derivatives satisfy the C-R equation then is differentiable at . Based on these above cases, the derivative at is given by:

If we write then and , in this case, Eq. C-R becomes:


(Laplace Equation).
N.P. Khu

It is obtained:

12

1. COMPLEX NUMBERS
4. Special Functions c. Exponential Function Complex exponential function is dened for as

Some properties follow from Euler formula Slide no. 6, satisfying for all are:

The 3rd identity is a very special one and has no counterpart for the real exponential function: periodicity with period 2.
For then .
N.P. Khu

13

1. COMPLEX NUMBERS
4. Special Functions d. Trigonometric Function Complex sine, cosine and tangent, cotangent are dened as:

and
and Properties: for all it is obtained:
Warning :

N.P. Khu

14

1. COMPLEX NUMBERS
4. Special Functions e. Logarithmic Function An inverse function to the complex exponential function is the complex logarithm , such that: that is and . The logarithm function would be

Given a region , any continuous function that satises is a branch of the logarithm (on ). Let denote that argument of which is in . Then the principal logarithm is dened as .
Suppose is a branch of the logarithm. Then wherever it is continuous and: is differentiable

N.P. Khu

15

1. COMPLEX NUMBERS
5. Curvilinear Integration a. Integration on Smooth Curve Let be a smooth curve parametrized, and is a complex function which is continuous on , we dene integral of on as This denition can be extended to piecewise smooth curves.

Example: Let from is

to

over parabol with . A parametrization of this curve , and . Thus:

whence


N.P. Khu

16

2. COMPLEX POWER SERIES


1. Sequences a. Convergence-Divergence Suppose is a sequence and such that for all , there is an integer such that for all : , in such a case the sequence is convergent and is its limit: If no such exists, the sequence is divergent. Example 1: We have: then Example 2: Sequence if if : for any and . For any , let ,

diverges. Let , let then also has

and

: . .

: doing the same, letting

N.P. Khu

17

2. COMPLEX POWER SERIES


1. Sequences b. Related Properties Let be convergent sequences and , we have:

In (c) we have to make sure we do not divide by zero. Monotone Property: Any bounded monotone sequence converges. Archimedean Property: If is any real number, there is an integer which is greater than . Exponentials beat polynomials: for any polynomial any , it is obtained . Factorials beat exponentials: if , then Note these last properties also works for ! and .
N.P. Khu

18

2. COMPLEX POWER SERIES


2. Series a. Definitions A series is a whose members are or partial sums of the series, where is the sequence of terms. A series converges to the limit by definition if : for any
or so that there exists , .

for all

Example 1: For the telescoping series, we have:

Example 2: Harmonic series

diverges, due to this fact:

N.P. Khu

19

2. COMPLEX POWER SERIES


2. Series b. Absolute Convergence Series converges absolutely if .

If a series converges absolutely then it converges.


Example: The alternating harmonic series: but not absolutely. In fact, It is verified , converges,

, the general term satises:

The series converges by comparison Example 1 in previous slide.


N.P. Khu

20

2. COMPLEX POWER SERIES


2. Series c. Sequences and Series of Functions Sequence of functions complex numbers converges at all in Suppose there is an converges at if the sequence of converges. If a sequence of functions, then converges pointwise on .

and are functions dened on . If for all such that for all and for all we have then converges uniformly in to . converging

Let be a sequence of continuous functions on uniformly to on . Then is continuous on .

Suppose are continuous on the region , , for all and converges. Then converges absolutely and uniformly in , Weierstrass M-Test . Consider on converges pointwise to 0 or 1.
N.P. Khu

21

2. COMPLEX POWER SERIES


3. Power Series a. Definition A power series centered at is a series of functions of the form:

+ The geometric series converges absolutely for the function . + The convergence is uniform on any set of the form for any . This is straightforward by using Weierstrass M-Test and letting: with Finally, for all .

to

.
N.P. Khu

22

2. COMPLEX POWER SERIES


3. Power Series b. Region of Convergence Let an open disk with radius centred at 0, and corresponding closed disk: . Any power series has a radius of convergence . By this, is a nonnegative real number, or , satisfying: a. If :, converges absolutely and uniformly on the closed disk of radius centered at . b. If : the sequence of terms is unbounded, so does not converge, or divergences. Open disk in which the power series converges absolutely is the region of convergence. If then is the entire complex plane, and if then is the empty, e.g. : Ratio Test shows that, has a radius of convergence
N.P. Khu

.
23

2. COMPLEX POWER SERIES


3. Power Series b. Region of Convergence Suppose has radius of convergence , then is differentiable, holomorphic, analytic in . has the same radius of convergence Example: Consider and .

, it is obtained

From

and

this means that


Evaluating at , we see that

for some constant


so

as desired !
N.P. Khu

24

3. GENERATING FUNCTIONS
1. Definition a. Definition Consider a sequence of real numbers, the generating function of this sequence is defined on as: for those values of s for which the sum there exists a radius of convergence such that the series convergent if .

Some of useful generating functions:


Polynomial: Exponential: Triginometrics: is entier on is also entier on .

, in which

N.P. Khu

25

3. GENERATING FUNCTIONS
1. Definition b. Harmonic Numbers It is obtained: converges absolutely if .

Taking its integration, term by term, we have:

Hence, By multiplying the above series of where and , we have:

Hence,

is the generating function of

, the so-called
N.P. Khu

harmonic sequence or harmonic numbers w.r.t n.


26

3. GENERATING FUNCTIONS
2. Generating Probabilities a. Probability Generating Functions Consider a count r.v. values, and function is: From , i.e. a discrete r.v. taking non-negative , probability generating

, the series converges absolutely for : Binomial r.v. , : Poisson r.v. ,

, e.g.

: Negative Binomial r.v. has generating function:


if ,
N.P. Khu

.
27

3. GENERATING FUNCTIONS
2. Generating Probabilities b. Uniqueness If and have probability generating function respectively, then it is obtained : and

iff
i.e. iff Let at So, and have the same probability distribution. the rth derivative of its be a count r.v. and . Then and

That is :
e.g. and finally,
N.P. Khu

, then

,
28

3. GENERATING FUNCTIONS
3. An Application a. Solving Recurrence Relation Matching Problem: it is faced with the recurrence relation

for the probability that no matches occur in an n-card matching problem. Multiply through by and sum over:

Let

we can write , provided that with condition : :


N.P. Khu

Expand

and extract the coefficient of

, then for

29

4. BERNOUILLI NUMBER
1. Bernouilli Polynomial a. Bernouilli Numbers The generating function for the Bernoulli numbers is From:

Then:

Replacing

and using

, it is obtained:

N.P. Khu

30

4. BERNOUILLI NUMBER
1. Bernouilli Polynomial a. Bernouilli Numbers Radius of convergence: the generating function is singular whenever , except for . Thus the closest singularities to the real axis occur at 2i , so that the radius of convergence is 2, and :

It is inferred that the Bernoulli numbers grow rapidly with n .

We can not deduce the sign or overall constant from this analysis: The true asymptotic behavior of is :

N.P. Khu

31

4. BERNOUILLI NUMBER
1. Bernouilli Polynomial a. Bernouilli Numbers Bernouilli numbers compared with its above approximation:

N.P. Khu

32

4. BERNOUILLI NUMBER
1. Bernouilli Polynomial b. Bernouilli Polynomials The Bernoulli polynomials are dened by the generating function

where
Properties of these polynomials can be deduced as follows, Bernoulli polynomials at zero are equal to the Bernoulli numbers with and by comparing corresponding terms in the generating function expansion, we nd
N.P. Khu

33

4. BERNOUILLI NUMBER
2. Properties b. Bernouilli Polynomials Dierentiate the generating function w.r.t its 2nd argument:
and

Equating coecients of

we have:

By direct power series expansion of the generating function, the 1st few Bernoulli polynomials can be read o:

So,

and some others also be found, as follows:

N.P. Khu

34

4. BERNOUILLI NUMBER
2. Properties b. Bernouilli Polynomials Direct power series expansion of the generating function we have:

from which we read o:


By keeping two more terms in the expansion we nd

N.P. Khu

35

5. ASYMPTOTIC BEHAVIORS
1. Stirling Formula a. Theorem: Proof :

using the following steps: 1. Verify that: 2. Show that: is a bounded, monotone decreasing sequence. 3. Conclude that: , for some . 4. Conclude that: for some positive real number . 5. Show that: using the following formula, named Wallis:

N.P. Khu

36

5. ASYMPTOTIC BEHAVIORS
2. Approximations b. Some Approximations Euler constant:

whence
By using 6 terms: Stirling constant: Using complex integral : . , in general, it is obtained:

Replacing

: hence
N.P. Khu

.
37

Assignment Home works: 1. file BT-x, x = 1, 2, 3, 4 in:


MScMath-Excer-1.zip

Assignments: 1. read extensions in zip-file


MScMath-Assig-1.zip

38

You might also like