Shannon's Theory of Communication An operational introduction 5 - - PowerPoint PPT Presentation

shannon s theory of communication
SMART_READER_LITE
LIVE PREVIEW

Shannon's Theory of Communication An operational introduction 5 - - PowerPoint PPT Presentation

Shannon's Theory of Communication An operational introduction 5 September 2014, Introduction to Information Systems Giovanni Sileno g.sileno@uva.nl Leibniz Center for Law University of Amsterdam Fundamental basis of any communication


slide-1
SLIDE 1

Shannon's Theory of Communication

Giovanni Sileno g.sileno@uva.nl Leibniz Center for Law University of Amsterdam

5 September 2014, Introduction to Information Systems

An operational introduction

slide-2
SLIDE 2

Fundamental basis of any communication

slide-3
SLIDE 3

Fundamental basis of any communication Fundamental basis of communication

  • to reproduce at one point a message

selected at another point.

slide-4
SLIDE 4

Fundamental basis of any communication Fundamental basis of communication

  • We focus on the transmission system:

the communication channel.

slide-5
SLIDE 5
slide-6
SLIDE 6
  • Problem: how much “information”

can we transmit reliably?

slide-7
SLIDE 7

Quantification

slide-8
SLIDE 8

Quantify “information”

  • What information are we talking about?

– That concerning the signal, not the

interpreted meaning of the signal.

slide-9
SLIDE 9

Quantify “information”

  • What information are we talking about?

– That concerning the signal, not the

interpreted meaning of the signal.

  • Question:

– how much information the next pages

contain, taken as separate sources?

slide-10
SLIDE 10
slide-11
SLIDE 11
slide-12
SLIDE 12

Quantify “information”

  • A datum is reducible to a lack of uniformity.

– differentiation in the signal produces data.

  • How much can we differenciate the signal?

– It depends on how the signal is constructed!

slide-13
SLIDE 13
slide-14
SLIDE 14
slide-15
SLIDE 15
slide-16
SLIDE 16

?

slide-17
SLIDE 17

Quantification - 2

slide-18
SLIDE 18

Exercise

  • I choose randomly a card from a deck of 16

cards, ordered from 1 to 16. How many yes/no questions should you ask to discover which card I have in my hands?

slide-19
SLIDE 19

Exercise

  • 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 11. 12. 13. 14. 15. 16.
  • I choose randomly a card from a deck of 16

cards, ordered from 1 to 16. How many yes/no questions should you ask to discover which card I have in my hands?

slide-20
SLIDE 20

Exercise

  • I choose randomly a card from a deck of 16

cards, ordered from 1 to 16. How many yes/no questions should you ask to discover which card I have in my hands?

  • Dichotomy method:

Is it greater than 8?

  • 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 11. 12. 13. 14. 15. 16.
slide-21
SLIDE 21

Exercise

  • I choose randomly a card from a deck of 16

cards, ordered from 1 to 16. How many yes/no questions should you ask to discover which card I have in my hands?

  • Dichotomy method:

Is it greater than 8? No. → 8 cards remaining

  • 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 11. 12. 13. 14. 15. 16.
slide-22
SLIDE 22

Exercise

  • I choose randomly a card from a deck of 16

cards, ordered from 1 to 16. How many yes/no questions should you ask to discover which card I have in my hands?

  • Dichotomy method:

Is it greater than 8? No. → 8 cards remaining Is it greater then 4? Yes. → 4 cards remaining

  • 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 11. 12. 13. 14. 15. 16.
slide-23
SLIDE 23

Exercise

  • I choose randomly a card from a deck of 16

cards, ordered from 1 to 16. How many yes/no questions should you ask to discover which card I have in my hands?

  • Dichotomy method:

Is it greater than 8? No. → 8 cards remaining Is it greater then 4? Yes. → 4 cards remaining Is it greater then 6? No. → 2 cards remaining

  • 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 11. 12. 13. 14. 15. 16.
slide-24
SLIDE 24

Exercise

  • I choose randomly a card from a deck of 16

cards, ordered from 1 to 16. How many yes/no questions should you ask to discover which card I have in my hands?

  • Dichotomy method:

Is it greater than 8? No. → 8 cards remaining Is it greater then 4? Yes. → 4 cards remaining Is it greater then 6? No. → 2 cards remaining Is it greater then 5? No. → 1 cards remaining

  • 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 11. 12. 13. 14. 15. 16.
slide-25
SLIDE 25

Unit of measuring “information”

  • The cards correspond to the indexed symbols

available at the source.

  • BIT, for binary digit, corresponds to
  • ne answer to YES/NO questions
slide-26
SLIDE 26

Unit of measuring “information”

  • The cards correspond to the indexed symbols

available at the source.

  • BIT, for binary digit, corresponds to
  • ne answer to YES/NO questions
  • Basic formulas:

– # questions = Log2 (# symbols) – # symbols = 2#questions

slide-27
SLIDE 27

“Trick” for Log2 without calc

Write the series of multiples of 2 2 . 4 . 8 . 16 . 32 . 64 . 128. 256. 512. 1024 ... 1 . 2 . 3 . 4 . 5 . 6 . 7 . 8 . 9 . 10 ... From this sequence we read that: 27 = 128 Log232 = 5 2-4 = 1/16 Log21/16 = -4

slide-28
SLIDE 28

Exercise

  • How many symbols do we have in this class?

– as individuals – as genders

  • How many symbols in this question?

– as letters – as words

  • Calculate how many bits we need to index them.
slide-29
SLIDE 29

Exercise

  • How many symbols do we have in this class?

– as individuals – as genders

  • How many symbols in this question?

– as letters – as words

  • NOTA BENE: the answers depend on the

referent and on the “filter” chosen!

slide-30
SLIDE 30

From binary to decimal code

.. 8 4 2 1 .. 23 22 21 20 0 0 0 0 = 0 0 1 0 0 = 4 0 1 0 1 = 4 + 1 = 5 1 1 1 1 = 8 + 4 + 2 + 1 = 15

slide-31
SLIDE 31

From binary to decimal code

.. 8 4 2 1 .. 23 22 21 20 0 0 0 0 = 0 0 1 0 0 = 4 0 1 0 1 = 4 + 1 = 5 1 1 1 1 = 8 + 4 + 2 + 1 = 15

  • N bits index 2N integers, from 0 to 2N-1
slide-32
SLIDE 32

From binary to decimal code

.. 8 4 2 1 .. 23 22 21 20 0 0 0 0 = 0 0 1 0 0 = 4 0 1 0 1 = 4 + 1 = 5 1 1 1 1 = 8 + 4 + 2 + 1 = 15

  • N bits index 2N integers, from 0 to 2N-1
  • Exercise:

– write 9 with 4 bits. – write 01010 in decimal. – how many bits we need to write 5632?

slide-33
SLIDE 33

Encoding

slide-34
SLIDE 34

Idea: instead of transmitting the

  • riginal analog signal...
slide-35
SLIDE 35

encoding

decoding

...what if we transmit the correspondent digital signal?

slide-36
SLIDE 36

encoding

decoding

..as we are doing this trasformation, we can choose if there is an encoding more efficient than others!

slide-37
SLIDE 37

Information

  • For instance, we could use the statistical

information we know about the source.

slide-38
SLIDE 38

Information

  • For instance, we could use the statistical

information we know about the source.

  • Intuitively

– common symbols transport less information – rare symbols transport more information

  • It can be interpreted

as the surprise, the unexpectedness of x.

slide-39
SLIDE 39

Information

  • For instance, we could use the statistical

information we know about the source.

  • Intuitively

– common symbols transport less information – rare symbols transport more information

  • common/rare to WHO?
slide-40
SLIDE 40
slide-41
SLIDE 41

Information

  • Suppose each symbol x is extracted from the

source with a certain probability p

  • We define the information associated to the

symbol x, in respect to the source: I(x) = - Log2(p)

slide-42
SLIDE 42

Information

  • Suppose each symbol x is extracted from the

source with a certain probability p

  • We define the information associated to the

symbol x, in respect to the source: I(x) = - Log2(p)

  • Unit of measure: bit
slide-43
SLIDE 43

1 I = -log2(p) I p 0.5 1

  • 0 ≤ p ≤ 1
  • Ex. fair coin: 2 symbols (head, tail)

p(head) = 1/2, I(head) = 1 bit

How to draw the Log

slide-44
SLIDE 44

Multiple extractions

  • Assuming the symbols are statistically

independent, we can calculate the probability of multiple extractions in this way: p(x AND y) = p(x) * p(y) I(x AND y) = I(x) + I(y)

slide-45
SLIDE 45

Entropy

  • Entropy is the average quantity of information
  • f the source

H = p(x) * I(x) + p(y) * I(y) … = - p(x) * Log2(p(x)) - p(y) * Log2(p(y)) … It can be interpreted as the average missing information (required to specify an outcome x when we now the source probability distribution).

  • Unit of measure: bit/symbol
slide-46
SLIDE 46

Entropy

  • Entropy is the average quantity of information
  • f the source

H = p(x) * I(x) + p(y) * I(y) … = - p(x) * Log2(p(x)) - p(y) * Log2(p(y)) …

  • It depends on the alphabet of symbols of the

source and the associated probability distribution.

  • Ex. fair coin:

H = 0.5 * 1 + 0.5 * 1 = 1

slide-47
SLIDE 47

Maximum Entropy

  • The maximum entropy of a source of N symbols is:

max H = Log2(N)

  • It is obtained only when all symbols have the same

probability.

slide-48
SLIDE 48

Maximum Entropy and Redundancy

  • The maximum entropy of a source of N symbols is:

max H = Log2(N)

  • It is obtained only when all symbols have the same

probability.

  • A measure for redundancy:

Redundancy = (max H - actual H)/max H

slide-49
SLIDE 49

Exercise

  • Calculate the information per symbol for a

source with an alphabet of statistically independent symbols, with equal probability,

– consisting of 1 symbol. – consisting of 2 symbols. – consisting of 16 symbols.

  • How much the entropy?
slide-50
SLIDE 50

Exercise

  • Calculate the entropy of a source with an alphabet

consisting of 4 symbols with these probability: p1 = 1/2 p2 = 1/4 p3 = p4 = 1/8

  • What is the entropy if the symbols are equally

probable?

  • What is the redundancy?
slide-51
SLIDE 51

Compression

slide-52
SLIDE 52

Source encoding

  • In order to reduce the resource requirements

(bandwith, power, etc.) we are interested to minimize the average length of the words of the code.

slide-53
SLIDE 53

encoding

decoding

Goal: reduce the use of signal

slide-54
SLIDE 54

encoding

decoding

Goal: reduce the use of signal basic idea: associate short codes to more frequent symbols

slide-55
SLIDE 55

encoding

decoding

Goal: reduce the use of signal we are operating a compression on the messages! basic idea: associate short codes to more frequent symbols

slide-56
SLIDE 56

Huffman algorithm

  • produces an optimal encoding (as average length).
  • 3-steps:

– order symbols according to their probability – group by two the least probable symbols, and

sum up their probabilities associated to a new equivalent compound symbol

– repeat until you obtain only one equivalent

compound symbol with probability 1

slide-57
SLIDE 57

Example: Huffman algorithm

  • Source counting 5 symbols with probability 1/3,

1/4, 1/6, 1/6, 1/12.

slide-58
SLIDE 58

Example: Huffman algorithm

A] 1/3 B] 1/4 C] 1/6 D] 1/6 E] 1/12

slide-59
SLIDE 59

Example: Huffman algorithm

A] 1/3 B] 1/4 C] 1/6 D] 1/6 E] 1/12

slide-60
SLIDE 60

Example: Huffman algorithm

A] 1/3 B] 1/4 C] 1/6 D] 1/6 E] 1/12

1

1/4

slide-61
SLIDE 61

Example: Huffman algorithm

A] 1/3 B] 1/4 C] 1/6 D] 1/6 E] 1/12

1

1/4

slide-62
SLIDE 62

Example: Huffman algorithm

A] 1/3 B] 1/4 C] 1/6 D] 1/6 E] 1/12

1

1/4

1

5/12

slide-63
SLIDE 63

Example: Huffman algorithm

A] 1/3 = 4/12 B] 1/4 = 3/12 C] 1/6 D] 1/6 E] 1/12

1

1/4

1

5/12

slide-64
SLIDE 64

Example: Huffman algorithm

A] 1/3 = 4/12 B] 1/4 = 3/12 C] 1/6 D] 1/6 E] 1/12

1

1/4

1 1

7/12 5/12

slide-65
SLIDE 65

Example: Huffman algorithm

A] 1/3 B] 1/4 C] 1/6 D] 1/6 E] 1/12

1

1/4

1

5/12

1

7/12

1

1

slide-66
SLIDE 66

Example: Huffman algorithm

A] 1/3 B] 1/4 C] 1/6 D] 1/6 E] 1/12

1

1/4

1

5/12

1

7/12

1

1 Reading codes from the root!

slide-67
SLIDE 67

Example: Huffman algorithm

A] 1/3 B] 1/4 C] 1/6 D] 1/6 E] 1/12

1

1/4

1

5/12

1

7/12

1

1 Reading codes from the root!

00 01 10 110 111

slide-68
SLIDE 68

Source Coding Theorem

  • Given a source with entropy H, it is always

possible to find an encoding which satisfies: H ≤ average code length < H + 1

slide-69
SLIDE 69

Source Coding Theorem

  • Given a source with entropy H, it is always

possible to find an encoding which satisfies: H ≤ average code length < H + 1

In the previous exercise: H = - 1/3 * Log2 (1/3) - 1/4 * Log2 (1/4) - … ACL = 2 * 1/3 + 2 * 1/4 + .. + 3 * 1/12 H = 2.19, ACL = 2.25

slide-70
SLIDE 70

Exercise

  • Propose an encoding for a communication system

associated to a sensor placed in a rainforest.

  • The sensor recognizes the warbles/tweets of birds

from several species..

slide-71
SLIDE 71
slide-72
SLIDE 72

toucan

slide-73
SLIDE 73

parrot

slide-74
SLIDE 74

hornbill

slide-75
SLIDE 75

eagle

slide-76
SLIDE 76

Exercise

  • Propose an encoding for a communication system

associated to a sensor placed in a rainforest.

  • The sensor recognizes the warbles/tweets of birds

from several species, whose presence is described by these statistics: p(toucan) = 1/3 p(parrot) = 1/2 p(eagle) = 1/24 p(hornbill) = 1/8

  • Which of the assumptions you have used

may be critical in this scenario?

slide-77
SLIDE 77

Noise

slide-78
SLIDE 78

entropy redundancy encoding, compression

slide-79
SLIDE 79

Type of noise

  • Noise can be seen as an unintented source which

interferes with the intented one.

slide-80
SLIDE 80

Type of noise

  • Noise can be seen as an unintented source which

interferes with the intented one.

  • In terms of the outcomes, the communication

channel may suffer of two types of interferences:

– data received but unwanted

slide-81
SLIDE 81

Type of noise

  • Noise can be seen as an unintented source which

interferes with the intented one.

  • In terms of the outcomes, the communication

channel may suffer of two types of interferences:

– data received but unwanted – data sent never received

slide-82
SLIDE 82

Binary Simmetric Channel

  • A binary symmetric channel (BSC) models the case

that a binary input is flipped before the output.

1 1

Input Output pe 1 - pe 1 - pe pe pe = error probability 1 - pe = probability

  • f correct

transmission

slide-83
SLIDE 83

Binary Simmetric Channel

  • Probability of transmissions on 1 bit

Input Output → 1 – pe 1 → pe

  • Probability of transmissions on 2 bit

Input Output 0 0 0 0 → ( 1 – pe ) * ( 1 – pe ) 0 0 0 1 → ( 1 – pe ) * pe 0 0 1 0 → pe * ( 1 – pe ) 0 0 1 1 → pe * pe

slide-84
SLIDE 84

Exercise

  • Consider messages of 3 bits,

– what is the probability of 2 bits inversion? – what is the probability of error?

slide-85
SLIDE 85

Error detection

slide-86
SLIDE 86

Simple error detection

  • Parity check

– A parity bit is added at the end of a of a string of

bits (eg. 7): 0 if the number of 1 is even, 1 if odd Coding : 0000000 → 00000000 1001001 → 10010011 0111111 → 01111110

slide-87
SLIDE 87

Example of error detection

  • Parity check

– A parity bit is added at the end of a of a string of

bits (eg. 7): 0 if the number of 1 is even, 1 if odd Decoding while detecting errors 01111110 →

  • k

00100000 → error detected 10111011 → error not detected!

slide-88
SLIDE 88

Exercise

  • Add the parity bit

Perform the parity check 01100011010? 1110001010111 01011100? 0001110011 0010010001? 1001110100 1111011100100? 11011

slide-89
SLIDE 89

Exercise

  • Consider messages of 2 bits + 1 parity bit.
  • What is the probability to detect the error?
slide-90
SLIDE 90

Error correction

slide-91
SLIDE 91

Simple error correction

  • Forward Error Correction with (3, 1) repetition,

each bit is repeated two times more. Coding : → 000 1 → 111 11 → 111111 010 → 000111000

slide-92
SLIDE 92

Simple error correction

  • Forward Error Correction with (3, 1) repetition,

each bit is repeated two times more. Decoding (while correcting errors) 010 → 011 → 1 111101 → 11 100011000 → 010

slide-93
SLIDE 93

Exercise

  • Decode and identify the errors on the following

encoding: 011000110101 010111001000 001001000011 111011001001

slide-94
SLIDE 94

Summary

slide-95
SLIDE 95

entropy redundancy encoding, compression decoding, error detection, error correction channel capacity

slide-96
SLIDE 96

Main points - Entropy

  • In Information Science, Entropy is a measure of

the uncertainty at the reception point of messages generated by a source.

  • Greater entropy, greater signal randomness
  • Less entropy, more redundancy.
slide-97
SLIDE 97

Main points - Entropy

  • In Information Science, Entropy is a measure of

the uncertainty at the reception point of messages generated by a source.

  • Greater entropy, greater signal randomness
  • Less entropy, more redundancy.
  • It depends on what counts as symbol and their

probability distributions, which are always taken by an observer.

slide-98
SLIDE 98

Side comment - Entropy

  • In Physics, Entropy is a function related to the

amount of disorder. It always increases (even if locally may decrease).

slide-99
SLIDE 99

Side comment - Entropy

  • In Physics, Entropy is a function related to the

amount of disorder. It always increases (even if locally may decrease).

slide-100
SLIDE 100

Main points – Redundancy & Noise

  • As all communications suffer to a certain extent

from noise, adding some redundancy is good for transmission, as it helps in detecting or even correcting certain errors.

slide-101
SLIDE 101

Main points – Redundancy & Noise

  • As all communications suffer to a certain extent

from noise, adding some redundancy is good for transmission, as it helps in detecting or even correcting certain errors.

  • Example:

(Some People Can Read This)

Somr Peoplt Cat Rea Tis

slide-102
SLIDE 102

Main points – Redundancy & Noise

  • As all communications suffer to a certain extent

from noise, adding some redundancy is good for transmission, as it helps in detecting or even correcting certain errors.

  • Example:

(SM PPL CN RD THS)

SMR PPLT CT R TS

slide-103
SLIDE 103

Main points – Redundancy & Noise

  • As all communications suffer to a certain extent

from noise, adding some redundancy is good for transmission, as it helps in detecting or even correcting certain errors.

  • Example:

Some People Can Read This → Somr Peoplt Cat Rea Tis SM PPL CN RD THS → SMR PPLT CT R TS

  • The redundancy is expressed by the correlation

between letters composing words! (independent probability assumption not valid!)

slide-104
SLIDE 104

Literature

Shannon, C. E. (1948). A mathematical theory of communication. The Bell System Technical Journal, 27, 379–423/623–656. Weaver, W. (1949). Recent contributions to the mathematical theory of

  • communication. The mathematical theory of communication.

Floridi, L. (2009). Philosophical conceptions of information. Formal Theories of Information, (2), 13–53. Guizzo, E. M. (2003). The essential message: Claude Shannon and the making of information theory. Massachusetts Institute of Technology. Lesne, A. (2014). Shannon entropy: a rigorous notion at the crossroads between probability, information theory, dynamical systems and statistical

  • physics. Mathematical Structures in Computer Science, 24(3).