lec0418 - CS 173 Discrete Mathematical Structures Cinda...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 173: Discrete Mathematical Structures Cinda Heeren [email protected] Siebel Center, rm 2213 Office Hours: BY APPOINTMENT
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Cs173 - Spring 2004 CS 173 Announcements Hwk #10 available, due 4/16, 8a Final Exam:  5/10, 7-10p, Siebel 1404
Background image of page 2
Cs173 - Spring 2004 CS 173 Divide and Conquer Recurrences General form: T(n) = aT(n/b) + f(n) What do the algorithms look like? Divide the problem into a subproblems of size n/b. Solve those subproblems (recursively). Conquer the solution in time f(n). We understand how abstract this is.  Some of  us think cs125 should be a prerequisite for  this course. The only algorithms you have as examples are  mergesort and binary search.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Cs173 - Spring 2004 CS 173 Divide and Conquer Recurrences General form: T(n) = aT(n/b) + f(n) To solve a problem of size n, we require time f(n), plus the time it takes to  solve a subproblems of size n/b. We don’t have simple recipes for solving these  in all cases, though sometimes we do… f(n) a f(n/b) a f(n/b) a f(n/b) a f(n/b) a f(n/b 2 ) a f(n/b 2 ) f(n/b 2 ) Total running time is sum of the values in the  pink rectangles.
Background image of page 4
Cs173 - Spring 2004 CS 173 Divide and Conquer Recurrences General form: T(n) = aT(n/b) + f(n) f(n) a f(n/b) a f(n/b) a f(n/b) a f(n/b) a f(n/b 2 ) a f(n/b 2 ) f(n/b 2 ) Sum over levels… How many? a) n b) b c) log b n d) no clue    ι=0 λογ β ν
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Cs173 - Spring 2004 CS 173 Divide and Conquer Recurrences General form: T(n) = aT(n/b) + f(n) f(n) a f(n/b) a f(n/b) a f(n/b) a f(n/b) a f(n/b 2 ) a f(n/b 2 ) f(n/b 2 ) How many blocks at level  i? a) a b) a i c) i∙a d) no clue    ι=0 λογ β ν    α ι φ (?)
Background image of page 6
Cs173 - Spring 2004 CS 173 Divide and Conquer Recurrences General form: T(n) = aT(n/b) + f(n) f(n) a f(n/b) a f(n/b) a f(n/b) a f(n/b) a f(n/b 2 ) a f(n/b 2 ) f(n/b 2 ) ? a) n/b i b) n log b c) i∙b d) no clue    ι=0 λογ β ν    α ι φ (?)    α ι φ ( n b i )
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Cs173 - Spring 2004 CS 173 Divide and Conquer Recurrences General form: T(n) = aT(n/b) + f(n)    ι=0 λογ β ν    α ι φ ( n b i ) We no longer have recursive terms, but  we do have a sum to deal with. Consider binary search, and write a recurrence for the # of 
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/15/2008 for the course CS 173 taught by Professor [email protected] during the Spring '08 term at University of Illinois at Urbana–Champaign.

  • Spring '08
  • [email protected]

Page1 / 29

lec0418 - CS 173 Discrete Mathematical Structures Cinda...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online