SlideShare a Scribd company logo
APPENDIX A
Useful Formulas for the
Analysis of Algorithms
This appendix contains a list of useful formulas and rules that are helpful in the
mathematical analysis of algorithms. More advanced material can be found in
[Gra94], [Gre07], [Pur04], and [Sed96].
Properties of Logarithms
All logarithm bases are assumed to be greater than 1 in the formulas below; lg x
denotes the logarithm base 2, ln x denotes the logarithm base e = 2.71828 . . . ;
x, y are arbitrary positive numbers.
1. loga 1 = 0
2. loga a = 1
3. loga xy = y loga x
4. loga xy = loga x + loga y
5. loga
x
y
= loga x − loga y
6. alogb x = xlogb a
7. loga x =
logb x
logb a
= loga b logb x
Combinatorics
1. Number of permutations of an n-element set: P(n) = n!
2. Number of k-combinations of an n-element set: C(n, k) = n!
k!(n − k)!
3. Number of subsets of an n-element set: 2n
475
476 Useful Formulas for the Analysis of Algorithms
Important Summation Formulas
1.
u

i=l
1 = 1 + 1 + . . . + 1
  
u−l+1 times
= u − l + 1 (l, u are integer limits, l ≤ u);
n

i=1
1 = n
2.
n

i=1
i = 1 + 2 + . . . + n =
n(n + 1)
2
≈
1
2
n2
3.
n

i=1
i2
= 12
+ 22
+ . . . + n2
=
n(n + 1)(2n + 1)
6
≈
1
3
n3
4.
n

i=1
ik
= 1k
+ 2k
+ . . . + nk
≈
1
k + 1
nk+1
5.
n

i=0
ai
= 1 + a + . . . + an
=
an+1
− 1
a − 1
(a = 1);
n

i=0
2i
= 2n+1
− 1
6.
n

i=1
i2i
= 1 . 2 + 2 . 22
+ . . . + n2n
= (n − 1)2n+1
+ 2
7.
n

i=1
1
i
= 1 +
1
2
+ . . . +
1
n
≈ ln n + γ , where γ ≈ 0.5772 . . . (Euler’s constant)
8.
n

i=1
lg i ≈ n lg n
Sum Manipulation Rules
1.
u

i=l
cai = c
u

i=l
ai
2.
u

i=l
(ai ± bi) =
u

i=l
ai ±
u

i=l
bi
3.
u

i=l
ai =
m

i=l
ai +
u

i=m+1
ai, where l ≤ m  u
4.
u

i=l
(ai − ai−1) = au − al−1
Useful Formulas for the Analysis of Algorithms 477
Approximation of a Sum by a Definite Integral
, u
l−1
f (x)dx ≤
u

i=l
f (i) ≤
, u+1
l
f (x)dx for a nondecreasing f (x)
, u+1
l
f (x)dx ≤
u

i=l
f (i) ≤
, u
l−1
f (x)dx for a nonincreasing f (x)
Floor and Ceiling Formulas
The floor of a real number x, denoted x, is defined as the greatest integer not
larger than x (e.g., 3.8 = 3, −3.8 = −4, 3 = 3). The ceiling of a real number x,
denoted x, is defined as the smallest integer not smaller than x (e.g., 3.8 = 4,
−3.8 = −3, 3 = 3).
1. x − 1  x ≤ x ≤ x  x + 1
2. x + n = x + n and x + n = x + n for real x and integer n
3. n/2 + n/2 = n
4. lg(n + 1) = lg n + 1
Miscellaneous
1. n!≈
√
2πn
	
n
e

n
as n → ∞ (Stirling’s formula)
2. Modular arithmetic (n, m are integers, p is a positive integer)
(n + m) mod p = (n mod p + m mod p) mod p
(nm) mod p = ((n mod p)(m mod p)) mod p

More Related Content

What's hot

Subset sum problem Dynamic and Brute Force Approch
Subset sum problem Dynamic and Brute Force ApprochSubset sum problem Dynamic and Brute Force Approch
Subset sum problem Dynamic and Brute Force Approch
Ijlal Ijlal
 
Work book on POLYNOMIALS
Work book on POLYNOMIALSWork book on POLYNOMIALS
Work book on POLYNOMIALS
RASANATH VK
 
PCExam 1 study guide answers
PCExam 1 study guide answersPCExam 1 study guide answers
PCExam 1 study guide answersvhiggins1
 
6.5 notes p2 DeMoivres
6.5 notes p2 DeMoivres6.5 notes p2 DeMoivres
6.5 notes p2 DeMoivres
Jonathan Fjelstrom
 
Sum of subset problem
Sum of subset problemSum of subset problem
Sum of subset problem
A. S. M. Shafi
 
Equations in Polar Coordinates
Equations in Polar CoordinatesEquations in Polar Coordinates
Equations in Polar Coordinates
EFREN ARCHIDE
 

What's hot (7)

Algebra 5 6
Algebra 5 6Algebra 5 6
Algebra 5 6
 
Subset sum problem Dynamic and Brute Force Approch
Subset sum problem Dynamic and Brute Force ApprochSubset sum problem Dynamic and Brute Force Approch
Subset sum problem Dynamic and Brute Force Approch
 
Work book on POLYNOMIALS
Work book on POLYNOMIALSWork book on POLYNOMIALS
Work book on POLYNOMIALS
 
PCExam 1 study guide answers
PCExam 1 study guide answersPCExam 1 study guide answers
PCExam 1 study guide answers
 
6.5 notes p2 DeMoivres
6.5 notes p2 DeMoivres6.5 notes p2 DeMoivres
6.5 notes p2 DeMoivres
 
Sum of subset problem
Sum of subset problemSum of subset problem
Sum of subset problem
 
Equations in Polar Coordinates
Equations in Polar CoordinatesEquations in Polar Coordinates
Equations in Polar Coordinates
 

Similar to Fórmulas ADA

Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
Soujanya V
 
AsymptoticAnalysis.ppt
AsymptoticAnalysis.pptAsymptoticAnalysis.ppt
AsymptoticAnalysis.ppt
SiddheshUpadhyay3
 
lecture 1
lecture 1lecture 1
lecture 1sajinsc
 
Paper computer
Paper computerPaper computer
Paper computerbikram ...
 
Paper computer
Paper computerPaper computer
Paper computerbikram ...
 
Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and Complexity
Rajandeep Gill
 
Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture Notes
Sreedhar Chowdam
 
04. Growth_Rate_AND_Asymptotic Notations_.pptx
04. Growth_Rate_AND_Asymptotic Notations_.pptx04. Growth_Rate_AND_Asymptotic Notations_.pptx
04. Growth_Rate_AND_Asymptotic Notations_.pptx
arslanzaheer14
 
A Mathematically Derived Number of Resamplings for Noisy Optimization (GECCO2...
A Mathematically Derived Number of Resamplings for Noisy Optimization (GECCO2...A Mathematically Derived Number of Resamplings for Noisy Optimization (GECCO2...
A Mathematically Derived Number of Resamplings for Noisy Optimization (GECCO2...
Jialin LIU
 
Introduction to the AKS Primality Test
Introduction to the AKS Primality TestIntroduction to the AKS Primality Test
Introduction to the AKS Primality Test
Pranshu Bhatnagar
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithms
pppepito86
 
Computation of Semi-Magic Squares Generated by Serpentine Matrices
Computation of Semi-Magic Squares Generated by Serpentine MatricesComputation of Semi-Magic Squares Generated by Serpentine Matrices
Computation of Semi-Magic Squares Generated by Serpentine Matrices
Lossian Barbosa Bacelar Miranda
 
Chapter 1 review topic in algebra 1
Chapter 1 review topic in algebra 1Chapter 1 review topic in algebra 1
Chapter 1 review topic in algebra 1jennytuazon01630
 
3 analysis.gtm
3 analysis.gtm3 analysis.gtm
3 analysis.gtm
Natarajan Angappan
 
Indices and logarithms
Indices and logarithmsIndices and logarithms
Indices and logarithmsAwais Khan
 
Data structures notes for college students btech.pptx
Data structures notes for college students btech.pptxData structures notes for college students btech.pptx
Data structures notes for college students btech.pptx
KarthikVijay59
 
A0280106
A0280106A0280106
module1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdfmodule1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdf
Shiwani Gupta
 

Similar to Fórmulas ADA (20)

Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
 
AsymptoticAnalysis.ppt
AsymptoticAnalysis.pptAsymptoticAnalysis.ppt
AsymptoticAnalysis.ppt
 
lecture 1
lecture 1lecture 1
lecture 1
 
Paper computer
Paper computerPaper computer
Paper computer
 
Paper computer
Paper computerPaper computer
Paper computer
 
Algorithm.ppt
Algorithm.pptAlgorithm.ppt
Algorithm.ppt
 
Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and Complexity
 
Annie
AnnieAnnie
Annie
 
Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture Notes
 
04. Growth_Rate_AND_Asymptotic Notations_.pptx
04. Growth_Rate_AND_Asymptotic Notations_.pptx04. Growth_Rate_AND_Asymptotic Notations_.pptx
04. Growth_Rate_AND_Asymptotic Notations_.pptx
 
A Mathematically Derived Number of Resamplings for Noisy Optimization (GECCO2...
A Mathematically Derived Number of Resamplings for Noisy Optimization (GECCO2...A Mathematically Derived Number of Resamplings for Noisy Optimization (GECCO2...
A Mathematically Derived Number of Resamplings for Noisy Optimization (GECCO2...
 
Introduction to the AKS Primality Test
Introduction to the AKS Primality TestIntroduction to the AKS Primality Test
Introduction to the AKS Primality Test
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithms
 
Computation of Semi-Magic Squares Generated by Serpentine Matrices
Computation of Semi-Magic Squares Generated by Serpentine MatricesComputation of Semi-Magic Squares Generated by Serpentine Matrices
Computation of Semi-Magic Squares Generated by Serpentine Matrices
 
Chapter 1 review topic in algebra 1
Chapter 1 review topic in algebra 1Chapter 1 review topic in algebra 1
Chapter 1 review topic in algebra 1
 
3 analysis.gtm
3 analysis.gtm3 analysis.gtm
3 analysis.gtm
 
Indices and logarithms
Indices and logarithmsIndices and logarithms
Indices and logarithms
 
Data structures notes for college students btech.pptx
Data structures notes for college students btech.pptxData structures notes for college students btech.pptx
Data structures notes for college students btech.pptx
 
A0280106
A0280106A0280106
A0280106
 
module1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdfmodule1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdf
 

More from Spacetoshare

EL HUECO.pdf
EL HUECO.pdfEL HUECO.pdf
EL HUECO.pdf
Spacetoshare
 
Probles on Algorithms
Probles on AlgorithmsProbles on Algorithms
Probles on Algorithms
Spacetoshare
 
Sums ADA
Sums ADASums ADA
Sums ADA
Spacetoshare
 
Manual de análisis y diseño de algoritmos
Manual de análisis y diseño de algoritmosManual de análisis y diseño de algoritmos
Manual de análisis y diseño de algoritmos
Spacetoshare
 
Inducción matemática
Inducción matemáticaInducción matemática
Inducción matemática
Spacetoshare
 
Ejercicios Investigación de operaciones
Ejercicios Investigación de operacionesEjercicios Investigación de operaciones
Ejercicios Investigación de operaciones
Spacetoshare
 
Algoritmos de ordenamiento
Algoritmos de ordenamientoAlgoritmos de ordenamiento
Algoritmos de ordenamiento
Spacetoshare
 
Ejercicios jess
Ejercicios jessEjercicios jess
Ejercicios jess
Spacetoshare
 
Sistemas Expertos
Sistemas ExpertosSistemas Expertos
Sistemas Expertos
Spacetoshare
 
Como escribir tesis
Como escribir tesisComo escribir tesis
Como escribir tesis
Spacetoshare
 
COMPONENTES BÁSICOS DE UN SISTEMA MS-DOS
COMPONENTES BÁSICOS DE UN SISTEMA MS-DOSCOMPONENTES BÁSICOS DE UN SISTEMA MS-DOS
COMPONENTES BÁSICOS DE UN SISTEMA MS-DOS
Spacetoshare
 
Curso básico de Ensamblador
Curso básico de EnsambladorCurso básico de Ensamblador
Curso básico de Ensamblador
Spacetoshare
 
Ejercicios álgebra superior
Ejercicios álgebra superiorEjercicios álgebra superior
Ejercicios álgebra superior
Spacetoshare
 
INDUCCIÓN MATEMÁTICA
INDUCCIÓN MATEMÁTICA INDUCCIÓN MATEMÁTICA
INDUCCIÓN MATEMÁTICA
Spacetoshare
 
Sistemas de ecuaciones
Sistemas de ecuacionesSistemas de ecuaciones
Sistemas de ecuaciones
Spacetoshare
 
Determinantes
DeterminantesDeterminantes
Determinantes
Spacetoshare
 
Inducción matemática
Inducción matemáticaInducción matemática
Inducción matemática
Spacetoshare
 
Tareas números complejos
Tareas números complejosTareas números complejos
Tareas números complejos
Spacetoshare
 
Notas metodologia de la programación
Notas metodologia de la programaciónNotas metodologia de la programación
Notas metodologia de la programación
Spacetoshare
 

More from Spacetoshare (20)

EL HUECO.pdf
EL HUECO.pdfEL HUECO.pdf
EL HUECO.pdf
 
Probles on Algorithms
Probles on AlgorithmsProbles on Algorithms
Probles on Algorithms
 
Sums ADA
Sums ADASums ADA
Sums ADA
 
Manual de análisis y diseño de algoritmos
Manual de análisis y diseño de algoritmosManual de análisis y diseño de algoritmos
Manual de análisis y diseño de algoritmos
 
Inducción matemática
Inducción matemáticaInducción matemática
Inducción matemática
 
Ejercicios Investigación de operaciones
Ejercicios Investigación de operacionesEjercicios Investigación de operaciones
Ejercicios Investigación de operaciones
 
Algoritmos de ordenamiento
Algoritmos de ordenamientoAlgoritmos de ordenamiento
Algoritmos de ordenamiento
 
Ejercicios jess
Ejercicios jessEjercicios jess
Ejercicios jess
 
Sistemas Expertos
Sistemas ExpertosSistemas Expertos
Sistemas Expertos
 
Como escribir tesis
Como escribir tesisComo escribir tesis
Como escribir tesis
 
COMPONENTES BÁSICOS DE UN SISTEMA MS-DOS
COMPONENTES BÁSICOS DE UN SISTEMA MS-DOSCOMPONENTES BÁSICOS DE UN SISTEMA MS-DOS
COMPONENTES BÁSICOS DE UN SISTEMA MS-DOS
 
Curso básico de Ensamblador
Curso básico de EnsambladorCurso básico de Ensamblador
Curso básico de Ensamblador
 
Ejercicios álgebra superior
Ejercicios álgebra superiorEjercicios álgebra superior
Ejercicios álgebra superior
 
INDUCCIÓN MATEMÁTICA
INDUCCIÓN MATEMÁTICA INDUCCIÓN MATEMÁTICA
INDUCCIÓN MATEMÁTICA
 
Sistemas de ecuaciones
Sistemas de ecuacionesSistemas de ecuaciones
Sistemas de ecuaciones
 
Determinantes
DeterminantesDeterminantes
Determinantes
 
Inducción matemática
Inducción matemáticaInducción matemática
Inducción matemática
 
Tareas números complejos
Tareas números complejosTareas números complejos
Tareas números complejos
 
Ejer
EjerEjer
Ejer
 
Notas metodologia de la programación
Notas metodologia de la programaciónNotas metodologia de la programación
Notas metodologia de la programación
 

Recently uploaded

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 

Recently uploaded (20)

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 

Fórmulas ADA

  • 1. APPENDIX A Useful Formulas for the Analysis of Algorithms This appendix contains a list of useful formulas and rules that are helpful in the mathematical analysis of algorithms. More advanced material can be found in [Gra94], [Gre07], [Pur04], and [Sed96]. Properties of Logarithms All logarithm bases are assumed to be greater than 1 in the formulas below; lg x denotes the logarithm base 2, ln x denotes the logarithm base e = 2.71828 . . . ; x, y are arbitrary positive numbers. 1. loga 1 = 0 2. loga a = 1 3. loga xy = y loga x 4. loga xy = loga x + loga y 5. loga x y = loga x − loga y 6. alogb x = xlogb a 7. loga x = logb x logb a = loga b logb x Combinatorics 1. Number of permutations of an n-element set: P(n) = n! 2. Number of k-combinations of an n-element set: C(n, k) = n! k!(n − k)! 3. Number of subsets of an n-element set: 2n 475
  • 2. 476 Useful Formulas for the Analysis of Algorithms Important Summation Formulas 1. u i=l 1 = 1 + 1 + . . . + 1 u−l+1 times = u − l + 1 (l, u are integer limits, l ≤ u); n i=1 1 = n 2. n i=1 i = 1 + 2 + . . . + n = n(n + 1) 2 ≈ 1 2 n2 3. n i=1 i2 = 12 + 22 + . . . + n2 = n(n + 1)(2n + 1) 6 ≈ 1 3 n3 4. n i=1 ik = 1k + 2k + . . . + nk ≈ 1 k + 1 nk+1 5. n i=0 ai = 1 + a + . . . + an = an+1 − 1 a − 1 (a = 1); n i=0 2i = 2n+1 − 1 6. n i=1 i2i = 1 . 2 + 2 . 22 + . . . + n2n = (n − 1)2n+1 + 2 7. n i=1 1 i = 1 + 1 2 + . . . + 1 n ≈ ln n + γ , where γ ≈ 0.5772 . . . (Euler’s constant) 8. n i=1 lg i ≈ n lg n Sum Manipulation Rules 1. u i=l cai = c u i=l ai 2. u i=l (ai ± bi) = u i=l ai ± u i=l bi 3. u i=l ai = m i=l ai + u i=m+1 ai, where l ≤ m u 4. u i=l (ai − ai−1) = au − al−1
  • 3. Useful Formulas for the Analysis of Algorithms 477 Approximation of a Sum by a Definite Integral , u l−1 f (x)dx ≤ u i=l f (i) ≤ , u+1 l f (x)dx for a nondecreasing f (x) , u+1 l f (x)dx ≤ u i=l f (i) ≤ , u l−1 f (x)dx for a nonincreasing f (x) Floor and Ceiling Formulas The floor of a real number x, denoted x, is defined as the greatest integer not larger than x (e.g., 3.8 = 3, −3.8 = −4, 3 = 3). The ceiling of a real number x, denoted x, is defined as the smallest integer not smaller than x (e.g., 3.8 = 4, −3.8 = −3, 3 = 3). 1. x − 1 x ≤ x ≤ x x + 1 2. x + n = x + n and x + n = x + n for real x and integer n 3. n/2 + n/2 = n 4. lg(n + 1) = lg n + 1 Miscellaneous 1. n!≈ √ 2πn n e n as n → ∞ (Stirling’s formula) 2. Modular arithmetic (n, m are integers, p is a positive integer) (n + m) mod p = (n mod p + m mod p) mod p (nm) mod p = ((n mod p)(m mod p)) mod p