Joseph L. Lindo Algorithms and Data Structures Sir Joseph Lindo University of the Cordilleras
Joseph L. Lindo Case What How Section 1 Algorithm Why study algorithm? Make a lot of money out of great algorithm $ ? Ex. PageRank AlgorithmPageRank Algorithm Why
Joseph L. Lindo Case What How Section 1 Algorithm Why study algorithm? Make significant contribution to the society Ex. Viterbi AlgorithmViterbi Algorithm Why
Joseph L. Lindo Case What How Section 1 Algorithm Why study algorithm? Simply to be cool to invent something in computer science or IT field Ex. Shortest Path AlgorithmShortest Path Algorithm Why
Joseph L. Lindo Case What How Why Algorithm Definition An algorithm is a sequence of unambiguous instructions/operations for solving a problem for obtaining a required output for any legitimate input in a finite amount of time What
Joseph L. Lindo Case What How Why Algorithm What “computer”+ programs PROBLEM ALGORITHM INPUT OUTPUT Data Structures Map Navigation A B Graphs Path
Joseph L. Lindo Case What How Why Algorithm Characteristics Finiteness - terminates after a number of steps Input - Valid inputs are clearly specified Output - can be proven to produce the correct outcome What
Joseph L. Lindo Case What How Why Algorithm Characteristics Definiteness -rigorously and unambiguously specified Effectiveness - steps are sufficiently simple and basic What
Joseph L. Lindo Case What How Why Algorithm Important Points Each step of an algorithm is unambiguous The range of inputs has to be specified carefully The same algorithm can be represented in different ways What
Joseph L. Lindo Case What How Why Algorithm Important Points The same problem may be solved by different algorithms Different algorithms may take different time to solve the same problem – we may prefer one to the other What
Joseph L. Lindo Case What How Why Algorithm Algorithmic Problem Solving What 1. Understanding the problem 2. Ascertaining the capabilities of a computational device 3. Choose between exact and approximate problem solving
Joseph L. Lindo Case What How Why Algorithm Algorithmic Problem Solving What 4.Deciding on appropriate data structure 5. Algorithm design techniques 6. Methods of specifying an algorithm (Pseudocode or diagram)
Joseph L. Lindo Case What How Why Algorithm Algorithmic Problem Solving What 7. Prove an algorithm’s correctness – mathematic induction 8. Analyzing an algorithm – Simplicity, efficiency, optimality 9. Coding an algorithm
Joseph L. Lindo Case What How Why Algorithm Algorithm Analysis Correctness Time efficiency Space efficiency What
Joseph L. Lindo Case What How Why Algorithm In general A good algorithm is a result of repeated effort and rework Better data structure Better algorithm design Better time or space efficiency Easy to implement Optimal algorithm What
Joseph L. Lindo Case What How Why Algorithm How to study Algorithm? Problem Representation/data structure in computer Operations on representations How
Joseph L. Lindo Case What How Why Algorithm How to present Algorithm? Human Language Graphical representation (Flow Chart) -->--> Pseudo code -->--> Sample Problem How
Joseph L. Lindo Case What How Why Algorithm Group Activity Write the algorithm in borrowing a book at the University of the Cordilleras. Represent the algorithm in: Human Language Flowchart Pseudo code Case
Joseph L. Lindo Algorithms and Data Structures Sir Joseph Lindo University of the Cordilleras
Joseph L. Lindo PageRank Algorithm Algorithm
Joseph L. Lindo PageRank Algorithm Algorithm Created by Larry Page The “soul” of Google Search Engine Google total assets: $31 billions 2008
Joseph L. Lindo Viterbi Algorithm Algorithm
Joseph L. Lindo Viterbi Algorithm Algorithm conceived by Andrew Viterbi in 1967 as an error-correction scheme for noisy digital communication links Viterbi algorithm is a standard component of tens of millions of high-speed modems
Joseph L. Lindo Viterbi Algorithm Algorithm It is a key building block of modern information infrastructure Digitalcellular, dial-up modems, satellite, deep-space wireless LANs. speech recognition, keyword spotting, computational linguistics, and bioinformatics.
Joseph L. Lindo Shortest Path Algorithm Algorithm CLICK HERE FOR MORE INFO
Joseph L. Lindo Shortest Path Algorithm Algorithm Used in Google Maps
Joseph L. Lindo Flow Chart Symbols Algorithm
Joseph L. Lindo Flow Chart Symbols Algorithm
Joseph L. Lindo Flow Chart Symbols Algorithm
Joseph L. Lindo Pseudo code Algorithm It is a cross between human language and a programming language
Joseph L. Lindo Name Search Problem Algorithm “Create a program that will determine the number of times a name occurs in a list.”
Joseph L. Lindo Human Language Representation Algorithm 1. Get the list of names, let's call this nameList 2. Get the name to look for, let's call this the keyname 3. Compare the keyname to each of the names in nameList 4. If the keyname is the same with a name in the list, add 1 to the count 5. If all the names have been compared, output the result
Joseph L. Lindo Flowchart Representation Algorithm
Joseph L. Lindo Pseudo code Representation Algorithm Let nameList = List of Names Let keyName = the name to be sought Let Count = 0 For each name in NameList do the following if name == keyName Count = Count + 1 Display Count