Documentos de Académico
Documentos de Profesional
Documentos de Cultura
1 1
H (x )=0.1 log 2
( )
0
+0.9 log2
0 ( )
H (x )=0,3321+ 0,1368
H (x )=0.4689
n
B) Calcule la longitud media de código utilizando códigos compactos binarios para S dónde n =
1, 2, 3, 4 teniendo en cuenta como alfabeto X = {0, 1}
para S1
S Probabilidad
S1 =0 0.1
S2 =1 0.9
L´ =∑ Pi ni
L´ =0.1∗1+ 0.9∗1=1
This study source was downloaded by 100000846450000 from CourseHero.com on 08-29-2022 20:30:14 GMT -05:00
https://www.coursehero.com/file/91019873/Taller-codificaciondocx/
para S2
S Probabilidad/código
S1 0.81/0 0.81/0 0.81/0
S2 0.09/11 0.1/10 0.19/1
S3 0.09/100 0.09/11
S4 0.01/101
L´ =∑ Pi ni
para S3
This study source was downloaded by 100000846450000 from CourseHero.com on 08-29-2022 20:30:14 GMT -05:00
https://www.coursehero.com/file/91019873/Taller-codificaciondocx/
S S1 /código S2 S3 S4 S5 S6 S7
S1 0.729/0 0.729/0 0.729/0 0.729/0 0.729/0 0.729/0 0.729/
0
S2 0.081/100 0.081/100 0.081/100 0.081/10 0.109/11 0.162/1 0.271/
0 0 1
S3 0.081/101 0.081/101 0.081/101 0.081/10 0.081/10 0.109/1
1 0 1
S4 0.081/110 0.081/110 0.081/110 0.081/11 0.081/10
0 1
S5 0.009/11100 0.010/1111 0.018/111 0.028/11
0 1
S6 0.009/11101 0.009/1110 0.010/111
0 1
S7 0.009/11110 0.009/1110
1
S8 0.001/11111
L´ =∑ Pi ni
para S4
This study source was downloaded by 100000846450000 from CourseHero.com on 08-29-2022 20:30:14 GMT -05:00
https://www.coursehero.com/file/91019873/Taller-codificaciondocx/
1011 0.9*0.1*0.9*0.9 0.0729
1101 0.9*0.9*0.1*0.9 0.0729
1110 0.9*0.9*0.9*0.1 0.0729
1111 0.9*0.9*0.9*0.9 0.6561
7
S1 S2 S3 S4 S5 S6 S7
/código
0.6561/0 0.6561/0 0.6561/0 0.6561/0 0.6561/ 0.6561/ 0.6561/ 0.6561/ 0.6561 0.656 0.656 0.656 0.65 0.65
0 0 0 0 /0 1/0 1/0 1/0 61/0 61/0
0.0729/10 0.0729/1 0.0729/1 0.0729/1 0.0729/ 0.0729/ 0.0729/ 0.0729/ 0.0729 0.072 0.117 0.145 0.19 0.33
1 01 01 01 101 101 101 101 /101 9/101 1/100 8/11 00/1 58/1
0
0.0729/11 0.0729/1 0.0729/1 0.0729/1 0.0729/ 0.0729/ 0.0729/ 0.0729/ 0.0729 0.072 0.072 0.117 0.14
0 10 10 10 110 110 110 110 /110 9/110 9/101 1/100 58/1
1
0.0729/11 0.0729/1 0.0729/1 0.0729/1 0.0729/ 0.0729/ 0.0729/ 0.0729/ 0.0729 0.072 0.072 0.072
1 11 11 11 111 111 111 111 /111 9/111 9/110 9/101
0.0729/10 0.0729/1 0.0729/1 0.0729/1 0.0729/ 0.0729/ 0.0729/ 0.0729/ 0.0729 0.072 0.072
00 000 000 000 1000 1000 1000 1000 /1000 9/100 9/111
0
0.0081/10 0.0081/1 0.0081/1 0.0081/1 0.0081/ 0.0118/ 0.0162/ 0.0162/ 0.0280 0.044
0110 00110 00110 00110 100110 100101 100100 10011 /10010 2/100
1
0.0081/10 0.0081/1 0.0081/1 0.0081/1 0.0081/ 0.0081/ 0.0118/ 0.0162/ 0.0162
0111 00111 00111 00111 100111 100110 100101 100100 /10011
0.0081/10 0.0081/1 0.0081/1 0.0081/1 0.0081/ 0.0081/ 0.0081/ 0.0118/
01000 001000 001000 001000 1001000 100111 100110 100101
0.0081/10 0.0081/1 0.0081/1 0.0081/1 0.0081/ 0.0081/ 0.0081/
01001 001001 001001 001001 1001001 1001000 100111
0.0081/10 0.0081/1 0.0081/1 0.0081/1 0.0081/ 0.0081/
01010 001010 001010 001010 1001010 1001001
0.0009/10 0.0010/1 0.0018/1 0.0019/1 0.0037/
0101101 00101100 0010111 0010110 1001011
0.0009/10 0.0009/1 0.0010/1 0.0018/1
0101110 00101101 00101100 0010111
0.0009/10 0.0009/1 0.0009/1
0101111 00101110 00101101
0.0009/10 0.0009/1
01011000 00101111
0.0001/10
01011001
L´ =∑ Pi ni
This study source was downloaded by 100000846450000 from CourseHero.com on 08-29-2022 20:30:14 GMT -05:00
https://www.coursehero.com/file/91019873/Taller-codificaciondocx/
2.
S S1 /códig S2 S3 S4 S5 S6
o
S1 1 1 1 1 1 2
/1 /1 /1 /1 /1 /0
3 3 3 3 3 3
S2 1 1 1 1 1 1
/00 /00 /00 /00 /00 /1
3 3 3 3 3 3
S3 1 1 1 2 1
/011 /011 9 /011 9 /01 3 /01
9 9
0
S4 1 1 1 1
/0100 /0100 9 /010 9 /01
9 9
0 1
1 2 1
S5 /¿ 010
/010 /010
27 27 9
11 10 1
S6 1 1
/0101 /010
27 27
00 11
S7 1
/0101
27
01
L´ =∑ Pi ni
This study source was downloaded by 100000846450000 from CourseHero.com on 08-29-2022 20:30:14 GMT -05:00
https://www.coursehero.com/file/91019873/Taller-codificaciondocx/
1 1 1 1 1 1 1
L´
= ∗1+ ∗2+ ∗3+ ∗4+ ∗5+ ∗6+ ∗6=2.407
3 3 9 9 27 27 27
Para este alfabeto código la fuente sí es fuente especial, ya que todas las
probabilidades son de la forma 1/3αi con αi entero. Aplicamos, en este caso, el método
de creación de códigos compactos para fuentes especiales.
1
l =log
n 3
Pn
l1=log3 3=1
l2=log3 3=1
l3=log3 9=2
l4=log3 9=2
l5=log3 27=3
l6=log327=3
l7=log3 27=3
Sn Código
S1 0
This study source was downloaded by 100000846450000 from CourseHero.com on 08-29-2022 20:30:14 GMT -05:00
https://www.coursehero.com/file/91019873/Taller-codificaciondocx/
S2 1
S3 20
S4 21
S5 220
S6 221
S7 222
L´ =∑ Pi ni
1 1 1 1 1 1 1 13
L´
= ∗1+ ∗1+ ∗2+ ∗2+ ∗3+ ∗3+ ∗3= ≅1.44
3 3 9 9 27 27 27 9
3.
Para X ={0,1}
S S 1 /códig S2 S3 S4 S5
o
S1 1 2 2 2 4
/10 /01 /00 /1 /0
9 9 9 9 9
S2 1 1 2 2 2
/11 /10 /01 /00 /1
9 9 9 9 9
S3 1 1 1 2
/000 /11 /10 /01
9 9 9 9
S4 1 1 1
/001 /000 /11
9 9 9
1 1
S5 /010 /001
9 9
S6 1
/011
9
This study source was downloaded by 100000846450000 from CourseHero.com on 08-29-2022 20:30:14 GMT -05:00
https://www.coursehero.com/file/91019873/Taller-codificaciondocx/