For Friday Read Weiss, chapter 10, section 3 Program 4 due Program - - PowerPoint PPT Presentation

for friday
SMART_READER_LITE
LIVE PREVIEW

For Friday Read Weiss, chapter 10, section 3 Program 4 due Program - - PowerPoint PPT Presentation

For Friday Read Weiss, chapter 10, section 3 Program 4 due Program 4 Any questions? Research Paper Questions? Huffman Codes File compression technique Greedy algorithm is optimal Bin Packing Whats the problem?


slide-1
SLIDE 1

For Friday

  • Read Weiss, chapter 10, section 3
  • Program 4 due
slide-2
SLIDE 2

Program 4

  • Any questions?
slide-3
SLIDE 3

Research Paper

  • Questions?
slide-4
SLIDE 4

Huffman Codes

  • File compression technique
  • Greedy algorithm is optimal
slide-5
SLIDE 5

Bin Packing

  • What’s the problem?
slide-6
SLIDE 6

On-Line Strategies

  • Next Fit
  • First Fit
  • Best Fit
slide-7
SLIDE 7

Off-Line Strategies

  • First Fit Decreasing
  • Best Fit Decreasing
slide-8
SLIDE 8

Divide and Conquer

  • Basic Concept

– Break a problem into pieces – Solve the problem for each piece – Combine the solutions to create the solution for the entire problem

  • Recursion

– The divide and conquer concept is recursive – Implementations of divide and conquer algorithms may or may not be recursive

slide-9
SLIDE 9

Finding a Counterfeit Coin

slide-10
SLIDE 10

Familiar Divide and Conquer Algorithms

  • What algorithms have we looked at that fit

this type?

slide-11
SLIDE 11

Familiar Divide and Conquer Algorithms

  • Quicksort
  • Mergesort
  • Binary Search
  • Permutations
  • Towers of Hanoi Solution
slide-12
SLIDE 12

Divide and Conquer Examples

  • Finding max-min
  • Closest two points
  • Selection