Yalin Zhang Huffman Coding Variations of Huffman Coding Length-limited coding Unequal-cost coding Mixed-radix coding Reserved-length.

Slides:



Advertisements
Similar presentations
Interval Heaps Complete binary tree. Each node (except possibly last one) has 2 elements. Last node has 1 or 2 elements. Let a and b be the elements in.
Advertisements

EE 4780 Huffman Coding Example. Bahadir K. Gunturk2 Huffman Coding Example Suppose X is a source producing symbols; the symbols comes from the alphabet.
Min Chen School of Computer Science and Engineering Seoul National University Data Structure: Chapter 9.
Heaps1 Part-D2 Heaps Heaps2 Recall Priority Queue ADT (§ 7.1.3) A priority queue stores a collection of entries Each entry is a pair (key, value)
Greedy Algorithms Greed is good. (Some of the time)
22C:19 Discrete Math Trees Fall 2011 Sukumar Ghosh.
Huffman Encoding Dr. Bernard Chen Ph.D. University of Central Arkansas.
Compression & Huffman Codes
Optimal Merging Of Runs
CS2420: Lecture 13 Vladimir Kulyukin Computer Science Department Utah State University.
Q&A II – Sunday Feb 13 th 2011 BITS. Signed binary  What are the following numbers in signed binary?     
Optimal binary search trees
Chapter 18 - basic definitions - binary trees - tree traversals Intro. to Trees 1CSCI 3333 Data Structures.
Binary Tree. Binary Trees – An Informal Definition A binary tree is a tree in which no node can have more than two children Each node has 0, 1, or 2 children.
Huffman Codes. Encoding messages  Encode a message composed of a string of characters  Codes used by computer systems  ASCII uses 8 bits per character.
Huffman Encoding Veronica Morales.
Lecture 10 Trees –Definiton of trees –Uses of trees –Operations on a tree.
 Greedy Algorithms. Greedy Algorithm  Greedy Algorithm - Makes locally optimal choice at each stage. - For optimization problems.  If the local optimum.
Chapter 6 Binary Trees. 6.1 Trees, Binary Trees, and Binary Search Trees Linked lists usually are more flexible than arrays, but it is difficult to use.
Algorithm Paradigms High Level Approach To solving a Class of Problems.
5.5.3 Rooted tree and binary tree  Definition 25: A directed graph is a directed tree if the graph is a tree in the underlying undirected graph.  Definition.
Huffman coding Content 1 Encoding and decoding messages Fixed-length coding Variable-length coding 2 Huffman coding.
Chapter 2: Basic Data Structures. Spring 2003CS 3152 Basic Data Structures Stacks Queues Vectors, Linked Lists Trees (Including Balanced Trees) Priority.
Huffman Codes Juan A. Rodriguez CS 326 5/13/2003.
Huffman’s Algorithm 11/02/ Weighted 2-tree A weighted 2-tree T is an extended binary tree with n external nodes and each of the external nodes is.
Foundation of Computing Systems
M180: Data Structures & Algorithms in Java Trees & Binary Trees Arab Open University 1.
Tim Au Yeung.  Dynamic Programming on Tree  “always” from leaves to root  Children node pass information to parent, obtain solution from root  Unrooted.
1 More Trees Trees, Red-Black Trees, B Trees.
Low Power Huffman Coding for High Performance Data Transmission Chiu-Yi Chen,Yu-Ting Pai, Shanq-Jang Ruan, International Conference on, ICHIT '06,
Lossless Decomposition and Huffman Codes Sophia Soohoo CS 157B.
1 Trees General Trees  Nonrecursive definition: a tree consists of a set of nodes and a set of directed edges that connect pairs of nodes.
Huffman Coding The most for the least. Design Goals Encode messages parsimoniously No character code can be the prefix for another.
1Computer Sciences Department. 2 Advanced Design and Analysis Techniques TUTORIAL 7.
بسم الله الرحمن الرحيم My Project Huffman Code. Introduction Introduction Encoding And Decoding Encoding And Decoding Applications Applications Advantages.
BINARY TREES Objectives Define trees as data structures Define the terms associated with trees Discuss tree traversal algorithms Discuss a binary.
Huffman encoding.
Lecture 11CS 380C 1 380C Last Time Interactions of scheduling and register usage Today Interactions of scheduling and instruction level parallelism.
Chapter 6 – Trees. Notice that in a tree, there is exactly one path from the root to each node.
Question 4 Tutorial 8. Part A Insert 20, 10, 15, 5,7, 30, 25, 18, 37, 12 and 40 in sequence into an empty binary tree
Code: BCA302 Data Structures with C Prof. (Dr.) Monalisa Banerjee By.
CSCI 58000, Algorithm Design, Analysis & Implementation Lecture 12 Greedy Algorithms (Chapter 16)
Balanced Search Trees 2-3 Trees AVL Trees Red-Black Trees
Greedy Algorithms Alexandra Stefan.
7.2 Labeled trees.
Top 50 Data Structures Interview Questions
Greedy Technique.
Binary search tree. Removing a node
Source Code for Data Structures and Algorithm Analysis in C (Second Edition) – by Weiss
Optimal Merging Of Runs
Data Compression If you’ve ever sent a large file to a friend, you may have compressed it into a zip archive like the one on this slide before doing so.
CS223 Advanced Data Structures and Algorithms
Heaps and Priority Queues
Chapter 16: Greedy Algorithms
Optimal Merging Of Runs
Lecture 9 Greedy Strategy
Math 221 Huffman Codes.
Heaps 12/4/2018 5:27 AM Heaps /4/2018 5:27 AM Heaps.
Huffman Coding CSE 373 Data Structures.
Heaps and Priority Queues
Huffman Encoding Huffman code is method for the compression for standard text documents. It makes use of a binary tree to develop codes of varying lengths.
Binary Tree Traversals
Greedy Algorithms TOPICS Greedy Strategy Activity Selection
Binary Trees: Motivation
Trees Addenda.
Data Structure and Algorithms
CIS595: Lecture 5 Acknowledgement:
Heaps and Priority Queues
Podcast Ch23d Title: Huffman Compression
Lecture 8 Huffman Encoding (Section 2.2)
Presentation transcript:

Yalin Zhang

Huffman Coding

Variations of Huffman Coding Length-limited coding Unequal-cost coding Mixed-radix coding Reserved-length coding One-ended coding

Variations of Huffman Coding Standard binary treeMix-radix tree Reserved-length tree General approach: Dynamic Programming to build an optimal coding tree.

Top-Down DP for GMR coding Generalized-Mixed-Radix problem Both the arity of an internal node and the length of an edge depends on its level. Given a sequence of arities R = (r1, r2,...) and a sequence of edge lengths C = (c1, c2...), a generalized mixed radix (GMR) tree T satisfying R, C is a tree in which internal node v at level i − 1 has at most ri children and and the length of an edge from v to any of its children is ci

Top-Down DP for GMR coding

Top-Down Dynamic Program

Build optimal trees top-down, starting with a root; Expand tree level-by-level by making some nodes on the bottom level internal. Until a tree whose bottom level contains no internal nodes.

Top-Down Dynamic Program

Batching for Speed up

Results