Lecture 14 Lower Bounds Decision tree model Linear-time reduction.

Slides:



Advertisements
Similar presentations
Algorithms Algorithm: what is it ?. Algorithms Algorithm: what is it ? Some representative problems : - Interval Scheduling.
Advertisements

Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Lower Bounds for Sorting, Searching and Selection
Longest Common Subsequence
Comments We consider in this topic a large class of related problems that deal with proximity of points in the plane. We will: 1.Define some proximity.
CMSC 341 Asymptotic Analysis. 2 Mileage Example Problem: John drives his car, how much gas does he use?
CS420 lecture one Problems, algorithms, decidability, tractability.
© The McGraw-Hill Companies, Inc., Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
Divide-and-Conquer The most-well known algorithm design strategy:
1 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.
Advanced Topics in Algorithms and Data Structures Lecture 7.1, page 1 An overview of lecture 7 An optimal parallel algorithm for the 2D convex hull problem,
Chapter 4 Divide-and-Conquer Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
CPSC 320: Intermediate Algorithm Design & Analysis Asymptotic Notation: (O, Ω, Θ, o, ω) Steve Wolfman 1.
Chapter 4 Divide-and-Conquer Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Chapter 4: Divide and Conquer The Design and Analysis of Algorithms.
2 -1 Analysis of algorithms Best case: easiest Worst case Average case: hardest.
Lecture 5: Master Theorem and Linear Time Sorting
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
Chapter 11: Limitations of Algorithmic Power
CS 104 Introduction to Computer Science and Graphics Problems Data Structure & Algorithms (1) Asymptotic Complexity 10/28/2008 Yang Song.
CS420 lecture two Fundamentals
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
The Complexity of Algorithms and the Lower Bounds of Problems
CS420 lecture three Lowerbounds wim bohm, cs CSU.
1 Summary of lectures 1.Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture SlidesLecture Slides 2.Recurrence and Master Theorem (Chapter.
Aaron Bernstein Analysis of Algorithms I. Sorting Algorithms Insertion Sort: Θ(n 2 ) Merge Sort:Θ(nlog(n)) Heap Sort:Θ(nlog(n)) We seem to be stuck at.
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
CSCE350 Algorithms and Data Structure
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
A Simple Algorithm for Stable Minimum Storage Merging Pok-Son Kim Kookmin University, Department of Mathematics, Seoul , Korea Arne Kutzner Seokyeong.
A. Levitin “Introduction to the Design & Analysis of Algorithms,” 3rd ed., Ch. 5 ©2012 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
CMSC 341 Asymptotic Analysis. 2 Complexity How many resources will it take to solve a problem of a given size? –time –space Expressed as a function of.
The Lower Bounds of Problems
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.
Fall 2015 Lecture 4: Sorting in linear time
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
CMSC 341 Asymptotic Analysis. 2 Complexity How many resources will it take to solve a problem of a given size? –time –space Expressed as a function of.
Asymptotic Analysis (based on slides used at UMBC)
Sorting Algorithms Insertion Sort: Θ(n 2 ) Merge Sort:Θ(nlog(n)) Heap Sort:Θ(nlog(n)) We seem to be stuck at Θ(nlog(n)) Hypothesis: Every sorting algorithm.
Lecture 2 Analysis of Algorithms How to estimate time complexity? Analysis of algorithms Techniques based on Recursions ACKNOWLEDGEMENTS: Some contents.
LIMITATIONS OF ALGORITHM POWER
CSCE 411H Design and Analysis of Algorithms Set 10: Lower Bounds Prof. Evdokia Nikolova* Spring 2013 CSCE 411H, Spring 2013: Set 10 1 * Slides adapted.
8/3/07CMSC 341 Asymptotic Anaylsis1 CMSC 341 Asymptotic Analysis.
Sorting Lower Bounds n Beating Them. Recap Divide and Conquer –Know how to break a problem into smaller problems, such that –Given a solution to the smaller.
Ch03-Algorithms 1. Algorithms What is an algorithm? An algorithm is a finite set of precise instructions for performing a computation or for solving a.
Decision Trees DEFINITION: DECISION TREE A decision tree is a tree in which the internal nodes represent actions, the arcs represent outcomes of an action,
David Kauchak cs062 Spring 2010
Computation of the solutions of nonlinear polynomial systems
Decision trees Polynomial-Time
Summary of lectures Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture Slides Recurrence and Master Theorem (Chapter 4). Lecture Slides.
CPSC 411 Design and Analysis of Algorithms
Chapter 4 Divide-and-Conquer
CSCE 411 Design and Analysis of Algorithms
Lower Bound Theory.
The Complexity of Algorithms and the Lower Bounds of Problems
Analysis and design of algorithm
CSCE 411 Design and Analysis of Algorithms
Chapter 11 Limitations of Algorithm Power
The Lower Bounds of Problems
Transform and Conquer Transform and Conquer Transform and Conquer.
Transform and Conquer Transform and Conquer Transform and Conquer.
CMPS 3120: Computational Geometry Spring 2013
CPSC 411 Design and Analysis of Algorithms
David Kauchak cs302 Spring 2012
Presentation transcript:

Lecture 14 Lower Bounds Decision tree model Linear-time reduction

Lower & Upper Bounds Upper bounds of a problem A: there is an algorithm for the problem that is O(f(n)). Lower bounds of a problem A: ALL algorithms for the problem that are Ω(f(n)). An optimal algorithm for some problem is an algorithm with its upper bound asymptotically equivalent to the lower bound of this problem.

Trivial lower bounds Finding the maximum element of a list of n elements: Ω(n). Multiplying two n × n matrix: Ω(n2).

Roadmap Decision tree model Linear-time reduction

Decision tree model Definition: Decision Tree Model Decision tree model is the model of computation in which an algorithm is considered to be a decision tree, i.e., a sequence of branching operations based on comparisons of some quantities.

Algorithm ⇔ Decision tree Linear Search Depth = worst time complexity A[1] = x? tests 1 A[2] = x? T F 2 A[2] = x? T F n A[n] = x? ...... T F

Algorithm ⇔ Decision tree Binary Search A[n/2] ? x n/2 A[n/4] = x? A[3n/4] = x? < = > n/4 A[n/8] = x? ....... < = > 3n/4 ...... A[7n/8] = x? A[n/n] = x? ...... A[i] = x? A[j] = x? A[n] = x? ... < = > n j i 1

Lower bounds based on Decision Tree Model How many leaves? Lower bound = the smallest depth

Searching problem ⎡log(n+1)⎤ = Θ(logn) Problem: Search Input: A array A[1..n] of n elements, and an element a Output: The index i if A[i]=a, 0 otherwise Any search algorithm a1 a2 a3 an ...... n+1 leaves ⎡log(n+1)⎤ = Θ(logn)

Sorting problem ⎡log(n!)⎤ = Θ(nlogn) Problem: Sorting Input: An array A[1..n] of n elements Output: The sorted array of A[1..n] a1a2...an Any sort algorithm a2a1...an a3a1...an a4a1...an anan-1...a1 anan-1...a2 ...... n! leaves ⎡log(n!)⎤ = Θ(nlogn)

Decision trees Definition: Simple Decision tree model Every decision is based on the comparison of two numbers within constant time Definition: Algebra Decision tree model Every decision is based on some polynomial function: f(x1,x2,...,xn) = 0?

Element uniqueness Theorem Problem: ElementUniqueness Input: A set of n numbers Output: yes, if there does not exist two of them that are equal; no, otherwise Theorem Any algorithm base on algebraic decision tree model to determine element uniqueness requires Ω(nlogn) comparisons in the worst case.

Roadmap Decision tree model Linear-time reduction

Polynomial-time reduction Q is polynomially reduced to Q’ An algorithm for Q An algorithm for problem Q’ yes Input of Q Transform Input of Q’ no Review (P v.s. NP) Polynomial-time Q∝p Q’ : Q’ is harder than Q

Linear-time reductions An algorithm for A Input of A Transform Input of B Linear-time Any algorithm for problem B Output of B Output of A Transform f(n) = Ω(n) A∝nB: A has lower bound Ω(f(n)) implies B has lower bound Ω(f(n))

The convex hull problem Sorting∝nConvexHull

The closest pair problem ElementUniqueness ∝n ClosestPair

The Euclidean minimum spanning tree problem Sorting ∝n EuclideanMinSpan

Conclusion Theorem In algebraic decision tree model for computation, any algorithm that solves sorting problem, or element uniqueness problem, or convex hull problem, or the closest pair problem, or the Euclidean minimum spanning tree problem requires Ω(nlogn) operations in the worst case.