1 / 30

ADVANCED ALGORITHM ANALYSIS LECTURE # 1 INTRODUCTION-H euristic Algorithms

ADVANCED ALGORITHM ANALYSIS LECTURE # 1 INTRODUCTION-H euristic Algorithms. Prof. Vuda Sreenivasarao Bahir Dar University-ETHIOPIA. Course Information. Course Name: ADVANCED ALGORITHM ANALYSIS. Course Code: 6162. ADVANCED ALGORITHM ANALYSIS. 1.Introduction

cbarker
Download Presentation

ADVANCED ALGORITHM ANALYSIS LECTURE # 1 INTRODUCTION-H euristic Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ADVANCED ALGORITHM ANALYSISLECTURE # 1INTRODUCTION-Heuristic Algorithms Prof. Vuda Sreenivasarao Bahir Dar University-ETHIOPIA

  2. Course Information • Course Name: ADVANCED ALGORITHM ANALYSIS. • Course Code:6162

  3. ADVANCED ALGORITHM ANALYSIS • 1.Introduction • 2.Basic concept of Heuristic algorithms. • 2.1.Example of Heuristic algorithms. • 2.2The Traveling Salesman Problem. • 2.3Traveling Salesman Problem algorithm with example.

  4. Textbooks: • There is no textbook required for the course. Lecture notes are available for the current course. Reference textbooks for each topic are listed in the readings section.

  5. References Books 1. Fundamentals of Computer Algorithms, Ellis Horowitz , Satraj Sahni and Rajasekharam,Galgotia publications pvt. Ltd. 2.Introduction to Algorithms, second edition,T.H.Cormen,C.E.Leiserson, L.Rivest, and C.Stein,PHI Pvt. Ltd./ Pearson Education 3.Introduction to the design and analysis of Algorithms, second edition by Anany Levitin. 4.Introduction to Design & Analysis Computer Algorithm 3rd, Sara Baase, Allen Van Gelder, Adison-Wesley, 2000. 5.Algorithms, Richard Johnsonbaugh, Marcus Schaefer, Prentice Hall, 2004. 6. Steven S. Skiena ,The Algorithm Design Manual ,Second Edition

  6. References Books 7.Allan Borodin and Ran El-Yaniv: Online Computation and Competitive Analysis, Cambridge University Press, 2005. 8.Vijay Vazirani: Approximation Algorithms, Springer, 2001. 9.Dorit S. Hochbaum (ed.): Approximation Algorithms for NP-hard Problems, PWS Publishing, 1997. 10.Joseph JáJá: Introduction to Parallel Algorithms 1992. 11.Rajeev Motwani, PrabhakarRaghavan: Randomized Algorithms, Cambridge University Press, 1995. 12.Jiri Matousek and Bernd Gärtner: Understanding and Using Linear Programming , 2006.

  7. Assignments and Examination Grading Criteria: • Assignment-20%. • Project/Term Paper -30%. • Examination-50%.

  8. Course Objectives • This course introduces students to the analysis and design of advanced computer algorithms. Upon completion of this course, students will be able to do the following: • Analyze the asymptotic performance of algorithms. • Demonstrate a familiarity with major algorithms . • Apply important algorithmic design paradigms and methods of analysis. • Synthesize efficient algorithms in common engineering design situations. • Design of fast algorithms.

  9. Cont…. • Depth knowledge in ADVANCED ALGORITHM ANALYSISand develop programs efficiently by analyzing first the feasibility of an algorithm used before program coding. • To develop an understanding about basic algorithms and different problem solving strategies. • To improve creativeness and the confidence to solve non-conventional problems and expertise for analyzing existing solutions. • An end of the Course Solve any type of problems. • Algorithmic is more than a branch of computer science.

  10. Cont----- • It is the core of computer science, and, in all fairness, can be said to be relevant to most of science, business, and technology. • Another reason for studying algorithms is their usefulness in developing analytical skills. • A person well-trained in computer science knows how to deal with algorithms: how to construct them, manipulate them, understand them, analyze them. • This knowledge is preparation for much more than writing good computer programs; it is a general-purpose mental tool that will be a definite aid to the understanding of other subjects, whether they be chemistry, linguistics, or music, etc.

  11. Prerequisites: • Programming • Data Structures. • Discrete Mathematics. • Design Analysis and Algorithms

  12. Approach • Analytical: • Build a mathematical model of a computer. • Study properties of algorithms on this modal. • REASON: about algorithms PROVE facts about time taken.

  13. Applications • Study problems these techniques can be applied to • sorting • data retrieval • network routing • Games • etc

  14. WhereWe'reGoing • Learn general approaches to algorithm design • Divide and conquer • Greedy method • Dynamic Programming • Basic Search and Traversal Technique • Graph Theory • Linear Programming • Approximation Algorithm • NP Problem

  15. WhereWe'reGoing • Examine methods of analyzing algorithm correctness and efficiency • Recursion equations • Lower bound techniques • O,Omega and Theta notations for best/worst/average case analysis • Decide whether some problems have no solution in reasonable time • List all permutations of n objects (takes n! steps) • Travelling salesman problem • Investigate memory usage as a different measure of efficiency

  16. Algorithm. (webster.com) • A procedure for solving a mathematical problem (as of finding the greatest common divisor) in a finite number of steps that frequently involves repetition of an operation. • Broadly: a step-by-step procedure for solving a problem or accomplishing some end especially by a computer. "Great algorithms are the poetry of computation." Etymology: • "algos" = Greek word for pain. • "algor" = Latin word for to be cold. • Abu Ja’far al-Khwarizmi’s = 9th century Arab scholar. • his book "Al-Jabr wa-al-Muqabilah" evolved into today’s high school algebra text

  17. Example • How to make a coffee with a coffee machine:1. Open the coffee machine2. Put water in it.3. Close it4. Open the coffee container (hope it's called like that)5. Fill it with finely ground coffee.6. Close it7. Turn the machine on8. Wait 3-4 minutes9. Open it 10. Pour the coffee.11. etc.

  18. Imagine: A WorldWithNoAlgorithms • Fast arithmetic. • Cryptography. • Quick sort. • Databases. • Signal processing. • Huffman codes. • Data compression. • Network flow. • Routing Internet packets. • Linear programming. • Planning, decision-making.

  19. What is an Algorithm?- Anany Levitin • An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate input in a finite amount of time.

  20. What is a ComputerAlgorithm? • A computer algorithm is • a detailed step-by-step method for • solving a problem • by using a computer.

  21. Whichalgorithmisbetter? The algorithms are correct, but which is the best? Measure the running time (number of operations needed). Measure the amount of memory used. Note that the running time of the algorithms increase as the size of the input increases.

  22. ImportanceofAnalyzeAlgorithm • Need to recognize limitations of various algorithms for solving a problem. • Need to understand relationship between problem size and running time. • When is a running program not good enough? • Need to learn how to analyze an algorithm's running time without coding it. • Need to learn techniques for writing more efficient code. • Need to recognize bottlenecks in code as well as which parts of code are easiest to optimize.

  23. Whydoweanalyzeaboutthem? • understand their behavior, and (Job -- Selection, performance, modify)improve them. (Research) • Correctness • Does the input/output relation match algorithm requirement? • Amount of work done ( complexity) • Basic operations to do task • Amount of space used • Memory used • Simplicity, clarity • Verification and implementation. • Optimality • Is it impossible to do better?

  24. Algorithm Classification • There are various ways to classify algorithms: • 1. Classification by implementation : • Recursion or iteration: • Logical: • Serial or parallel or distributed: • Deterministic or non-deterministic: • Exact or approximate: • 2.Classification by Design Paradigm : • Divide and conquer. • Dynamic programming. • The greedy method. • Linear programming. • Reduction. • Search and enumeration. • The probabilistic and heuristic paradigm.

  25. Solution Methods • Try every possibility (n-1)! possibilities – • grows faster than exponentially • If it took 1 microsecond to calculate each possibility takes 10140 centuriesto calculate all possibilities when n = 100 • Optimising Methodsobtain guaranteed optimal solution, but can take a very, very, long time III. Heuristic Methodsobtain ‘good’ solutions ‘quickly’ by intuitive methods. No guarantee of optimality.

  26. HeuristicAlgorithms • The term heuristic is used for algorithms which find solutions among all possible ones ,but they do not guarantee that the best will be found, therefore they may be considered as approximately and not accurate algorithms. • These algorithms, usually find a solution close to the best one and they find it fast and easily. • Sometimes these algorithms can be accurate, that is they actually find the best solution, but the algorithm is still called heuristic until this best solution is proven to be the best . • EXAMPLE: Heuristic algorithm for the Traveling Salesman Problem (T.S.P) .

  27. Traveling Salesman Problem A Salesman wishes to travel around a given set of cities, and return to the beginning, covering the smallest total distance. Easy to State Difficult to Solve

  28. Traveling Salesman Problem (T.S.P)  William Rowan Hamilton • This is one of the most known problems, and is often called as a difficult problem. • A salesman must visit n cities, passing through each city only once, beginning from one of them which is considered as his base, and returning to it. • The cost of the transportation among the cities (whichever combination possible) is given. • The program of the journey is requested, that is the order of visiting the cities in such a way that the cost is the minimum.

  29. Traveling Salesman Problem • Let's number the cities from 1 to n, and • let city 1 be the city-base of the salesman. • Also let's assume that c(i, j) is the visiting cost from ito j. • There can be c(i, j)<>c(j, i). • Apparently all the possible solutions are (n-1)!. • Someone could probably determine them systematically, find the cost for each and every one of these solutions and finally keep the one with the minimum cost. • These require at least (n-1)! steps.

  30. Interesting, right? This is just a sneak preview of the full presentation. We hope you like it! To see the rest of it, just click here to view it in full on PowerShow.com. Then, if you’d like, you can also log in to PowerShow.com to download the entire presentation for free.

More Related