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

Trabajo matlab vectores
Trabajo matlab vectoresTrabajo matlab vectores
Trabajo matlab vectores
Yussel Gutiérrez
 
Números complejos pro
Números complejos   proNúmeros complejos   pro
Números complejos pro
Universidad Técnica de Manabí
 
Expresiones algebraicas
Expresiones algebraicasExpresiones algebraicas
Expresiones algebraicas
IES San pablo
 
Funciones trigonometricas (parte 2)
Funciones trigonometricas (parte 2)Funciones trigonometricas (parte 2)
Funciones trigonometricas (parte 2)
Jose Ojeda
 
Producto cartesiano
Producto cartesianoProducto cartesiano
Producto cartesiano
Feliciano Garcia Rodriguez
 
Ejercicios binomio de newton y triangulo de pascal
Ejercicios binomio de newton y triangulo de pascalEjercicios binomio de newton y triangulo de pascal
Ejercicios binomio de newton y triangulo de pascal
Sergio Patiño Palacio
 
Razones trigonometricas
Razones trigonometricasRazones trigonometricas
Razones trigonometricas
Abner Emanuel Mejia Reina
 
AREA E INTEGRAL DEFINIDA.pdf
AREA E INTEGRAL DEFINIDA.pdfAREA E INTEGRAL DEFINIDA.pdf
AREA E INTEGRAL DEFINIDA.pdf
JorgeRojas278373
 
Guía de fracciones suma resta multiplicacion y division de fracciones 7°
Guía de fracciones suma resta multiplicacion y division de fracciones 7°Guía de fracciones suma resta multiplicacion y division de fracciones 7°
Guía de fracciones suma resta multiplicacion y division de fracciones 7°
Verónica Castro
 
Guía de clase, bloque 1, tercer grado
Guía de clase, bloque 1, tercer gradoGuía de clase, bloque 1, tercer grado
Guía de clase, bloque 1, tercer grado
JEDANNIE Apellidos
 
6.operacionescombinadasconnumerosnaturales.docx
6.operacionescombinadasconnumerosnaturales.docx6.operacionescombinadasconnumerosnaturales.docx
6.operacionescombinadasconnumerosnaturales.docx
Juanito Sánchez
 
Transformación de productos en suma o diferencia
Transformación de productos en suma o diferenciaTransformación de productos en suma o diferencia
Transformación de productos en suma o diferencia
Cipriano Arboleda
 
Función Exponencial y Logarítmica
Función Exponencial y LogarítmicaFunción Exponencial y Logarítmica
Función Exponencial y Logarítmica
Mugen Shinigami
 
TRASLACIÓN (vector)
TRASLACIÓN (vector)TRASLACIÓN (vector)
TRASLACIÓN (vector)
Paola Bon Valdiviezo
 
Trabajo vectores en el plano y el espacio
Trabajo vectores en el plano y el espacioTrabajo vectores en el plano y el espacio
Trabajo vectores en el plano y el espacio
Jonathan Villarroel
 
Lenguaje algebraico y Pensamiento Funcional
Lenguaje algebraico y Pensamiento FuncionalLenguaje algebraico y Pensamiento Funcional
Lenguaje algebraico y Pensamiento Funcional
MilanisEstherBuznSol
 
Dfd
DfdDfd
Ecuacion de la recta ppt.ppt mark
Ecuacion de la recta ppt.ppt markEcuacion de la recta ppt.ppt mark
Ecuacion de la recta ppt.ppt markjmedinah666
 

What's hot (19)

Trabajo matlab vectores
Trabajo matlab vectoresTrabajo matlab vectores
Trabajo matlab vectores
 
Números complejos pro
Números complejos   proNúmeros complejos   pro
Números complejos pro
 
Expresiones algebraicas
Expresiones algebraicasExpresiones algebraicas
Expresiones algebraicas
 
Funciones trigonometricas (parte 2)
Funciones trigonometricas (parte 2)Funciones trigonometricas (parte 2)
Funciones trigonometricas (parte 2)
 
Producto cartesiano
Producto cartesianoProducto cartesiano
Producto cartesiano
 
Ejercicios binomio de newton y triangulo de pascal
Ejercicios binomio de newton y triangulo de pascalEjercicios binomio de newton y triangulo de pascal
Ejercicios binomio de newton y triangulo de pascal
 
Razones trigonometricas
Razones trigonometricasRazones trigonometricas
Razones trigonometricas
 
AREA E INTEGRAL DEFINIDA.pdf
AREA E INTEGRAL DEFINIDA.pdfAREA E INTEGRAL DEFINIDA.pdf
AREA E INTEGRAL DEFINIDA.pdf
 
Guía de fracciones suma resta multiplicacion y division de fracciones 7°
Guía de fracciones suma resta multiplicacion y division de fracciones 7°Guía de fracciones suma resta multiplicacion y division de fracciones 7°
Guía de fracciones suma resta multiplicacion y division de fracciones 7°
 
Guía de clase, bloque 1, tercer grado
Guía de clase, bloque 1, tercer gradoGuía de clase, bloque 1, tercer grado
Guía de clase, bloque 1, tercer grado
 
Identidades trigonometricas pitagoricas
Identidades trigonometricas pitagoricasIdentidades trigonometricas pitagoricas
Identidades trigonometricas pitagoricas
 
6.operacionescombinadasconnumerosnaturales.docx
6.operacionescombinadasconnumerosnaturales.docx6.operacionescombinadasconnumerosnaturales.docx
6.operacionescombinadasconnumerosnaturales.docx
 
Transformación de productos en suma o diferencia
Transformación de productos en suma o diferenciaTransformación de productos en suma o diferencia
Transformación de productos en suma o diferencia
 
Función Exponencial y Logarítmica
Función Exponencial y LogarítmicaFunción Exponencial y Logarítmica
Función Exponencial y Logarítmica
 
TRASLACIÓN (vector)
TRASLACIÓN (vector)TRASLACIÓN (vector)
TRASLACIÓN (vector)
 
Trabajo vectores en el plano y el espacio
Trabajo vectores en el plano y el espacioTrabajo vectores en el plano y el espacio
Trabajo vectores en el plano y el espacio
 
Lenguaje algebraico y Pensamiento Funcional
Lenguaje algebraico y Pensamiento FuncionalLenguaje algebraico y Pensamiento Funcional
Lenguaje algebraico y Pensamiento Funcional
 
Dfd
DfdDfd
Dfd
 
Ecuacion de la recta ppt.ppt mark
Ecuacion de la recta ppt.ppt markEcuacion de la recta ppt.ppt mark
Ecuacion de la recta ppt.ppt mark
 

Similar to Formulas para algoritmos

Fórmulas ADA
Fórmulas ADAFórmulas ADA
Fórmulas ADA
Spacetoshare
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
Soujanya V
 
AsymptoticAnalysis.ppt
AsymptoticAnalysis.pptAsymptoticAnalysis.ppt
AsymptoticAnalysis.ppt
SiddheshUpadhyay3
 
Paper computer
Paper computerPaper computer
Paper computerbikram ...
 
Paper computer
Paper computerPaper computer
Paper computerbikram ...
 
lecture 1
lecture 1lecture 1
lecture 1sajinsc
 
Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and Complexity
Rajandeep Gill
 
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
 
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
 
3 analysis.gtm
3 analysis.gtm3 analysis.gtm
3 analysis.gtm
Natarajan Angappan
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithms
pppepito86
 
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
 
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
 
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
 
Indices and logarithms
Indices and logarithmsIndices and logarithms
Indices and logarithmsAwais Khan
 
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
 
module1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdfmodule1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdf
Shiwani Gupta
 
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
 

Similar to Formulas para algoritmos (20)

Fórmulas ADA
Fórmulas ADAFórmulas ADA
Fórmulas ADA
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
 
AsymptoticAnalysis.ppt
AsymptoticAnalysis.pptAsymptoticAnalysis.ppt
AsymptoticAnalysis.ppt
 
Paper computer
Paper computerPaper computer
Paper computer
 
Paper computer
Paper computerPaper computer
Paper computer
 
lecture 1
lecture 1lecture 1
lecture 1
 
Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and Complexity
 
Algorithm.ppt
Algorithm.pptAlgorithm.ppt
Algorithm.ppt
 
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
 
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
 
3 analysis.gtm
3 analysis.gtm3 analysis.gtm
3 analysis.gtm
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithms
 
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...
 
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
 
Introduction to the AKS Primality Test
Introduction to the AKS Primality TestIntroduction to the AKS Primality Test
Introduction to the AKS Primality Test
 
Indices and logarithms
Indices and logarithmsIndices and logarithms
Indices and logarithms
 
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
 
module1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdfmodule1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdf
 
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
 

More from Beat Winehouse

Metodos numéricos (euler, euler modificado, rk)
Metodos numéricos (euler, euler modificado, rk)Metodos numéricos (euler, euler modificado, rk)
Metodos numéricos (euler, euler modificado, rk)
Beat Winehouse
 
Gráficos en MATLAB
Gráficos en MATLABGráficos en MATLAB
Gráficos en MATLAB
Beat Winehouse
 
Parallel processing for linear programming
Parallel processing for linear programmingParallel processing for linear programming
Parallel processing for linear programming
Beat Winehouse
 
Improving Tree augmented Naive Bayes for class probability estimation
Improving Tree augmented Naive Bayes for class probability estimationImproving Tree augmented Naive Bayes for class probability estimation
Improving Tree augmented Naive Bayes for class probability estimation
Beat Winehouse
 
Curso de edición fotográfica
Curso de edición fotográficaCurso de edición fotográfica
Curso de edición fotográfica
Beat Winehouse
 
Redes bayesianas
Redes bayesianasRedes bayesianas
Redes bayesianas
Beat Winehouse
 
Cómo construir y validar redes bayesianas con netica
Cómo construir y validar redes bayesianas con neticaCómo construir y validar redes bayesianas con netica
Cómo construir y validar redes bayesianas con netica
Beat Winehouse
 
Modelizacion con curvas y superficies de bezier
Modelizacion con curvas y superficies de bezierModelizacion con curvas y superficies de bezier
Modelizacion con curvas y superficies de bezier
Beat Winehouse
 
Taller de edicion
Taller de edicionTaller de edicion
Taller de edicion
Beat Winehouse
 
Sums (Sumatorias)
Sums (Sumatorias)Sums (Sumatorias)
Sums (Sumatorias)
Beat Winehouse
 
Problems on Algorithms
Problems on AlgorithmsProblems on Algorithms
Problems on Algorithms
Beat Winehouse
 
Manual análisis de algoritmos
Manual análisis de algoritmosManual análisis de algoritmos
Manual análisis de algoritmos
Beat Winehouse
 
The bayesian revolution in genetics
The bayesian revolution in geneticsThe bayesian revolution in genetics
The bayesian revolution in genetics
Beat Winehouse
 
Inducción matemática
Inducción matemáticaInducción matemática
Inducción matemática
Beat Winehouse
 
La eficiencia de los algoritmos
La eficiencia de los algoritmosLa eficiencia de los algoritmos
La eficiencia de los algoritmos
Beat Winehouse
 
Algoritmos de vuelta atrás
Algoritmos de vuelta atrásAlgoritmos de vuelta atrás
Algoritmos de vuelta atrás
Beat Winehouse
 
Algoritmos de ordenación
Algoritmos de ordenaciónAlgoritmos de ordenación
Algoritmos de ordenación
Beat Winehouse
 

More from Beat Winehouse (17)

Metodos numéricos (euler, euler modificado, rk)
Metodos numéricos (euler, euler modificado, rk)Metodos numéricos (euler, euler modificado, rk)
Metodos numéricos (euler, euler modificado, rk)
 
Gráficos en MATLAB
Gráficos en MATLABGráficos en MATLAB
Gráficos en MATLAB
 
Parallel processing for linear programming
Parallel processing for linear programmingParallel processing for linear programming
Parallel processing for linear programming
 
Improving Tree augmented Naive Bayes for class probability estimation
Improving Tree augmented Naive Bayes for class probability estimationImproving Tree augmented Naive Bayes for class probability estimation
Improving Tree augmented Naive Bayes for class probability estimation
 
Curso de edición fotográfica
Curso de edición fotográficaCurso de edición fotográfica
Curso de edición fotográfica
 
Redes bayesianas
Redes bayesianasRedes bayesianas
Redes bayesianas
 
Cómo construir y validar redes bayesianas con netica
Cómo construir y validar redes bayesianas con neticaCómo construir y validar redes bayesianas con netica
Cómo construir y validar redes bayesianas con netica
 
Modelizacion con curvas y superficies de bezier
Modelizacion con curvas y superficies de bezierModelizacion con curvas y superficies de bezier
Modelizacion con curvas y superficies de bezier
 
Taller de edicion
Taller de edicionTaller de edicion
Taller de edicion
 
Sums (Sumatorias)
Sums (Sumatorias)Sums (Sumatorias)
Sums (Sumatorias)
 
Problems on Algorithms
Problems on AlgorithmsProblems on Algorithms
Problems on Algorithms
 
Manual análisis de algoritmos
Manual análisis de algoritmosManual análisis de algoritmos
Manual análisis de algoritmos
 
The bayesian revolution in genetics
The bayesian revolution in geneticsThe bayesian revolution in genetics
The bayesian revolution in genetics
 
Inducción matemática
Inducción matemáticaInducción matemática
Inducción matemática
 
La eficiencia de los algoritmos
La eficiencia de los algoritmosLa eficiencia de los algoritmos
La eficiencia de los algoritmos
 
Algoritmos de vuelta atrás
Algoritmos de vuelta atrásAlgoritmos de vuelta atrás
Algoritmos de vuelta atrás
 
Algoritmos de ordenación
Algoritmos de ordenaciónAlgoritmos de ordenación
Algoritmos de ordenación
 

Recently uploaded

erythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptxerythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptx
muralinath2
 
platelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptxplatelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptx
muralinath2
 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
muralinath2
 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
muralinath2
 
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
Sérgio Sacani
 
Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
silvermistyshot
 
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptxBody fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
muralinath2
 
Hemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptxHemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptx
muralinath2
 
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
Scintica Instrumentation
 
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
NathanBaughman3
 
extra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdfextra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdf
DiyaBiswas10
 
Large scale production of streptomycin.pptx
Large scale production of streptomycin.pptxLarge scale production of streptomycin.pptx
Large scale production of streptomycin.pptx
Cherry
 
Cancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate PathwayCancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate Pathway
AADYARAJPANDEY1
 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
SAMIR PANDA
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
AlaminAfendy1
 
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdfUnveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Erdal Coalmaker
 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
muralinath2
 
general properties of oerganologametal.ppt
general properties of oerganologametal.pptgeneral properties of oerganologametal.ppt
general properties of oerganologametal.ppt
IqrimaNabilatulhusni
 
Orion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWSOrion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWS
Columbia Weather Systems
 
FAIR & AI Ready KGs for Explainable Predictions
FAIR & AI Ready KGs for Explainable PredictionsFAIR & AI Ready KGs for Explainable Predictions
FAIR & AI Ready KGs for Explainable Predictions
Michel Dumontier
 

Recently uploaded (20)

erythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptxerythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptx
 
platelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptxplatelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptx
 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
 
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
 
Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
 
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptxBody fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
 
Hemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptxHemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptx
 
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
 
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
 
extra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdfextra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdf
 
Large scale production of streptomycin.pptx
Large scale production of streptomycin.pptxLarge scale production of streptomycin.pptx
Large scale production of streptomycin.pptx
 
Cancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate PathwayCancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate Pathway
 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
 
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdfUnveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdf
 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
 
general properties of oerganologametal.ppt
general properties of oerganologametal.pptgeneral properties of oerganologametal.ppt
general properties of oerganologametal.ppt
 
Orion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWSOrion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWS
 
FAIR & AI Ready KGs for Explainable Predictions
FAIR & AI Ready KGs for Explainable PredictionsFAIR & AI Ready KGs for Explainable Predictions
FAIR & AI Ready KGs for Explainable Predictions
 

Formulas para algoritmos

  • 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