Solution:(1) because C (a) =1,c (b) =2,c (R) =3,c (t) =4, then:
Sequence |
Output |
<0,0,3> |
R |
<0,0,1> |
Ra |
<0,0,4> |
Rat |
<2,8,2> |
Ratatatatatb |
<3,1,2> |
Ratatatatatbab |
<0,0,3> |
Ratatatatatbabr |
<6,4,4> |
Ratatatatatbabratbat |
<9,5,4> |
Ratatatatatbabratbatbabrat |
(2) because the size of the window is - , the size of the antecedent buffer is Ten , so the code is as follows:
Input Ratatatatatbabratbatbabrat
Solution: Because the receiving sequence is:4,5,3,1,2,8,2,7,9,7,4;
So the input sequence is:4,5,3,1,2,8,2,7,9,7,4
(1) input 4,5,3,1,2,8,2,7,9,7,4
index |
entry |
1 |
s |
2 |
_ ( spaces ) |
3 |
i |
4 |
t |
5 |
h |
The decoded sequence is:T
(2) input 4,5,3,1,2,8,2,7,9,7,4
index |
entry |
1 |
s |
2 |
( space ) |
3 |
i |
4 |
t |
5 |
h |
The decoded sequence is:TH
(3) input 4,5,3,1,2,8,2,7,9,7,4
Index |
Entry |
1 |
S |
2 |
_ ( space ) |
3 |
I |
4 |
T |
5 |
H |
6 |
TH |
The decoded sequence is:THI
(4) input 4,5,3,1,2,8,2,7,9,7,4
Index |
Entry |
1 |
S |
2 |
_ ( space ) |
3 |
I |
4 |
T |
5 |
H |
6 |
TH |
7 |
Hi |
The decoded sequence is: this
(5) input 4,5,3,1,2,8,2,7,9,7,4
Index |
Entry |
1 |
S |
2 |
_ ( space ) |
3 |
I |
4 |
T |
5 |
H |
6 |
TH |
7 |
Hi |
8 |
Is |
The decoded sequence is:this_
(6) input 4,5,3,1,2,8,2,7,9,7,4
Index |
Entry |
1 |
S |
2 |
_ ( space ) |
3 |
I |
4 |
T |
5 |
H |
6 |
TH |
7 |
Hi |
8 |
Is |
9 |
S_ |
The decoded sequence is:
(7) input 4,5,3,1,2,8,2,7,9,7,4
Index |
Entry |
1 |
S |
2 |
_ ( space ) |
3 |
I |
4 |
T |
5 |
H |
6 |
TH |
7 |
Hi |
8 |
Is |
9 |
S_ |
10 |
_i |
The decoded sequence is: thisis_
(8) input 4,5,3,1,2,8,2,7,9,7,4
Index |
Entry |
1 |
S |
2 |
_ ( space ) |
3 |
I |
4 |
T |
5 |
H |
6 |
TH |
7 |
Hi |
8 |
Is |
9 |
S_ |
10 |
_i |
11 |
Is_ |
The decoded sequence is: The ISHI
(9) input 4,5,3,1,2,8,2,7,9,7,4
Index |
Entry |
1 |
S |
2 |
_ ( space ) |
3 |
I |
4 |
T |
5 |
H |
6 |
TH |
7 |
Hi |
8 |
Is |
9 |
S_ |
10 |
_i |
11 |
Is_ |
12 |
_h |
The decoded sequence is:
(Ten) input 4,5,3,1,2,8,2,7,9,7,4
Index |
Entry |
1 |
S |
2 |
_ ( space ) |
3 |
I |
4 |
T |
5 |
H |
6 |
TH |
7 |
Hi |
8 |
Is |
9 |
S_ |
10 |
_i |
11 |
Is_ |
12 |
_h |
13 |
His |
The decoded sequence is: The is the hisHI
(one) input 4,5,3,1,2,8,2,7,9,7,4
Index |
Entry |
1 |
S |
2 |
_ ( space ) |
3 |
I |
4 |
T |
5 |
H |
6 |
TH |
7 |
Hi |
8 |
Is |
9 |
S_ |
10 |
_i |
11 |
Is_ |
12 |
_h |
13 |
His |
14 |
S_h |
The decoded sequence is:
Up to: The decoded sequence is the IS- his-hit.
Fourth assignment--Xiaoxiang