1 Summary of lectures 1.Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture SlidesLecture Slides 2.Recurrence and Master Theorem (Chapter.

Slides:



Advertisements
Similar presentations
Lecture 3: Parallel Algorithm Design
Advertisements

Dynamic Programming.
1 Selection --Medians and Order Statistics (Chap. 9) The ith order statistic of n elements S={a 1, a 2,…, a n } : ith smallest elements Also called selection.
S. J. Shyu Chap. 1 Introduction 1 The Design and Analysis of Algorithms Chapter 1 Introduction S. J. Shyu.
© The McGraw-Hill Companies, Inc., Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
Jan Welcome to the Course of Advanced Algorithm Design (ACS-7101/3)
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
1 -1 Chapter 1 Introduction Why Do We Need to Study Algorithms? To learn strategies to design efficient algorithms. To understand the difficulty.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2003 Review Lecture Tuesday, 5/6/03.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Lecture 1 (Part 1) Introduction/Overview Tuesday, 9/3/02.
NP-Complete Problems Problems in Computer Science are classified into
1 -1 Chapter 1 Introduction Why to study algorithms? Sorting problem: To sort a set of elements into increasing or decreasing order. 11, 7, 14,
Chapter 11: Limitations of Algorithmic Power
Recurrences / HW: 2.4 Quiz: 2.1, 4.1, 4.2, 5.2, 7.3, 7.4 Midterm: 8 given a recursive algorithm, state the recurrence solve a recurrence, using Master.
Data Structures, Spring 2004 © L. Joskowicz 1 DAST – Final Lecture Summary and overview What we have learned. Why it is important. What next.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Introduction to Algorithm design and analysis
Ch. 8 & 9 – Linear Sorting and Order Statistics What do you trade for speed?
Dynamic Programming. Well known algorithm design techniques:. –Divide-and-conquer algorithms Another strategy for designing algorithms is dynamic programming.
1 Summary of lectures 1.Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture SlidesLecture Slides 2.Recurrence and Master Theorem (Chapter.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
Lecture 2 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
10/20/20151 CS 3343: Analysis of Algorithms Review for final.
The Selection Problem. 2 Median and Order Statistics In this section, we will study algorithms for finding the i th smallest element in a set of n elements.
CMPT 438 Algorithms. Why Study Algorithms? Necessary in any computer programming problem ▫Improve algorithm efficiency: run faster, process more data,
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
1Computer Sciences Department. Book: Introduction to Algorithms, by: Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest Clifford Stein Electronic:
1 CPSC 320: Intermediate Algorithm Design and Analysis July 28, 2014.
1 Approximate Algorithms (chap. 35) Motivation: –Many problems are NP-complete, so unlikely find efficient algorithms –Three ways to get around: If input.
INTRODUCTION. What is an algorithm? What is a Problem?
1 BIM304: Algorithm Design Time: Friday 9-12am Location: B4 Instructor: Cuneyt Akinlar Grading –2 Midterms – 20% and 30% respectively –Final – 30% –Projects.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 16, 2014.
Computer Sciences Department1.  Property 1: each node can have up to two successor nodes (children)  The predecessor node of a node is called its.
Design and Analysis of Algorithms (09 Credits / 5 hours per week) Sixth Semester: Computer Science & Engineering M.B.Chandak
Lecture 14 Lower Bounds Decision tree model Linear-time reduction.
Lecture 14 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
CES 592 Theory of Software Systems B. Ravikumar (Ravi) Office: 124 Darwin Hall.
Lecture 2 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
Conceptual Foundations © 2008 Pearson Education Australia Lecture slides for this course are based on teaching materials provided/referred by: (1) Statistics.
Lecture 2 Algorithm Analysis
CMPT 438 Algorithms.
Design and Analysis of Algorithms
Chapter 10 NP-Complete Problems.
Design and Analysis of Algorithms (09 Credits / 5 hours per week)
CSE 326: Data Structures: Advanced Topics
Lecture 5 Dynamic Programming
Summary of lectures Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture Slides Recurrence and Master Theorem (Chapter 4). Lecture Slides.
Course Description Algorithms are: Recipes for solving problems.
CS 3343: Analysis of Algorithms
Lecture 5 Dynamic Programming
CS 3343: Analysis of Algorithms
Design and Analysis of Algorithms (07 Credits / 4 hours per week)
CS 3343: Analysis of Algorithms
CS 3343: Analysis of Algorithms
CS 3343: Analysis of Algorithms
COSC 320 Advanced Data Structures and Algorithm Analysis
CS 3343: Analysis of Algorithms
Introduction to Algorithms: Dynamic Programming
Chapter 1 Introduction.
The Selection Problem.
Course Description Algorithms are: Recipes for solving problems.
INTRODUCTION TO ALOGORITHM DESIGN STRATEGIES
Department of Computer Science & Engineering
Design and Analysis of Algorithms (04 Credits / 4 hours per week)
Algorithm Course Algorithms Lecture 3 Sorting Algorithm-1
COMP 122 – Design and Analysis of Algorithms
Presentation transcript:

1 Summary of lectures 1.Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture SlidesLecture Slides 2.Recurrence and Master Theorem (Chapter 4). Lecture SlidesLecture Slides 3.Sorting and Order Statistics (Chapter 8-9). Lecture SlidesLecture Slides 4.Balanced Search Trees: red-back tree (chapter 13) and others Lecture SlidesLecture Slides 5.Augmenting Data Structure (Chapter 14) Lecture SlidesLecture Slides 6.Dynamic Programming (Chapter 15). Lecture SlidesLecture Slides 7.Greedy Algorithms (Chapter 16). Lecture SlidesLecture Slides 8.Amortized Analysis (chapter 17) Lecture slidesLecture slides 9.Disjoint Sets (Chapter 21). Lecture SlidesLecture Slides 10.NP-Completeness (Chapter 34). Lecture SlidesLecture Slides 11.Parallel Algorithms (Selected from Chapter 30, the First Edition). Lecture SlidesLecture Slides 12.String/Pattern Matching (Chapter 32 & handout). Lecture SlidesLecture Slides 13.Approximation Algorithms (Chapter 35). Lecture SlidesLecture Slides 14.Divide and Conquer--closest pair (Chapter 33.4) Lecture slidesLecture slides 15.Lower bound: decision tree & adversary argument (handout) Lecture SlidesLecture Slides

2 Introduction Algorithms design: data structures and algorithms (disjoint set, red-black tree, AVL, B-Tree, 2-3-4) Algorithm analysis: complexities-- space and time worst, best, average asymptotic notations: order of growth Analysis methods: loop and loop invariant recursive relation and equations Substitution, Recursion tree, Master theorem, Domain Transformation, Change of variables amortized analysis adversary argument, decision argument (worst case lower bound) Algorithms: serial vs. parallel regular vs. approximate deterministic vs. probabilistic Design methods: divide and conquer dynamic programming, memoization greedy algorithm prune and search specific methods: 7 in closest pair, 5 in ordered statistic,

3 Sorting and order statistic Sorting: –Comparison: Lower bound O(nlg n), decision tree. –Non-comparison: Bucket sort, counting sort, radix sort, (linear time). ith smallest elements: –First (minimum), last (Maximum), both (3  n/2  ). –Prune-and-search RANDOMIZED-SELECT :Expected linear time O(n) but worst- case running time O(n 2 ). SELECT: Linear worst-case running time O(n).

Lower bound 4 Decision Tree Adversary Argument

5 Dynamic programming Elements of DP: –Optimal substructures –Overlapping subproblems Four steps: –Find/prove Optimal Substructure –Find recursive solution –write DP program to compute optimal value –Construct optimal solution (path). Analysis of DP program Relations among: recursive algorithm, divide-and- conquer, Memoization. Auxiliary table.

6 Data structures Disjoint set –Definition and implementation Union-by-rank, path compression –Analysis Fast increasing function and its slow reverse Amortized analysis Proof of the running time. Red-black trees –Balance –Rotation –Augmenting Other trees: –AVL, B-tree, B+-tree, 2-3-4, Treap, Splay

7 Amortized analysis Find the average worse-case performance over a sequence of operations Three methods: –Aggregate analysis: Total cost of n operations/n, –Accounting method: Assign each type of operation an (different) amortized cost overcharge some operations, store the overcharge as credit on specific objects, then use the credit for compensation for some later operations. –Potential method: Same as accounting method But store the credit as “potential energy” and as a whole.

8 NP-completeness P and NP Poly reduction Proof of NP-completeness by reduction. –Belong to NP –Is NP-hard Reduce a (general) instance of known NPC problem to a (concrete) instance of need-to-proof problem Prove poly reduction and their equivalence.

9 Parallel algorithms PRAM models: –EREW, CREW, ERCW, CRCW Design parallel algorithms –Analysis Relation among models.

10 String matching Naïve solution KMP algorithm –Prefix function –Analysis: amortized method. Appropriate string matching.

11 Approximate algorithms Find near-optimal solution in poly time Ratio Question: given two NP-complete problems A and B, if A can be reduced to B in poly, how about their corresponding appropriate algorithms and the ratios?

12 Cross-topic reviews NP-complete problem –Proof –Some (poly) algorithms such as DP algorithm (they may look like poly solution, but in fact, not). –Graph related problems, schedule problems, number and set related problems, etc. Given a problem, –determine whether it is NP-complete, If yes, –find special cases, or find appropriate solution –Otherwise, design its data structures, its algorithms, and analyze its complexity. –DP solution for NP-complete problem, pseudo-poly. Space and time trade-off Pre-processing

13 Questions types NP-complete proof Parallel algorithm Design data structures Design algorithms (by different methods) Given algorithm, analysis of its (different techniques) functions and complexity. Problem-related specific questions: many!! Recursive and recurrence. Proof, computation, design, analysis.