Information Theory and Communication

Size: px
Start display at page:

Download "Information Theory and Communication"

Transcription

1 Information Theory and Communication Shannon-Fano-Elias Code and Arithmetic Codes Ritwik Banerjee c Ritwik Banerjee Information Theory and Communication 1/12

2 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

3 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

4 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

5 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) p(x) For discrete random variable X, this is equivalent to x 1 F (x) = p(i) p(x) i=1 c Ritwik Banerjee Information Theory and Communication 5/12

6 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

7 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

8 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

9 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

10 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

11 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

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

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

COMPSCI 650 Applied Information Theory Feb 2, Lecture 5. Recall the example of Huffman Coding on a binary string from last class: COMPSCI 650 Applied Information Theory Feb, 016 Lecture 5 Instructor: Arya Mazumdar Scribe: Larkin Flodin, John Lalor 1 Huffman Coding 1.1 Last Class s Example Recall the example of Huffman Coding on a

More information

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

Lecture 15. Error-free variable length schemes: Shannon-Fano code Lecture 15 Agenda for the lecture Bounds for L(X) Error-free variable length schemes: Shannon-Fano code 15.1 Optimal length nonsingular code While we do not know L(X), it is easy to specify a nonsingular

More information

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

Digital Communication Prof. Bikash Kumar Dey Department of Electrical Engineering Indian Institute of Technology, Bombay Digital Communication Prof. Bikash Kumar Dey Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 29 Source Coding (Part-4) We have already had 3 classes on source coding

More information

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

Lecture 17. Lower bound for variable-length source codes with error. Coding a sequence of symbols: Rates and scheme (Arithmetic code) Lecture 17 Agenda for the lecture Lower bound for variable-length source codes with error Coding a sequence of symbols: Rates and scheme (Arithmetic code) Introduction to universal codes 17.1 variable-length

More information

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

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 11 Coding Strategies and Introduction to Huffman Coding The Fundamental

More information

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

Chapter 5 VARIABLE-LENGTH CODING Information Theory Results (II) Chapter 5 VARIABLE-LENGTH CODING ---- Information Theory Results (II) 1 Some Fundamental Results Coding an Information Source Consider an information source, represented by a source alphabet S. S = { s,

More information

ENSC Multimedia Communications Engineering Huffman Coding (1)

ENSC Multimedia Communications Engineering Huffman Coding (1) ENSC 424 - Multimedia Communications Engineering Huffman Coding () Jie Liang Engineering Science Simon Fraser University JieL@sfu.ca J. Liang: SFU ENSC 424 Outline Entropy Coding Prefix code Kraft-McMillan

More information

Chapter 5: Data compression. Chapter 5 outline

Chapter 5: Data compression. Chapter 5 outline Chapter 5: Data compression Chapter 5 outline 2 balls weighing problem Examples of codes Kraft inequality Optimal codes + bounds Kraft inequality for uniquely decodable codes Huffman codes Shannon-Fano-Elias

More information

Compressing Data. Konstantin Tretyakov

Compressing Data. Konstantin Tretyakov Compressing Data Konstantin Tretyakov (kt@ut.ee) MTAT.03.238 Advanced April 26, 2012 Claude Elwood Shannon (1916-2001) C. E. Shannon. A mathematical theory of communication. 1948 C. E. Shannon. The mathematical

More information

Data Compression Techniques

Data Compression Techniques Data Compression Techniques Part 1: Entropy Coding Lecture 1: Introduction and Huffman Coding Juha Kärkkäinen 31.10.2017 1 / 21 Introduction Data compression deals with encoding information in as few bits

More information

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

Fundamentals of Multimedia. Lecture 5 Lossless Data Compression Variable Length Coding Fundamentals of Multimedia Lecture 5 Lossless Data Compression Variable Length Coding Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Mahmoud El-Gayyar / Fundamentals of Multimedia 1 Data Compression Compression

More information

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

Digital Communication Prof. Bikash Kumar Dey Department of Electrical Engineering Indian Institute of Technology, Bombay Digital Communication Prof. Bikash Kumar Dey Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 26 Source Coding (Part 1) Hello everyone, we will start a new module today

More information

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

Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Lecture 10 (Chapter 7) ZHU Yongxin, Winson Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Lecture 10 (Chapter 7) ZHU Yongxin, Winson zhuyongxin@sjtu.edu.cn 2 Lossless Compression Algorithms 7.1 Introduction 7.2 Basics of Information

More information

Figure-2.1. Information system with encoder/decoders.

Figure-2.1. Information system with encoder/decoders. 2. Entropy Coding In the section on Information Theory, information system is modeled as the generationtransmission-user triplet, as depicted in fig-1.1, to emphasize the information aspect of the system.

More information

Data Compression - Seminar 4

Data Compression - Seminar 4 Data Compression - Seminar 4 October 29, 2013 Problem 1 (Uniquely decodable and instantaneous codes) Let L = p i l 100 i be the expected value of the 100th power of the word lengths associated with an

More information

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

David Rappaport School of Computing Queen s University CANADA. Copyright, 1996 Dale Carnegie & Associates, Inc. David Rappaport School of Computing Queen s University CANADA Copyright, 1996 Dale Carnegie & Associates, Inc. Data Compression There are two broad categories of data compression: Lossless Compression

More information

Lossless Compression Algorithms

Lossless Compression Algorithms Multimedia Data Compression Part I Chapter 7 Lossless Compression Algorithms 1 Chapter 7 Lossless Compression Algorithms 1. Introduction 2. Basics of Information Theory 3. Lossless Compression Algorithms

More information

Distributed source coding

Distributed source coding Distributed source coding Suppose that we want to encode two sources (X, Y ) with joint probability mass function p(x, y). If the encoder has access to both X and Y, it is sufficient to use a rate R >

More information

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

OUTLINE. Paper Review First Paper The Zero-Error Side Information Problem and Chromatic Numbers, H. S. Witsenhausen Definitions: OUTLINE Definitions: - Source Code - Expected Length of a source code - Length of a codeword - Variable/fixed length coding - Example: Huffman coding - Lossless coding - Distortion - Worst case length

More information

Interval Algorithm for Homophonic Coding

Interval Algorithm for Homophonic Coding IEEE TRANSACTIONS ON INFORMATION THEORY, VOL 47, NO 3, MARCH 2001 1021 Interval Algorithm for Homophonic Coding Mamoru Hoshi, Member, IEEE, and Te Sun Han, Fellow, IEEE Abstract It is shown that the idea

More information

ENSC Multimedia Communications Engineering Topic 4: Huffman Coding 2

ENSC Multimedia Communications Engineering Topic 4: Huffman Coding 2 ENSC 424 - Multimedia Communications Engineering Topic 4: Huffman Coding 2 Jie Liang Engineering Science Simon Fraser University JieL@sfu.ca J. Liang: SFU ENSC 424 1 Outline Canonical Huffman code Huffman

More information

EE67I Multimedia Communication Systems Lecture 4

EE67I Multimedia Communication Systems Lecture 4 EE67I Multimedia Communication Systems Lecture 4 Lossless Compression Basics of Information Theory Compression is either lossless, in which no information is lost, or lossy in which information is lost.

More information

Intro. To Multimedia Engineering Lossless Compression

Intro. To Multimedia Engineering Lossless Compression Intro. To Multimedia Engineering Lossless Compression Kyoungro Yoon yoonk@konkuk.ac.kr 1/43 Contents Introduction Basics of Information Theory Run-Length Coding Variable-Length Coding (VLC) Dictionary-based

More information

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

Uniquely Decodable. Code 1 Code 2 A 00 0 B 1 1 C D 11 11 Uniquely Detectable Code Uniquely Decodable A code is not uniquely decodable if two symbols have the same codeword, i.e., if C(S i ) = C(S j ) for any i j or the combination of two codewords gives a third

More information

Image Coding and Data Compression

Image Coding and Data Compression Image Coding and Data Compression Biomedical Images are of high spatial resolution and fine gray-scale quantisiation Digital mammograms: 4,096x4,096 pixels with 12bit/pixel 32MB per image Volume data (CT

More information

An Efficient Decoding Technique for Huffman Codes Abstract 1. Introduction

An Efficient Decoding Technique for Huffman Codes Abstract 1. Introduction An Efficient Decoding Technique for Huffman Codes Rezaul Alam Chowdhury and M. Kaykobad Department of Computer Science and Engineering Bangladesh University of Engineering and Technology Dhaka-1000, Bangladesh,

More information

Course notes for Data Compression - 2 Kolmogorov complexity Fall 2005

Course notes for Data Compression - 2 Kolmogorov complexity Fall 2005 Course notes for Data Compression - 2 Kolmogorov complexity Fall 2005 Peter Bro Miltersen September 29, 2005 Version 2.0 1 Kolmogorov Complexity In this section, we present the concept of Kolmogorov Complexity

More information

CSE 421 Greedy: Huffman Codes

CSE 421 Greedy: Huffman Codes CSE 421 Greedy: Huffman Codes Yin Tat Lee 1 Compression Example 100k file, 6 letter alphabet: File Size: ASCII, 8 bits/char: 800kbits 2 3 > 6; 3 bits/char: 300kbits a 45% b 13% c 12% d 16% e 9% f 5% Why?

More information

CSC 310, Fall 2011 Solutions to Theory Assignment #1

CSC 310, Fall 2011 Solutions to Theory Assignment #1 CSC 310, Fall 2011 Solutions to Theory Assignment #1 Question 1 (15 marks): Consider a source with an alphabet of three symbols, a 1,a 2,a 3, with probabilities p 1,p 2,p 3. Suppose we use a code in which

More information

6. Finding Efficient Compressions; Huffman and Hu-Tucker

6. Finding Efficient Compressions; Huffman and Hu-Tucker 6. Finding Efficient Compressions; Huffman and Hu-Tucker We now address the question: how do we find a code that uses the frequency information about k length patterns efficiently to shorten our message?

More information

SIGNAL COMPRESSION Lecture Lempel-Ziv Coding

SIGNAL COMPRESSION Lecture Lempel-Ziv Coding SIGNAL COMPRESSION Lecture 5 11.9.2007 Lempel-Ziv Coding Dictionary methods Ziv-Lempel 77 The gzip variant of Ziv-Lempel 77 Ziv-Lempel 78 The LZW variant of Ziv-Lempel 78 Asymptotic optimality of Ziv-Lempel

More information

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

Contents. 3 Vector Quantization The VQ Advantage Formulation Optimality Conditions... 48 Contents Part I Prelude 1 Introduction... 3 1.1 Audio Coding... 4 1.2 Basic Idea... 6 1.3 Perceptual Irrelevance... 8 1.4 Statistical Redundancy... 9 1.5 Data Modeling... 9 1.6 Resolution Challenge...

More information

Multimedia Networking ECE 599

Multimedia Networking ECE 599 Multimedia Networking ECE 599 Prof. Thinh Nguyen School of Electrical Engineering and Computer Science Based on B. Lee s lecture notes. 1 Outline Compression basics Entropy and information theory basics

More information

Greedy Algorithms CHAPTER 16

Greedy Algorithms CHAPTER 16 CHAPTER 16 Greedy Algorithms In dynamic programming, the optimal solution is described in a recursive manner, and then is computed ``bottom up''. Dynamic programming is a powerful technique, but it often

More information

IMAGE PROCESSING (RRY025) LECTURE 13 IMAGE COMPRESSION - I

IMAGE PROCESSING (RRY025) LECTURE 13 IMAGE COMPRESSION - I IMAGE PROCESSING (RRY025) LECTURE 13 IMAGE COMPRESSION - I 1 Need For Compression 2D data sets are much larger than 1D. TV and movie data sets are effectively 3D (2-space, 1-time). Need Compression for

More information

Arithmetic Coding. Arithmetic Coding

Arithmetic Coding. Arithmetic Coding Contents Image Compression Lecture 3 Arithmetic Code Introduction to & Decoding Algorithm Generating a Binary Code for Huffman codes have to be an integral number of bits long, while the entropy value

More information

Greedy Algorithms. Alexandra Stefan

Greedy Algorithms. Alexandra Stefan Greedy Algorithms Alexandra Stefan 1 Greedy Method for Optimization Problems Greedy: take the action that is best now (out of the current options) it may cause you to miss the optimal solution You build

More information

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

6. Finding Efficient Compressions; Huffman and Hu-Tucker Algorithms 6. Finding Efficient Compressions; Huffman and Hu-Tucker Algorithms We now address the question: How do we find a code that uses the frequency information about k length patterns efficiently, to shorten

More information

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

Huffman Code Application. Lecture7: Huffman Code. A simple application of Huffman coding of image compression which would be : Lecture7: Huffman Code Lossless Image Compression Huffman Code Application A simple application of Huffman coding of image compression which would be : Generation of a Huffman code for the set of values

More information

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

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 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 have to take into account the complexity of the code.

More information

ITCT Lecture 8.2: Dictionary Codes and Lempel-Ziv Coding

ITCT Lecture 8.2: Dictionary Codes and Lempel-Ziv Coding ITCT Lecture 8.2: Dictionary Codes and Lempel-Ziv Coding Huffman codes require us to have a fairly reasonable idea of how source symbol probabilities are distributed. There are a number of applications

More information

Move-to-front algorithm

Move-to-front algorithm Up to now, we have looked at codes for a set of symbols in an alphabet. We have also looked at the specific case that the alphabet is a set of integers. We will now study a few compression techniques in

More information

Complete Variable-Length "Fix-Free" Codes

Complete Variable-Length Fix-Free Codes Designs, Codes and Cryptography, 5, 109-114 (1995) 9 1995 Kluwer Academic Publishers, Boston. Manufactured in The Netherlands. Complete Variable-Length "Fix-Free" Codes DAVID GILLMAN* gillman @ es.toronto.edu

More information

Lecture: Analysis of Algorithms (CS )

Lecture: Analysis of Algorithms (CS ) Lecture: Analysis of Algorithms (CS483-001) Amarda Shehu Spring 2017 1 The Fractional Knapsack Problem Huffman Coding 2 Sample Problems to Illustrate The Fractional Knapsack Problem Variable-length (Huffman)

More information

Engineering Mathematics II Lecture 16 Compression

Engineering Mathematics II Lecture 16 Compression 010.141 Engineering Mathematics II Lecture 16 Compression Bob McKay School of Computer Science and Engineering College of Engineering Seoul National University 1 Lossless Compression Outline Huffman &

More information

Source Encoding and Compression

Source Encoding and Compression Source Encoding and Compression Jukka Teuhola Computer Science Department of Information Technology University of Turku Spring 2014 Lecture notes 2 Table of Contents 1. Introduction...3 2. Coding-theoretic

More information

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

Research Article Does an Arithmetic Coding Followed by Run-length Coding Enhance the Compression Ratio? Research Journal of Applied Sciences, Engineering and Technology 10(7): 736-741, 2015 DOI:10.19026/rjaset.10.2425 ISSN: 2040-7459; e-issn: 2040-7467 2015 Maxwell Scientific Publication Corp. Submitted:

More information

Multimedia Systems. Part 20. Mahdi Vasighi

Multimedia Systems. Part 20. Mahdi Vasighi Multimedia Systems Part 2 Mahdi Vasighi www.iasbs.ac.ir/~vasighi Department of Computer Science and Information Technology, Institute for dvanced Studies in asic Sciences, Zanjan, Iran rithmetic Coding

More information

UC San Diego UC San Diego Previously Published Works

UC San Diego UC San Diego Previously Published Works UC San Diego UC San Diego Previously Published Works Title Universal lossless compression via multilevel pattern matching Permalink https://escholarshiporg/uc/item/39k54514 Journal IEEE Transactions on

More information

Topology and Topological Spaces

Topology and Topological Spaces Topology and Topological Spaces Mathematical spaces such as vector spaces, normed vector spaces (Banach spaces), and metric spaces are generalizations of ideas that are familiar in R or in R n. For example,

More information

16.Greedy algorithms

16.Greedy algorithms 16.Greedy algorithms 16.1 An activity-selection problem Suppose we have a set S = {a 1, a 2,..., a n } of n proposed activities that with to use a resource. Each activity a i has a start time s i and a

More information

ALGORITHMS OF INFORMATICS. Volume 3. APPLICATIONS AND DATA MANAGEMENT

ALGORITHMS OF INFORMATICS. Volume 3. APPLICATIONS AND DATA MANAGEMENT ALGORITHMS OF INFORMATICS Volume 3. APPLICATIONS AND DATA MANAGEMENT ELTE EÖTVÖS KIADÓ Budapest, 2006 Editor: Antal Iványi Authors: Ulrich Tamm (Chapter 13), László Szirmay-Kalos (14), János Demetrovics

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms CSE 101, Winter 018 D/Q Greed SP s DP LP, Flow B&B, Backtrack Metaheuristics P, NP Design and Analysis of Algorithms Lecture 8: Greed Class URL: http://vlsicad.ucsd.edu/courses/cse101-w18/ Optimization

More information

CSC 373: Algorithm Design and Analysis Lecture 4

CSC 373: Algorithm Design and Analysis Lecture 4 CSC 373: Algorithm Design and Analysis Lecture 4 Allan Borodin January 14, 2013 1 / 16 Lecture 4: Outline (for this lecture and next lecture) Some concluding comments on optimality of EST Greedy Interval

More information

Text Compression through Huffman Coding. Terminology

Text Compression through Huffman Coding. Terminology Text Compression through Huffman Coding Huffman codes represent a very effective technique for compressing data; they usually produce savings between 20% 90% Preliminary example We are given a 100,000-character

More information

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

Lecture 13. Types of error-free codes: Nonsingular, Uniquely-decodable and Prefix-free Lecture 13 Agenda for the lecture Introduction to data compression Fixed- and variable-length codes Types of error-free codes: Nonsingular, Uniquely-decodable and Prefix-free 13.1 The data compression

More information

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

Huffman Coding. Version of October 13, Version of October 13, 2014 Huffman Coding 1 / 27 Huffman Coding Version of October 13, 2014 Version of October 13, 2014 Huffman Coding 1 / 27 Outline Outline Coding and Decoding The optimal source coding problem Huffman coding: A greedy algorithm Correctness

More information

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

FACULTY OF ENGINEERING LAB SHEET INFORMATION THEORY AND ERROR CODING ETM 2126 ETN2126 TRIMESTER 2 (2011/2012) FACULTY OF ENGINEERING LAB SHEET INFORMATION THEORY AND ERROR CODING ETM 2126 ETN2126 TRIMESTER 2 (2011/2012) Experiment 1: IT1 Huffman Coding Note: Students are advised to read through this lab sheet

More information

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).

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). 4 th Stage Lecture time: 10:30 AM-2:30 PM Instructor: Dr. Ali Kadhum AL-Quraby Lecture No. : 5 Subject: Data Compression Class room no.: Department of computer science Move-to-Front Coding Move To Front

More information

Chapter 7 Lossless Compression Algorithms

Chapter 7 Lossless Compression Algorithms Chapter 7 Lossless Compression Algorithms 7.1 Introduction 7.2 Basics of Information Theory 7.3 Run-Length Coding 7.4 Variable-Length Coding (VLC) 7.5 Dictionary-based Coding 7.6 Arithmetic Coding 7.7

More information

Shannon capacity and related problems in Information Theory and Ramsey Theory

Shannon capacity and related problems in Information Theory and Ramsey Theory Shannon capacity and related problems in Information Theory and Ramsey Theory Eyal Lubetzky Based on Joint work with Noga Alon and Uri Stav May 2007 1 Outline of talk Shannon Capacity of of a graph: graph:

More information

8 Integer encoding. scritto da: Tiziano De Matteis

8 Integer encoding. scritto da: Tiziano De Matteis 8 Integer encoding scritto da: Tiziano De Matteis 8.1 Unary code... 8-2 8.2 Elias codes: γ andδ... 8-2 8.3 Rice code... 8-3 8.4 Interpolative coding... 8-4 8.5 Variable-byte codes and (s,c)-dense codes...

More information

A Quantitative Measure of Relevance Based on Kelly Gambling Theory

A Quantitative Measure of Relevance Based on Kelly Gambling Theory A Quantitative Measure of Relevance Based on Kelly Gambling Theory Mathias Winther Madsen Institute for Logic, Language, and Computation University of Amsterdam PLAN Why How Examples Why Why How Why not

More information

Code-Based Cryptography Error-Correcting Codes and Cryptography

Code-Based Cryptography Error-Correcting Codes and Cryptography Code-Based Cryptography Error-Correcting Codes and Cryptography I. Márquez-Corbella 0 1. Error-Correcting Codes and Cryptography 1. Introduction I - Cryptography 2. Introduction II - Coding Theory 3. Encoding

More information

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

A Comparative Study of Entropy Encoding Techniques for Lossless Text Data Compression A Comparative Study of Entropy Encoding Techniques for Lossless Text Data Compression P. RATNA TEJASWI 1 P. DEEPTHI 2 V.PALLAVI 3 D. GOLDIE VAL DIVYA 4 Abstract: Data compression is the art of reducing

More information

OPTIMAL PREFIX CODES AND HUFFMAN CODES

OPTIMAL PREFIX CODES AND HUFFMAN CODES Intern. J. Computer Math., Vol. 80, June 2003, pp. 727 742 OPTIMAL PREFIX CODES AND HUFFMAN CODES DONGYANG LONG a,b, *, WEIJIA JIA c,y and MING LI d,z a Department of Computer Science, Zhongshan University,

More information

16 Greedy Algorithms

16 Greedy Algorithms 16 Greedy Algorithms Optimization algorithms typically go through a sequence of steps, with a set of choices at each For many optimization problems, using dynamic programming to determine the best choices

More information

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

Lecture 19. Lecturer: Aleksander Mądry Scribes: Chidambaram Annamalai and Carsten Moldenhauer CS-621 Theory Gems November 21, 2012 Lecture 19 Lecturer: Aleksander Mądry Scribes: Chidambaram Annamalai and Carsten Moldenhauer 1 Introduction We continue our exploration of streaming algorithms. First,

More information

Pierre A. Humblet* Abstract

Pierre A. Humblet* Abstract Revised March 1980 ESL-P-8 0 0 GENERALIZATION OF HUFFMAN CODING TO MINIMIZE THE PROBABILITY OF BUFFER OVERFLOW BY Pierre A. Humblet* Abstract An algorithm is given to find a prefix condition code that

More information

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

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics 400 lecture note #4 [Ch 6] Set Theory 1. Basic Concepts and Definitions 1) Basics Element: ; A is a set consisting of elements x which is in a/another set S such that P(x) is true. Empty set: notated {

More information

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

Data Compression. Media Signal Processing, Presentation 2. Presented By: Jahanzeb Farooq Michael Osadebey Data Compression Media Signal Processing, Presentation 2 Presented By: Jahanzeb Farooq Michael Osadebey What is Data Compression? Definition -Reducing the amount of data required to represent a source

More information

Achievable Rate Regions for Network Coding

Achievable Rate Regions for Network Coding Achievable Rate Regions for Network oding Randall Dougherty enter for ommunications Research 4320 Westerra ourt San Diego, A 92121-1969 Email: rdough@ccrwest.org hris Freiling Department of Mathematics

More information

Information Retrieval. Chap 7. Text Operations

Information Retrieval. Chap 7. Text Operations Information Retrieval Chap 7. Text Operations The Retrieval Process user need User Interface 4, 10 Text Text logical view Text Operations logical view 6, 7 user feedback Query Operations query Indexing

More information

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

Data Compression. An overview of Compression. Multimedia Systems and Applications. Binary Image Compression. Binary Image Compression An overview of Compression Multimedia Systems and Applications Data Compression Compression becomes necessary in multimedia because it requires large amounts of storage space and bandwidth Types of Compression

More information

Lecture 12 March 4th

Lecture 12 March 4th Math 239: Discrete Mathematics for the Life Sciences Spring 2008 Lecture 12 March 4th Lecturer: Lior Pachter Scribe/ Editor: Wenjing Zheng/ Shaowei Lin 12.1 Alignment Polytopes Recall that the alignment

More information

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

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF INFORMATION TECHNOLOGY ACADEMIC YEAR / ODD SEMESTER QUESTION BANK KINGS COLLEGE OF ENGINEERING DEPARTMENT OF INFORMATION TECHNOLOGY ACADEMIC YEAR 2011-2012 / ODD SEMESTER QUESTION BANK SUB.CODE / NAME YEAR / SEM : IT1301 INFORMATION CODING TECHNIQUES : III / V UNIT -

More information

More Bits and Bytes Huffman Coding

More Bits and Bytes Huffman Coding More Bits and Bytes Huffman Coding Encoding Text: How is it done? ASCII, UTF, Huffman algorithm ASCII C A T Lawrence Snyder, CSE UTF-8: All the alphabets in the world Uniform Transformation Format: a variable-width

More information

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

/ Approximation Algorithms Lecturer: Michael Dinitz Topic: Linear Programming Date: 2/24/15 Scribe: Runze Tang 600.469 / 600.669 Approximation Algorithms Lecturer: Michael Dinitz Topic: Linear Programming Date: 2/24/15 Scribe: Runze Tang 9.1 Linear Programming Suppose we are trying to approximate a minimization

More information

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

Scribe: Virginia Williams, Sam Kim (2016), Mary Wootters (2017) Date: May 22, 2017 CS6 Lecture 4 Greedy Algorithms Scribe: Virginia Williams, Sam Kim (26), Mary Wootters (27) Date: May 22, 27 Greedy Algorithms Suppose we want to solve a problem, and we re able to come up with some recursive

More information

MRT based Fixed Block size Transform Coding

MRT based Fixed Block size Transform Coding 3 MRT based Fixed Block size Transform Coding Contents 3.1 Transform Coding..64 3.1.1 Transform Selection...65 3.1.2 Sub-image size selection... 66 3.1.3 Bit Allocation.....67 3.2 Transform coding using

More information

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

Diagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets? Diagonalization Cardinalities The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets? We say that a set S has at least as great cardinality as set T, written S T, if

More information

Data Compression. Guest lecture, SGDS Fall 2011

Data Compression. Guest lecture, SGDS Fall 2011 Data Compression Guest lecture, SGDS Fall 2011 1 Basics Lossy/lossless Alphabet compaction Compression is impossible Compression is possible RLE Variable-length codes Undecidable Pigeon-holes Patterns

More information

Mathematical preliminaries and error analysis

Mathematical preliminaries and error analysis Mathematical preliminaries and error analysis Tsung-Ming Huang Department of Mathematics National Taiwan Normal University, Taiwan August 28, 2011 Outline 1 Round-off errors and computer arithmetic IEEE

More information

Algorithms Dr. Haim Levkowitz

Algorithms Dr. Haim Levkowitz 91.503 Algorithms Dr. Haim Levkowitz Fall 2007 Lecture 4 Tuesday, 25 Sep 2007 Design Patterns for Optimization Problems Greedy Algorithms 1 Greedy Algorithms 2 What is Greedy Algorithm? Similar to dynamic

More information

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

Compression. storage medium/ communications network. For the purpose of this lecture, we observe the following constraints: CS231 Algorithms Handout # 31 Prof. Lyn Turbak November 20, 2001 Wellesley College Compression The Big Picture We want to be able to store and retrieve data, as well as communicate it with others. In general,

More information

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

We show that the composite function h, h(x) = g(f(x)) is a reduction h: A m C. 219 Lemma J For all languages A, B, C the following hold i. A m A, (reflexive) ii. if A m B and B m C, then A m C, (transitive) iii. if A m B and B is Turing-recognizable, then so is A, and iv. if A m

More information

Digital Image Processing

Digital Image Processing Lecture 9+10 Image Compression Lecturer: Ha Dai Duong Faculty of Information Technology 1. Introduction Image compression To Solve the problem of reduncing the amount of data required to represent a digital

More information

Elementary Recursive Function Theory

Elementary Recursive Function Theory Chapter 6 Elementary Recursive Function Theory 6.1 Acceptable Indexings In a previous Section, we have exhibited a specific indexing of the partial recursive functions by encoding the RAM programs. Using

More information

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

Image compression. Stefano Ferrari. Università degli Studi di Milano Methods for Image Processing. academic year Image compression Stefano Ferrari Università degli Studi di Milano stefano.ferrari@unimi.it Methods for Image Processing academic year 2017 2018 Data and information The representation of images in a raw

More information

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

a- As a special case, if there is only one symbol, no bits are required to specify it. Codes A single bit is useful if exactly two answers to a question are possible. Examples include the result of a coin toss (heads or tails), Most situations in life are more complicated. This chapter concerns

More information

Variable-length Splittable Codes with Multiple Delimiters

Variable-length Splittable Codes with Multiple Delimiters Variable-length Splittable Codes with Multiple Delimiters Anatoly V. Anisimov, Member, IEEE and Igor O. Zavadskyi 1 arxiv:1508.01360v1 [cs.it] 6 Aug 2015 Abstract Variable-length splittable codes are derived

More information

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

AM205: lecture 2. 1 These have been shifted to MD 323 for the rest of the semester. AM205: lecture 2 Luna and Gary will hold a Python tutorial on Wednesday in 60 Oxford Street, Room 330 Assignment 1 will be posted this week Chris will hold office hours on Thursday (1:30pm 3:30pm, Pierce

More information

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

CONSECUTIVE INTEGERS AND THE COLLATZ CONJECTURE. Marcus Elia Department of Mathematics, SUNY Geneseo, Geneseo, NY CONSECUTIVE INTEGERS AND THE COLLATZ CONJECTURE Marcus Elia Department of Mathematics, SUNY Geneseo, Geneseo, NY mse1@geneseo.edu Amanda Tucker Department of Mathematics, University of Rochester, Rochester,

More information

The Encoding Complexity of Network Coding

The Encoding Complexity of Network Coding The Encoding Complexity of Network Coding Michael Langberg Alexander Sprintson Jehoshua Bruck California Institute of Technology Email: mikel,spalex,bruck @caltech.edu Abstract In the multicast network

More information

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

Comparing Data Compression in Web-based Animation Models using Kolmogorov Complexity Comparing Data Compression in Web-based Animation Models using Kolmogorov Complexity Carlos A. P. Campani, Fernando Accorsi, Paulo Blauth Menezes and Luciana Porcher Nedel Abstract In the last few years,

More information

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

Greedy Algorithms. CLRS Chapters Introduction to greedy algorithms. Design of data-compression (Huffman) codes Greedy Algorithms CLRS Chapters 16.1 16.3 Introduction to greedy algorithms Activity-selection problem Design of data-compression (Huffman) codes (Minimum spanning tree problem) (Shortest-path problem)

More information

EECS 122: Introduction to Communication Networks Final Exam Solutions

EECS 122: Introduction to Communication Networks Final Exam Solutions EECS 22: Introduction to Communication Networks Final Exam Solutions Problem. (6 points) How long does it take for a 3000-byte IP packet to go from host A to host B in the figure below. Assume the overhead

More information

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

Entropy Coding. - to shorten the average code length by assigning shorter codes to more probable symbols => Morse-, Huffman-, Arithmetic Code Entropy Coding } different probabilities for the appearing of single symbols are used - to shorten the average code length by assigning shorter codes to more probable symbols => Morse-, Huffman-, Arithmetic

More information

Contributions to image encryption and authentication

Contributions to image encryption and authentication University of Wollongong Thesis Collections University of Wollongong Thesis Collection University of Wollongong Year 23 Contributions to image encryption and authentication Takeyuki Uehara University of

More information

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

Announcements. Problem Set 3 due Friday, October 21. Alternate Midterm Times. Drop by office hours! Ask questions at Functions Announcements Problem Set 3 due Friday, October 21 Drop by office hours! Ask questions at cs103@cs.stanford.edu. Alternate Midterm Times Wednesday, October 26, 7:00PM 10:00PM Thursday, October

More information