Greed in Practice: CS 306 Lecture notes

Computer Algorithms II Lecture Notes

4 November 2008 • Greed in Practice


Outline

Encoding Symbols

Encoding Strings

Symbol Frequencies

Frequency-Based Encoding

Huffman Tree

Huffman Tree Example

E0.28
A0.18
I0.15
S0.13
D0.10
U0.06
C0.05
P0.04

example huffman tree

Huffman Encoding

Huffman Encoding Example

E01
A11
I001
S100
D101
U0001
C00001
P00000

example huffman encoding

Does It Work?

Creating Huffman Trees

Example

Does It Work?

Local and Global Optimality

Optimal Subproblems

School Consolidation

Exhaustive Solution

A Greedy Solution

Does It Work?

Another Greedy Solution

Does It Work?

Yet Another Greedy Solution

Degrees of Failure

Limiting Failure

Heuristics

Post-Processing

Variant Contests

References


This page last modified on 26 October 2008.

Creative
    Commons License