SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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 ......................................
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

“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
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
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
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 

Kürzlich hochgeladen (20)

“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...
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
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
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 

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