Anany Levitin ACM SIGCSE 1999SIG. Outline Introduction Four General Design Techniques A Test of Generality Further Refinements Conclusion.

Slides:



Advertisements
Similar presentations
Dynamic Programming 25-Mar-17.
Advertisements

Algorithm Design Techniques
Design and Analysis of Algorithms Introduction to Divide-and-conquer Haidong Xue Summer 2012, at GSU.
Introduction to Algorithms Greedy Algorithms
Transform and Conquer Chapter 6. Transform and Conquer Solve problem by transforming into: a more convenient instance of the same problem (instance simplification)
Types of Algorithms.
Lecture 12: Revision Lecture Dr John Levine Algorithms and Complexity March 27th 2006.
CS4413 Divide-and-Conquer
Design and Analysis of Algorithms - Chapter 61 Transform and Conquer Solve problem by transforming into: b a more convenient instance of the same problem.
15-May-15 Dynamic Programming. 2 Algorithm types Algorithm types we will consider include: Simple recursive algorithms Backtracking algorithms Divide.
1 Dynamic Programming Jose Rolim University of Geneva.
Algorithm Strategies Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Lecture 8 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
Chapter 4: Divide and Conquer The Design and Analysis of Algorithms.
TCSS 343, version 1.1 Algorithms, Design and Analysis Transform and Conquer Algorithms Presorting HeapSort.
CS333/ Topic 11 CS333 - Introduction CS333 - Introduction General information Goals.
Chapter 10: Algorithm Design Techniques
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
Divide and Conquer The most well known algorithm design strategy: 1. Divide instance of problem into two or more smaller instances 2. Solve smaller instances.
Backtracking.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Design and Analysis of Algorithms - Chapter 11 Algorithm An algorithm is a.
TK3043 Analysis and Design of Algorithms Introduction to Algorithms.
Instructor: Dr. Sahar Shabanah Fall Lectures ST, 9:30 pm-11:00 pm Text book: M. T. Goodrich and R. Tamassia, “Data Structures and Algorithms in.
Teaching Teaching Discrete Mathematics and Algorithms & Data Structures Online G.MirkowskaPJIIT.
1 Decrease-and-Conquer Approach Lecture 06 ITS033 – Programming & Algorithms Asst. Prof. Dr. Bunyarit Uyyanonvara IT Program, Image and Vision Computing.
Copyright © 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin “ Introduction to the Design & Analysis of Algorithms, ” 2 nd ed., Ch. 1 Chapter.
Fundamentals of Algorithms MCS - 2 Lecture # 7
Merge Sort. What Is Sorting? To arrange a collection of items in some specified order. Numerical order Lexicographical order Input: sequence of numbers.
CMPT 438 Algorithms. Why Study Algorithms? Necessary in any computer programming problem ▫Improve algorithm efficiency: run faster, process more data,
Algorithm Paradigms High Level Approach To solving a Class of Problems.
1 Short Term Scheduling. 2  Planning horizon is short  Multiple unique jobs (tasks) with varying processing times and due dates  Multiple unique jobs.
Design and Analysis of Algorithms - Chapter 11 Algorithm b An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining.
December 14, 2015 Design and Analysis of Computer Algorithm Pradondet Nilagupta Department of Computer Engineering.
Types of Algorithms. 2 Algorithm classification Algorithms that use a similar problem-solving approach can be grouped together We’ll talk about a classification.
CSE 340: Review (at last!) Measuring The Complexity Complexity is a function of the size of the input O() Ω() Θ() Complexity Analysis “same order” Order.
Lecture 14 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
Data Structures and Algorithms Instructor: Tesfaye Guta [M.Sc.] Haramaya University.
Advanced Algorithms Analysis and Design
Data Structures and Algorithms
TK3043 Analysis and Design of Algorithms
Subject Name: Design and Analysis of Algorithm Subject Code: 10CS43
Decrease-and-Conquer Approach
Major Design Strategies
Chapter 1 Introduction Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
Introduction to the Design and Analysis of Algorithms
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
Divide-and-Conquer The most-well known algorithm design strategy:
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
Data Structures and Algorithms
Types of Algorithms.
Divide-and-Conquer The most-well known algorithm design strategy:
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
Types of Algorithms.
Analysis & Design of Algorithms (CSCE 321)
Chapter 6: Transform and Conquer
Divide-and-Conquer The most-well known algorithm design strategy:
Dynamic Programming 23-Feb-19.
Divide-and-Conquer The most-well known algorithm design strategy:
Lecture 3: Environs and Algorithms
Backtracking and Branch-and-Bound
Types of Algorithms.
Major Design Strategies
Analysis and design of algorithm
Major Design Strategies
Algorithm Course Algorithms Lecture 3 Sorting Algorithm-1
Chapter 1 Introduction Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
Presentation transcript:

Anany Levitin ACM SIGCSE 1999SIG

Outline Introduction Four General Design Techniques A Test of Generality Further Refinements Conclusion

Introduction-1 According to many textbooks, a consensus seems to have evolved as to which approaches qualify as major techniques for designing algorithms. This is includes: divide-and-conquer, greedy approach, dynamic programming, backtracking, and branch-and- bound.

Introduction-2 However, this widely accepted taxonomy has serious shortcoming. First, it includes techniques of different levels of generality. For example, it seems obvious that divide- and-conquer is more general than greedy approach and branch-and-bound. Second, it fails to distinguish divide-and-conquer and decrease-and-conquer. Third, it fails to include brute force and transform-and- conquer.

Introduction-3 Fourth, its linear, as opposed to hierarchical, structure fails to reflect important special cases of techniques. Finally, it fails to classify many classical algorithms (e.g., Euclid’s algorithm, heapsort, search trees, hashing, etc.) This paper seeks to rectify these shortcomings and presents new taxonomy.

Four General Design Techniques-1 Brute Force It usually based on the problem’s statement and definitions of concepts involved This technique can not be overlooked by the following reasons Applicable to a very wide variety of problems, e.g., computing the sum of n numbers, adding two matrices... Useful for solving small-size instances of a problem Serving an important theoretical or educational purpose, e.g., NP-hard problem, as a yardstick for more efficient alternatives for solving a problem

Four General Design Techniques-2 Divide-and-conquer It based on partitioning a problem into a number of smaller subproblems, usually of the same kind and ideally of about the same size The subproblems are then solved and their solutions combined to get a solution to the original problem. Divide-before-processing: the bulk of the work is done while combining solutions to smaller subproblems, e.g., mergesort. Process-before-dividing: processing before a partition into subproblems, e.g., quicksort.

Four General Design Techniques-3 Decrease-and-conquer This technique is solving a problem by reducing its instance to a smaller one, solving the latter, and then extending the obtained solution to get a solution to the original instance decrease by a constant: insertion sort decrease by a constant factor(a.k.a. prune-and-search): binary search variable size decrease: Euclid’s algorithm

Four General Design Techniques-4 Transform-and-conquer This technique is based on the idea of transformation simplification: solves a problem by first transforming its instance to another instance of the same problem which makes the problem easier to solve, e.g., Gaussian elimination, heapsort... representation change: it is based on a transformation of a problem’s input to a different representation, e.g., hashing, heapsort …

Four General Design Techniques-4 cont. preprossing: The idea is to process a part of the input or the entire input to get some auxiliary information which speeds up solving the problem, e.g., KMP algorithms. reduction: An instance of a problem is transformed to an instance of a different problem altogether, e.g, NP-hard problems.

A Test of Generality-1 We partition design techniques into two categories: more general and less general techniques. How to make such a determinate ? We would like to suggest the following test. In order to qualify for inclusion in the category of most general approaches, a technique must yield reasonable algorithms for the two problems: sorting and searching.

A Test of Generality-2 SortingSearching Brute forceSelection sortSequential search Divide-and-conquerMergesortApplicable Decrease-and-conquerInsertion sortApplicable Transform-and-conquerHeapsortSearch trees, hashing The others - greedy approach, dynamic programming, backtracking, and branch-and-bound - fail to qualify as the most general design techniques.

Further Refinements-1 Local search techniques Greedy methods: it builds solutions piece by piece … the choice selected is that which produces the largest immediate gain while maintaining feasibility, e.g., Prim’s algorithm. Iterative methods: it start with any feasible solution and proceed to improve upon the solution by repeated applications of a simple step, e.g., Ford-Fulkerson algorithm.

Further Refinements-2 Dynamic programming Bottom-up: a table of solutions to subproblems is filled starting with the problem’s smallest subproblems. A solution to the original instance of the problem is then obtained from the table constructed. Top-down: memory function

Further Refinements-3 State-space-tree techniques Backtracking: take coloring problem as an example: Use three colors to color the vertices of this graph. How many different ways ?

Further Refinements-3 cont. S V1V1 V2V2 V3V3

Branch-and-Bound: take TSP problem as an example. If there are four cities, all feasible solutions are

Further Refinements-3 cont. Consider the traveling costs between any two cities: =

Further Refinements-3 cont. Start to branch Choose 1  2 Otherwise

Further Refinements-3 cont. The current branch:

Further Refinements-3 cont. The difference between them lies in that backtracking is not limited to optimization problems, while branch- and-bound is not restricted to a specific way of traversing the problem’s space tree.

Conclusion This paper gives a new taxonomy of algorithm design techniques. No matter how many general design techniques are recognized, there will always be algorithms that cannot be naturally interpreted as an application of those techniques. Some algorithms can be interpreted as an application of different techniques, e.g., selection sort, as a brute-force algorithm and as a decrease-and-conquer method. Some algorithms may incorporate ideas of several techniques, e.g. Fourier transform takes advantage of both the transform and divide-and-conquer ideas.