Communication Theory and Engineering

Similar documents
Chapter 2: Entropy and Mutual Information. University of Illinois at Chicago ECE 534, Natasha Devroye

Introduction to Information Theory. Uncertainty. Entropy. Surprisal. Joint entropy. Conditional entropy. Mutual information.

Dept. of Linguistics, Indiana University Fall 2015

Introduction to Information Theory. B. Škorić, Physical Aspects of Digital Security, Chapter 2

Machine Learning. Lecture 02.2: Basics of Information Theory. Nevin L. Zhang

Solutions to Set #2 Data Compression, Huffman code and AEP

COMPSCI 650 Applied Information Theory Jan 21, Lecture 2

Homework Set #2 Data Compression, Huffman code and AEP

4F5: Advanced Communications and Coding Handout 2: The Typical Set, Compression, Mutual Information

Communications Theory and Engineering

3. If a choice is broken down into two successive choices, the original H should be the weighted sum of the individual values of H.

Lecture 5 - Information theory

Lecture 2: August 31

Classification & Information Theory Lecture #8

Chapter 8: Differential entropy. University of Illinois at Chicago ECE 534, Natasha Devroye

Homework 1 Due: Thursday 2/5/2015. Instructions: Turn in your homework in class on Thursday 2/5/2015

Capacity of a channel Shannon s second theorem. Information Theory 1/33

Complex Systems Methods 2. Conditional mutual information, entropy rate and algorithmic complexity

Information Theory. David Rosenberg. June 15, New York University. David Rosenberg (New York University) DS-GA 1003 June 15, / 18

Principles of Communications

Exercise 1. = P(y a 1)P(a 1 )

Ch. 8 Math Preliminaries for Lossy Coding. 8.4 Info Theory Revisited

Chapter I: Fundamental Information Theory

Some Basic Concepts of Probability and Information Theory: Pt. 2

Lecture 1: Introduction, Entropy and ML estimation

CS 630 Basic Probability and Information Theory. Tim Campbell

Quantitative Biology II Lecture 4: Variational Methods

H(X) = plog 1 p +(1 p)log 1 1 p. With a slight abuse of notation, we denote this quantity by H(p) and refer to it as the binary entropy function.

Entropies & Information Theory

Lecture 22: Final Review

Medical Imaging. Norbert Schuff, Ph.D. Center for Imaging of Neurodegenerative Diseases

1 Basic Information Theory

Solutions to Homework Set #1 Sanov s Theorem, Rate distortion

LECTURE 3. Last time:

1 Introduction to information theory

Exam 1. Problem 1: True or false

The binary entropy function

the Information Bottleneck

Information in Biology

Noisy channel communication

Distributed Source Coding Using LDPC Codes

Note that the new channel is noisier than the original two : and H(A I +A2-2A1A2) > H(A2) (why?). min(c,, C2 ) = min(1 - H(a t ), 1 - H(A 2 )).

Example: Letter Frequencies

3F1 Information Theory, Lecture 1

Information in Biology

Coding of memoryless sources 1/35

How to Quantitate a Markov Chain? Stochostic project 1

02 Background Minimum background on probability. Random process

Information Theory. Coding and Information Theory. Information Theory Textbooks. Entropy

5 Mutual Information and Channel Capacity

EGR 544 Communication Theory

ECE 4400:693 - Information Theory

Module 1. Introduction to Digital Communications and Information Theory. Version 2 ECE IIT, Kharagpur

Information Theory Primer:

Solutions to Homework Set #3 Channel and Source coding

Network coding for multicast relation to compression and generalization of Slepian-Wolf

Conditional Likelihood Maximization: A Unifying Framework for Information Theoretic Feature Selection

Additional Practice Lessons 2.02 and 2.03

EE376A: Homework #3 Due by 11:59pm Saturday, February 10th, 2018

Information Theory. M1 Informatique (parcours recherche et innovation) Aline Roumy. January INRIA Rennes 1/ 73

Source Coding. Master Universitario en Ingeniería de Telecomunicación. I. Santamaría Universidad de Cantabria

Is the entropy a good measure of correlation?

Information measures in simple coding problems

Computational Systems Biology: Biology X

Bivariate distributions

The Logic of Partitions with an application to Information Theory

SDS 321: Introduction to Probability and Statistics

Information Theory: Entropy, Markov Chains, and Huffman Coding

Series 7, May 22, 2018 (EM Convergence)

Part I. Entropy. Information Theory and Networks. Section 1. Entropy: definitions. Lecture 5: Entropy

Machine Learning Srihari. Information Theory. Sargur N. Srihari

Example: Letter Frequencies

Information. = more information was provided by the outcome in #2

A Gentle Tutorial on Information Theory and Learning. Roni Rosenfeld. Carnegie Mellon University

MAHALAKSHMI ENGINEERING COLLEGE-TRICHY QUESTION BANK UNIT V PART-A. 1. What is binary symmetric channel (AUC DEC 2006)

ELEC546 Review of Information Theory

Information Theory and ID3 Algo.

Example: Letter Frequencies

INTRODUCTION TO INFORMATION THEORY

Topics. Probability Theory. Perfect Secrecy. Information Theory

Revision of Lecture 5

Solutions 1. Introduction to Coding Theory - Spring 2010 Solutions 1. Exercise 1.1. See Examples 1.2 and 1.11 in the course notes.

Bioinformatics: Biology X

Lecture 2. Capacity of the Gaussian channel


Entropy and Ergodic Theory Lecture 4: Conditional entropy and mutual information

Channel capacity. Outline : 1. Source entropy 2. Discrete memoryless channel 3. Mutual information 4. Channel capacity 5.

QB LECTURE #4: Motif Finding

ECE Information theory Final

MAHALAKSHMI ENGINEERING COLLEGE QUESTION BANK. SUBJECT CODE / Name: EC2252 COMMUNICATION THEORY UNIT-V INFORMATION THEORY PART-A

Application of Information Theory, Lecture 7. Relative Entropy. Handout Mode. Iftach Haitner. Tel Aviv University.

Lecture 3: Channel Capacity

Lecture 18: Quantum Information Theory and Holevo s Bound

MGMT 69000: Topics in High-dimensional Data Analysis Falll 2016

Lecture 3. Mathematical methods in communication I. REMINDER. A. Convex Set. A set R is a convex set iff, x 1,x 2 R, θ, 0 θ 1, θx 1 + θx 2 R, (1)

Reconsidering unique information: Towards a multivariate information decomposition

ELECTRONICS & COMMUNICATIONS DIGITAL COMMUNICATIONS

CS 591, Lecture 2 Data Analytics: Theory and Applications Boston University

Mathematics 426 Robert Gross Homework 9 Answers

EE5139R: Problem Set 4 Assigned: 31/08/16, Due: 07/09/16

Transcription:

Communication Theory and Engineering Master's Degree in Electronic Engineering Sapienza University of Rome A.A. 018-019

Information theory Practice work 3

Review For any probability distribution, we define a quantity called the entropy Entropy is a measure of the uncertainty of a random variable H ( X ) = p( x) log p( x) x Conditional entropy H(X Y), is the entropy of a random variable conditional on the knowledge of another random variable H(Y X ) = p(x) H(Y X = x) = p(x, y)log p( y x) x Ω X x Ω X y Ω Y

Review The relative entropy is a measure of the distance between two distributions p(x) D( p q) = p(x)log q(x) x Ω X 0 0log 0 = 0; 0log 0 q = 0; p log Mutual information is a measure of the amount of information one random variable contains about another. p(x, y) p(x,y ) I (X;Y ) = D( p(x, y) p(x) p( y)) = p(x, y)log = E p(x) p( y) p(x, y) log p(x ) p(y ) x Ω X y Ω Y p 0 = The mutual information I(X;Y) is the relative entropy between the joint distribution p(x,y) and the product of the distributions p(x)p(y)

Example 1 Show that: a) I(X;Y) = H(X) H(X Y) = H(Y) H(Y X) b) I(X;Y) = H(X) + H(Y) H(Y,X) c) I(X;X) =?

Example 1 Solution a) I (X;Y ) = p(x, y) p(x, y)log x, y p(x) p( y) = p(x, y)log p(x y) x, y p(x) = = p(x)log p(x) + p(x, y)log p(x y) = H(X ) H(X Y ) = H(Y ) H(Y X ) x x, y b) We know that H(X,Y) = H(X) + H(Y X) = H(Y) + H(X Y) so I(X;Y) = H(X) - H(X Y) = H(X) + H(Y) H(X,Y) c) I(X;X) = H(X) H(X X) = H(X)

Example Show that: H(X,Y Z ) = H(X Z ) + H(Y X,Z ) Solution: H(X,Y Z ) = p(x, y,z) log p(x, y z) = x, y,z = p(x, y,z) log p(x z) p(x, y,z) log p( y x,z) = H(X Z ) + H(Y X,Z ) x, y,z Note: x, y,z p(x, y z) = p(x, y,z) p(z) * p(x,z) p(x,z) = p( y x,z) p(x z)

Example 3 solution What is the entropy and coding of an equiprobable binary source? If the outcomes of X are equally likely (q=1/), H(X) is maximum and equal to 1 bit, i.e. we need, on average, one bit to code each possible outcome of X In this case, the possible outcomes are two (the source is binary), so exactly 1 bit is used for each outcome

Example 4 What is the entropy and coding of a non equiprobable binary source? a) Evaluate the average number of bits necessary to encode a non-equiprobable binary source, characterized by q=0.1. Solution: The entropy is H(X)= 0.1*log 0.1 0.9*log 0.9 = 0.47 bits We need, on average, 0.47 bits to code each outcome. b) Implement a possible binary code that efficiently represents this source Solution: A code, in which the outcomes are coded in pairs, e.g.: outcomes Associated Code 00 0 01 10 10 110 11 111 not optimized n bit = [p(0,0)*1+p(0,1)*+p(1,0)*3+p(1,1)*3] / = = [0.9*0.9 + 0.9*0.1* + 0.1*0.9*3 + 0.1*0.1*3]/ = 0.645 bits > 0.47 bits

Example 5 What is the entropy and coding of a non binary and non equiprobable source? a) Evaluate entropy and a possible binary representation code. If X is a r.v. such that Ω X ={a 1, a, a 3, a 4 } and: Solution: the entropy is: H(X ) = 1 log + 1 4 log 4 + 1 8 log 8 + 1 log 8 =1.75 bits 8 A possible code that represents the outcomes of X with an average number of bits n bit equal to 1.75 is: outcomes Associated Code a 1 0 p X (a 1 ) = 1, p X (a ) = 1 4, p X (a 3 ) = 1 8, p X (a 4 ) = 1 8 a 10 a 3 110 n bit = [p(a 1 )*1+p(a )*+p(a 3 )*3+p(a 4 )*3] / 1 = 1.75 bits a 4 111

Example 6 Let! (X,Y ) p(x, y) Compute the following: a)h(x), H(Y) b)h(x Y), H(Y X) c)h(x,y) d)h(y) H(Y X) e)i(x;y) Y y 1 y y 3 X x 1 0 1/4 1/16 x 1/8 0 1/8 x 3 1/16 1/8 1/4 Joint probability of p(x,y)

p X (x) = p(x = x) = p(x) = p(x, y) p y Y p(x = x 1 ) = 0 + 1 4 + 1 16 = 5 16 Example 6 solution In the first step, we compute the marginal distribution of X and Y with respect to the given jiont probabilities in the table. x ( y) = p(y = y) = p( y) = p(x, y) p(y = y 1 ) = 0 + 1 8 + 1 16 = 3 16 p(x = x ) = 1 8 + 0 + 1 8 = 1 4 p(y = y ) = 1 4 + 0 + 1 8 = 3 8 p(x = x 3 ) = 1 16 + 1 8 + 1 4 = 7 16 H(X ) = p(x)log x H(Y ) = p( y)log y 1 p(x) = 5 16 log 16 5 + 1 4 log 4 + 7 16 log 16 7 1 p( y) = 5 16 log 16 5 + 3 8 log p(y = y 3 ) = 1 16 + 1 8 + 1 4 = 7 16 a) Now we can compute the entropy and conditional entropy regarding to the jiont probabilities and marginal distribution 8 3 + 7 16 log 16 7 =1.543 bits =1.505 bits

Example 6 solution b) The conditional entropies H(X Y) and H(Y X) are: H(X Y ) = p(y = y)h(x Y = y) = p(y = y) p(x = x y)log p(x y) = p(x, y) log p( y x) = y y = p(x 1, y 1 )log p(x 1 y 1 ) p(x 1, y )log p(x 1 y ) p(x 1, y 3 )log p(x 1 y 3 ) p(x, y 1 )log p(x y 1 ) p(x, y )log p(x y ) p(x, y 3 )log p(x y 3 ) p(x 3, y 1 )log p(x 3 y 1 ) p(x 3, y )log p(x 3 y ) p(x 3, y 3 )log p(x 3 y 3 ) = 0 1 4 log 4 5 1 16 log 1 7 1 8 log 5 0 + 1 8 log 7 1 16 log 1 5 1 8 log 1 3 1 4 log 4 7 x x, y =1.119 bits H(Y X ) = p(x = x)h(y X = x) = 5 x 16 H(Y X = x ) + 1 1 3 H(Y X = x ) + 7 16 H(Y X = x ) = 3 = 5 16 H(0, 4 5,1 5 ) + 1 4 H(1,0,1 ) + 7 16 H(1 7, 7, 4 ) = 0.5 + 0.5 + 0.60 =1.077 bits 7

1 H(X,Y ) = p(x, y)log = p(x, y) x y Example 6 solution c) The joint entropy with respect to the definition is: = 0 + 1 4 log 4 + 1 16 log 16 + 1 8 log 8 + 0 + 1 8 log 8 + 1 16 log 16 + 1 8 log 8 + 1 4 log 4 =.65 bits = = H(X ) + H(Y X ) = H(Y ) + H(X Y ) d, e) The mutual information is: I (X;Y ) = H(Y ) H(Y X ) = 1.505 1.077 = 0.48 bits = H(X ) H(X Y )

Consider the distributions in the table the ternary source X. Calculate: a) H(p), H(q) b) D(p q), D(q p) H( p) = 1 16 log 16 + 1 log + 3 16 log 16 3 + 1 4 log 4 = 1 4 + 1 + 0.45 + 1 H(q) = 4 4 log 4 = bits D( p q) = 1 16 log D(q p) = 1 4 log 4 + 1 4 log 1 4 + 1 log + 3 16 log 1 + 1 4 log Example 7 solution 3 4 + 1 4 log 1= 0.98 4 3 + 1 4 log 1= 0.353 Symbol p(x) q(x) a 1/16 1/4 b 1/ 1/4 c 3/16 1/4 d 1/4 1/4 =1.703 bits

Example 7 solution b) Shows an example of two distributions p and q for which D(p q) = D(q p) Symbol p(x) q(x) a z 1-z b 1-z z z D( p q) = z log 1 z + (1 z)log 1 z z D(q p) = (1 z)log 1 z z + z log z 1 z

Excercise MATLAB 1: Entropy of a binary source Write a MATLAB script that produces a graph representing the entropy H(X) of a binary X source, as the pmf of the source changes. the algorithm can be written as: 0- begin 1- set counter i=1, - get the step size Δ 3- p(1)=0 4- i= i+1 5- p(i)=p(i-1)+δ 6- H(i)=-(1-p(i))log (1-p(i))-p(i)log p(i) 7- if p(i)<1 then go to 4 8- H(1)=H(end)=0 9- plot H on the Y axis and p on the X axis 10- end Then we test the algorithm Set step size = 0.1 i p(i) H(i) 1 0 0 0.1 0.0808. 11 1 0

Excercise MATLAB 1: Entropy of a binary source After testing the algorithm, now we can draw the flowchart as: begin i=1, p(1)=0, get the step size Δ i=i+1 p(i)=p(i-1)+δ, H(i)=-(1-p(i))log (1-p(i))- p(i)log p(i) H(1)=H(end)=0 Plot(p,H) end Yes p(i)<1 No

MATLAB excercise : Entropy of a non equiprobable discrete source Write a MATLAB script that produces the entropy calculation H(X) of a discrete source X. a) The script must provide for the possibility of choice, by a generic user: i. of the cardinality of the source (number of outcomes) ii. of the source pmf b) In addition, the script must predict the user's possible error in entering data (eg, on the total sum of the probability), and react appropriately. c) Note: Use the MATLAB help command to get information about the input() and fprintf() functions.

MATLAB excercise 3: Relative entropy Consider two distributions p(x) and q(x) of q(x):pr(x q =0)=[0:0.1:1]; a binary X source. Whereas a) Write a proper algorithm and draw its flow chart to plot the trend of D(p q) to the variation of Pr(x q = 0), in the following cases : 1) p(x) uniform ) p(x) non uniform and such that Pr(x p =0)=1/3; 3) p(x) non uniform and such that Pr(x p =0)=/3; b) Produce a script to plot, in the same figure, the trend of D(p q) to the variation of Pr(x=0), in the previous cases c) For the three cases of the previous point, show in the same figure, but in a suitable subplot number, the curves obtained by calculating D(p q) and D(q p), showing the anti-symmetry property of the relative entropy (in general D(p q) D(q p).