• Ei tuloksia

Autumn2012 Lecture4:NoisyChannelCodingJyrkiKivinen Information-TheoreticModeling

N/A
N/A
Info
Lataa
Protected

Academic year: 2022

Jaa "Autumn2012 Lecture4:NoisyChannelCodingJyrkiKivinen Information-TheoreticModeling"

Copied!
90
0
0

Kokoteksti

(1)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Information-Theoretic Modeling

Lecture 4: Noisy Channel Coding

Jyrki Kivinen

Department of Computer Science, University of Helsinki

Autumn 2012

(2)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Lecture 4: Noisy Channel Coding

(3)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

1 Noisy Channels

Reliable communication Error correcting codes Repetition codes

2 Channel Coding and Shannon’s 2nd Theorem Channel capacity

Codes and rates

Channel coding theorem

3 Hamming Codes Parity Check Codes Hamming (7,4)

(4)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

1 Noisy Channels

Reliable communication Error correcting codes Repetition codes

2 Channel Coding and Shannon’s 2nd Theorem Channel capacity

Codes and rates

Channel coding theorem

3 Hamming Codes Parity Check Codes Hamming (7,4)

(5)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

1 Noisy Channels

Reliable communication Error correcting codes Repetition codes

2 Channel Coding and Shannon’s 2nd Theorem Channel capacity

Codes and rates

Channel coding theorem

3 Hamming Codes Parity Check Codes Hamming (7,4)

(6)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

1 Noisy Channels

Reliable communication Error correcting codes Repetition codes

2 Channel Coding and Shannon’s 2nd Theorem Channel capacity

Codes and rates

Channel coding theorem

3 Hamming Codes Parity Check Codes Hamming (7,4)

(7)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Reliable communication

In practice, most media are not perfect —noisy channels:

Modem line Satellite link Hard disk

Can we recover the original message (without errors) from a noisy code string?

(8)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Reliable communication

In practice, most media are not perfect —noisy channels:

Modem line

Satellite link Hard disk

Can we recover the original message (without errors) from a noisy code string?

(9)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Reliable communication

In practice, most media are not perfect —noisy channels:

Modem line Satellite link

Hard disk

Can we recover the original message (without errors) from a noisy code string?

(10)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Reliable communication

In practice, most media are not perfect —noisy channels:

Modem line Satellite link Hard disk

Can we recover the original message (without errors) from a noisy code string?

(11)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Reliable communication

In practice, most media are not perfect —noisy channels:

Modem line Satellite link Hard disk

Can we recover the original message (without errors) from a noisy code string?

(12)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Error correcting codes

source string decoded string

encoder noisy

channel decoder

We want to minimize two things:

1 Length of the code string.

2 Probability of error.

(13)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Error correcting codes

source string decoded string

encoder noisy

channel decoder

We want to minimize two things:

1 Length of the code string.

2 Probability of error.

(14)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Repetition codes

A simple idea: Just repeat the original string many times.

T R A N S M I S S I O N TTTRRRAAANNNSSSMMMIIISSSSSSIIIOOONNN TTTHRRAAANNBSSSMMMIIISSSSWSPILOOONNG T R A N S M I S S ? O N Transmission ratereduced to 1 : 3.

If errors independent and symmetric, probability of error reduced to 3(1−p)p2+p3 ≈3p2, where p is the error rate of the channel.

(15)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Repetition codes

A simple idea: Just repeat the original string many times.

Get it? Get it? Get it? Get it? Get it? Get it? Get it? Get it? Get it?

T R A N S M I S S I O N TTTRRRAAANNNSSSMMMIIISSSSSSIIIOOONNN TTTHRRAAANNBSSSMMMIIISSSSWSPILOOONNG T R A N S M I S S ? O N Transmission ratereduced to 1 : 3.

If errors independent and symmetric, probability of error reduced to 3(1−p)p2+p3 ≈3p2, where p is the error rate of the channel.

(16)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Repetition codes

A simple idea: Just repeat the original string many times.

T R A N S M I S S I O N

TTTRRRAAANNNSSSMMMIIISSSSSSIIIOOONNN TTTHRRAAANNBSSSMMMIIISSSSWSPILOOONNG T R A N S M I S S ? O N Transmission ratereduced to 1 : 3.

If errors independent and symmetric, probability of error reduced to 3(1−p)p2+p3 ≈3p2, where p is the error rate of the channel.

(17)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Repetition codes

A simple idea: Just repeat the original string many times.

T R A N S M I S S I O N TTTRRRAAANNNSSSMMMIIISSSSSSIIIOOONNN

TTTHRRAAANNBSSSMMMIIISSSSWSPILOOONNG T R A N S M I S S ? O N Transmission ratereduced to 1 : 3.

If errors independent and symmetric, probability of error reduced to 3(1−p)p2+p3 ≈3p2, where p is the error rate of the channel.

(18)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Repetition codes

A simple idea: Just repeat the original string many times.

T R A N S M I S S I O N TTTRRRAAANNNSSSMMMIIISSSSSSIIIOOONNN TTTHRRAAANNBSSSMMMIIISSSSWSPILOOONNG

T R A N S M I S S ? O N Transmission ratereduced to 1 : 3.

If errors independent and symmetric, probability of error reduced to 3(1−p)p2+p3 ≈3p2, where p is the error rate of the channel.

(19)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Repetition codes

A simple idea: Just repeat the original string many times.

T R A N S M I S S I O N TTTRRRAAANNNSSSMMMIIISSSSSSIIIOOONNN TTTHRRAAANNBSSSMMMIIISSSSWSPILOOONNG T R A N S M I S S ? O N

Transmission ratereduced to 1 : 3.

If errors independent and symmetric, probability of error reduced to 3(1−p)p2+p3 ≈3p2, where p is the error rate of the channel.

(20)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Repetition codes

A simple idea: Just repeat the original string many times.

T R A N S M I S S I O N TTTRRRAAANNNSSSMMMIIISSSSSSIIIOOONNN TTTHRRAAANNBSSSMMMIIISSSSWSPILOOONNG T R A N S M I S S ? O N Transmission ratereduced to 1 : 3.

If errors independent and symmetric, probability of error reduced to 3(1−p)p2+p3 ≈3p2, where p is the error rate of the channel.

(21)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Reliable communication Error correcting codes Repetition codes

Repetition codes

A simple idea: Just repeat the original string many times.

T R A N S M I S S I O N TTTRRRAAANNNSSSMMMIIISSSSSSIIIOOONNN TTTHRRAAANNBSSSMMMIIISSSSWSPILOOONNG T R A N S M I S S ? O N Transmission ratereduced to 1 : 3.

If errors independent and symmetric, probability of error reduced to 3(1−p)p2+p3 ≈3p2, wherep is the error rate of the channel.

(22)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

1 Noisy Channels

Reliable communication Error correcting codes Repetition codes

2 Channel Coding and Shannon’s 2nd Theorem Channel capacity

Codes and rates

Channel coding theorem

3 Hamming Codes Parity Check Codes Hamming (7,4)

(23)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity: basic intuition

We are going to define thechannel capacity C purely in terms of the probabilistic properties of the channel.

We consider encoding messages ofb bits into code wordsof b/R bits, for somerate0<R <1.

Error is the event that the original message cannot be correctly decoded from the received code word.

We say a rate R is achievableusing a channel, if there is an encoding such that the probability of error goes to zero as b increases.

The Source Coding Theorem, or Shannon’s Second Theorem, says rateR is achievable ifR<C, and not achievable if R >C.

(24)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity: basic intuition

We are going to define thechannel capacity C purely in terms of the probabilistic properties of the channel.

We consider encoding messages ofb bits into code wordsof b/R bits, for somerate0<R <1.

Error is the event that the original message cannot be correctly decoded from the received code word.

We say a rate R is achievableusing a channel, if there is an encoding such that the probability of error goes to zero as b increases.

The Source Coding Theorem, or Shannon’s Second Theorem, says rateR is achievable ifR<C, and not achievable if R >C.

(25)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity: basic intuition

We are going to define thechannel capacity C purely in terms of the probabilistic properties of the channel.

We consider encoding messages ofb bits into code wordsof b/R bits, for somerate0<R <1.

Error is the event that the original message cannot be correctly decoded from the received code word.

We say a rate R is achievableusing a channel, if there is an encoding such that the probability of error goes to zero as b increases.

The Source Coding Theorem, or Shannon’s Second Theorem, says rateR is achievable ifR<C, and not achievable if R >C.

(26)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity: basic intuition

We are going to define thechannel capacity C purely in terms of the probabilistic properties of the channel.

We consider encoding messages ofb bits into code wordsof b/R bits, for somerate0<R <1.

Error is the event that the original message cannot be correctly decoded from the received code word.

We say a rate R is achievableusing a channel, if there is an encoding such that the probability of error goes to zero as b increases.

The Source Coding Theorem, or Shannon’s Second Theorem, says rateR is achievable ifR<C, and not achievable if R >C.

(27)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity: basic intuition

We are going to define thechannel capacity C purely in terms of the probabilistic properties of the channel.

We consider encoding messages ofb bits into code wordsof b/R bits, for somerate0<R <1.

Error is the event that the original message cannot be correctly decoded from the received code word.

We say a rate R is achievableusing a channel, if there is an encoding such that the probability of error goes to zero as b increases.

The Source Coding Theorem, or Shannon’s Second Theorem, says rateR is achievable ifR<C, and not achievable if R >C.

(28)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

Binary symmetric channel (BSC), error ratep:

Pr[y = 1|x = 0] = Pr[y = 0|x= 1] =p wherex is the transmitted andy the received bit

We define channel capacityas C(p) = 1−H(p) = 1−

plog2 1

p + (1−p) log2 1 1−p

. For instance,C(0.1)≈0.53. Ratio about 1 : 2.

(29)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

Binary symmetric channel (BSC), error ratep:

Pr[y = 1|x = 0] = Pr[y = 0|x= 1] =p wherex is the transmitted andy the received bit We define channel capacityas

C(p) = 1−H(p) = 1−

plog2 1

p + (1−p) log2 1 1−p

.

For instance,C(0.1)≈0.53. Ratio about 1 : 2.

(30)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

Binary symmetric channel (BSC), error ratep:

Pr[y = 1|x = 0] = Pr[y = 0|x= 1] =p wherex is the transmitted andy the received bit We define channel capacityas

C(p) = 1−H(p) = 1−

plog2 1

p + (1−p) log2 1 1−p

. For instance,C(0.1)≈0.53. Ratio about 1 : 2.

(31)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

For channels other than BSC, the channel capacity is more generally defined as

C = max

pX

I(X,Y) = max

pX

(H(Y)−H(Y |X)) X is the transmitted andY the received symbol

I is calculated with respect to pX,Y(x,y) =pX(x)pY|X(y |x) pY|X is defined by the channed characteristics.

Intuition:

for a large capacity, we wantY to carry a lot of information however, knowingX should remove most of the uncertainty about Y

we can get a favourable pX by choosing a suitable coding.

(32)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

For channels other than BSC, the channel capacity is more generally defined as

C = max

pX

I(X,Y) = max

pX

(H(Y)−H(Y |X)) X is the transmitted andY the received symbol

I is calculated with respect to pX,Y(x,y) =pX(x)pY|X(y |x) pY|X is defined by the channed characteristics.

Intuition:

for a large capacity, we wantY to carry a lot of information however, knowingX should remove most of the uncertainty about Y

we can get a favourable pX by choosing a suitable coding.

(33)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

For channels other than BSC, the channel capacity is more generally defined as

C = max

pX

I(X,Y) = max

pX

(H(Y)−H(Y |X)) X is the transmitted andY the received symbol

I is calculated with respect to pX,Y(x,y) =pX(x)pY|X(y |x) pY|X is defined by the channed characteristics.

Intuition:

for a large capacity, we wantY to carry a lot of information

however, knowingX should remove most of the uncertainty about Y

we can get a favourable pX by choosing a suitable coding.

(34)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

For channels other than BSC, the channel capacity is more generally defined as

C = max

pX

I(X,Y) = max

pX

(H(Y)−H(Y |X)) X is the transmitted andY the received symbol

I is calculated with respect to pX,Y(x,y) =pX(x)pY|X(y |x) pY|X is defined by the channed characteristics.

Intuition:

for a large capacity, we wantY to carry a lot of information however, knowingX should remove most of the uncertainty about Y

we can get a favourable pX by choosing a suitable coding.

(35)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

For channels other than BSC, the channel capacity is more generally defined as

C = max

pX

I(X,Y) = max

pX

(H(Y)−H(Y |X)) X is the transmitted andY the received symbol

I is calculated with respect to pX,Y(x,y) =pX(x)pY|X(y |x) pY|X is defined by the channed characteristics.

Intuition:

for a large capacity, we wantY to carry a lot of information however, knowingX should remove most of the uncertainty about Y

we can get a favourablepX by choosing a suitable coding.

(36)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

Example 1: BSC

Choosing uniformpX gives the maximumI(X;Y) = 1−H(p)

(exercise)

Example 2: Noisy typewriter

The maximum is obtained for uniform pX (symmetricity) with uniform pX, also pY is uniform over 26 symbols

⇒ H(Y) = log226

if X is known, there are two equally probable values Y

⇒ H(Y |X) = log22 = 1

so I(X;Y) = log226−1 = log213 (capacity 13 bits per transmission)

(37)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

Example 1: BSC

Choosing uniformpX gives the maximumI(X;Y) = 1−H(p) (exercise)

Example 2: Noisy typewriter

The maximum is obtained for uniform pX (symmetricity) with uniform pX, also pY is uniform over 26 symbols

⇒ H(Y) = log226

if X is known, there are two equally probable values Y

⇒ H(Y |X) = log22 = 1

so I(X;Y) = log226−1 = log213 (capacity 13 bits per transmission)

(38)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

Example 1: BSC

Choosing uniformpX gives the maximumI(X;Y) = 1−H(p) (exercise)

Example 2: Noisy typewriter

The maximum is obtained for uniform pX (symmetricity) with uniform pX, also pY is uniform over 26 symbols

⇒ H(Y) = log226

if X is known, there are two equally probable values Y

⇒ H(Y |X) = log22 = 1

so I(X;Y) = log226−1 = log213 (capacity 13 bits per transmission)

(39)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

Example 1: BSC

Choosing uniformpX gives the maximumI(X;Y) = 1−H(p) (exercise)

Example 2: Noisy typewriter

The maximum is obtained for uniform pX (symmetricity)

with uniform pX, also pY is uniform over 26 symbols

⇒ H(Y) = log226

if X is known, there are two equally probable values Y

⇒ H(Y |X) = log22 = 1

so I(X;Y) = log226−1 = log213 (capacity 13 bits per transmission)

(40)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

Example 1: BSC

Choosing uniformpX gives the maximumI(X;Y) = 1−H(p) (exercise)

Example 2: Noisy typewriter

The maximum is obtained for uniform pX (symmetricity) with uniform pX, also pY is uniform over 26 symbols

⇒ H(Y) = log226

if X is known, there are two equally probable values Y

⇒ H(Y |X) = log22 = 1

so I(X;Y) = log226−1 = log213 (capacity 13 bits per transmission)

(41)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

Example 1: BSC

Choosing uniformpX gives the maximumI(X;Y) = 1−H(p) (exercise)

Example 2: Noisy typewriter

The maximum is obtained for uniform pX (symmetricity) with uniform pX, also pY is uniform over 26 symbols

⇒ H(Y) = log226

if X is known, there are two equally probable values Y

⇒ H(Y |X) = log22 = 1

so I(X;Y) = log226−1 = log213 (capacity 13 bits per transmission)

(42)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel Capacity

Example 1: BSC

Choosing uniformpX gives the maximumI(X;Y) = 1−H(p) (exercise)

Example 2: Noisy typewriter

The maximum is obtained for uniform pX (symmetricity) with uniform pX, also pY is uniform over 26 symbols

⇒ H(Y) = log226

if X is known, there are two equally probable values Y

⇒ H(Y |X) = log22 = 1

so I(X;Y) = log226−1 = log213 (capacity 13 bits per transmission)

(43)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

For simplicity, we consider BSC unless we say otherwise.

Messageswe want to send are blocks of b bits.

Thus, there areM = 2b possible messages. We encode a message into code wordsof n bits.

So generally we need n≥log2M =b.

Notation:

W ∈ {1, . . . ,M}: (index of) a message

Xn=f(W)∈ {0,1}n: code word for messageW

Yn∈ {0,1}n: received code word (noisy version ofXn(W)) Wˆ =g(Yn)∈ {1, . . . ,M}: our guess about what the correct message was.

The rateof the code isR = (log2M)/n.

(44)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

For simplicity, we consider BSC unless we say otherwise.

Messageswe want to send are blocks of b bits.

Thus, there areM = 2b possible messages.

We encode a message into code wordsof n bits.

So generally we need n≥log2M =b.

Notation:

W ∈ {1, . . . ,M}: (index of) a message

Xn=f(W)∈ {0,1}n: code word for messageW

Yn∈ {0,1}n: received code word (noisy version ofXn(W)) Wˆ =g(Yn)∈ {1, . . . ,M}: our guess about what the correct message was.

The rateof the code isR = (log2M)/n.

(45)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

For simplicity, we consider BSC unless we say otherwise.

Messageswe want to send are blocks of b bits.

Thus, there areM = 2b possible messages.

We encode a message into code wordsof n bits.

So generally we need n≥log2M =b. Notation:

W ∈ {1, . . . ,M}: (index of) a message

Xn=f(W)∈ {0,1}n: code word for messageW

Yn∈ {0,1}n: received code word (noisy version ofXn(W)) Wˆ =g(Yn)∈ {1, . . . ,M}: our guess about what the correct message was.

The rateof the code isR = (log2M)/n.

(46)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

For simplicity, we consider BSC unless we say otherwise.

Messageswe want to send are blocks of b bits.

Thus, there areM = 2b possible messages.

We encode a message into code wordsof n bits.

So generally we need n≥log2M =b.

Notation:

W ∈ {1, . . . ,M}: (index of) a message

Xn=f(W)∈ {0,1}n: code word for messageW

Yn∈ {0,1}n: received code word (noisy version ofXn(W)) Wˆ =g(Yn)∈ {1, . . . ,M}: our guess about what the correct message was.

The rateof the code isR = (log2M)/n.

(47)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

For simplicity, we consider BSC unless we say otherwise.

Messageswe want to send are blocks of b bits.

Thus, there areM = 2b possible messages.

We encode a message into code wordsof n bits.

So generally we need n≥log2M =b.

Notation:

W ∈ {1, . . . ,M}: (index of) a message

Xn=f(W)∈ {0,1}n: code word for messageW

Yn∈ {0,1}n: received code word (noisy version ofXn(W)) Wˆ =g(Yn)∈ {1, . . . ,M}: our guess about what the correct message was.

The rateof the code isR = (log2M)/n.

(48)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

For simplicity, we consider BSC unless we say otherwise.

Messageswe want to send are blocks of b bits.

Thus, there areM = 2b possible messages.

We encode a message into code wordsof n bits.

So generally we need n≥log2M =b.

Notation:

W ∈ {1, . . . ,M}: (index of) a message

Xn=f(W)∈ {0,1}n: code word for messageW

Yn∈ {0,1}n: received code word (noisy version ofXn(W)) Wˆ =g(Yn)∈ {1, . . . ,M}: our guess about what the correct message was.

The rateof the code isR = (log2M)/n.

(49)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

For simplicity, we consider BSC unless we say otherwise.

Messageswe want to send are blocks of b bits.

Thus, there areM = 2b possible messages.

We encode a message into code wordsof n bits.

So generally we need n≥log2M =b.

Notation:

W ∈ {1, . . . ,M}: (index of) a message

Xn=f(W)∈ {0,1}n: code word for messageW

Yn∈ {0,1}n: received code word (noisy version ofXn(W)) Wˆ =g(Yn)∈ {1, . . . ,M}: our guess about what the correct message was.

The rateof the code isR = (log2M)/n.

(50)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

For simplicity, we consider BSC unless we say otherwise.

Messageswe want to send are blocks of b bits.

Thus, there areM = 2b possible messages.

We encode a message into code wordsof n bits.

So generally we need n≥log2M =b.

Notation:

W ∈ {1, . . . ,M}: (index of) a message

Xn=f(W)∈ {0,1}n: code word for messageW

Yn∈ {0,1}n: received code word (noisy version ofXn(W))

Wˆ =g(Yn)∈ {1, . . . ,M}: our guess about what the correct message was.

The rateof the code isR = (log2M)/n.

(51)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

For simplicity, we consider BSC unless we say otherwise.

Messageswe want to send are blocks of b bits.

Thus, there areM = 2b possible messages.

We encode a message into code wordsof n bits.

So generally we need n≥log2M =b.

Notation:

W ∈ {1, . . . ,M}: (index of) a message

Xn=f(W)∈ {0,1}n: code word for messageW

Yn∈ {0,1}n: received code word (noisy version ofXn(W)) Wˆ =g(Yn)∈ {1, . . . ,M}: our guess about what the correct message was.

The rateof the code isR = (log2M)/n.

(52)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

For simplicity, we consider BSC unless we say otherwise.

Messageswe want to send are blocks of b bits.

Thus, there areM = 2b possible messages.

We encode a message into code wordsof n bits.

So generally we need n≥log2M =b.

Notation:

W ∈ {1, . . . ,M}: (index of) a message

Xn=f(W)∈ {0,1}n: code word for messageW

Yn∈ {0,1}n: received code word (noisy version ofXn(W)) Wˆ =g(Yn)∈ {1, . . . ,M}: our guess about what the correct message was.

The rateof the code isR = (log2M)/n.

(53)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

Letλw, for w ∈ {1, . . . ,M}, denote the probability that message w was sent but not correctly received.

We can write this as

λw = X

y6∈g−1(w)

p(y |X =f(w))

whereg−1(w) ={y |g(y) =w}. Average error: ¯λ= M1 P

wλw Maximum error: λmax = maxwλw

(54)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

Letλw, for w ∈ {1, . . . ,M}, denote the probability that message w was sent but not correctly received.

We can write this as

λw = X

y6∈g−1(w)

p(y |X =f(w))

whereg−1(w) ={y |g(y) =w}.

Average error: ¯λ= M1 P

wλw Maximum error: λmax = maxwλw

(55)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

Letλw, for w ∈ {1, . . . ,M}, denote the probability that message w was sent but not correctly received.

We can write this as

λw = X

y6∈g−1(w)

p(y |X =f(w))

whereg−1(w) ={y |g(y) =w}.

Average error: ¯λ= M1 P

wλw

Maximum error: λmax = maxwλw

(56)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Codes and rates

Letλw, for w ∈ {1, . . . ,M}, denote the probability that message w was sent but not correctly received.

We can write this as

λw = X

y6∈g−1(w)

p(y |X =f(w))

whereg−1(w) ={y |g(y) =w}.

Average error: ¯λ= M1 P

wλw Maximum error: λmax = maxwλw

(57)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

A rateR is achievableif there is a sequence of codes, for increasingly large code word lengthsn, such that asn goes to infinity, the maximum errorλmax goes to zero.

Channel Coding Theorem

IfR<C, whereC is the channel capacity, then rate R is achievable.

IfR>C, then rateR is not achievable.

In other words, for any given >0 and R<C, for large enoughb we can encode messages ofb bits into code words of n=b/R bits so that the probability of error is at most.

This is also known as Shannon’s Second Theorem (the first one being the Source Coding Theorem).

(58)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

A rateR is achievableif there is a sequence of codes, for increasingly large code word lengthsn, such that asn goes to infinity, the maximum errorλmax goes to zero.

Channel Coding Theorem

IfR<C, whereC is the channel capacity, then rate R is achievable.

IfR>C, then rateR is not achievable.

In other words, for any given >0 and R<C, for large enoughb we can encode messages ofb bits into code words of n=b/R bits so that the probability of error is at most.

This is also known as Shannon’s Second Theorem (the first one being the Source Coding Theorem).

(59)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

A rateR is achievableif there is a sequence of codes, for increasingly large code word lengthsn, such that asn goes to infinity, the maximum errorλmax goes to zero.

Channel Coding Theorem

IfR<C, whereC is the channel capacity, then rate R is achievable.

IfR>C, then rateR is not achievable.

In other words, for any given >0 and R<C, for large enoughb we can encode messages ofb bits into code words of n=b/R bits so that the probability of error is at most.

This is also known as Shannon’s Second Theorem (the first one being the Source Coding Theorem).

(60)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

A rateR is achievableif there is a sequence of codes, for increasingly large code word lengthsn, such that asn goes to infinity, the maximum errorλmax goes to zero.

Channel Coding Theorem

IfR<C, whereC is the channel capacity, then rate R is achievable.

IfR>C, then rateR is not achievable.

In other words, for any given >0 and R<C, for large enoughb we can encode messages ofb bits into code words of n=b/R bits so that the probability of error is at most.

(61)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

Channel Coding Theorem—So what?

Assume you want to transmit data with probability of error 10−15 over a BSC,p = 0.1. Using a repetition code, we need to make the message63 times as long as the source string.

Shannon’s result says twice as long is enough.

If you want probability of error 10−100, Shannon’s result still says that twice is enough!

However the messages you encode need to be sufficiently long!

(62)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

Channel Coding Theorem—So what?

Assume you want to transmit data with probability of error 10−15 over a BSC,p = 0.1. Using a repetition code, we need to make the message63 times as long as the source string.

Shannon’s result says twice as long is enough.

If you want probability of error 10−100, Shannon’s result still says that twice is enough!

However the messages you encode need to be sufficiently long!

(63)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

Channel Coding Theorem—So what?

Assume you want to transmit data with probability of error 10−15 over a BSC,p = 0.1. Using a repetition code, we need to make the message63 times as long as the source string.

(Exercise: Check the math. Hint: binomial distribution.)

Shannon’s result says twice as long is enough.

If you want probability of error 10−100, Shannon’s result still says that twice is enough!

However the messages you encode need to be sufficiently long!

(64)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

Channel Coding Theorem—So what?

Assume you want to transmit data with probability of error 10−15 over a BSC,p = 0.1. Using a repetition code, we need to make the message63 times as long as the source string.

Shannon’s result says twice as long is enough.

If you want probability of error 10−100, Shannon’s result still says that twice is enough!

However the messages you encode need to be sufficiently long!

(65)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

Channel Coding Theorem—So what?

Assume you want to transmit data with probability of error 10−15 over a BSC,p = 0.1. Using a repetition code, we need to make the message63 times as long as the source string.

Shannon’s result says twice as long is enough.

If you want probability of error 10−100, Shannon’s result still says that twice is enough!

However the messages you encode need to be sufficiently long!

(66)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

Channel Coding Theorem—So what?

Assume you want to transmit data with probability of error 10−15 over a BSC,p = 0.1. Using a repetition code, we need to make the message63 times as long as the source string.

Shannon’s result says twice as long is enough.

If you want probability of error 10−100, Shannon’s result still says that twice is enough!

However the messages you encode need to be sufficiently long!

(67)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

The proof of Channel Coding Theorem (which we won’t cover) is based on choosingM code words, each n bits long, completely at random.

To decode y, just pickw for whichf(w) is closest to y. If log2M <nR, then the expected error rate, over random choice of code books, is very small.

If random code books are good on average, then surely the best single code book is at least as good.

However, in practice we need specific codes that have high rates and are easy to compute. Finding such is difficult and out of scope for this course.

We will next give a simple example to illustrate the basic idea.

(68)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

The proof of Channel Coding Theorem (which we won’t cover) is based on choosingM code words, each n bits long, completely at random.

To decodey, just pickw for whichf(w) is closest to y.

If log2M <nR, then the expected error rate, over random choice of code books, is very small.

If random code books are good on average, then surely the best single code book is at least as good.

However, in practice we need specific codes that have high rates and are easy to compute. Finding such is difficult and out of scope for this course.

We will next give a simple example to illustrate the basic idea.

(69)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

The proof of Channel Coding Theorem (which we won’t cover) is based on choosingM code words, each n bits long, completely at random.

To decodey, just pickw for whichf(w) is closest to y.

If log2M <nR, then the expected error rate, over random choice of code books, is very small.

If random code books are good on average, then surely the best single code book is at least as good.

However, in practice we need specific codes that have high rates and are easy to compute. Finding such is difficult and out of scope for this course.

We will next give a simple example to illustrate the basic idea.

(70)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

The proof of Channel Coding Theorem (which we won’t cover) is based on choosingM code words, each n bits long, completely at random.

To decodey, just pickw for whichf(w) is closest to y.

If log2M <nR, then the expected error rate, over random choice of code books, is very small. This is the tricky part.

If random code books are good on average, then surely the best single code book is at least as good.

However, in practice we need specific codes that have high rates and are easy to compute. Finding such is difficult and out of scope for this course.

We will next give a simple example to illustrate the basic idea.

(71)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

The proof of Channel Coding Theorem (which we won’t cover) is based on choosingM code words, each n bits long, completely at random.

To decodey, just pickw for whichf(w) is closest to y.

If log2M <nR, then the expected error rate, over random choice of code books, is very small.

If random code books are good on average, then surely the best single code book is at least as good.

However, in practice we need specific codes that have high rates and are easy to compute. Finding such is difficult and out of scope for this course.

We will next give a simple example to illustrate the basic idea.

(72)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

The proof of Channel Coding Theorem (which we won’t cover) is based on choosingM code words, each n bits long, completely at random.

To decodey, just pickw for whichf(w) is closest to y.

If log2M <nR, then the expected error rate, over random choice of code books, is very small.

If random code books are good on average, then surely the best single code book is at least as good.

However, in practice we need specific codes that have high rates and are easy to compute. Finding such is difficult and out of scope for this course.

We will next give a simple example to illustrate the basic idea.

(73)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Channel capacity Codes and rates Channel coding theorem

Channel coding theorem

The proof of Channel Coding Theorem (which we won’t cover) is based on choosingM code words, each n bits long, completely at random.

To decodey, just pickw for whichf(w) is closest to y.

If log2M <nR, then the expected error rate, over random choice of code books, is very small.

If random code books are good on average, then surely the best single code book is at least as good.

However, in practice we need specific codes that have high rates and are easy to compute. Finding such is difficult and out of scope for this course. We will next give a simple example to illustrate the basic idea.

(74)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Parity Check Codes Hamming (7,4)

1 Noisy Channels

Reliable communication Error correcting codes Repetition codes

2 Channel Coding and Shannon’s 2nd Theorem Channel capacity

Codes and rates

Channel coding theorem

3 Hamming Codes Parity Check Codes Hamming (7,4)

(75)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Parity Check Codes Hamming (7,4)

Hamming Codes

Richard W. Hamming (11.2.1915–7.1.1998)

(76)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Parity Check Codes Hamming (7,4)

Parity Check Codes

One way to detect and correct errors is to addparity checks to the codewords:

If we add a parity check bit at the end of each codeword we can detect one (but not more) error per codeword.

By clever use of more than one parity bits, we can actually identify where the error occurred and thus also correct errors. Designing ways to add as few parity bits as possible to correct and detect errors is a reallyhard problem.

(77)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Parity Check Codes Hamming (7,4)

Parity Check Codes

One way to detect and correct errors is to addparity checks to the codewords:

If we add a parity check bit at the end of each codeword we can detect one (but not more) error per codeword.

By clever use of more than one parity bits, we can actually identify where the error occurred and thus also correct errors. Designing ways to add as few parity bits as possible to correct and detect errors is a reallyhard problem.

(78)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Parity Check Codes Hamming (7,4)

Parity Check Codes

One way to detect and correct errors is to addparity checks to the codewords:

If we add a parity check bit at the end of each codeword we can detect one (but not more) error per codeword.

By clever use of more than one parity bits, we can actually identify where the error occurred and thus also correct errors.

Designing ways to add as few parity bits as possible to correct and detect errors is a reallyhard problem.

(79)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Parity Check Codes Hamming (7,4)

Parity Check Codes

One way to detect and correct errors is to addparity checks to the codewords:

If we add a parity check bit at the end of each codeword we can detect one (but not more) error per codeword.

By clever use of more than one parity bits, we can actually identify where the error occurred and thus also correct errors.

Designing ways to add as few parity bits as possible to correct and detect errors is areally hard problem.

(80)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Parity Check Codes Hamming (7,4)

Hamming (7,4)

4 data bits (d ,d ,d ,d ), 3 parity bits (p ,p ,p )

(81)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Parity Check Codes Hamming (7,4)

Hamming (7,4)

source string 1011, parity bits 010

(82)

Outline Noisy Channels Channel Coding and Shannon’s 2nd Theorem Hamming Codes

Parity Check Codes Hamming (7,4)

Hamming (7,4)

error in data bit d (07→1) is identified and corrected

Viittaukset

LIITTYVÄT TIEDOSTOT

Encoding Continuous Data Differential Entropy Linear Regression Subset Selection Problem Wavelet Denoising..

To summarize, the prefix property is reasonable from a practical point of view, and from a theoretical point of view can be assumed without increasing input lengths too much....

Key ideas: motivation and basic definition universal and prefix machines invariance theorem, uncomputability basic upper bounds and examples More technical: proof of

Find out what compression algorithms are used in the gadgets you use—DVD player, digital TV, CD, iPod, cell-phone, laptop (WinZip), etc.. You can simply list the names of

Solution First observe that the minimum number of weightings must be at least dlog 3 24e = 3, since there are 24 possible outputs (12 balls, each can be either light or heavy) and

Under the assumption that our data come from a distribution which lies within our chosen model class C, when we have specified a prior distribution over all models M ∈ C, this gives

information theory, statistical learning theory, Bayesianism, minimum description length principle, Bayesian networks, regression, positioning, stemmatology,

• The purpose of channel coding in digital transmission of voice or data is to introduce additional bits into the information bit stream that will allow errors to be detected and,