1 / 8

Introduction

Introduction. What is an Algorithm?. An algorithm is: a sequence of elementary computational steps that transforms the input into the output . An algorithm is: a tool for solving a well-specified computational problem , eg. Sorting, Multiplication.

louise
Download Presentation

Introduction

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. Introduction

  2. What is an Algorithm? An algorithm is: a sequence of elementary computational steps that transforms the inputinto the output. An algorithm is: a tool for solving a well-specified computational problem, eg. Sorting, Multiplication. A correct algorithm:for every input instance, it halts with the correct output.

  3. A Sorting Problem ASorting Problem Input : <a1, a2, …, an> Output : A permutation (re-ordering) < a’1, a’2, …, a’n> of the input sequence such that a’1a’2  … a’n. Example: <31, 41, 59, 26, 41, 58> => < > An instance of the sorting problem.

  4. Which algorithm is best, eg. for a sorting problem? The best algorithm Answer these questions first: • Number of items to be sorted? • Are the items already somewhat sorted? • Any restrictions on the item values? • What kind of storage device (main memory? Disks?)

  5. Other examples of problems • Identifying 100,000 genes in human DNA. Determining the sequences of 3,000,000,000 base pairs. => Sorting and Order statistics • Internet search engine => Graph algorithms, hash tables, string matching • Find all x and n that satisfies 1079*x = 80642173 (mod n)Cryptography and digital signatures => Numerical problems

  6. Other examples of problems • Winning an election => Linear Programming • Triangulation of polygon => Dynamic Programming • Identifying the convex hull => Computational Geometry

  7. Tractable: The set of problems with efficient solutions known. NP-Complete Problems NP-Complete Problems All known problems: No efficient solution is known yet. • Nobody has ever proven that an efficient algorithm for one cannot exist. • If an efficient algorithm exists for any one of them, then efficient algorithms exist for all of them !!! • Several NP-Complete problems are similar to some tractable ones. Eg. Traveling-salesman problem However, “Approximation Algorithms” exist !!!

  8. Core Topics • Analysis of Algorithms • Divide and Conquer • Dynamic Programming • Greedy Algorithms • Computational Geometry • Graph Algorithms • String Algorithms • NP-Completeness

More Related