Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source •...

39
Introduction to Information Theory Part 2 1

Transcript of Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source •...

Page 1: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Introduction to Information Theory

Part 2

1

Page 2: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

A General Communication System

CHANNEL

• Information Source• Transmitter• Channel• Receiver• Destination

2

Page 3: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Information: Definition Information is quantified using probabilities. Given a finite set of possible messages, associate a probability with 

each message. A message with low probability represents more information than 

one with high probability.

Definition of Information:

Where  is the probability of the messageBase 2 is used for the logarithm so  is measured in bitsTrits for base 3, nats for base  , Hartleys for base 10…

3

Page 4: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Some properties of 

Information is non‐negative.

Information we get from observing two independent events occurring is the sum of two information(s).

is monotonic and continuous in Slight changes in probability incur slight changes in information.

We get zero information from an event whose probability is 1.

4

Page 5: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Example: Information in a coin flip

5

Page 6: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Independent Events: 2 Coin flips

• There are four possibilities: HH, HT, TH, TT

i.e. Additive property:

6

Page 7: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Example: Text Analysis

SPC

e

ta o i n

s rh

l dc u m f p g w y b v k x q j z0.00000

0.05000

0.10000

0.15000

0.20000

0.25000

SPC e t a o i n s r h l d c u m f p g w y b v k x q j z

7

a 0.06428b 0.01147c 0.02413d 0.03188e 0.10210f 0.01842g 0.01543h 0.04313i 0.05767j 0.00082k 0.00514l 0.03338m 0.01959n 0.05761o 0.06179p 0.01571q 0.00084r 0.04973s 0.05199t 0.07327u 0.02201v 0.00800w 0.01439x 0.00162y 0.01387z 0.00077

SPC 0.20096

Page 8: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Example: Text AnalysisLetter          Freq.        I

8

a 0.06428 3.95951b 0.01147 6.44597c 0.02413 5.37297d 0.03188 4.97116e 0.10210 3.29188f 0.01842 5.76293g 0.01543 6.01840h 0.04313 4.53514i 0.05767 4.11611j 0.00082 10.24909k 0.00514 7.60474l 0.03338 4.90474m 0.01959 5.67385n 0.05761 4.11743o 0.06179 4.01654p 0.01571 5.99226q 0.00084 10.21486r 0.04973 4.32981s 0.05199 4.26552t 0.07327 3.77056u 0.02201 5.50592v 0.00800 6.96640w 0.01439 6.11899x 0.00162 9.26697y 0.01387 6.17152z 0.00077 10.34877

SPC 0.20096 2.31502

Page 9: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Definition of Entropy Information ( ) is associated with known events/messages

Entropy ( ) is the average information w.r.to all possible outcomes. 

Given, 

Characterizes an information source.

9

Page 10: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Example: A 3‐event Source

)

10

Page 11: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Example: Text AnalysisLetter          Freq.        I

11

a 0.06428 3.95951b 0.01147 6.44597c 0.02413 5.37297d 0.03188 4.97116e 0.10210 3.29188f 0.01842 5.76293g 0.01543 6.01840h 0.04313 4.53514i 0.05767 4.11611j 0.00082 10.24909k 0.00514 7.60474l 0.03338 4.90474m 0.01959 5.67385n 0.05761 4.11743o 0.06179 4.01654p 0.01571 5.99226q 0.00084 10.21486r 0.04973 4.32981s 0.05199 4.26552t 0.07327 3.77056u 0.02201 5.50592v 0.00800 6.96640w 0.01439 6.11899x 0.00162 9.26697y 0.01387 6.17152z 0.00077 10.34877

SPC 0.20096 2.31502

Aka, First‐Order Entropy.

Page 12: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Entropy (2 outcomes)

12

Page 13: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Entropy: Properties

13

Entropy is maximized if  is uniform.

Additive property for independent events.

If  and  are not independent.

Page 14: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Entropy of things…

• Entropy of English text is approx 1.5 bits

• Entropy of the human genome <= 2 bits

• Entropy of a black hole is ¼ of the area of the outer event horizon.

• Value of information in economics is defined in terms of entropy. E.g. Scarcity

14

Page 15: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Entropy: What about it?

• Does  have a maximum? Where?

• Is entropy a good name for this stuff? How is it related to entropy in thermodynamics?

• How does entropy help in communication? What else can we do with it?

• Why use the letter  ? 

15

Page 16: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Entropy & Codes

• Entropy is closely related to the design of efficient codes for random sources.

• Provides foundations for techniques of compression, data search, encryption, correction of communication errors, etc.

• Essential to the study of life sciences, economics, etc.

16

Page 17: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Coding: Basics

• Events of an information source:  , …, 

• A code is made up of codewords from a code alphabet(e.g. {0, 1}, {., ‐}, etc.)

• A code is an assignment of codewords to source symbols.

17

Page 18: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Coding: Basics• Block code: When all codes have the same length. For example, ASCII 

(8‐bits)

• Average Word Length: 

More generally, 1

• A code is efficient if it has the smallest average word length. (Turns out entropy is the benchmark…)

18

Page 19: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Coding: Basics

• Singular (not unique) codes• Nonsingular (unique) codes

19

Symbol SingularCode

Nonsingular Code

A 00 0

B 10 10

C 01 00

D 10 01

Page 20: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Coding: Basics

• Singular (not unique) codes• Nonsingular (unique) codes• instantaneous codes 

(every word can be decoded as soon as it is received)

20

Symbol SingularCode

Nonsingular Code

A 00 0

B 10 10

C 01 00

D 10 01

Not aninstantaneousCode!

Page 21: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Example: Avg. Code Length (L)

Symbol p Codeword

A 0.3 00

B 0.2 10

C 0.2 11

D 0.2 010

E 0.1 011

21

0.3 ∗ 2 0.2 ∗ 2 0.2 ∗ 2 0.2 ∗ 3 0.1 ∗ 3 2.3

Page 22: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Example: Source Entropy (H)

Symbol p Codeword

A 0.3 00

B 0.2 10

C 0.2 11

D 0.2 010

E 0.1 011

22

0.3 ∗ 2 0.2 ∗ 2 0.2 ∗ 2 0.2 ∗ 3 0.1 ∗ 3 2.3

0.3 log10.3 0.2 log

10.2 ∗ 3 0.1 log

10.1 2.246

Page 23: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Example:  & 

Symbol p Codeword

A 0.3 00

B 0.2 10

C 0.2 11

D 0.2 010

E 0.1 011

23

Is there a relationshipbetween  and  ?

0.3 ∗ 2 0.2 ∗ 2 0.2 ∗ 2 0.2 ∗ 3 0.1 ∗ 3 2.3

0.3 log10.3 0.2 log

10.2 ∗ 3 0.1 log

10.1 2.246

Page 24: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Average Code Length & Entropy

• Average length bounds: 

• Grouping  symbols together: 

24

Page 25: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Average Code Length & Entropy

• Average length bounds: 

• Grouping  symbols together: 

25

Page 26: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Average Code Length & Entropy

• Average length bounds: 

• Grouping  symbols together: 

26

Page 27: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Average Code Length & Entropy

• Average length bounds: 

• Grouping  symbols together: 

27

Page 28: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Average Code Length & Entropy• Average length bounds:  1

• Grouping  symbols together: 

1

1

1

lim→

H

28

Page 29: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Shannon’s First Theorem

• By coding sequences of independent symbols (in ), it is possible to construct codes such that

The price paid for such improvement is increased coding complexity (due to increased  ) and increased delay in coding.

29

Page 30: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Entropy & Coding: Central Ideas

• Use short codes for highly likely events. This shortens the average length of coded messages.

• Code several events at a time. Provides greater flexibility in code design.

30

Page 31: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Data Compression: Huffman Coding

A 0.3

B 0.2

C 0.2

D 0.2

E 0.1 31

Page 32: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Huffman Coding: Reduction Phase

A 0.3 0.3 0.4 0.6

B 0.2 0.3 0.3 0.4

C 0.2 0.2 0.3

D 0.2 0.2

E 0.1 32

Page 33: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Huffman Coding: SplittingPhase

A 0.3  00 0.3  00 0.4   1 0.6   0

B 0.2  10 0.3  01 0.3  00 0.4   1

C 0.2  11 0.2  10 0.3  01

D 0.2  010 0.2  11

E 0.1  011 33

Page 34: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Huffman Coding: SplittingPhase

A 0.3  00 0.3  00 0.4   1 0.6   0

B 0.2  10 0.3  01 0.3  00 0.4   1

C 0.2  11 0.2  10 0.3  01

D 0.2  010 0.2  11

E 0.1  011 34

Page 35: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Huffman Codes• Nonsingular

• Instantaneous

• Efficient

• Non‐unique

• Powers of a source lead closer to 

• Requires knowledge of symbol probabilities

35

Page 36: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Design Huffman Codes

36

Page 37: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

References• Eugene Chiu, Jocelyn Lin, Brok Mcferron, Noshirwan Petigara, Satwiksai Seshasai: 

Mathematical Theory of Claude Shannon: A study of the style and context of his work up to the genesis of information theory. MIT 6.933J / STS.420J The Structure of Engineering Revolutions

• Luciano Floridi, 2010: Information: A Very Short Introduction, Oxford University Press, 2011.

• Luciano Floridi, 2011: The Philosophy of Information, Oxford University Press, 2011.• James Gleick, 2011: The Information: A History, A Theory, A Flood, Pantheon Books, 

2011.• Zhandong Liu , Santosh S Venkatesh and Carlo C Maley, 2008: Sequence space 

coverage, entropy of genomes and the potential to detect non‐human DNA in human samples, BMC Genomics 2008, 9:509

• David Luenberger, 2006: Information Science, Princeton University Press, 2006.• David J.C. MacKay, 2003: Information Theory, Inference, and Learning Algorithms, 

Cambridge University Press, 2003.• Claude Shannon & Warren Weaver, 1949: The Mathematical Theory of 

Communication, University of Illinois Press, 1949.• W. N. Francis and H. Kucera: Brown University Standard Corpus of Present‐Day 

American English, Brown University, 1967.

37

Page 38: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

38

Page 39: Part 2 - Bryn MawrPart 2 1 A General Communication System CHANNEL • Information Source • Transmitter • Channel • Receiver • Destination 2 Information: Definition Information

Additive property.

∈ , ∈

∈ , ∈

log∈∈

log∈∈

39