Professional Documents
Culture Documents
IT Lec2
IT Lec2
(INFORMATION THEORY)
0918-125-540
thuan.duong@sgu.edu.vn
dhthuan@gmail.com
Mutual
Entropy
Information
• All real systems that work with digitally represented data, as CD players, TV, fax
machines, internet, satelites, mobiles, require to use error correcting codes
because all real channels are, to some extent, noisy.
▪ Channel coding theory problems are therefore among the very basic and most
frequent problems of storage and transmission of information.
▪ Channel coding theory results allow to create reliable systems out of unreliable
systems to store and/or to transmit information.
▪ Coding theory methods are often elegant applications of very basic concepts and
methods of (abstract) algebra.
• Chapter presents and illustrates the very basic problems, concepts, methods and
results of channel coding theory.
TRANSMISSION GOALS
1. Fast encoding of information.
2. Easy transmission of encoded messages.
3. Fast decoding of received messages.
4. Reliable correction of errors introduced in the channel.
5. Maximum transfer of information per unit time.
Solution
We first find all Hamming distances.
Solution
We first find all the Hamming distances.
G H = 0; H T G T = 0
Hay: vH = 0
s = wH = ( cm + e ) H
= cm H + eH = eH
(n – k)–dimensional vector s is called the syndrome of the error
pattern. Or in other words, s contains the pattern of failure in
parity checks.
c0 c1 ci c2k −1
e1 c1 + e1 ci + e1 c2k −1 + e1
e2 c1 + e2 ci + e2 c2k −1 + e2
S = syn( w) = wH
11100111
11011101
00111001
10101001
10101010
k bits n bits
• Vídụ: Chuỗi bit 101 có thể được biểu diễn dưới dạng đa thức
nhị phân như sau:
1.x 2 + 0.x1 + 1.x 0 = x 2 + 1
• Receiving
1. Receive F’(x)
2. Divide F’(x) by P(x)
3. Accept if remainder is 0, reject otherwise
Remainder 0 Remainder 0
Note: Binary modular addition is equivalent to
binary modular subtraction → R(x) + R(x) = 0
Message
0011
0100
0000 0000
0111 1
1000
0000 1000
1110 0 1101
1101 1010
0110 0010
1 0000
0000 0100
1100 1100
1101 1
1101
001 001
Message
x2
x0 1 0 1 1 0
+ 2 + 1 0 0 1 1 0 0
1 0 1 0 1
Data
1 1 0 1 0
LSB
Input 0 0 1
CRC
k shifts later, CRC is in register Send MSB first
Shift out (without any XOR) in n shifts
Message
x2
x0 1 0 1 1 0
+ 2 + 1 0 0 1 1 0 0
1 0 1 0 1
Data
1 1 0 1 0
LSB
Input
MSB
0 0 0 0 1
CRC 0 0 0 1 0
n+k shifts later, remainder is 0 1 0 1 0 0
Data accepted 0 0 0
LSB
+ 2
1 0
Data In
A
Control Line A:
A 1: Make/Test CRC
0: Shift Out CRC
Data OK
For Transmitting:
Data Out Assert A true while feeding k bits of message
Assert A false for n clock cycles to output CRC
For Receiving:
A Assert A true while feeding k+n bits of message and CRC
Ignore Data Out, check Data OK for correctness
g0 g1 g2 ... gn 0 0 0 ... 0
0 g0 g1 g2 ... gn 0 0 ... 0
G = 0 0 g0 g1 g2 ... gn 0 ... 0
.. .. ..
0 0 ... 0 0 ... 0 g0 ... g n
Solution
The number 21 in binary is 10101 (it needs five bits). We
can wrap the leftmost bit and add it to the four rightmost
bits. We have (0101 + 1) = 0110 or 6.
▪ Write the bit numbers in binary: 1, 10, 11, 100, 101, etc.
▪ All bit positions that are powers of two (have only one 1 bit in the binary
form of their position) are parity bits: 1, 2, 4, 8, etc. (1, 10, 100, 1000)
▪ All other bit positions, with two or more 1 bits in the binary form of their
➢ Parity bit 2 covers all bit positions which have the second least significant bit set:
➢ Parity bit 4 covers all bit positions which have the third least significant bit set:
➢ Parity bit 8 covers all bit positions which have the fourth least significant bit set:
✓ In general each parity bit covers all bits where the bitwise AND of the parity
The code has minimal Hamming distance at least 5 and corrects up to two errors (d = 5)
BCH Codes
Linear
Codes
Hamming Codes
k bits
1 k 1 k 1 k
1 2 n
, x2 , x1 , x0 x = ( x0 , x1 , x2 )
+ chuổi bit sau mã hoá:
Mỗi phần tử trong trong chuổi ra y đã được ghép xen là sự kết hợp tuyến tính của của các
phần tử của chuổi ngõ vào x(0),x(1),…,x(k-1).
Ví dụ trong bộ mã ½
y0(1) = x0(0) + 0 + 0
y (1)
i =x (0)
i +x (0)
i −1 +x
(0)
i −3
y1(1) = x1(0) + x0(0) + 0
y2(1) = x2(0) + x1(0) + 0
y3(1) = x3(0) + x2(0) + x0(0) y (1) = 1 + D + D3
y4(1) = x4(0) + x3(0) + x1(0)
D thể hiện toán tử trễ
y (0)
= 1+ D + D2 3
Mỗi đa thức thể hiện cho mối quan hệ giữa 1 input và 1 output. Ngoài ra người ta
còn ký hiệu đa thức tạo mã như sau
g (0) = (1011) = 1 + D 2 + D3
g (1) = (1101) = 1 + D + D3
Một cách tương tự ta có đa thức tạo mã cho bộ mã 2/3
- Phân tích mã xoắn người ta dựa trên giản đồ trạng thái (state
diagram) và giản đồ trellis (giản đồ hình cây)
- Giản đồ trạng thái chứa các phần tử nhớ và trạng thái của các
phần tử nhớ (phụ thuộc số phần tử nhớ lớn nhất của một nhánh
bất kỳ) với các bit ngõ ra khi biết một tập các bit ngõ vào.
- Ví dụ bộ mã hoá ½ ta có nhánh dài nhất có 3 phần tử nhớ → có 8
trạng thái của 3 phần tử nhớ này, giả thiết ta đặt là S0 = 000,
S1=100, S2=010, S3=110, …, S7=111 theo nhị phân. Trên mỗi nhánh
nối 2 trạng thái thể hiện X/YY với X là bit vào và YY là bit ngõ ra
1/10
S1 S3
1/01 0/11
0/00 1/00 1/11
S0 S2 S5 S7
0/10
0/01
S4 S6
S7
S6
S5
S4
S3
S2
S1
S0
S5
S4
S3
S2
S1
S0
This is the
survival path
in this
example
Decoded sequence is
m=[10 1110]
De-interleaving
Convolutional
Y1 Interleaver
Decoder 1
X Interleaving Convolutional
Decoder 2 De-interleaving X’
Y2
Read
Interleaving
a13, a14, a15, a16
Transmitting Data a1, a5, a9, a13, a2, a6, a10, a14, a3, …
Through Air
Received Data a1, a5, a9, a13, a2, a6, a10, a14, a3, …
Output Data a1, a2, a3, a4, a5, a6, a7, a8, a9, …
Transmitting 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0,…
Data
Read
0, 1, 0, 0
Write 0, 1, 0, 0
De-Interleaving
0, 1, 0, 0
1, 0, 0, 0
Output Data 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, …
Discrete errors