SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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 ......................................
 

Plus de 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
 

Plus de 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
 

Dernier

ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
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
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 

Dernier (20)

ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
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 🔝✔️✔️
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 

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