Information Theory Information Suppose that we have the source alphabet of q symbols s 1, s 2,.., s q, each with its probability p(s i )=p i. How much.

Slides:



Advertisements
Similar presentations
DCSP-8: Minimal length coding I Jianfeng Feng Department of Computer Science Warwick Univ., UK
Advertisements

CY2G2 Information Theory 1
EE 4780 Huffman Coding Example. Bahadir K. Gunturk2 Huffman Coding Example Suppose X is a source producing symbols; the symbols comes from the alphabet.
Lecture 3: Source Coding Theory TSBK01 Image Coding and Data Compression Jörgen Ahlberg Div. of Sensor Technology Swedish Defence Research Agency (FOI)
Sampling and Pulse Code Modulation
Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
Information Theory EE322 Al-Sanie.
Bounds on Code Length Theorem: Let l ∗ 1, l ∗ 2,..., l ∗ m be optimal codeword lengths for a source distribution p and a D-ary alphabet, and let L ∗ be.
Data Compression.
Entropy and Shannon’s First Theorem
The University of Manchester Introducción al análisis del código neuronal con métodos de la teoría de la información Dr Marcelo A Montemurro
Chapter 6 Information Theory
Lecture04 Data Compression.
Lecture 6: Huffman Code Thinh Nguyen Oregon State University.
CSc 461/561 CSc 461/561 Multimedia Systems Part B: 1. Lossless Compression.
ENGS Assignment 3 ENGS 4 – Assignment 3 Technology of Cyberspace Winter 2004 Thayer School of Engineering Dartmouth College Assignment 3 – Due Sunday,
Fundamental limits in Information Theory Chapter 10 :
Information Theory Eighteenth Meeting. A Communication Model Messages are produced by a source transmitted over a channel to the destination. encoded.
Lossless data compression Lecture 1. Data Compression Lossless data compression: Store/Transmit big files using few bytes so that the original files.
Data Structures – LECTURE 10 Huffman coding
1 Chapter 5 A Measure of Information. 2 Outline 5.1 Axioms for the uncertainty measure 5.2 Two Interpretations of the uncertainty function 5.3 Properties.
1 Chapter 1 Introduction. 2 Outline 1.1 A Very Abstract Summary 1.2 History 1.3 Model of the Signaling System 1.4 Information Source 1.5 Encoding a Source.
Lecture 2: Basic Information Theory Thinh Nguyen Oregon State University.
Variable-Length Codes: Huffman Codes
Fundamentals of Multimedia Chapter 7 Lossless Compression Algorithms Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
CSI Uncertainty in A.I. Lecture 201 Basic Information Theory Review Measuring the uncertainty of an event Measuring the uncertainty in a probability.
Huffman Coding. Main properties : –Use variable-length code for encoding a source symbol. –Shorter codes are assigned to the most frequently used symbols,
EEE377 Lecture Notes1 EEE436 DIGITAL COMMUNICATION Coding En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room 2.14.
Information Theory and Security
1 Lossless Compression Multimedia Systems (Module 2) r Lesson 1: m Minimum Redundancy Coding based on Information Theory: Shannon-Fano Coding Huffman Coding.
©2003/04 Alessandro Bogliolo Background Information theory Probability theory Algorithms.
STATISTIC & INFORMATION THEORY (CSNB134)
Information Theory & Coding…
INFORMATION THEORY BYK.SWARAJA ASSOCIATE PROFESSOR MREC.
Huffman coding By: Justin Bancroft. Huffman coding is the most efficient way to code DCT coefficients.
Source Coding-Compression
Huffman Codes Information coding: –Most info transmission machines (computer terminal, Voyager spacecraft) use a binary code. –Why? These electric signals.
Huffman Codes. Encoding messages  Encode a message composed of a string of characters  Codes used by computer systems  ASCII uses 8 bits per character.
Basic Concepts of Encoding Codes, their efficiency and redundancy 1.
Prepared by: Amit Degada Teaching Assistant, ECED, NIT Surat
Coding & Information theory
Linawati Electrical Engineering Department Udayana University
DCSP-8: Minimal length coding I Jianfeng Feng Department of Computer Science Warwick Univ., UK
Prof. Pushpak Bhattacharyya, IIT Bombay1 Basics Of Entropy CS 621 Artificial Intelligence Lecture /09/05 Prof. Pushpak Bhattacharyya.
Huffman coding Content 1 Encoding and decoding messages Fixed-length coding Variable-length coding 2 Huffman coding.
Outline Transmitters (Chapters 3 and 4, Source Coding and Modulation) (week 1 and 2) Receivers (Chapter 5) (week 3 and 4) Received Signal Synchronization.
Abdullah Aldahami ( ) April 6,  Huffman Coding is a simple algorithm that generates a set of variable sized codes with the minimum average.
Lecture 4: Lossless Compression(1) Hongli Luo Fall 2011.
Huffman Codes Juan A. Rodriguez CS 326 5/13/2003.
Presented by Minkoo Seo March, 2006
1 Data Compression Hae-sun Jung CS146 Dr. Sin-Min Lee Spring 2004.
Huffman Coding (2 nd Method). Huffman coding (2 nd Method)  The Huffman code is a source code. Here word length of the code word approaches the fundamental.
SEAC-3 J.Teuhola Information-Theoretic Foundations Founder: Claude Shannon, 1940’s Gives bounds for:  Ultimate data compression  Ultimate transmission.
Lossless Compression-Statistical Model Lossless Compression One important to note about entropy is that, unlike the thermodynamic measure of entropy,
ENTROPY Entropy measures the uncertainty in a random experiment. Let X be a discrete random variable with range S X = { 1,2,3,... k} and pmf p k = P X.
UNIT I. Entropy and Uncertainty Entropy is the irreducible complexity below which a signal cannot be compressed. Entropy is the irreducible complexity.
UNIT –V INFORMATION THEORY EC6402 : Communication TheoryIV Semester - ECE Prepared by: S.P.SIVAGNANA SUBRAMANIAN, Assistant Professor, Dept. of ECE, Sri.
Chapter 4: Information Theory. Learning Objectives LO 4.1 – Understand discrete and continuous messages, message sources, amount of information and its.
Huffman Codes ASCII is a fixed length 7 bit code that uses the same number of bits to define each character regardless of how frequently it occurs. Huffman.
Assignment 6: Huffman Code Generation
Shannon Entropy Shannon worked at Bell Labs (part of AT&T)
Increasing Information per Bit
Image Compression The still image and motion images can be compressed by lossless coding or lossy coding. Principle of compression: - reduce the redundant.
Information Theory Michael J. Watts
Context-based Data Compression
COT 5611 Operating Systems Design Principles Spring 2012
COT 5611 Operating Systems Design Principles Spring 2014
The Huffman Algorithm We use Huffman algorithm to encode a long message as a long bit string - by assigning a bit string code to each symbol of the alphabet.
Why Compress? To reduce the volume of data to be transmitted (text, fax, images) To reduce the bandwidth required for transmission and to reduce storage.
Inf 723 Information & Computing
Presentation transcript:

Information Theory

Information Suppose that we have the source alphabet of q symbols s 1, s 2,.., s q, each with its probability p(s i )=p i. How much information do we get when we receive one of these symbols ? Suppose that we have the source alphabet of q symbols s 1, s 2,.., s q, each with its probability p(s i )=p i. How much information do we get when we receive one of these symbols ? For example, if p 1 =1, then there is no “ surprise ”, no information since you know what the message must be For example, if p 1 =1, then there is no “ surprise ”, no information since you know what the message must be

On the other hand, if the probabilities are all very different, then when a symbol with a low probability arrives, you feel more surprised, get more information, than when a symbol with a higher probability arrives On the other hand, if the probabilities are all very different, then when a symbol with a low probability arrives, you feel more surprised, get more information, than when a symbol with a higher probability arrives I(p) : A function which measures the amount of information-surprise ( uncertainty in the occurrence of an event of probability p ). I(p) : A function which measures the amount of information-surprise ( uncertainty in the occurrence of an event of probability p ). Define I(p) = log1/p = – log p Define I(p) = log1/p = – log p If we use the base 2 logs, the resulting unit of information is call a bit ( binary digit ). If we use the base 2 logs, the resulting unit of information is call a bit ( binary digit ). Information

Properties of I(p) Properties of I(p) I(p)  0 (a real nonnegative measure) I(p)  0 (a real nonnegative measure) I(p 1 p 2 ) = I(p 1 )+I(p 2 ) for independent event I(p 1 p 2 ) = I(p 1 )+I(p 2 ) for independent event I(p) is a continuous function of p I(p) is a continuous function of p If we get I(s i ) units of information when we receive the symbol s i how much do we get on the average ? If we get I(s i ) units of information when we receive the symbol s i how much do we get on the average ? Since p i is the probability of getting the information I(s i ), then on the average we get for each symbol s i, Since p i is the probability of getting the information I(s i ), then on the average we get for each symbol s i, p i I(s i ) = p i log 2 (1/ p i ) Entropy

Thus, on the average, over the whole alphabet of symbols s i, we will get Thus, on the average, over the whole alphabet of symbols s i, we will get Conventionally, we write Conventionally, we write as the entropy of the signaling system S having symbols s i and probability p i. Entropy

Entropy S={s 1, s 2, s 3, s 4 }, p 1 =1/2, p 2 =1/4, p 3 = p 4 =1/8 Then H 2 (S) = 1/2 log /4 log /8log /8log 2 8 = (1/2)+(1/4)2+(1/8)3+(1/8)3 = 1(3/4) bits of information In this example, L avg of Huffman code can reach H r (S)

Entropy and Coding Instantaneous Codes : A code is said to be instantaneous if when a complete symbol is received, the receiver immediately knows this, and do not have to look further before deciding what message symbol is received Instantaneous Codes : A code is said to be instantaneous if when a complete symbol is received, the receiver immediately knows this, and do not have to look further before deciding what message symbol is received No encoded symbol of this code is a prefix of any other symbol No encoded symbol of this code is a prefix of any other symbol

Entropy and Coding Example : s 1 =0 s 1 =0 s 2 =10 s 2 =01 s 3 =110 s 3 =011 s 4 =111 s 4 =111 instantaneous non-instantaneous Example : s 1 =0 s 1 =0 s 2 =10 s 2 =01 s 3 =110 s 3 =011 s 4 =111 s 4 =111 instantaneous non-instantaneous s 2 s 3 s 1 s s 3 s 4 s s 2 s 3 s 1 s s 3 s 4 s 4 It is necessary and sufficient that an instantaneous code have no code word s i which is a prefix of another code word, s j. It is necessary and sufficient that an instantaneous code have no code word s i which is a prefix of another code word, s j.

Shannon-Fano Coding Shannon-Fano coding is less efficient than is Huffman coding, but has the advantage that you can go directly from the probability p i to the code word length l i Shannon-Fano coding is less efficient than is Huffman coding, but has the advantage that you can go directly from the probability p i to the code word length l i

Shannon-Fano Coding Example : p 1 =p 2 = 1/4, p 3 =p 4 =p 5 =p 6 =1/8 Example : p 1 =p 2 = 1/4, p 3 =p 4 =p 5 =p 6 =1/8 Shannon-Fano lengths: Shannon-Fano lengths: l 1 = l 2 = 2, l 3 = l 4 = l 5 = l 6 =3 we then assign s 1 =00 s 3 =100 s 2 =01 s 4 =101 s 5 =110 s 5 =110 s 6 =111 s 6 =111

Extensions of a Code Example: Example: s 1 : p 1 = 2/3 s 1 0 s 2 : p 2 = 1/3 s 2 1 Lavg = 1 The second extension takes two symbols at a time s 1 s 1 : p 11 = 4/9 s 1 s 1 1 s 1 s 2 : p 12 = 2/9 s 1 s 2 01 s 2 s 1 : p 21 = 2/9 s 2 s s 2 s 2 : p 22 = 1/9 s 2 s Lavg = 17/18 = Lavg for the third extension : 76/87 = Lavg for the fourth extension :