0 views

Uploaded by Ebmesem

- optimization_europython2006
- Unit 4
- Chapter 2
- FLOWCHART.ppt
- MHF4U ISU Part 1
- Part II Computational Project Manual
- Add Maths Project Function Sarawak 2013
- A Comparative Analysis of QADA-KF with JPDAF for Multitarget Tracking in Clutter
- FlowChart & Algorithm
- Chapter 6 : Sets, Relations and Functions
- DivConq01
- Csc313 Lecture Complexity(6)
- MAT1330_Final_2009F
- Lecture01ETH_Terzidis
- Math Pick Up Lines
- Bung 2011 a Man Chester Sanskrit Paper
- Practical 4
- Unit IV Multiple Integrals 19112014
- math project 2
- Lecture1and2

You are on page 1of 5

1 Growth of Functions 1

1.1 Asymptotic Notation . . . . . . . . . . . . . . . . . . . . . . . 2

1.1.1 Asymptotes . . . . . . . . . . . . . . . . . . . . . . . . 2

1.1.2 Asymptotic Notation . . . . . . . . . . . . . . . . . . . 3

1.1.3 Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.1.4 Opposite of Asymptotically tight bounds . . . . . . . . 4

1.2 Mathematical functions and conepts . . . . . . . . . . . . . . 5

1 Growth of Functions

Functions are incarnations of algorithms. As these functions evolve they con-

sume computational resources. Also, functions are often called procedures in

computations and the algorithm-function relationship gives birth to what is

called procedural abstraction. That is what ever procedure is harshed from

a function/algorithm is independent in its own right and solves the intended

problem in its own way. Several procedures with the same name could actu-

ally implement diﬀerent algorithms, but all arrive at the same solution. In

this case, each of the procedures is called a procedural abstracion.

An example is a square root function. THe square root of a number could

be calculated in a variety of ways:

it. . .

we have a choice. And if we have a choice, then we need to use a scale of

preference, and opportunity costs to determine which of the algorithms to

use. A closer look at the concept of scale of preference reveals that we might

chose the algorithm that uses less time to compute the result we are seeking.

And the opportunity cost will enable us get a feel of what we shall loose

if we chose one algorithm over the others. Eventually, we need a proper

understanding of the implications of using any algorithm we choose. How

can we understand what we loose or gain from an algorithm?

The procedures can be formally analyzed to understand the their com-

sumption of resources. It is this formal understanding that will help us

1

classify algorithms, choose which is better in what situation, communicate

our ideas about algorithms, and be able to know what and where to tweak

performance.

The study or analysis of the run times of algorithms is investigated and

expressed formally using a notation called asymptotic notation. We could

call these investigations the Calculus of Algorithms or Algorithmic Calculus.

Note that diﬀerential and Integral Calculus are tools that can also be

implemented to get an understanding of the rates of change of various Algo-

rithms and also to compute the total amount of resources consumed by an

algorithm.

The time taken by an algorithm to perform each step, and eventually the

total time taken to return a result plus the sum total of the cost of every

step taken is called the running time of an Algorithm.

The running time is often expressed as a Mathematical function. There-

fore, we could apply diﬀerential calculus to the emergent runtimes functions

of various algorithms to determine their growth rates.

Similarly, the application of integral calculus as a tool for determining

the total run time, total cost, average cost, total space etc. of an algorithm

is very feasible.

Suppose there is loop that runs n times and uses x steps. The total cost

of such a loop can∫ nbe determined by using the integral of x from 1 to n.

That is, c × 0 x dx = c × ½ × n 2

Where c is a constant.

See the Mathematical concepts of Limits, Sequences and Series for more

understanding of the analysis of the algorithms.

1.1.1 Asymptotes

In Mathematics, an asymptote refers to a line or curve that approaches a

given curve arbitrarily closely, but never touches it. Vertical asymptotes arise

when dealing with rational functios such that the value of the denominator

becomes zero. Vertical asymptotes can tell us more about the domain of a

function.

Horizontal asymptotes are values, curves or lines that anothe function

approaches very closly without actually reaching it. That is as the values

of the function grow large without bound, the value it approaches often

2

tend to be the Horizontal asymptotes. Same as the limit of a function as it

approaches infinity.

limx → ∞ x = L

Interestingly, L could actually be a function. That is:

limx → ∞ x = g(x)

Now, in computer science, Asymptotic notations are used to express the

rate at with algorithms grow by expressing the functions that the runtimes

of these Algorithms approach as their inputs become large without bound.

Suppose f(n) is an Algorithm with input n, and suppose there is a set

of some other functions collectively called g(n). The asymptotic notation of

the run time of f will tell us how f approaches g as n becomes larger and

larger, in the same way that a normal mathematical function will evolve and

approach it’s horizontal Asymptote.

to some other function F(n)such that given 3 constants c1 , c2 , n0 , for

all inputs n > n0 , A(n) is ≥ c1 × F(n) from below and ≤ c2 × F(n)

from above. Therefore, A(n) is sandwiched between c1 × F(n) and c2

× F(n).

Expressed as: 0 ≤ c1 F(n) ≤ A(n) ≤ c2 F(n) for all n ≤ n0

However, when communicating such information, we often say:

A(n) = Θ(F(n))

Although we actually mean A(n) ∈ Θ(F(n))

The sandwich or pinching theorem of limits justifies our notation.

According to the squeeze or sandwich theorem of limits Squeeze Theorem

From this, it is concluded that F(n) is an asymptotically tight bound

for A(n).

bound, it follows that there is a situation where there is either an upper

bound or a lower bound and not both. A case with no lower bound,

that is Asymptote tight bound minus the lower bound, is expressed

using the O-notation. This is called an Asymptotic upper bound.

Expressed as: 0 ≤ A(n) ≤ cF(n) for all n ≥ n0

3

It might be compelling to realize that an Algorithm whose run time is

Θ(n) is a subset of that whose run time is 0(n).

That is,

Θ(F(n)) ⊆ O(F (n))

Often, when taking the run times of Algorithms we omit constants, leading

coeﬃcients, and take just the leading term. An notaion of F(n) = Θ(n2 )

might actually mean that F(n) = a n2 + b n + c.

The fact that

Θ(n) ⊆ O(n),

explains this elimitation of minor terms and the leading coeﬃcient.

Similarly, a algorithm with a growth rate of a × n + b is linear, but can be

expressed as A(n) = Θ(n2 )

(a) Note The upper hints the worst case, which is what we are of-

ten interested in knowing. So O-notation tells us about without

getting us engaged in sophistaced calculations.

For example, the insertion sort Algorithm has 2 major loops.

Loop one has a runtime of n, and loop 2 a run time of n, therefore

the upper bound is n × n which is n2 . And this is the actual run

time of insertion sort Algorithm.

In eﬀect, all what run times express are the bounds of the con-

sumption of resources and not the exact run times of every in-

stance of the algorithm in question.

3. Ω-notation And finally the lower bound. If there is a function F(n) such

that for all n, an algorithm A(n) is ≥ F(n), then F(n) is a lower bound to

that algorithm, A(n).

Expressed as: 0 ≤ cF(n) ≤ A(n) for n ≥ n0

1.1.3 Theorem

A function is bouned if and only if it is bounded from below and above.

For any 2 functions f(n) and g(n), we have f(n) = Θ(g(n)) if and only if

f(n) = O(g(n)) and f(n) = Ω(g(n))

Therefore, the run time of insertion sort is Θ(n) from below and Θ(n2 )

from above.

4

1.1.4 Opposite of Asymptotically tight bounds

In numberline arithmetic, < is know as strictly less than. In Asymptotic

analysis, Asymptotes with ≤ are called Asymptotically tight bounds. The

Opposite of this or bounds that are strictly less than or greater than are

expressed using little notations:

1. Monotonicity

∑

n

4. Polynomials: p(n) = ai ni

i=0

- optimization_europython2006Uploaded byFanilo Razafindralambo
- Unit 4Uploaded bycooooool1927
- Chapter 2Uploaded bySrinivasan Ramachandran
- FLOWCHART.pptUploaded byStanley Bennett
- MHF4U ISU Part 1Uploaded byLeonard Lim
- Part II Computational Project ManualUploaded byKelvin Wong
- Add Maths Project Function Sarawak 2013Uploaded byrockafella101
- A Comparative Analysis of QADA-KF with JPDAF for Multitarget Tracking in ClutterUploaded byMia Amalia
- FlowChart & AlgorithmUploaded byVivek Mishra
- Chapter 6 : Sets, Relations and FunctionsUploaded byRishiArora
- DivConq01Uploaded byRajeev Krishna Singh
- Csc313 Lecture Complexity(6)Uploaded byChristopher Miller
- MAT1330_Final_2009FUploaded byexamkiller
- Lecture01ETH_TerzidisUploaded byPhaethon Psichis
- Math Pick Up LinesUploaded byLina lines
- Bung 2011 a Man Chester Sanskrit PaperUploaded byalshaboti
- Practical 4Uploaded byanandintel
- Unit IV Multiple Integrals 19112014Uploaded byadarsh
- math project 2Uploaded byapi-355204809
- Lecture1and2Uploaded byuazaga
- frege_facUploaded byIvo Quintana
- 9-12 Math I Student Edition Unit 1 Function FamiliesUploaded bySharyahna McNeil
- 1.9 ReviewUploaded byBradley Singh
- lesson plan aug 29Uploaded byapi-380857868
- 02 Program Design.pdfUploaded byAgus Prasetyo
- 1.1-1.4 NotesUploaded byAlex Xanderjoel Hayes
- An Application of DSmT in Ontology-Based Fusion SystemsUploaded byDon Hass
- Tolleson Daily Plans Math Topic FiveUploaded byLindsey
- 7 6-function-operationsUploaded byapi-267265141
- 15F Syllabus bUploaded byJen

- Notes on angularUploaded byEbmesem
- Homework 4Uploaded byEbmesem
- Methods of My CraftUploaded byEbmesem
- Bubblesort StoryUploaded byEbmesem
- div&Conq.pdfUploaded byEbmesem
- recursionUploaded byEbmesem
- Notes on awsUploaded byEbmesem
- Shaped NumbersUploaded byEbmesem
- Analysis of Mergesort algorithmUploaded byEbmesem
- Divide and Conquer Algorithm Design MethodUploaded byEbmesem
- Dynamic Types [Python]Uploaded byEbmesem
- Basic CS definitionsUploaded byEbmesem
- On the growth of AlgorithmsUploaded byEbmesem
- On Proc DesignUploaded byEbmesem
- Programming NotesUploaded byEbmesem

- Spink Auction 17042Uploaded byMitar Miric
- Assm13 Lecture 4 Basic Computer Organization and Design 1Uploaded byvito787
- Amity University MAE Newsletter 1st IssueUploaded bySoumi Bandyopadhyay SB
- Generic Random Species Generator (PHP)Uploaded byPeter Cobcroft
- SAP Activate Methodology for SAP AribaUploaded byCleberton Antunes
- Errata Datasheet 18f2550Uploaded byAlessandro Nakoneczny Schildt
- sap red hat linuxUploaded byVideesh Kakarla
- johnston russell bibliography 2Uploaded byapi-242651875
- Introduction to Airline Information System 4880Uploaded bySneha Agarwal
- Mainframe Question BankUploaded bySukanta Jana
- copyright primerUploaded byapi-320212618
- Hadoop World: Monitoring Best Practices, Ed Capriolo, About.comUploaded byOleksiy Kovyrin
- Whats NewadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdadwasdasdasdasdasdaUploaded byEmanuel Martinez Gonzalez
- 01 Menggambar TeknikUploaded byRahmat Azis Nabawi
- Ct213 Fsm DesignUploaded byAviral Agarwal
- Amit Kumar DL 02Uploaded byRipunjay Mishra
- Lesson 7 FileOrganizationUploaded byRussel Ponferrada
- AIALATAPInnovationGlennHickman030410Uploaded bysteve7857
- User Guide for Cdf PlayerUploaded byVictoria Hahn
- Cable RacewayUploaded by54045114
- longerA4testUploaded bycagerton
- Reservation System Owners ManualUploaded byMissy Restless
- GLB - Gramm-Leach-Bliley ActUploaded byHitachiID
- Lez MatlabUploaded byMarco
- Journal of Water Sanitation and Hygiene for DevelopmentUploaded byYossy Ryananta
- C Programs PracticeUploaded byfaha_jamil
- Rac on VM Best PracticesUploaded byRavi Kasibhatla
- Optimizing Security of Cloud Computing Within the DodUploaded byKhanh Tran
- Nipper Studio Beginners Guide 2.2_0Uploaded byMuhammad Arif Rahman
- Elmer Solver ManualUploaded byDengxian Lai