CS 312: Algorithm Analysis Lecture #8: Non-Homogeneous Recurrence Relations This work is licensed under a Creative Commons Attribution-Share Alike 3.0.

Slides:



Advertisements
Similar presentations
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
Advertisements

section 6.2 Solving Recurrence Relations
2/9/06CS 3343 Analysis of Algorithms1 Convex Hull  Given a set of pins on a pinboard  And a rubber band around them  How does the rubber band look when.
CS Divide and Conquer/Recurrence Relations1 Divide and Conquer.
Lecture 3: Parallel Algorithm Design
1/13/15CMPS 3130/6130: Computational Geometry1 CMPS 3130/6130: Computational Geometry Spring 2015 Convex Hulls Carola Wenk.
MA/CSSE 473 Day 13 Divide and Conquer Closest Points Convex Hull Answer Quiz Question 1.
Introduction to Algorithms Rabie A. Ramadan rabieramadan.org 6 Ack : Carola Wenk nad Dr. Thomas Ottmann tutorials.
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,
8/29/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Spring 2006 Convex Hulls Carola Wenk.
Computational Geometry The art of finding algorithms for solving geometrical problems Literature: –M. De Berg et al: Computational Geometry, Springer,
Computational Geometry The art of finding algorithms for solving geometrical problems Literature: –M. De Berg et al: Computational Geometry, Springer,
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 3 Chapter 3: 2D Convex Hulls Friday,
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 2 Chapter 2: Polygon Partitioning.
Real Zeros of Polynomial Functions Lesson 4.4. Division of Polynomials Can be done manually See Example 2, pg 253 Calculator can also do division Use.
Section 3.3 Dividing Polynomials; Remainder and Factor Theorems
Lecture 6 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
CS 312: Algorithm Analysis Lecture #3: Algorithms for Modular Arithmetic, Modular Exponentiation This work is licensed under a Creative Commons Attribution-Share.
CS 312: Algorithm Analysis
CS 312: Algorithm Design & Analysis Lecture #34: Branch and Bound Design Options for Solving the TSP: Tight Bounds This work is licensed under a Creative.
CS 312: Algorithm Analysis Lecture #4: Primality Testing, GCD This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
CS 312: Algorithm Design & Analysis Lecture #17: Connectedness in Graphs This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
MA/CSSE 473 Day 17 Divide-and-conquer Convex Hull Strassen's Algorithm: Matrix Multiplication.
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Academy Algebra II/Trig 5.5: The Real Zeros of a Polynomial Functions HW: p.387 (14, 27, 30, 31, 37, 38, 46, 51)
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
CS 312: Algorithm Analysis Lecture #8: Non-Homogeneous Recurrence Relations This work is licensed under a Creative Commons Attribution-Share Alike 3.0.
CS 312: Algorithm Analysis Lecture #32: Intro. to State-Space Search This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
CS 312: Algorithm Design & Analysis Lecture #23: Making Optimal Change with Dynamic Programming Slides by: Eric Ringger, with contributions from Mike Jones,
CS 312: Algorithm Design & Analysis Lecture #12: Average Case Analysis of Quicksort This work is licensed under a Creative Commons Attribution-Share Alike.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 2.4 Real Zeros of Polynomial Functions.
CS 312: Algorithm Analysis Lecture #1: Algorithms and Efficiency This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
CS 312: Algorithm Design & Analysis Lecture #24: Optimality, Gene Sequence Alignment This work is licensed under a Creative Commons Attribution-Share Alike.
Chapter 8 With Question/Answer Animations. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
CS 312: Algorithm Design & Analysis Lecture #2: Asymptotic Notation This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
Slide Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
CS 312: Algorithm Design & Analysis Lecture #35: Branch and Bound Design Options: State Spaces Slides by: Eric Ringger, with contributions from Mike Jones,
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
CS 312: Algorithm Analysis Lecture #1: Algorithms and Efficiency This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
Section 5.5 The Real Zeros of a Polynomial Function.
CSE 2813 Discrete Structures Solving Recurrence Relations Section 6.2.
CS 312: Algorithm Analysis Lecture #7: Recurrence Relations a.k.a. Difference Equations Slides by: Eric Ringger, with contributions from Mike Jones, Eric.
CS 312: Algorithm Analysis Lecture #33: Branch and Bound, Job Assignment This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
CS 312: Algorithm Analysis
CS 312: Algorithm Analysis Lecture #31: Linear Programming: the Simplex Algorithm, part 2 This work is licensed under a Creative Commons Attribution-Share.
CS 312: Algorithm Analysis Lecture #35: Branch and Bound Design Options - State Spaces Slides by: Eric Ringger, with contributions from Mike Jones, Eric.
Warm-Up: November 16, Homework Questions? Zeros of Polynomial Functions Section 2.5.
CS 312: Algorithm Analysis Lecture #31: Linear Programming: the Simplex Algorithm, part 2 This work is licensed under a Creative Commons Attribution-Share.
Do Now. Section 8.2 Angles in Polygons Polygon Interior Angles Theorem The sum of the measures of the interior angles of a convex polygon with n sides.
CS 312: Algorithm Analysis Lecture #4: Primality Testing, GCD This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
CS 312: Algorithm Analysis Lecture #9: Recurrence Relations - Change of Variable Slides by: Eric Ringger, with contributions from Mike Jones, Eric Mercer,
CS 312: Algorithm Design & Analysis Lecture #26: 0/1 Knapsack This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
CS 312: Algorithm Design & Analysis Lecture #29: Network Flow and Cuts This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
CS 312: Algorithm Analysis Lecture #30: Linear Programming: Intro. to the Simplex Algorithm This work is licensed under a Creative Commons Attribution-Share.
Mathematical Analysis of Recursive Algorithm CSG3F3 Lecture 7.
CS 312: Algorithm Analysis Lecture #27: Network Flow This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
CSG523/ Desain dan Analisis Algoritma
CSG523/ Desain dan Analisis Algoritma
Dividing Polynomials A review of long division:
A Divide-and-Conquer Algorithm for Delaunay Triangulation CS Gates 219 October 17, 3:00 – 4:20 Richard Zhang (for Leo G.) Disclaimer: All figures.
College Algebra Chapter 3 Polynomial and Rational Functions
Real Zeros of Polynomial Functions
CSCE350 Algorithms and Data Structure
Computational Geometry (35/33)
Zeros of a Polynomial Function
Real Zeros of Polynomial Functions
CMPS 3120: Computational Geometry Spring 2013
Introduction to Algorithms
Presentation transcript:

CS 312: Algorithm Analysis Lecture #8: Non-Homogeneous Recurrence Relations This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative Commons Attribution-Share Alike 3.0 Unported License Slides by: Eric Ringger, with contributions from Mike Jones, Eric Mercer, Sean Warnick

Announcements  HW #5: due now  Start Project #2!  Budget enough time  Be sure to keep up in the required reading listed on the schedule in Learning Suite

Convex Hull (Proj. #2)

Convexity

Objectives  Big Picture:  Develop a method to analyze recursive divide and conquer algorithms  Work up to a proof of the Master Theorem  Find specific solutions using initial conditions  Understand how to solve non-homogeneous, linear, recurrence relations with constant coefficients  Having geometric forcing functions

Example (cont.): Linear, Homogeneous Recurrence Relation

General Solution: Linear Combinations

Starting things off

Finding the Specific Solution

Specific Solution: One point

Fibonacci in Closed Form!

Fundamental Theorem of Algebra  For every polynomial of degree n, there are exactly n roots.  They may not be unique.

Roots of Multiplicity j

Example

CS 312: Algorithm Analysis Remainder of Lecture #8: Non-homogeneous Linear Recurrence Relations

Non-Homogeneous, Linear Recurrence Relations

Non-Homogeneous Example What do you notice about the problem now?

Non-Homogeneous Example What do you notice about the problem now?

Example (Cont.)

Coincidence?

Possible Update  Point out existence of homog. RR for every non-homog. RR.  Notation: Use y(k) (homog.) instead of z(k) (non-homog.) to emphasize the difference.

Initial Conditions

Example (cont.)

Towers of Hanoi Revisited Exercise on HW #6

Assignment  Read: Recurrence Relations Notes  HW #6:  Part II Exercises (Section 2.2)  Towers of Hanoi using method of recurrence relations.

Extra Slides

Possible DC Solution: Step 1  Given set of n points  Divide into two subsets  L containing the leftmost points  R containing the rightmost points  All points with same x coordinate  Assign to the same subset  Even if this makes the division not exactly into halves

Possible DC Solution: Step 2 Compute the convex hulls of L and R recursively

Possible DC Solution: Step 3  Combine the left hull CH(L) and the right hull CH(R):  Find the two edges known as the upper and lower common tangents (shown in red)  Common tangent: a line segment in the exterior of both polygons intersecting each polygon at a single vertex or a single edge.  The line containing the common tangent does not intersect the interior of either polygon

Possible DC Solution: Tips  Find the upper common tangent:  Scan around the left hull in a clockwise direction and around the right hull in a counter-clockwise direction  Come up with the details of finding the common tangents – hints available in the guidelines document  The tangents divide each hull into two pieces  Delete the right edges belonging to the left hull and the left edges belonging to the right hull