Vous êtes sur la page 1sur 23

Table of Contents

Introduction ................................................................................................................................................... i
DIFFERENTIATION .................................................................................................................................. 1
Basics & Differentiation ............................................................................................................................. 1
First Principle & Differentiation Rules ...................................................................................................... 1
Behaviour of Graphs in Calculus ............................................................................................................... 3
Implicit Differentiation .............................................................................................................................. 4
INTEGRAL CALCULUS ............................................................................................................................ 5
Method of integrations ............................................................................................................................... 5
Definite Integral ......................................................................................................................................... 9
NUMBER THEORY .................................................................................................................................. 11
Proofs........................................................................................................................................................ 11
Prime Number .......................................................................................................................................... 12
Linear Diophantine Equation ................................................................................................................... 12
Modular Arithmetic .................................................................................................................................. 13
1. Chinese Remainder Theorem (for solving simultaneous congruencies) .......................................... 13
2. Solving System of Congruencies by Substitution ............................................................................ 13
3. Fermats Little Theorem ................................................................................................................... 14
Number Division ...................................................................................................................................... 14
Numbers in Different Bases ..................................................................................................................... 15
Recurrence Relations................................................................................................................................ 16
GRAPH THEORY ..................................................................................................................................... 17
Definitions ................................................................................................................................................ 17
Graph Theory Theorems .......................................................................................................................... 18
Algorithms ................................................................................................................................................ 19
1. Eulerian, & Hamiltonian Algorithm ................................................................................................. 19
2. Kruskals Algorithm (Finding Minimum Spanning Tree) ............................................................... 19
3. Dijkstras Algorithm (Finding Shortest Path) .................................................................................. 19
4. Chinese Postman Problem (Finding Shortest Eulerian Circuit) ....................................................... 20
5. Travelling Salesman Problem (Finding Shortest Hamiltonian Cycle) ............................................. 20
Some Important Long Proofs ................................................................................................................... 21
Sy Hai Dinh Kungsholmens Gymnasium
IB Mathematics HL Notes (May 2014 Session)

Sy Hai Dinh Kungsholmens Gymnasium (2014)

Introduction
This is part of my series of detailed IB Mathematics HL notes that I took during my mathematics course at
Kungsholmens Gymnasium. Part

consists of

big topics: Calculus, and Discrete Mathematics Option (including

Number, & Graph Theory). The study guide covers the IB syllabus; thus contains lots of derivations & explanations
for different laws and concepts that students need to master at the end of their IB Mathematics HL course.
Notice that there are things within this study guide that are totally not part of the syllabus, but are still put here for
the ones who are interested; these supplementary materials are put within the information boxes (see the figure
below). There are many symbols and abbreviations that are used throughout the study guide, in which some of the
most common ones are listed down below. However, most of the symbols will be defined within the guide itself; so
pay attention to these definitions when using the guide! Also, note that the mathematical formulae that appear
within small red boxes (such as the one presented down below) are the ones that appear within the IB Mathematics
HL formula booklet!
Some common abbreviations:
-

Min, Max: Minimum & Maximum

Trig: Trigonometric

InTrig: Inverse Trigonometric

Example of an information box

Example of an equation that appear within IB Maths HL formula booklet


This guide is not for commercial use; hence, the information presented here (in which most are taken from the
internet; from Mathematics Higher Level Topic 10 Option Discrete Mathematics, written by Paul Fannon, Vesna
Kadelburg, Ben Woolley, & Stephen Ward; and from Mathematics High Level Developed Specially for the IB
Diploma (Pearson Baccalaureate), written by Ibrahim Wazir & Tim Garry) will not be formally referenced.
Please feel free to contact me through email (my email address is dinhsyhai@yahoo.com.vn) if you have any
questions regarding this study guide. Thank you!

Sy Hai Dinh Kungsholmens Gymnasium (2014)

DIFFERENTIATION
Basics & Differentiation
Differentiation is a technique that is used to find the slope of tangent lines at every point on a graph (a function); note
that the graph does not necessarily be a straight-line graph!
-

( )

Notations of differentiation:
( )

st-derivative,

( ( )) for

nd-derivative, &

( ) when

derivatives are only denoted as


-

( ( )) for finding

Differentiation can be done with GDC using graphical


This shows that

methods, or using algebraic method as shown in the figures

) at

is

Remember that when dealing with trig (or intrig) functions in calculus, always use radians instead of degrees this
is to make sure that the inside the functions are consistent with the ones outside the functions
( )

Rules of Limits: let


-

(where
( )

( )

( )

( )

( )

( )
+
( )

( is a specific value;

&

are constants), then:

is a constant)
(where

( )

&

is a constant)

is in indeterminate form (

) however, in case

), then perform algebraic

manipulation (rationalization & fraction simplification) such that only appear in numerator
-

If ( ) exists (where is a specific value), then its obvious that

If

If

( )

( )

( )

( )

is the horizontal asymptote

, then limit doesnt exist

is the vertical asymptote

First Principle & Differentiation Rules


First Principle:
-

A secant line is a line connecting

points,

( )) &

)), on a graph now let be

infinitesimally small, then this secant line becomes the tangent line of point
Secant lines slope is

( )

( )

tangent lines slope is


1

( )

( )

Sy Hai Dinh Kungsholmens Gymnasium (2014)


Basic Differentiation Rules (which can be proven by First Principle):
-

( )

( ( )

(where
)

)
) this can be proven by First Principle & binomial theorem

(
( ))

( ( ))

( ))

( ( ))

( ( )) (

( )&

Chain Rules: Let

( ), then its obvious that when theres no change in , there would be no

change in or (i.e.
-

as they approach ):
now applying the limits, we have

Its obvious that


( )

Chain rule is really useful when ( ) is a composite of

Applying chain rule:


o

For ( )

), then

( )

or more functions

))

( ) this means that the

derivative of an odd function is an even function


o

( )

For

), then

( )

( ) this means that the derivative of an

even function is an odd function


( ) ( ), thus:

Product Rule Let


-

By applying First Principle, & then adding (

( )

) ( ) into the numerator, we can factorize

, then by product rule:

( )

this is the product rule!

& then derive the formula


Quotient Rule Let

) ( )

this is the quotient rule!

Differentiation with Trigonometric (Trig) & Inverse Trigonometric Function (InTrig):


-

Using GDC, we can deduce that

( )

&

Principle, factorization, & co-function identity, we can derive

use these results, together with First


(

results & quotient rule can be combined to differentiate other Trig functions

&

these

Sy Hai Dinh Kungsholmens Gymnasium (2014)


-

( )

Let

of inverse sine), hence

( )

by implicit differentiation,

( )

now by Pythagoras identity,

Using the same method,

Similarly, let

( ))

( )

( )

; but as

(the range

( )

( )

by implicit differentiation,

( )

but since

Differentiation with Exponential (Exp) & Logarithmic (Log) Functions:


-

Using GDC, we deduce that

By chain rule,

by applying First Principle,


( )

)
(

equating the

results give

As

, then by chain rule,

As

can also be written as

, then by product rule,

)
)

(
(

)
)

);

( )
Trig

( )
( )

InTrig

( )

( )

Exp &

( )

Log

Behaviour of Graphs in Calculus


If

( ( ))

, then theres no change when

( ), we must first derive it to get

(i.e.

is a stationary point); to graph a particular function

( ), then apply the sign chart for the function

( ) as follow:

When

( )

, then ( ) is decreasing draw a little arrow pointing downward

When

( )

, then ( ) is increasing draw a little arrow pointing upward

When

( )

, then theres a stationary point here (i.e. a turning point of ( )) draw a horizontal arrow

Now connect all the arrows to get the general shape of the graph of ( )

Sy Hai Dinh Kungsholmens Gymnasium (2014)


Concavity:
-

( ) concaves up whenever

( ) concave down whenever

( ) is a straight line whenever

( )

( ) is increasing (i.e. whenever


( ) is decreasing (i.e. whenever

( )

( )

( ) stays constant (i.e. whenever

For a continuous function, an inflexion point is the point where concavity (up or down) changes since
concavity changes, the inflexion point must always have
o

However, the opposite does not apply (i.e. even though

( )
( )

isnt necessarily an inflexion

, then

point) this happens in the case of a straight line graph because

( )

everywhere the on graph

To show whether a point on the graph of ( ) is an inflexion point or not:


Step : Show that

( )

Step : Figure out the sign of the second derivative of any point that is close to , but is to the left of it
Step : Figure out the sign of the second derivative of any point that is closer to , but is to the right of it
Step : Compare the signs to see if the concavity changes if it does, then

is an inflexion point

First Derivative Test (max & min test):


-

If

( ) changes sign from plus to minus as ( ) passes through a stationary point, then the point is a max

If

( ) changes sign from minus to plus as ( ) passes through a stationary point, then the point is a min

If

( ) doesnt change sign as ( ) passes through a stationary point, then the point is neither a max nor a min

However, this test can be easily done by setting up a sign chart for

( ) & then draw the general shape of ( )

Second Derivative Test (max & min test):


-

If

( )

, then ( ) concaves down

is a max

If

( )

, then ( ) concaves down

is a min

If

( )

, then the test fails first derivative should now be applied!

Both derivative tests can be applied in optimization problems because optimization is basically a process of choosing
the best option for a problem; & this best option usually occurs at a critical value (a max or a min)

Implicit Differentiation
Implicit Equations are equations of both
pass the vertical line test); let
-

Step

Differentiate

& ; they dont necessarily have to be a function (i.e. they dont have to

be an implicit equation but not a function to find stationary points of


implicitly by:
with respect to

Differentiate (term-by-term) both sides of the equation

For any terms containing , differentiate by simply writing

Now use algebra to isolate

Step

Since

(like

& then solve for it

) is also an implicit equation that contains both

found by simultaneously solving equation

& equation

&

stationary points must be

Sy Hai Dinh Kungsholmens Gymnasium (2014)

INTEGRAL CALCULUS
Method of integrations
( )

Integration is the opposite process of differentiation let


is the integrand; &

( ), then ( )

( )

(where ( )

is the constant of integration which must be included when finding the general equations)

Anti-Derivative is the simplest method of integration, as it is basically a direct reverse of differentiation this
method can thus be applied with simple, common, & non-composite functions
Basic Integration Rules (which are straight-forward as theyre all consistent with differentiation):
( )

( )

Constant Rule:

Addition & Subtraction Rule: ( ( )

Polynomial Rule:

| |

for

), but

(where
( ))

is a constant)
( )

(where

( )

) the absolute-value is necessary because

(where

is defined for all

note that the rule is absolute true also because

is only defined for

(except
is symmetrical

& thus has the same slopes on both sides of the -axis

Integration by Substitution
-

Step : Choose ( ) such that is the variable that were integrating with respect to; then differentiate ( ),
so that

can be written in terms of

Step : Substitute both

&

into the original integral to transform the original integral into a basic form such

that we can apply anti-derivatives directly to integrate the integral with respect to
-

Step : Substitute back the original , & add the constant of integration

Example: Integrate
(1) As

with respect to

(2) As

&

), thus we need to choose


(

, thus

(3) Hence,

Integration by Parts
By product rule of differentiation,
equation with respect to , we get

)
(

; now by integrating all the terms on both sides of the


)

this is the method of integration by parts!

Sy Hai Dinh Kungsholmens Gymnasium (2014)


-

choose the variables wisely, such that

Re-write the integral that we have to integrate into the form


is something thats easy to differentiate, while

Differentiate to get

As , ,

,&

: Remember to keep repeating the process until

Case

, while integrate

is something thats easy to integrate


to get

are now known, we can use the formula above to evaluate the integral
can be integrated anti-derivatives or

substitution; during the repetition of the process, do not change the nature of substitution; i.e. always
differentiate the same type of function (e.g. polynomial, trig, etc), & integrate the same type of function!
o

Case : If the process returns to the original integral, we can then group

together & solve for it

Example for case : Evaluate


(1) Let

&

, thus:

(2) Repeat the process of integration by parts on

(3) Combining the results from (1) & (2) gives


Example for case : Evaluate
(1) Let

&

, thus:

(2) Repeat the process of integration by parts on

(3) Combining the results from (1) & (2) gives

together gives

grouping

Integration with Trig Functions


Integrating trig functions requires a wise use of trig identities, in which the most common ones are
Pythagoras identities

,&

these identities help simplifying the integrals to transform them into a basic form in order to apply anti-derivative
Integrals with Even Powers of Trig Functions:
-

Use Pythagoras identities to transform the even powers into simpler form to apply anti-derivatives

Note that anti-derivative should be used for

For
terms of

( is even), write

&

functions as
( )

as

then use the substitution

because

)
( ) where

&

( ) can be written in
same goes for

Sy Hai Dinh Kungsholmens Gymnasium (2014)


Example: Evaluate
(

(1)

(2) Now let

(3) Combining results from (1) & (2) gives


Odd Powers:
-

For

( is odd), write

( ) where

as

then use the substitution


-

For

( ,

where

For

are odd), write

as

by the Pythagoras identities then use the

because
, its best to transform it to

same goes for

because

can be written in terms of

substitution

( ) can be written in terms of

For

now let

, then

( is odd), then write

as

use the substitution

now

to solve for the integral

Example: Evaluate
(1)

(2) Let

, its best to transform it to


(

For

is odd), since

integration by parts with

(3) Combining results from (1) & (2) gives


For

|
)

now let

, then

, we can integrate the integrals using

,&

Example: Evaluate
(1) We know that

; now let

(2) But

}
(

&

, thus:

(3) Combining the results from (1) & (2) gives


grouping

together gives

|)

Sy Hai Dinh Kungsholmens Gymnasium (2014)

Integration with InTrig Functions


( )

Remember to use anti-derivatives wisely as

( )

&

these anti-derivatives can also be used in a special case when theres a quadratic expression in the integrals by:
-

First completing the square to change the quadratic expression into the vertex form (
can let

,&

, in which we

in this way, the original quadratic expression has been transformed into an

easier form such that we can apply the

anti-derivatives above

Whenever these following expressions (

, or

, or

) appear within an integral (where is a

constant & is a function of the variable that were integrating with respect to), then use the following substitution:
Expression

Substitution

Example with expression


-

Step : Let

Simplification using the Substitution

Integrate

substitute these into the integral gives

|
|

(
( (

Geometric Representation

|))

Step : Using the figure down below, its quite easy to deduce that

,&

thus:

Sy Hai Dinh Kungsholmens Gymnasium (2014)

|
(

)(

Similar methods can be applied for expression

just remember to use the right substitutions!

,&

Definite Integral
Let

&

integrals can be evaluated by:


-

( )

represent the limits of an integral (i.e. theyre some values of ); if ( )


( )|

( )

( ( )

( ( )

( )

, then definite

( )

Note that the limits are for the variables that were integrating with respect to if we perform substitution, we
must remember to change our limits such that theyre suitable for the variable that weve just substituted in

Fundamental Theorem of Calculus:


-

Let ( ) & ( ) be the derivatives of ( ) & ( ), respectively; and let be a constant (i.e.

Now, since

( )|

( )

( )

( ), thus

( )

this is the fundamental theorem of calculus, which states that


-

( ) & write

, then remember to use the substitution


&

range

be some values of

( )

( )

( )

( )

( )

(e.g. ( )), that is more complicated than the simplest function

Note that if the upper limit is a function of

Let

( )

if ( ) (where

in terms of

) is the average value of the function ( ) over the

, then just like calculating the area of a rectangle with the height of ( ), & the width of

area of the function over the range is

( )

) ( ) thus ( )

, the

( )

Areas in a Graph
Area Between -axis & a Function of :
-

Using analogy of finding the area of a rectangle, a small change in area (


(where
while

is a small change in

) under the graph of

& can analogically be thought of as the width of the rectangle,

is the height of the rectangle) thus the area over the range

is

Limits can then be used for a better approximation

When dealing with cases where areas are both above & below the -axis, use Case
below), but remember to let ( )

is estimated by

as it is the area between a function

(which is explained down

( ) & the -axis (

( )

Sy Hai Dinh Kungsholmens Gymnasium (2014)


Area Between
-

Case : If either ( )
( )

|
-

Functions ( ) & ( ):
( ) or ( )

( )

( )

( ) over the range


( )

, then area between these

| the absolute value takes care of any negative signs


(i.e. therere parts where ( )

Case 2: If ( ) & ( ) intersect somewhere over the range


therere parts where ( )
o

functions is

( ), &

( ) in this range), then do either one of the following methods:

Sketch the curve to find the points of intersection these points split the range

into different parts

we can calculate the area of each part, & add their absolute values together
| ( )

o Evaluate

( )|

| ( )

( )|

with GDC

Area Along -axis: This is very similar to finding the areas along the -axis, only with

&

in the integrals be

interchanged (i.e. imagine -axis as the -axis, while the -axis being the -axis)
Note that its impossible to find area over an asymptote of any curve, as technically, the area would be infinite!!!

Volumes of Revolution
( ):

Disk Method For a volume ( ) of revolution around -axis created by a function


-

Using the analogy of finding the volume of a cylinder, the volume of


a small disk section of the function is estimated by
can analogically be thought of as the height of the

(where

is the radius) thus the volume of revolution over

cylinder, while
the range
-

is

Limits can then be used for a better approximation,

when

using the GDC to evaluate this, remember to draw the graph of


Volume between

( )&

( ) is

| (

| (

Likewise, for a volume of revolution around the -axis, we just need to interchange

&

in the integrals; thus

hence, we have to find in terms of which is quite difficult & lengthy sometimes in

this case, its better to use the shell method as it avoids having to find in terms of !
Shell Method (used when volume of revolution around -axis):
-

Using the analogy of finding the volume of a rectangular box, volume of a small change in volume is estimated
by

( )

(where

can analogically be thought of as the length of the box, ( ) as the width, &

as the thickness) volume over the range


-

For volumes around

-axis between

functions

is
( ) &

( ), then

absolute value should only be used if ( ) & ( ) intersects in the range

10

( )

( )

( )
( )|

the

Sy Hai Dinh Kungsholmens Gymnasium (2014)

NUMBER THEORY
An axiom is a universally accepted principle, rule or a proposition that is assumed without proof & serves as a
starting point from which other statements are logically derived

Proofs
To prove a statement
then

is true) &

(i.e.
(i.e. if

is true if & only if


is true then

is true), then

separate statements

(i.e. if

is true

is true) must be proven!

Proof by Implication:
-

Use intuitive logics to prove than

(where

&

are

particular propositions)

Proof by implication gives rise to proof by contrapostive, which is based on the fact that
if we prove

equivalent to its contrapostive

, then

is logically
is proven

Proof by Contradiction:
-

A proposition is disproved by showing that its truth would lead to an impossible conclusion relies on the law
of excluded middle, which states that either a proposition or its negation must be true

This can be used to prove that must be irrational number, or to prove that if

is odd, then

is also odd

Proof by Pigeonhole Principle:


-

If

objects are divided into

groups, then there is a group which contains at least

objects; note that

the pigeonhole principle itself can be proved by contradiction


Proof by Mathematical Induction:
-

Induction is based on domino effects it can thus be used to prove proposition involving only positive integers

To prove by induction that a proposition

is true for all

, follow these steps:

Basis case: Show that the st case of

is true (i.e. let

Inductive: Make an assumption that it


given by the question to prove for

is true for all

, then use this assumption & the definition

when
, and if its true for all

Conclusion: Since the statement is true for


; Hence, by the principle of induction,

, it must also be true for

is true for all

Proof by Strong Induction:


-

If

is true for some number of base cases, & assuming that

true for

thus by principle of strong induction,

11

is true for all

is true for all

, we can show that its also

Sy Hai Dinh Kungsholmens Gymnasium (2014)

Prime Number
is a prime or not, its best to divide

To check whether an integer

by all primes that are less or equal to

Euclids Lemma:
If

is prime & |

If

If

is prime & | , then | and

If

&

Prime factorize

, then |
(

or | proof is as follow:

; but |

) (i.e. | )

this is a result of st statement

are relatively prime, & if

, then both

|(

&

are square numbers proof is as follow:

&
|

simplify this expression; as

; as

& |

, we cant further

are square numbers

Fundamental Theorem of Arithmetic:


(

) can be prime factorized this can be proven by strong induction!

Theorem : All

Theorem : Theres only

Theorem : Therere infinitely many prime numbers proof (very similar to induction) is as follow:
o

Let there be a number


primes between

way to prime factorize a number this can be proven by contradiction!


such that theres no other

that can be prime factorized as

&

its clear that

; thus

can be prime factorized there must be a prime

However, by theorem ,

this concludes that therere infinitely many primes for theorem

& that |

such that

to hold true

Linear Diophantine Equation


Linear Diophantine Equations are equations of the form
find general solutions to
If

such that we use discrete maths now, let

):

there are infinitely many solutions:

Apply Euclidean algorithm in backwards to write


such that (

equation by
-

in terms of a parameter

doesnt divide , then theres no solutions (as both sides have no common factor)

If | , then
-

&

are constants) our task is

(where

Now, its logical to say that if


,&
Thus (

only integers, therefore

is increased, then

, where

&

( )

(where
,

are called particular solution

must decrease such that the equation stays the same; if

are the exact amount to keep the equation stay the same
)

( ) ; but since the parameter


&

); then multiply both sides of the

thus,

can be of any integer values, & we are dealing with

can be satisfied with the following equalities:

General solution to the Diophantine Equation is


Sometimes, solutions get restricted (e.g.

&

,&

,&
(for

) in this case, write the inequalities & solve for them

12

Sy Hai Dinh Kungsholmens Gymnasium (2014)

Modular Arithmetic
Tips when solving problems in modular arithmetic (which is basically the study of numbers with same remainders):
-

Definition of modulo is as followed: If

), then

(i.e.

|(

)) this definition is

extremely helpful when proving something within modular arithmetic


-

When working with modulo, remember to reduce the remainder to the smallest value, thatll give us easy answer
to the modulo (e.g. its ideal to have the value equal to due to its special multiplication property)

The remainder sometimes repeats itself as a number is raised to different powers its good to find the rule of
(

repetition; e.g.

when is odd, while

when is even

Theorems in Modular Arithmetic (can be proven by direct proof, which usually involves the use of the definition
(

of modulo) let
(

), &

), then:

)
(

) (where

If | ; |

) (where
(

) note that we can add the multiples of to only


(

We mostly use the last

side at a tie

rules for solving Linear Congruencies

1. Chinese Remainder Theorem (for solving simultaneous congruencies)


For these
&

following simultaneous congruencies

)&
(

are co-prime), then theres a unique solution

), if

(i.e. if

) (in which is any term that satisfies

both of the congruencies) can be found by inspection or by setting up a Diophantine equation as follow:
-

) rearranging the equation gives

(in which

solve

this Diophantine equation for & such that we can use the results to find
2. Solving System of Congruencies by Substitution
Let

),

),

),.., be a system of simultaneous congruencies the

trick here is to solve each of the congruencies in turns & then substitute into the next congruency as follow:
-

Step : Write st congruency as equality using definition of modulo, i.e.


this into the nd congruency such that

(for

) substitute

) from this, its easy to solve for , & then

write in terms of another variable (e.g. )


-

Step : Substitute this new variable into the rd congruency & solve for it this is very similar to Step

Step : Repeat Step

until substitutions have been done for all the congruencies

13

Sy Hai Dinh Kungsholmens Gymnasium (2014)


-

Step : Write in terms of the last variable that was substituted this equality can then be transformed into a
congruency (with modulo

) which is the simultaneous solution to the given system of congruencies

This method is extremely useful as it can be applied in any situation (even when

are not co-prime

as required by Chinese Remainder Theorem) this is great for a computer program!


3. Fermats Little Theorem
-

If is a prime, & that

Special case of the theorem requires

, then
(

, meaning that

This is the quickest way to reduce the remainder of some large number to the smallest possible value that gives
an easy answer to the modulo its very useful when finding the remainder for a large power
Note that if is a composite number, break into products of primes & then apply the theorem several times

Number Division
Its very straight-forward to compute the remainder of a number division; however, it gets complicated when dealing
with negative integers in these cases, the remainder must satisfy the inequality | |

| | (where is the

remainder, & is the divisor) such that is closest to as much as possible!


Factor Theorem:
-

Its obvious that

), thus

), which means that (

is basically the factor theorem, & it will be used to prove the divisibility test of
-

Similarly,
of

(which states that an integer is divisible by

For proof of divisibility by


factor theorem, |(

& , rewrite
(

(
o

) (

is divisible by

) but by

same for divisibility by

) this can then be substituted in the equation of

is basically the alternating sum of the digits


) Let

, then:

Proof: As
(

, then:

Some Theorems about Greatest Common Divisor (


-

) (
(

as follow:

((

); thus | if the sum

From factor theorem, its clear that

&

if the alternating sum of its digits is divisible by

as

) this

) this will be used to prove the divisibility test

Given an integer

Proof for Divisibility Test of , , &


-

) (

)|(

, so

Proof: Its obvious that

) 2 pairs of integers (

same common divisors, thus they must have the same greatest common divisor

14

) &(

) have the

Sy Hai Dinh Kungsholmens Gymnasium (2014)


(

this result is important as its used to derive Euclidean Algorithm!


(

Proof: Its obvious that

) 2 pairs of integers (

)&(

) have

the same common divisors, thus they must have the same greatest common divisor
(

Euclidean Algorithm (which can be used to find

)):

Step : Find the remainder of

call this

Step : Find the remainder of

call this

Step : Continue this process until the remainder is zero the last non-zero remainder is the

This algorithm works because


(

Prove that

(
(

)
(

(
)

,&

(for

Step : Let

Step : From ( ) & ( ), we get


(

, then
(

Step : Let

, which means that

, & if we give a value such that

keep repeating this process until

This also means (

(for

)
; but since

however, for
)

)|(

|
to be the

), then

)
(

), i.e. its a proof for If | , & | , then

)|

Numbers in Different Bases


For a number in base denoted by ( ) the place values are worth times more than the previous one; in
base , therere digits (from
Converting Number from Base

); if

, letters will be used instead!

to Base :

Step : Find the largest power of that goes into the number the quotient is the st digit

Step : Divide the remainder by the previous power of to find the quotient, which is the next digit

Step : Repeat ( ) until division by

has been done

Mathematically, just write ( )


that goes into , while

(in which is the largest power of

is the number of digits in base )

To convert from one base to any other base, its easiest to go via base 10
Converting Number from Base to Base
as its done with base

Multiply each digit with the corresponding powers of (just

), then add all the terms together

Converting Number from Base

to Base Use the fact that each base-

digit can be written as a

block of digits in base this is mostly used in computer science to convert from base

15

to base

Sy Hai Dinh Kungsholmens Gymnasium (2014)


Divisibility Test:
-

A base- number is divisible by if & only if the last digit is divisible by

A base- number is divisible by


method as divisibility test of

if & only if the sum of its digits is divisible by

in base

A base- number is divisible by

(same proving

)
if & only if the alternating sum of its digits is divisible by

proving method as divisibility test for

in base

(same

Arithmetic Operations in other bases can be done using the column method (just as it is in base

Recurrence Relations
One of the purposes of the study of recurrence relations is to find an equation (a solution) that gives an explicit
definition to a sequence from the sequences recursive definition
1. First-Order Recurrence Relations
General form of a recursive definition that well work with is:

general solution (i.e. the explicit formula) will be of the form


-

Substitute

Then use

&

are constants (note that

, then its a geometric sequence) we now assume that the

, then its an arithmetic sequence; if

if

, where

into the recursive definition to find


(which is always given) to find

2. Second-Order Recurrence Relations


General form of a recursive definition that well work with is:
now, assume that

(where

&

are constants)

this is called the

(for some & ), then

characteristic equation, which we will solve for


If the equation gives

real roots, then:

General solution will be of the form

Then, use

&

(which are always given) to find

If the equation gives


-

&

are the

roots)

complex roots, then:


(where

(which are always given) to find

If the equation only gives

&

General solution will be of the form

Then, use

complex roots) now,

to simplify the final solutions!

real root, then:

are the

&

When required, use De Moivres Theorem & the polar form of

&

&

General solution will still be of the form


use

(where

(where

(which are always given) to find &

16

is the root)

Sy Hai Dinh Kungsholmens Gymnasium (2014)

GRAPH THEORY
Definitions
-

An edge connects

Multiple edges have the same endpoints this thus creates a multi-graph

Vertex with a loop will be counted as 2 degrees this is denoted as

If

Simple graph is the graph that contains no loops or multiple edges

Sub-graph is part of another graph which have all the vertices connected

Di-graph is a directed graph (in which the directions are always from a vertex in a row to a vertex in a column,

( )

, then

adjacent vertices;

adjacent edges have

common vertex
( )

is pendant

i.e. row-to-column rule) in-degree of vertex

(denoted by

( )) is the no. of edges that goes into

similarly for out-degree total in-degree = total out-degree (because what goes in must go out)
-

Bi-partile graph is when the vertices can be divided into

subsets; vertices from same subset arent connected

to each other, & therere only edges connecting the vertices between the
-

Complete graph (

is complete simple graph, while

vertex is connected to all other vertices with only

subsets

is a complete bi-partile graph) is a graph where each

edge a graph

is a complement graph of graph

if

they make a complete simple graph when they combine


-

Null graph is a graph with only vertices, but without any edges

Walk is a sequence of linked edges Length of a walk is the no. of edges used

Trail is a walk with no repeating edges; Circuit is a trail which begins & ends at the same vertex

Path is a walk with no repeating vertices; Cycle is a path which begins & ends at the same vertex

Note that a trail doesnt necessarily be a path, but a path is definitely a trail (because no repeating vertices also
means that there are no repeating edges) the same relation goes for connection between a circuit & a cycle

A trail or a circuit, which contains all the edges of the graph, are called Eulerian a graph which contains an
Eulerian circuit is called an Eulerian graph

A path or a cycle, which contains all the vertices of the graph, are called Hamiltonian a graph which
contains a Hamiltonian cycle is called a Hamiltonian graph

Planar graph is a graph in a plane with no edges crossing each other

Adjacency matrix of a graph


between

(denoted by

) is a

-matrix, where the entries show the no. of edges

particular vertices the matrix must be symmetric about the diagonal in every undirected graph

Tree is a simple connected graph without any cycles a spanning tree is a tree in a graph which contains all
the vertices of that graph

-regular graph is a graph where all the vertices have the same degree

17

Sy Hai Dinh Kungsholmens Gymnasium (2014)

Graph Theory Theorems


Handshaking Theorem (which can be applied to both multi- & simple graph) states that sum of all the degrees of
the vertices is equal to twice the no. of edges; mathematically,

( )

(where

is a set containing all

vertices of a graph, while is total no. of edges of that graph)


As a result of the theorem, an undirected graph can only have an even number of vertices with odd degrees
is always ( ); this is because each vertex is connected to

No. of Edges in a Complete Graph


vertices (i.e. therere (
there must be ( )

) edges), but since each edge connects


)

other

vertices, thus we have over-counted twice

in a complete simple graph

Bi-Partile Negative Tests:


-

If the

subsets of the bi-particle graph dont have the same no. of vertices there is no Hamiltonian cycle

If the

subsets of the bi-particle graph differ by

or more vertices there is no Hamiltonian path

Rules Relating to Adjacency Matrices:


-

is a simple graph, then sum of the entries in a column/row is the degree of that vertex however, if

If a graph

contains some loops, remember that the entries in the diagonal should be multiplied by
-

No. of walks of length between


(

particular vertices in a graph

can be seen from the appropriate entry in

) (i.e. the power of adjacency matrix) the total no. of walks of length is the sum of all the entries!

Theorems Relating to Eulerian Trail & Circuit:


-

A graph has an Eulerian circuit if & only if every vertex has even degree this is because what goes in must
go out for the walk to go back the same vertex!

A graph has an Eulerian trail (but not an Eulerian circuit) if & only if it has exactly

vertices (which will be the

starting & ending vertices) of odd degree its because there shouldnt be any edge connecting these

vertices

Theorems Relating to Hamiltonian Path & Cycle:


-

If a graph contains a vertex with degree , then it does not contain any Hamiltonian cycles, because we cant go
back to the same position if we go through that vertex

In a complete graph
o

Theres

, therere always

Hamiltonian cycles this is because by the counting principle:

possibility for the st vertex (because it doesnt matter which vertex to start as the cycle can be

started from any vertex e.g. the cycle

possibilities for the nd vertex; similarly, therere


o

Therefore, there should be (


reverse the cycle (e.g.

); however, therere

is essentially the same as

possibilities for the rd vertex, & so on

) possibilities; however, note that we over-counted twice as we can also


is essentially the same as

18

) there should be

possibilities!

Sy Hai Dinh Kungsholmens Gymnasium (2014)


Theorems Relating to Planar Graphs:
-

For all connected planar graphs,

(where , , &

are no. of vertices, of edges, & of faces,

respectively) this is basically the Eulers formula


-

All simple connected planar graphs with triangles (i.e. cycles of


while for the ones with no triangles, the relation

edges) must satisfy the relation

must hold true

To prove that a graph is planar, its enough to just draw it in planar form
To prove that a simple connected graph (with triangles) is not planar, show that it doesnt satisfy
To prove that a simple connected graph (with no triangles) is not planar, show that it doesnt satisfy
Kuratowskis Theorem: A graph is not a planar graph if & only if it contains a sub-graph similar to
(i.e. a sub-graph that can be rearranged to look like

or

or

) this is very useful, because the methods of

proof above wont work for graphs that have a super-small section that is not planar!
No. of Edges in a Tree of Vertices is always

; this is because every vertex is connected to the previous

unique edge each vertex contributes

vertex by only

to the total no. of edges; however, since the st vertex

does not have any previous vertex the total no. of edges must be

Algorithms
1. Eulerian, & Hamiltonian Algorithm
-

To find an Eulerian circuit, we need to use all the edges by constructing several different circuits (note that each
must have the starting/ending vertex as a vertex of another circuit), & then combining them all together e.g.
different circuits

,&

can be combined to become the Eulerian circuit

To find a Hamiltonian path, the only method is to use trial & error

2. Kruskals Algorithm (Finding Minimum Spanning Tree)


-

Step : List at least

Step : Add

Step : Repeat Step

edges from a graph (the shortest first) this is because a tree has

edges

edge at a time (the shortest first) to the tree; but take away any edges that create cycles of any kind
(i.e. keep adding edges) until all of the vertices have been connected

The resulting tree should be the minimum spanning tree, as its made of the shortest

edges of the graph

3. Dijkstras Algorithm (Finding Shortest Path)


-

Step : Draw the following boxes for each of the vertices:


Box

Box

Box

Box

Box
o

Box

shows the order in which the vertices are given permanent labels

Box

shows the shortest distance the from the start to the current vertex

Box

shows the previous vertex

Note that Box ,

,&

are called permanent labels (i.e. if they are filled, they cant be changed) the

algorithm will be completed when all of the vertices are filled with the permanent labels

19

Sy Hai Dinh Kungsholmens Gymnasium (2014)


o

Box

shows the temporary previous vertex the value in this box will get copied into Box

permanent labels are being filled; note that Box

once

is only there to make it easier to do by hand, & thus it

should be deleted after the algorithm is done


o

Box

is the temporary label, which shows the shortest distance so far from the start to that vertex (i.e. it

will get updated whenever we find a shorter path it will not get updated with a new path that is of the
same distance as the old path, but we still need to write down both of the paths for alternatives)
-

Step : Start from the required vertex; find the distances from that vertex to all neighbouring vertices & fill these
values into Box

of all those vertices

Step : Compare Box

of all the vertices that dont have their permanent labels filled, & choose the one with

the lowest value fill in the permanent labels for this vertex
-

Step : After the permanent labels of a vertex have been filled, continue to find the distances from this vertex to
all neighbouring vertices & fill the Box

Step : Repeat Step , & Step

for those vertices

until all vertices are filled with permanent labels

Dijkstras Algorithm is usually done with an already-drawn graph; however, its fine to do it with just an
adjacency table just make sure that you always look at both rows & columns (no matter what!)
Dijkstras Algorithm is used in computer science; however, note that the algorithm can only find the shortest
distance from a particular starting vertex to any other vertices, but not from any vertices to any vertices!
4. Chinese Postman Problem (Finding Shortest Eulerian Circuit)
For a graph with only
-

vertices of odd degrees:

Find the shortest path between these

vertices (by inspection or Dijkstras algorithm) this path will have to

be repeated twice in the final answer e.g.


-

will become

DCBA

Continue to find a Eulerian circuit like normal, & then include the path above in the final answer!

For a graph with

vertices of odd degrees:

possible ways of pairing up the 4 vertices e.g. with vertices ,

Consider all
(

), (

), & (

,&

, the pairings are

) now, choose the combination that gives the shortest distance this

combination will have to be repeated twice in the final answer


-

Continue to find an Eulerian circuit like normal & then include the chosen combination above in the final answer

5. Travelling Salesman Problem (Finding Shortest Hamiltonian Cycle)


-

To find an Upper Bound (UB), we use Nearest Neighbour Algorithm pick a starting vertex, & then go to the
next closest vertex until you have gone back to the original vertex

To find a Lower Bound (LB): remove


the rest of the vertices; then, add

vertex & apply Kruskals Algorithm to find the shortest spanning tree for

shortest vertices of the removed vertex to the spanning tree to obtain the LB

even though this doesnt give a cycle, but its still a LB as it has enough edges to make a Hamiltonian cycle!
-

Note that using a different starting vertex or choosing a different vertex to remove will give a different UB or LB

20

Sy Hai Dinh Kungsholmens Gymnasium (2014)

Some Important Long Proofs


Prove

by Induction

BASIS STEP:
-

If

, & if it is a simple graph, then

If

, & if it has a loop, then

,&

,&

INDUCTIVE STEP:
is true for vertices, edges, & faces i.e.

Our assumption is that

; Now

there are 2 ways that we can build up the graph:


1) Increase to

vertices when we add more vertex (vertex ), we also need to add

more edge

for the graph to be a connected graph; this also means that we havent changed the total no. of faces
Now we have

the assumption,
2) Increase to
have

edges when we add

edges, & faces then using

vertices,
)

more edge (edge ) using the existing vertices, we then

edges, but unchanged no. of vertices; however, the no. of faces will increase by

new edge will divide the region into

because the

parts
Now we have vertices,
the assumption,

edges, &
)

faces then using

CONCLUSION: Thus, by the principle of mathematical induction,

Prove that
In a simple planar connected graph, a new region (i.e. a face) must be surrounded by at least
total no. of edges is at least

times no. of faces (i.e.

edges the

); however, since each edge belongs to

region,

we have over-counted twice


By substituting

(from Eulers formula) into

, we get the relation

Prove that
In a simple planar connected graph with no triangles (i.e. no cycles with
must be surrounded by at least

edges the total no. of edges is at least

however, since each edge belongs to


By substituting

edges), a new region (i.e. a face)


times no. of faces (i.e.

region, we have over-counted twice

(from Eulers formula) into

21

, we get the relation

);