Difference between revisions of "Aufgaben:Exercise 1.4Z: Entropy of the AMI Code"
m (Text replacement - "generalis" to "generaliz") |
|||
(28 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | {{quiz-Header|Buchseite= | + | {{quiz-Header|Buchseite=Information_Theory/Discrete_Sources_with_Memory |
}} | }} | ||
− | [[File:P_ID2249__Inf_A_1_4.png|right| | + | [[File:P_ID2249__Inf_A_1_4.png|right|frame|Binary source signal (top) and <br>ternary encoder signal (bottom)]] |
− | + | We assume similar prerequisites as in [[Aufgaben:Exercise_1.4:_Entropy_Approximations_for_the_AMI_Code|Exercise 1.4]] : | |
− | + | A binary source provides the source symbol sequence $\langle q_\nu \rangle$ with $q_\nu \in \{ {\rm L}, {\rm H} \}$, where there are no statistical bindings between the individual sequence elements. | |
− | |||
− | |||
− | |||
+ | For the symbol probabilities, let: | ||
+ | * pL=pH=1/2 (in subtasks 1 und 2), | ||
+ | * pL=1/4,pH=3/4 (subtasks 3, 4 and 5), | ||
+ | * pL=3/4,pH=1/4 (subtask 6). | ||
− | |||
− | + | The presented coded signal $c(t)$ and the corresponding encoded sequence $\langle c_\nu \rangle$ with $c_\nu \in \{{\rm P}, {\rm N}, {\rm M} \}$ results from the AMI coding ("Alternate Mark Inversion") according to the following rule: | |
− | |||
+ | * The binary symbol L ⇒ "Low" is always represented by the ternary symbol N ⇒ "German: Null" ⇒ "Zero". | ||
+ | * The binary symbol H ⇒ "High" is also encoded deterministically but alternately (hence the name "Alternate Mark Inversion") by the symbols P ⇒ "Plus" and M ⇒ "Minus". | ||
− | In | + | |
+ | |||
+ | |||
+ | In this task, the decision content H0 and the resulting entropy HC of the encoded sequence ⟨cν⟩ are to be determined for the three parameter sets mentioned above. The relative redundancy of the code sequence results from this according to the equation | ||
:$$r_{\rm C} = \frac{H_{\rm 0}-H_{\rm C}}{H_{\rm C}} | :$$r_{\rm C} = \frac{H_{\rm 0}-H_{\rm C}}{H_{\rm C}} | ||
\hspace{0.05cm}.$$ | \hspace{0.05cm}.$$ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | + | |
+ | |||
+ | |||
+ | ''Hints:'' | ||
+ | *This task belongs to the chapter [[Information_Theory/Discrete_Sources_with_Memory|Discrete Sources with Memory]]. | ||
+ | *Reference is made in particular to the page [[Information_Theory/Discrete_Sources_with_Memory#The_entropy_of_the_AMI_code|The entropy of the AMI code]]. | ||
+ | |||
+ | *In general, the following relations exist between the decision content H0, the entropy H (here equal to HC) and the entropy approximations: | ||
+ | :$$H \le \ \text{...} \ \le H_3 \le H_2 \le H_1 \le H_0 | ||
+ | \hspace{0.05cm}.$$ | ||
+ | *In [[Aufgaben:Exercise_1.4:_Entropy_Approximations_for_the_AMI_Code|Exercise 1.4]] the entropy approximations were calculated for equally probable symbols L and H as follows (each in "bit/symbol"): | ||
+ | :$$H_1 = 1.500\hspace{0.05cm},\hspace{0.2cm} H_2 = 1.375\hspace{0.05cm},\hspace{0.2cm}H_3 = 1.292 | ||
+ | \hspace{0.05cm}.$$ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===Questions=== | ||
<quiz display=simple> | <quiz display=simple> | ||
− | { | + | {Let the source symbols be equally probable (pL=pH=1/2). What is the entropy HC of the encoded sequence ⟨cν⟩? |
|type="{}"} | |type="{}"} | ||
− | + | $H_{\rm C} \ = \ { 1 3% }\ \rm bit/ternary \ symbol$ | |
− | { | + | {What is the relative redundancy of the encoded sequence? |
|type="{}"} | |type="{}"} | ||
− | $ | + | $r_{\rm C} \ = \ { 36.9 3% }\ \rm \%$ |
− | { | + | {For the binary source, pL=1/4 and pH=3/4. What is the entropy of the encoded sequence? |
|type="{}"} | |type="{}"} | ||
− | + | $H_{\rm C} \ = \ { 0.811 3% }\ \rm bit/ternary \ symbol$ | |
+ | |||
+ | {What is the relative redundancy of the encoded sequence? | ||
− | |||
|type="{}"} | |type="{}"} | ||
− | + | $r_{\rm C} \ = \ { 48.8 3% }\ \rm \%$ | |
− | { | + | {Calculate the approximation H1 of the code entropy for $p_{\rm L} = 1/4 and p_{\rm H} = 3/4$. |
|type="{}"} | |type="{}"} | ||
− | + | $H_{\rm 1} \ = \ { 1.56 3% }\ \rm bit/ternary \ symbol$ | |
− | { | + | {Calculate the approximation H1 of the code entropy for $p_{\rm L} = 3/4 and p_{\rm H} = 1/4$. |
|type="{}"} | |type="{}"} | ||
− | + | $H_{\rm 1} \ = \ { 1.06 3% }\ \rm bit/ternary \ symbol$ | |
Line 69: | Line 85: | ||
</quiz> | </quiz> | ||
− | === | + | ===Solution=== |
{{ML-Kopf}} | {{ML-Kopf}} | ||
− | + | '''(1)''' Since the AMI code neither adds new information nor causes information to disappear, the entropy HC of the encoded sequence ⟨cν⟩ is equal to the source entropy $H_{\rm Q}$. | |
− | :$$H_{\rm Q} {= 1 \,{\rm bit/ | + | *Therefore, for equally probable and statistically independent source symbols, the following holds: |
+ | :$$H_{\rm Q} {= 1 \,{\rm bit/binary \ symbol}} \hspace{0.3cm} \Rightarrow\hspace{0.3cm} H_{\rm C} \hspace{0.15cm} \underline {= 1 \,{\rm bit/ternary \ symbol}} | ||
\hspace{0.05cm}.$$ | \hspace{0.05cm}.$$ | ||
− | + | ||
+ | |||
+ | '''(2)''' The decision content of a ternary source is $H_0 = \log_2 \; (3) = 1.585\; \rm bit/symbol$. | ||
+ | * This gives the following for the relative redundancy | ||
:$$r_{\rm C} =1 -{H_{\rm C}/H_{\rm 0}}=1-1/{\rm log}_2\hspace{0.05cm}(3) | :$$r_{\rm C} =1 -{H_{\rm C}/H_{\rm 0}}=1-1/{\rm log}_2\hspace{0.05cm}(3) | ||
\hspace{0.15cm} \underline {= 36.9 \,\%} | \hspace{0.15cm} \underline {= 36.9 \,\%} | ||
\hspace{0.05cm}.$$ | \hspace{0.05cm}.$$ | ||
− | + | ||
+ | |||
+ | '''(3)''' $H_{\rm C} = H_{\rm Q}$ is still valid. However, because of the unequal symbol probabilities, $H_{\rm Q}$ is now smaller: | ||
:$$H_{\rm Q} = \frac{1}{4} \cdot {\rm log}_2\hspace{0.05cm} (4) + \frac{3}{4} \cdot | :$$H_{\rm Q} = \frac{1}{4} \cdot {\rm log}_2\hspace{0.05cm} (4) + \frac{3}{4} \cdot | ||
{\rm log}_2\hspace{0.1cm} (4/3) | {\rm log}_2\hspace{0.1cm} (4/3) | ||
− | {= 0.811 \,{\rm bit/ | + | {= 0.811 \,{\rm bit/binary \ symbol}} \hspace{0.3cm} |
− | + | \Rightarrow\hspace{0.3cm} H_{\rm C} = H_{\rm Q} \hspace{0.15cm} \underline {= 0.811 \,{\rm bit/ternary \ symbol}} | |
\hspace{0.05cm}.$$ | \hspace{0.05cm}.$$ | ||
− | + | ||
− | + | ||
+ | '''(4)''' By analogy with sub-task '''(2)''' $r_{\rm C} = 1 - 0.811/1.585 | ||
\hspace{0.15cm} \underline {= 48.8 \,\%} | \hspace{0.15cm} \underline {= 48.8 \,\%} | ||
+ | \hspace{0.05cm}$ now holds. | ||
+ | *One can generalize this result. Namely, it holds: | ||
+ | :$$(1-0.488) = (1- 0.189) \cdot (1- 0.369)\hspace{0.3cm} | ||
+ | \Rightarrow\hspace{0.3cm} (1-r_{\rm Codefolge}) = (1-r_{\rm Quelle}) \cdot (1- r_{\rm AMI-Code}) | ||
\hspace{0.05cm}.$$ | \hspace{0.05cm}.$$ | ||
− | + | ||
− | :$$ | + | |
− | + | ||
+ | '''(5)''' Since each L is mapped to N and H is mapped alternately to M and P, it holds that | ||
+ | :$$p_{\rm N} = p_{\rm L} = 1/4\hspace{0.05cm},\hspace{0.2cm}p_{\rm P} = p_{\rm M} = p_{\rm H}/2 = 3/8\hspace{0.3cm} | ||
+ | \Rightarrow\hspace{0.3cm} H_1 = {1}/{4} \cdot {\rm log}_2\hspace{0.1cm} (4) + | ||
+ | 2 \cdot {3}/{8} \cdot {\rm log}_2\hspace{0.1cm}(8/3) \hspace{0.15cm} \underline {= 1.56 \,{\rm bit/ternary \ symbol}} | ||
\hspace{0.05cm}.$$ | \hspace{0.05cm}.$$ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | '''(6)''' Now the probabilities of occurrence of the ternary symbols are $p_{\rm N} = 3/4$ sowie $p_{\rm P} = p_{\rm M} =1/8$. Thus: | |
:$$H_1 = {3}/{4} \cdot {\rm log}_2\hspace{0.1cm} (4/3) + | :$$H_1 = {3}/{4} \cdot {\rm log}_2\hspace{0.1cm} (4/3) + | ||
− | 2 \cdot {1}/{8} \cdot {\rm log}_2\hspace{0.1cm}(8) \hspace{0.15cm} \underline {= 1.06 \,{\rm bit/ | + | 2 \cdot {1}/{8} \cdot {\rm log}_2\hspace{0.1cm}(8) \hspace{0.15cm} \underline {= 1.06 \,{\rm bit/ternary \ symbol}} |
\hspace{0.05cm}.$$ | \hspace{0.05cm}.$$ | ||
− | : | + | |
− | :$$H_0 = 1.585 \,{\rm bit/ | + | ''Interpretation:'' |
− | \lim_{k \rightarrow \infty } H_k = 0.811 \,{\rm bit/ | + | *For $p_{\rm L} = 1/4, \ p_{\rm H} = 3/4 gives H_1 = 1.56 \; \rm bit/symbol$. |
+ | *For $p_{\rm L} = 3/4, \ p_{\rm H} = 1/4 , on the other hand, H_1 = 1.06 \; \rm bit/symbol$ results in a significantly smaller value. | ||
+ | *For both parameter combinations, however, the same applies: | ||
+ | :$$H_0 = 1.585 \,{\rm bit/symbol}\hspace{0.05cm},\hspace{0.2cm}H_{\rm C} = | ||
+ | \lim_{k \rightarrow \infty } H_k = 0.811 \,{\rm bit/symbol} | ||
\hspace{0.05cm}.$$ | \hspace{0.05cm}.$$ | ||
− | : | + | It follows from this: <br> |
− | + | *If one considers two message sources $\rm Q1 and \rm Q2 with the same symbol set size M$ ⇒ decision content H0=const., whereby the first order entropy approximation (H1) is clearly greater for source $\rm Q1 than for source \rm Q2$, one cannot conclude from this by any means that the entropy of $\rm Q1 is actually greater than the entropy of\rm Q2$. | |
− | :* | + | *Rather, one must |
− | + | :* calculate enough entropy approximations H1, H2, H3, ... for both sources and | |
− | :* | + | :* determine from them (graphically or analytically) the limit value of Hk for k→∞. |
− | + | *Only then a final statement about the entropy ratios is possible. | |
{{ML-Fuß}} | {{ML-Fuß}} | ||
− | [[Category: | + | [[Category:Information Theory: Exercises|^1.2 Sources with Memory^]] |
Latest revision as of 13:48, 22 September 2021
We assume similar prerequisites as in Exercise 1.4 :
A binary source provides the source symbol sequence ⟨qν⟩ with qν∈{L,H}, where there are no statistical bindings between the individual sequence elements.
For the symbol probabilities, let:
- pL=pH=1/2 (in subtasks 1 und 2),
- pL=1/4,pH=3/4 (subtasks 3, 4 and 5),
- pL=3/4,pH=1/4 (subtask 6).
The presented coded signal c(t) and the corresponding encoded sequence ⟨cν⟩ with cν∈{P,N,M} results from the AMI coding ("Alternate Mark Inversion") according to the following rule:
- The binary symbol L ⇒ "Low" is always represented by the ternary symbol N ⇒ "German: Null" ⇒ "Zero".
- The binary symbol H ⇒ "High" is also encoded deterministically but alternately (hence the name "Alternate Mark Inversion") by the symbols P ⇒ "Plus" and M ⇒ "Minus".
In this task, the decision content H0 and the resulting entropy HC of the encoded sequence ⟨cν⟩ are to be determined for the three parameter sets mentioned above. The relative redundancy of the code sequence results from this according to the equation
- rC=H0−HCHC.
Hints:
- This task belongs to the chapter Discrete Sources with Memory.
- Reference is made in particular to the page The entropy of the AMI code.
- In general, the following relations exist between the decision content H0, the entropy H (here equal to HC) and the entropy approximations:
- H≤ ... ≤H3≤H2≤H1≤H0.
- In Exercise 1.4 the entropy approximations were calculated for equally probable symbols L and H as follows (each in "bit/symbol"):
- H1=1.500,H2=1.375,H3=1.292.
Questions
Solution
- Therefore, for equally probable and statistically independent source symbols, the following holds:
- HQ=1bit/binary symbol⇒HC=1bit/ternary symbol_.
(2) The decision content of a ternary source is H0=log2(3)=1.585bit/symbol.
- This gives the following for the relative redundancy
- rC=1−HC/H0=1−1/log2(3)=36.9%_.
(3) HC=HQ is still valid. However, because of the unequal symbol probabilities, HQ is now smaller:
- HQ=14⋅log2(4)+34⋅log2(4/3)=0.811bit/binary symbol⇒HC=HQ=0.811bit/ternary symbol_.
(4) By analogy with sub-task (2) rC=1−0.811/1.585=48.8%_ now holds.
- One can generalize this result. Namely, it holds:
- (1−0.488)=(1−0.189)⋅(1−0.369)⇒(1−rCodefolge)=(1−rQuelle)⋅(1−rAMI−Code).
(5) Since each L is mapped to N and H is mapped alternately to M and P, it holds that
- pN=pL=1/4,pP=pM=pH/2=3/8⇒H1=1/4⋅log2(4)+2⋅3/8⋅log2(8/3)=1.56bit/ternary symbol_.
(6) Now the probabilities of occurrence of the ternary symbols are pN=3/4 sowie pP=pM=1/8. Thus:
- H1=3/4⋅log2(4/3)+2⋅1/8⋅log2(8)=1.06bit/ternary symbol_.
Interpretation:
- For pL=1/4, pH=3/4 gives H1=1.56bit/symbol.
- For pL=3/4, pH=1/4 , on the other hand, H1=1.06bit/symbol results in a significantly smaller value.
- For both parameter combinations, however, the same applies:
- H0=1.585bit/symbol,HC=lim
It follows from this:
- If one considers two message sources \rm Q1 and \rm Q2 with the same symbol set size M ⇒ decision content H_0 = \rm const., whereby the first order entropy approximation (H_1) is clearly greater for source \rm Q1 than for source \rm Q2, one cannot conclude from this by any means that the entropy of \rm Q1 is actually greater than the entropy of \rm Q2.
- Rather, one must
- calculate enough entropy approximations H_1, H_2, H_3, ... for both sources and
- determine from them (graphically or analytically) the limit value of H_k for k \to \infty.
- Only then a final statement about the entropy ratios is possible.