SlideShare a Scribd company logo
1 of 33
Tomado del libro de Cormen A A nalysis of lgorithms
OUTLINE ,[object Object],[object Object],[object Object],[object Object],[object Object]
What is an algorithm? ,[object Object],[object Object],[object Object],[object Object]
Algorithm A  sequence of  computational of steps  for solving a  well-specified computational problem   The statement of the  problem  specifies in general terms the desired  input/output  relationship The algorithm describes a specific  computational procedure  for achieving that  input/ouput  relationship
Algorithm steps ,[object Object],I O
INPUT:   A sequence of numbers <a 1 ,a 2 ,a 3 ,...,a n > OUTPUT:   A permutation  <a’ 1 ,a’ 2 ,a’ 3 ,...a’ n > such that a’ 1    a i2    a i3    ...     a in Sorting problem
A possible input sequence is a instance of the sorting problem <31,41,59,26,41,58> A sorting algorithms must return:   <26,31,41,41,58,59> Instance of the sorting problem
Analysis of algorithms Complexity Time complexity Space complexity Analysis Semantic Analysis Correctness
Semantic Analysis   What does an algorithm do?  (Discovering its function?) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Value in the variables at the point   * (n)     X 0   X 1   X 2   X 3   X 4   X 5   X 6   X 7    .…   X n     (j) k    0,  1,  2,  3,  4,  5,  6,  7,.…,  j     0,  1,  1,  2,  3,  5,  8,  13,.…, i     1,  0,  1,  1,  2,  3,  5,  8,.…, Example
mistery( 0)  =  0 mistery( 1)  =  1 mistery( n )  = mistery( n  - 1 ) +  mistery( n  - 2),  for n > 2 . “ mistery( n ) computess the n-th Fibonacci’s number”   mistery( n ) =(  n  -   n )   /  5 with    =(1 +   5)/2  [Golden ratio]    =(1 -   5)/2
following an algorithm. ,[object Object],[object Object],[object Object],[object Object],I O f ( X )
Correctness Is an algorithm correct  for a problem? (Does it do a given function?) Given a computational problem  f :   I      O    {  } and a algorithm  A  . The algorithm  A   is correct for the problem  f  if the function that  A  calculates is  f .
Problem: Finding the minumun element in an array of n reals Input : T[1..n] : array of real Output : x    min{T[i] | 1    i    n } min : N x R N     R  (n, T[1..n]  )     min{T[i] | 1    i    n} “ In order to prove that a program or algorithm is correct, we need to show that the program gives the correct answer for every possible input.”
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Analysis of complexity ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Complexity ,[object Object],[object Object],[object Object],[object Object],Analysis
Size of a problem n  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
Best case  t b (n)  Minimum execution time for any input of size  n Worst case  t w (n)  Maximum execution time over all the inputs of size  n Average case  t a (n)  Average execution time over all the inputs of size  n Time Complexity  t(n)  Number of computational steps
[object Object],[object Object],Sorting average time taken on the n! different ways of  initially ordering n elements (assuming they are all different)
An operation whose execution time can be bounded above by a constant depending only on the particular implementation used ( machine, programming language etc ). In general we use  RAM  elementary instructions as the model. Elementary Operation
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],RAM Model Random Access Model
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],If the operations are elementary   the algorithm takes a time equal to  a+bn , for appropriate constants a and b, i.e.,  time in  O (n).
We must attribute to the additions a cost proportional to the length of the operands  ,[object Object],[object Object],time in  O (n 2 ) !!!But the operations are not elementary  !!!
“ Two different implementations of the same algorithm will not differ in efficiency by more than  some multiplicative constant” Principle of Invariance
El  orden de complejidad de un algoritmo  Es una expresion matematica que indica como los recursos necesitados para correr un algoritmo se incrementan como se incrementa el tamaño del problema (que el resuelve). Orden de  complejidad de un algoritmo
Complejidad Lineal La complejidad de un algoritmo se dice que es lineal si: Con  a  y  b  son constantes t(n)=a * n + b
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Example
By the invariance principle we if we  have two different implementations  (computer + language +  compiler +code optimizations)  with worst case time complexity  t w1 (n)  and  t w2 (n)  then  t w1 (n) = c t w2 (n) Worst case time complexity t w (n) = a*n + b

More Related Content

What's hot

Mathematical Analysis of Recursive Algorithm.
Mathematical Analysis of Recursive Algorithm.Mathematical Analysis of Recursive Algorithm.
Mathematical Analysis of Recursive Algorithm.mohanrathod18
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexityAnkit Katiyar
 
(1) collections algorithms
(1) collections algorithms(1) collections algorithms
(1) collections algorithmsNico Ludwig
 
Lecture 3 insertion sort and complexity analysis
Lecture 3   insertion sort and complexity analysisLecture 3   insertion sort and complexity analysis
Lecture 3 insertion sort and complexity analysisjayavignesh86
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsKrishnan MuthuManickam
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihmSajid Marwat
 
Lecture 4 asymptotic notations
Lecture 4   asymptotic notationsLecture 4   asymptotic notations
Lecture 4 asymptotic notationsjayavignesh86
 
Analysis Of Algorithms I
Analysis Of Algorithms IAnalysis Of Algorithms I
Analysis Of Algorithms ISri Prasanna
 
asymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisasymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisAnindita Kundu
 
Lecture 5: Asymptotic analysis of algorithms
Lecture 5: Asymptotic analysis of algorithmsLecture 5: Asymptotic analysis of algorithms
Lecture 5: Asymptotic analysis of algorithmsVivek Bhargav
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsKrishnan MuthuManickam
 
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysisData Structure: Algorithm and analysis
Data Structure: Algorithm and analysisDr. Rajdeep Chatterjee
 
CS8461 - Design and Analysis of Algorithms
CS8461 - Design and Analysis of AlgorithmsCS8461 - Design and Analysis of Algorithms
CS8461 - Design and Analysis of AlgorithmsKrishnan MuthuManickam
 
Algorithm And analysis Lecture 03& 04-time complexity.
 Algorithm And analysis Lecture 03& 04-time complexity. Algorithm And analysis Lecture 03& 04-time complexity.
Algorithm And analysis Lecture 03& 04-time complexity.Tariq Khan
 
Fundamental computing algorithms
Fundamental computing algorithmsFundamental computing algorithms
Fundamental computing algorithmsGanesh Solanke
 
Basic Computer Engineering Unit II as per RGPV Syllabus
Basic Computer Engineering Unit II as per RGPV SyllabusBasic Computer Engineering Unit II as per RGPV Syllabus
Basic Computer Engineering Unit II as per RGPV SyllabusNANDINI SHARMA
 

What's hot (19)

Mathematical Analysis of Recursive Algorithm.
Mathematical Analysis of Recursive Algorithm.Mathematical Analysis of Recursive Algorithm.
Mathematical Analysis of Recursive Algorithm.
 
Cs2251 daa
Cs2251 daaCs2251 daa
Cs2251 daa
 
Design & Analysis Of Algorithm
Design & Analysis Of AlgorithmDesign & Analysis Of Algorithm
Design & Analysis Of Algorithm
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
 
(1) collections algorithms
(1) collections algorithms(1) collections algorithms
(1) collections algorithms
 
Lecture 3 insertion sort and complexity analysis
Lecture 3   insertion sort and complexity analysisLecture 3   insertion sort and complexity analysis
Lecture 3 insertion sort and complexity analysis
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of Algorithms
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihm
 
Lecture 4 asymptotic notations
Lecture 4   asymptotic notationsLecture 4   asymptotic notations
Lecture 4 asymptotic notations
 
Analysis Of Algorithms I
Analysis Of Algorithms IAnalysis Of Algorithms I
Analysis Of Algorithms I
 
asymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisasymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysis
 
Lecture 5: Asymptotic analysis of algorithms
Lecture 5: Asymptotic analysis of algorithmsLecture 5: Asymptotic analysis of algorithms
Lecture 5: Asymptotic analysis of algorithms
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of Algorithms
 
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysisData Structure: Algorithm and analysis
Data Structure: Algorithm and analysis
 
CS8461 - Design and Analysis of Algorithms
CS8461 - Design and Analysis of AlgorithmsCS8461 - Design and Analysis of Algorithms
CS8461 - Design and Analysis of Algorithms
 
Algorithm And analysis Lecture 03& 04-time complexity.
 Algorithm And analysis Lecture 03& 04-time complexity. Algorithm And analysis Lecture 03& 04-time complexity.
Algorithm And analysis Lecture 03& 04-time complexity.
 
Fundamental computing algorithms
Fundamental computing algorithmsFundamental computing algorithms
Fundamental computing algorithms
 
Greedy Algorithms
Greedy AlgorithmsGreedy Algorithms
Greedy Algorithms
 
Basic Computer Engineering Unit II as per RGPV Syllabus
Basic Computer Engineering Unit II as per RGPV SyllabusBasic Computer Engineering Unit II as per RGPV Syllabus
Basic Computer Engineering Unit II as per RGPV Syllabus
 

Viewers also liked

Complejidad ppt analisis de algoritmo
Complejidad ppt analisis de algoritmoComplejidad ppt analisis de algoritmo
Complejidad ppt analisis de algoritmoJanii Rivera
 
International Journal of Algorithms Design and Analysis vol 2 issue 1
International Journal of Algorithms Design and Analysis vol 2 issue 1International Journal of Algorithms Design and Analysis vol 2 issue 1
International Journal of Algorithms Design and Analysis vol 2 issue 1JournalsPub www.journalspub.com
 
Algorithm1 course 1st slide
Algorithm1 course 1st slideAlgorithm1 course 1st slide
Algorithm1 course 1st slideHani Ghazi
 
U1 Analisis Algoritmos Complejidad
U1 Analisis Algoritmos ComplejidadU1 Analisis Algoritmos Complejidad
U1 Analisis Algoritmos Complejidadrezzaca
 
Tema e Diplomes- Version përfundimtar
Tema e Diplomes- Version përfundimtarTema e Diplomes- Version përfundimtar
Tema e Diplomes- Version përfundimtarKristo Xhimo
 
Machine Learning Algorithms (Part 1)
Machine Learning Algorithms (Part 1)Machine Learning Algorithms (Part 1)
Machine Learning Algorithms (Part 1)Zihui Li
 
ANALISIS DE ALGORITMOS
ANALISIS DE ALGORITMOSANALISIS DE ALGORITMOS
ANALISIS DE ALGORITMOSEvans Balcazar
 
Gjuhe Programuese ushtrimet C++
Gjuhe Programuese   ushtrimet   C++Gjuhe Programuese   ushtrimet   C++
Gjuhe Programuese ushtrimet C++Ajla Hasani
 
Analisis y disenio de algoritmos
Analisis y disenio de algoritmosAnalisis y disenio de algoritmos
Analisis y disenio de algoritmosMayte dena
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSGayathri Gaayu
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of AlgorithmsSwapnil Agrawal
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to AlgorithmsVenkatesh Iyer
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of AlgorithmsArvind Krishnaa
 
Ejercicios De Diagrama De Flujo
Ejercicios De Diagrama De FlujoEjercicios De Diagrama De Flujo
Ejercicios De Diagrama De FlujoFabio Valencia
 

Viewers also liked (20)

Complejidad ppt analisis de algoritmo
Complejidad ppt analisis de algoritmoComplejidad ppt analisis de algoritmo
Complejidad ppt analisis de algoritmo
 
Complejidad de Algoritmos
Complejidad de AlgoritmosComplejidad de Algoritmos
Complejidad de Algoritmos
 
Analisis de algoritmos - Introduccion
Analisis de algoritmos - IntroduccionAnalisis de algoritmos - Introduccion
Analisis de algoritmos - Introduccion
 
International Journal of Algorithms Design and Analysis vol 2 issue 1
International Journal of Algorithms Design and Analysis vol 2 issue 1International Journal of Algorithms Design and Analysis vol 2 issue 1
International Journal of Algorithms Design and Analysis vol 2 issue 1
 
Algorithm1 course 1st slide
Algorithm1 course 1st slideAlgorithm1 course 1st slide
Algorithm1 course 1st slide
 
U1 Analisis Algoritmos Complejidad
U1 Analisis Algoritmos ComplejidadU1 Analisis Algoritmos Complejidad
U1 Analisis Algoritmos Complejidad
 
Tema e Diplomes- Version përfundimtar
Tema e Diplomes- Version përfundimtarTema e Diplomes- Version përfundimtar
Tema e Diplomes- Version përfundimtar
 
Machine Learning Algorithms (Part 1)
Machine Learning Algorithms (Part 1)Machine Learning Algorithms (Part 1)
Machine Learning Algorithms (Part 1)
 
ANALISIS DE ALGORITMOS
ANALISIS DE ALGORITMOSANALISIS DE ALGORITMOS
ANALISIS DE ALGORITMOS
 
Algoritmet
AlgoritmetAlgoritmet
Algoritmet
 
Gjuhe Programuese ushtrimet C++
Gjuhe Programuese   ushtrimet   C++Gjuhe Programuese   ushtrimet   C++
Gjuhe Programuese ushtrimet C++
 
ADA complete notes
ADA complete notesADA complete notes
ADA complete notes
 
Analisis y disenio de algoritmos
Analisis y disenio de algoritmosAnalisis y disenio de algoritmos
Analisis y disenio de algoritmos
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
 
Algoritmet C++
Algoritmet C++Algoritmet C++
Algoritmet C++
 
Algoritmet
AlgoritmetAlgoritmet
Algoritmet
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithms
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
 
Ejercicios De Diagrama De Flujo
Ejercicios De Diagrama De FlujoEjercicios De Diagrama De Flujo
Ejercicios De Diagrama De Flujo
 

Similar to Introducción al Análisis y diseño de algoritmos

Advanced Datastructures and algorithms CP4151unit1b.pdf
Advanced Datastructures and algorithms CP4151unit1b.pdfAdvanced Datastructures and algorithms CP4151unit1b.pdf
Advanced Datastructures and algorithms CP4151unit1b.pdfSheba41
 
Recurrence Relation
Recurrence RelationRecurrence Relation
Recurrence RelationNilaNila16
 
Computational Complexity.pptx
Computational Complexity.pptxComputational Complexity.pptx
Computational Complexity.pptxEnosSalar
 
01 - DAA - PPT.pptx
01 - DAA - PPT.pptx01 - DAA - PPT.pptx
01 - DAA - PPT.pptxKokilaK25
 
Data Structures- Part2 analysis tools
Data Structures- Part2 analysis toolsData Structures- Part2 analysis tools
Data Structures- Part2 analysis toolsAbdullah Al-hazmy
 
19. algorithms and-complexity
19. algorithms and-complexity19. algorithms and-complexity
19. algorithms and-complexityashishtinku
 
Algorithm chapter 1
Algorithm chapter 1Algorithm chapter 1
Algorithm chapter 1chidabdu
 
Algorithms - "Chapter 2 getting started"
Algorithms - "Chapter 2 getting started"Algorithms - "Chapter 2 getting started"
Algorithms - "Chapter 2 getting started"Ra'Fat Al-Msie'deen
 
Data Structure & Algorithms - Mathematical
Data Structure & Algorithms - MathematicalData Structure & Algorithms - Mathematical
Data Structure & Algorithms - Mathematicalbabuk110
 
module1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdfmodule1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdfShiwani Gupta
 
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
TIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMSTIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMS
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMSTanya Makkar
 
Data Structures and Algorithms Lecture 2: Analysis of Algorithms, Asymptotic ...
Data Structures and Algorithms Lecture 2: Analysis of Algorithms, Asymptotic ...Data Structures and Algorithms Lecture 2: Analysis of Algorithms, Asymptotic ...
Data Structures and Algorithms Lecture 2: Analysis of Algorithms, Asymptotic ...TechVision8
 
chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................nourhandardeer3
 

Similar to Introducción al Análisis y diseño de algoritmos (20)

Annotations.pdf
Annotations.pdfAnnotations.pdf
Annotations.pdf
 
Advanced Datastructures and algorithms CP4151unit1b.pdf
Advanced Datastructures and algorithms CP4151unit1b.pdfAdvanced Datastructures and algorithms CP4151unit1b.pdf
Advanced Datastructures and algorithms CP4151unit1b.pdf
 
Lec1
Lec1Lec1
Lec1
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
Recurrence Relation
Recurrence RelationRecurrence Relation
Recurrence Relation
 
Lec1
Lec1Lec1
Lec1
 
3 analysis.gtm
3 analysis.gtm3 analysis.gtm
3 analysis.gtm
 
Big Oh.ppt
Big Oh.pptBig Oh.ppt
Big Oh.ppt
 
Computational Complexity.pptx
Computational Complexity.pptxComputational Complexity.pptx
Computational Complexity.pptx
 
01 - DAA - PPT.pptx
01 - DAA - PPT.pptx01 - DAA - PPT.pptx
01 - DAA - PPT.pptx
 
Data Structures- Part2 analysis tools
Data Structures- Part2 analysis toolsData Structures- Part2 analysis tools
Data Structures- Part2 analysis tools
 
19. algorithms and-complexity
19. algorithms and-complexity19. algorithms and-complexity
19. algorithms and-complexity
 
Algorithm chapter 1
Algorithm chapter 1Algorithm chapter 1
Algorithm chapter 1
 
Algorithms - "Chapter 2 getting started"
Algorithms - "Chapter 2 getting started"Algorithms - "Chapter 2 getting started"
Algorithms - "Chapter 2 getting started"
 
Chapter two
Chapter twoChapter two
Chapter two
 
Data Structure & Algorithms - Mathematical
Data Structure & Algorithms - MathematicalData Structure & Algorithms - Mathematical
Data Structure & Algorithms - Mathematical
 
module1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdfmodule1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdf
 
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
TIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMSTIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMS
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
 
Data Structures and Algorithms Lecture 2: Analysis of Algorithms, Asymptotic ...
Data Structures and Algorithms Lecture 2: Analysis of Algorithms, Asymptotic ...Data Structures and Algorithms Lecture 2: Analysis of Algorithms, Asymptotic ...
Data Structures and Algorithms Lecture 2: Analysis of Algorithms, Asymptotic ...
 
chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................
 

More from luzenith_g

Formacion y crecimiento
Formacion y crecimientoFormacion y crecimiento
Formacion y crecimientoluzenith_g
 
Formacion y crecimiento
Formacion y crecimientoFormacion y crecimiento
Formacion y crecimientoluzenith_g
 
Carácterísticas técnicas de las wikis
Carácterísticas técnicas de las wikisCarácterísticas técnicas de las wikis
Carácterísticas técnicas de las wikisluzenith_g
 
Ejercicios Ada
Ejercicios AdaEjercicios Ada
Ejercicios Adaluzenith_g
 
Ejercicios Ada
Ejercicios AdaEjercicios Ada
Ejercicios Adaluzenith_g
 
Proyecto Unal2009 2
Proyecto Unal2009 2Proyecto Unal2009 2
Proyecto Unal2009 2luzenith_g
 
Taller3 Programacion Ii
Taller3 Programacion IiTaller3 Programacion Ii
Taller3 Programacion Iiluzenith_g
 
Algoritmos Voraces (Greedy)
Algoritmos Voraces (Greedy)Algoritmos Voraces (Greedy)
Algoritmos Voraces (Greedy)luzenith_g
 
Algoritmos Greedy
Algoritmos GreedyAlgoritmos Greedy
Algoritmos Greedyluzenith_g
 
Clase3 Notacion
Clase3 NotacionClase3 Notacion
Clase3 Notacionluzenith_g
 
Analisis Clase2
Analisis  Clase2Analisis  Clase2
Analisis Clase2luzenith_g
 
Como construir un DSS
Como construir un DSSComo construir un DSS
Como construir un DSSluzenith_g
 
State Space Search(2)
State Space Search(2)State Space Search(2)
State Space Search(2)luzenith_g
 
DSS:Conceptos, metodologias y Tecnologias
DSS:Conceptos, metodologias y TecnologiasDSS:Conceptos, metodologias y Tecnologias
DSS:Conceptos, metodologias y Tecnologiasluzenith_g
 
Soporte a las Decisiones Computarizado
Soporte a las Decisiones ComputarizadoSoporte a las Decisiones Computarizado
Soporte a las Decisiones Computarizadoluzenith_g
 
Decision Support Systems
Decision Support SystemsDecision Support Systems
Decision Support Systemsluzenith_g
 

More from luzenith_g (20)

Formacion y crecimiento
Formacion y crecimientoFormacion y crecimiento
Formacion y crecimiento
 
Formacion y crecimiento
Formacion y crecimientoFormacion y crecimiento
Formacion y crecimiento
 
Carácterísticas técnicas de las wikis
Carácterísticas técnicas de las wikisCarácterísticas técnicas de las wikis
Carácterísticas técnicas de las wikis
 
Web 2 0
Web 2 0Web 2 0
Web 2 0
 
Alg1
Alg1Alg1
Alg1
 
Ejercicios Ada
Ejercicios AdaEjercicios Ada
Ejercicios Ada
 
Ejercicios Ada
Ejercicios AdaEjercicios Ada
Ejercicios Ada
 
Proyecto Unal2009 2
Proyecto Unal2009 2Proyecto Unal2009 2
Proyecto Unal2009 2
 
Taller3 Programacion Ii
Taller3 Programacion IiTaller3 Programacion Ii
Taller3 Programacion Ii
 
Algoritmos Voraces (Greedy)
Algoritmos Voraces (Greedy)Algoritmos Voraces (Greedy)
Algoritmos Voraces (Greedy)
 
Algoritmos Greedy
Algoritmos GreedyAlgoritmos Greedy
Algoritmos Greedy
 
Resumen
ResumenResumen
Resumen
 
Clase3 Notacion
Clase3 NotacionClase3 Notacion
Clase3 Notacion
 
Analisis Clase2
Analisis  Clase2Analisis  Clase2
Analisis Clase2
 
Como construir un DSS
Como construir un DSSComo construir un DSS
Como construir un DSS
 
Mergesort
MergesortMergesort
Mergesort
 
State Space Search(2)
State Space Search(2)State Space Search(2)
State Space Search(2)
 
DSS:Conceptos, metodologias y Tecnologias
DSS:Conceptos, metodologias y TecnologiasDSS:Conceptos, metodologias y Tecnologias
DSS:Conceptos, metodologias y Tecnologias
 
Soporte a las Decisiones Computarizado
Soporte a las Decisiones ComputarizadoSoporte a las Decisiones Computarizado
Soporte a las Decisiones Computarizado
 
Decision Support Systems
Decision Support SystemsDecision Support Systems
Decision Support Systems
 

Recently uploaded

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Recently uploaded (20)

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 

Introducción al Análisis y diseño de algoritmos

  • 1. Tomado del libro de Cormen A A nalysis of lgorithms
  • 2.
  • 3.
  • 4. Algorithm A sequence of computational of steps for solving a well-specified computational problem The statement of the problem specifies in general terms the desired input/output relationship The algorithm describes a specific computational procedure for achieving that input/ouput relationship
  • 5.
  • 6. INPUT: A sequence of numbers <a 1 ,a 2 ,a 3 ,...,a n > OUTPUT: A permutation <a’ 1 ,a’ 2 ,a’ 3 ,...a’ n > such that a’ 1  a i2  a i3  ...  a in Sorting problem
  • 7. A possible input sequence is a instance of the sorting problem <31,41,59,26,41,58> A sorting algorithms must return: <26,31,41,41,58,59> Instance of the sorting problem
  • 8. Analysis of algorithms Complexity Time complexity Space complexity Analysis Semantic Analysis Correctness
  • 9.
  • 10.
  • 11. mistery( 0) = 0 mistery( 1) = 1 mistery( n ) = mistery( n - 1 ) + mistery( n - 2), for n > 2 . “ mistery( n ) computess the n-th Fibonacci’s number” mistery( n ) =(  n -  n ) /  5 with  =(1 +  5)/2 [Golden ratio]  =(1 -  5)/2
  • 12.
  • 13. Correctness Is an algorithm correct for a problem? (Does it do a given function?) Given a computational problem f : I  O  {  } and a algorithm A . The algorithm A is correct for the problem f if the function that A calculates is f .
  • 14. Problem: Finding the minumun element in an array of n reals Input : T[1..n] : array of real Output : x  min{T[i] | 1  i  n } min : N x R N  R (n, T[1..n] )  min{T[i] | 1  i  n} “ In order to prove that a program or algorithm is correct, we need to show that the program gives the correct answer for every possible input.”
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. Best case t b (n) Minimum execution time for any input of size n Worst case t w (n) Maximum execution time over all the inputs of size n Average case t a (n) Average execution time over all the inputs of size n Time Complexity t(n) Number of computational steps
  • 23.
  • 24. An operation whose execution time can be bounded above by a constant depending only on the particular implementation used ( machine, programming language etc ). In general we use RAM elementary instructions as the model. Elementary Operation
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. “ Two different implementations of the same algorithm will not differ in efficiency by more than some multiplicative constant” Principle of Invariance
  • 30. El orden de complejidad de un algoritmo Es una expresion matematica que indica como los recursos necesitados para correr un algoritmo se incrementan como se incrementa el tamaño del problema (que el resuelve). Orden de complejidad de un algoritmo
  • 31. Complejidad Lineal La complejidad de un algoritmo se dice que es lineal si: Con a y b son constantes t(n)=a * n + b
  • 32.
  • 33. By the invariance principle we if we have two different implementations (computer + language + compiler +code optimizations) with worst case time complexity t w1 (n) and t w2 (n) then t w1 (n) = c t w2 (n) Worst case time complexity t w (n) = a*n + b