Information Theory and Communication

Similar documents
COMPSCI 650 Applied Information Theory Feb 2, Lecture 5. Recall the example of Huffman Coding on a binary string from last class:

Lecture 15. Error-free variable length schemes: Shannon-Fano code

Digital Communication Prof. Bikash Kumar Dey Department of Electrical Engineering Indian Institute of Technology, Bombay

Lecture 17. Lower bound for variable-length source codes with error. Coding a sequence of symbols: Rates and scheme (Arithmetic code)

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Chapter 5 VARIABLE-LENGTH CODING Information Theory Results (II)

ENSC Multimedia Communications Engineering Huffman Coding (1)

Chapter 5: Data compression. Chapter 5 outline

Compressing Data. Konstantin Tretyakov

Data Compression Techniques

Fundamentals of Multimedia. Lecture 5 Lossless Data Compression Variable Length Coding

Digital Communication Prof. Bikash Kumar Dey Department of Electrical Engineering Indian Institute of Technology, Bombay

Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Lecture 10 (Chapter 7) ZHU Yongxin, Winson

Figure-2.1. Information system with encoder/decoders.

Data Compression - Seminar 4

David Rappaport School of Computing Queen s University CANADA. Copyright, 1996 Dale Carnegie & Associates, Inc.

Lossless Compression Algorithms

Distributed source coding

OUTLINE. Paper Review First Paper The Zero-Error Side Information Problem and Chromatic Numbers, H. S. Witsenhausen Definitions:

Interval Algorithm for Homophonic Coding

ENSC Multimedia Communications Engineering Topic 4: Huffman Coding 2

EE67I Multimedia Communication Systems Lecture 4

Intro. To Multimedia Engineering Lossless Compression

Uniquely Decodable. Code 1 Code 2 A 00 0 B 1 1 C D 11 11

Image Coding and Data Compression

An Efficient Decoding Technique for Huffman Codes Abstract 1. Introduction

Course notes for Data Compression - 2 Kolmogorov complexity Fall 2005

CSE 421 Greedy: Huffman Codes

CSC 310, Fall 2011 Solutions to Theory Assignment #1

6. Finding Efficient Compressions; Huffman and Hu-Tucker

SIGNAL COMPRESSION Lecture Lempel-Ziv Coding

Contents. 3 Vector Quantization The VQ Advantage Formulation Optimality Conditions... 48

Multimedia Networking ECE 599

Greedy Algorithms CHAPTER 16

IMAGE PROCESSING (RRY025) LECTURE 13 IMAGE COMPRESSION - I

Arithmetic Coding. Arithmetic Coding

Greedy Algorithms. Alexandra Stefan

6. Finding Efficient Compressions; Huffman and Hu-Tucker Algorithms

Huffman Code Application. Lecture7: Huffman Code. A simple application of Huffman coding of image compression which would be :

Chapter 5 Lempel-Ziv Codes To set the stage for Lempel-Ziv codes, suppose we wish to nd the best block code for compressing a datavector X. Then we ha

ITCT Lecture 8.2: Dictionary Codes and Lempel-Ziv Coding

Move-to-front algorithm

Complete Variable-Length "Fix-Free" Codes

Lecture: Analysis of Algorithms (CS )

Engineering Mathematics II Lecture 16 Compression

Source Encoding and Compression

Research Article Does an Arithmetic Coding Followed by Run-length Coding Enhance the Compression Ratio?

Multimedia Systems. Part 20. Mahdi Vasighi

UC San Diego UC San Diego Previously Published Works

Topology and Topological Spaces

16.Greedy algorithms

ALGORITHMS OF INFORMATICS. Volume 3. APPLICATIONS AND DATA MANAGEMENT

Design and Analysis of Algorithms

CSC 373: Algorithm Design and Analysis Lecture 4

Text Compression through Huffman Coding. Terminology

Lecture 13. Types of error-free codes: Nonsingular, Uniquely-decodable and Prefix-free

Huffman Coding. Version of October 13, Version of October 13, 2014 Huffman Coding 1 / 27

FACULTY OF ENGINEERING LAB SHEET INFORMATION THEORY AND ERROR CODING ETM 2126 ETN2126 TRIMESTER 2 (2011/2012)

Without the move-to-front step abcddcbamnopponm is encoded as C* = (0, 1, 2, 3, 3, 2, 1, 0, 4, 5, 6, 7, 7, 6, 5, 4) (Table 1.14b).

Chapter 7 Lossless Compression Algorithms

Shannon capacity and related problems in Information Theory and Ramsey Theory

8 Integer encoding. scritto da: Tiziano De Matteis

A Quantitative Measure of Relevance Based on Kelly Gambling Theory

Code-Based Cryptography Error-Correcting Codes and Cryptography

A Comparative Study of Entropy Encoding Techniques for Lossless Text Data Compression

OPTIMAL PREFIX CODES AND HUFFMAN CODES

16 Greedy Algorithms

Lecture 19. Lecturer: Aleksander Mądry Scribes: Chidambaram Annamalai and Carsten Moldenhauer

Pierre A. Humblet* Abstract

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

Data Compression. Media Signal Processing, Presentation 2. Presented By: Jahanzeb Farooq Michael Osadebey

Achievable Rate Regions for Network Coding

Information Retrieval. Chap 7. Text Operations

Data Compression. An overview of Compression. Multimedia Systems and Applications. Binary Image Compression. Binary Image Compression

Lecture 12 March 4th

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF INFORMATION TECHNOLOGY ACADEMIC YEAR / ODD SEMESTER QUESTION BANK

More Bits and Bytes Huffman Coding

/ Approximation Algorithms Lecturer: Michael Dinitz Topic: Linear Programming Date: 2/24/15 Scribe: Runze Tang

Scribe: Virginia Williams, Sam Kim (2016), Mary Wootters (2017) Date: May 22, 2017

MRT based Fixed Block size Transform Coding

Diagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets?

Data Compression. Guest lecture, SGDS Fall 2011

Mathematical preliminaries and error analysis

Algorithms Dr. Haim Levkowitz

Compression. storage medium/ communications network. For the purpose of this lecture, we observe the following constraints:

We show that the composite function h, h(x) = g(f(x)) is a reduction h: A m C.

Digital Image Processing

Elementary Recursive Function Theory

Image compression. Stefano Ferrari. Università degli Studi di Milano Methods for Image Processing. academic year

a- As a special case, if there is only one symbol, no bits are required to specify it.

Variable-length Splittable Codes with Multiple Delimiters

AM205: lecture 2. 1 These have been shifted to MD 323 for the rest of the semester.

CONSECUTIVE INTEGERS AND THE COLLATZ CONJECTURE. Marcus Elia Department of Mathematics, SUNY Geneseo, Geneseo, NY

The Encoding Complexity of Network Coding

Comparing Data Compression in Web-based Animation Models using Kolmogorov Complexity

Greedy Algorithms. CLRS Chapters Introduction to greedy algorithms. Design of data-compression (Huffman) codes

EECS 122: Introduction to Communication Networks Final Exam Solutions

Entropy Coding. - to shorten the average code length by assigning shorter codes to more probable symbols => Morse-, Huffman-, Arithmetic Code

Contributions to image encryption and authentication

Announcements. Problem Set 3 due Friday, October 21. Alternate Midterm Times. Drop by office hours! Ask questions at

Transcription:

Information Theory and Communication Shannon-Fano-Elias Code and Arithmetic Codes Ritwik Banerjee rbanerjee@cs.stonybrook.edu c Ritwik Banerjee Information Theory and Communication 1/12

Roadmap Examples and Types of Codes Kraft Inequality McMillan Inequality Entropy bound on data compression Shannon Code Huffman Code Wrong Code Stochastic and Stationary Processes c Ritwik Banerjee Information Theory and Communication 2/12

Recap We have seen that Huffman coding is optimal, and it has expected length L within 1 bit of the entropy H of the source. Redundancy, defined as the difference between the two (i.e., L H, is reduced in Huffman codes by the symbol-combining technique we saw in the last lecture. To obtain Huffman codes, we need to go through this entire procedure to encode (and hence compress) data. Next, we look at another type of code, the Shannon-Fano-Elias code, where all we need to know is the distribution to be able to write down the codewords. c Ritwik Banerjee Information Theory and Communication 3/12

Mathematical Setup We will need an ordering of the source letters. So, without loss of generality, consider the source alphabet of the type X = {1, 2,..., m}. We will continue to consider the encoding alphabet to be binary. Also, assume that that p(x) > 0 x X. Since otherwise, we can simply omit the zero-probability symbols from the alphabet and work with a smaller alphabet size. For the Shannon-Fano-Elias codes, we need to work with the cumulative distribution function, instead of just the probability mass function. c Ritwik Banerjee Information Theory and Communication 4/12

Cumulative Distribution The cumulative distribution function (CDF) F (x) for a real-valued random variable X is evaluated at a certain point x, and is defined as the probability that X will take a value at most equal to x { x F (x) = P (X x) = i x P (X = x i) if X is discrete x p(t)dt if X is continuous We will work with a modified CDF defined as follows: F (x) = F (x 1) + 1 2 p(x) For discrete random variable X, this is equivalent to x 1 F (x) = p(i) + 1 2 p(x) i=1 c Ritwik Banerjee Information Theory and Communication 5/12

Cumulative Distribution F (x) is defined over real values, but F (x) is only defined over the integer values because p(x), too, is defined over these integer values. These integers correspond to the symbols of X. c Ritwik Banerjee Information Theory and Communication 6/12

Explanation/Intuition of the modified CDF For discrete random variables, the CDF F (x) is a step function, with vertical jumps at each discrete value (because we assumed p(x) > 0 for all x X ). The modified CDF F (x) is a function that represents the midpoint of each step in the original CDF. Why do we need this modified function? Since p(x) > 0 for all x, there is a bijective mapping (i.e., a one-to-one correspondence) between x and F (x). That is, we can use F (x) as a codeword for x. Now, the same argument can be used for F (x). So why modify CDF? Because to answer the following question, we will need an approxmation process that will lead to prefix codes. And this process would not work for the original CDF. How many bits would we need to represent F (x)? c Ritwik Banerjee Information Theory and Communication 7/12

Shannon-Fano-Elias Code F (x) is a real number, so in general, we could need an infinite number of bits to represent the exact value of F (x). Instead, we use an approximation. But then, the question is, how many bits do we need? This reflects the precision of our encoding. Low precision would mean that we may no longer have a uniquely decodable code. The idea is to truncate the representation of F (x) as soon as we have enough bits to ensure that the codewords are unique. If we truncate F (x) to l(x) bits, it will be denoted by F (x) l(x). The idea is to use the first l(x) bits of F (x) to be the codeword for x. We then get (by definition of rounding ) F (x) F (x) l(x) 1 2 l(x) c Ritwik Banerjee Information Theory and Communication 8/12

Shannon-Fano-Elias Code We are going to show that 1 l(x) = log + 1 p(x) is adequate for encoding. Here, adequate means we need to show that 1. the codewords are unique, and 2. the coding is a prefix code. Proof shown in scribe notes. c Ritwik Banerjee Information Theory and Communication 9/12

Suboptimality and Competitive Optimality The expected length of Shannon-Fano-Elias code is bounded above by 2 bits more than the source entropy (proof shown in scribe notes). Huffman codes are optimal on the average, but they are not optimal for all sequences. Shannon code is nearly optimal, and often enough. The italicized terms are given technical meanings in the following theorem. The property is called competitive optimality of a code. The theorem thus shows that Shannon code is competitively optimal. Theorem Let l(x) and l (x) be the codeword lengths associated with Shannon code and any other uniquely decodable code, respectively. Then, P r(l(x) l (X) + c) 1 2 c 1 c Ritwik Banerjee Information Theory and Communication 10/12

Arithmetic Code Enables us to use a source distribution that is learned on the fly. Suitable for encoding and compressing streaming data. Results Let Y be a continuous random variable with distribution F Y (y). Let U be a function of Y defined by its distribution as U = F Y (Y ). Then, U has a uniform distribution on the interval [0, 1]. (proved in scribe notes) c Ritwik Banerjee Information Theory and Communication 11/12

Probability Transformation of infinite sequences Each bit of a numerical representation can be modeled as an independent Bernoulli random variable. These sequences are incompressible, and yield an invertible mapping from infinite source sequences into infinite binary sequences. Advantage: easy to calculate! (example shown in scribe notes) Using this transformation, long sequences of symbols can be encoded together, and the expected length per symbol is bounded by L < 1 n H(X1, X2,..., Xn) + 2 n Just like we have seen earlier, this means that we can make the code arbitrarily close to the optimal bound (i.e., H(X 1, X 2,..., X n)) by taking large values of n. But, for large n, Huffman s algorithm is not feasible due to time complexity concerns. Shannon-Fano-Elias encoding, however, remains fast as the encoding process does not depend on n. c Ritwik Banerjee Information Theory and Communication 12/12