Difference between revisions of "Aufgaben:Exercise 1.8: Synthetically Generated Texts"

From LNTwww
 
(30 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  
{{quiz-Header|Buchseite=Informationstheorie und Quellencodierung/Natürliche wertdiskrete Nachrichtenquellen
+
{{quiz-Header|Buchseite=Information_Theory/Natural_Discrete_Sources
 
}}
 
}}
  
[[File:P_ID2324__Inf_A_1_8.png|right|]]
+
[[File:EN_Inf_A_1_8.png|right|frame|Two synthetically generated text files]]
:Das Praktikum [Söd01] verwendet das Windows–Programm „Wertdiskrete Informationstheorie”. Der nachfolgende Link  ⇒  WDIT führt zur ZIP–Version des Programms.
 
  
:Aus einer gegebenen Textdatei VORLAGE kann man
+
With the Windows programme  "Discrete-Value Information Theory"  from the Chair of Communications Engineering at the TU Munich
  
:* die Häufigkeiten von Buchstabentripeln wie „aaa”, „aab”, ... , „xyz”, ... ermitteln und in einer Hilfsdatei abspeichern,
+
*one can determine the frequencies of character triplets such as  "aaa",  "aab", ... ,  "xyz", ...  from a given text file  "TEMPLATE"  and save them in an auxiliary file,
 +
* then create a file  "SYNTHESIS"  whereby the new character is generated from the last two generated characters and the stored triple frequencies.
  
:* danach eine Datei SYNTHESE erzeugen, wobei das neue Zeichen aus den beiden letzten Zeichen und den abgespeicherten Tripel–Häufigkeiten generiert wird.
 
  
:Ausgehend von der deutschen und der englischen Bibelübersetzung haben wir so zwei Dateien synthetisiert, die in der Grafik mit
+
Starting with the German and English Bible translations, we have thus synthesised two files, which are indicated in the graphic:
 +
* $\text{File 1}$  (red border),
 +
* $\text{File 2}$  (green border).
  
:* Datei 1 (rote Umrandung),
 
  
:* Datei 2 (grüne Umrandung)
+
It is not indicated which file comes from which template.  Determining this is your first task.
  
:bezeichnet sind. Nicht bekannt gegeben wird, welche Datei von welcher Vorlage stammt. Dies zu ermitteln ist Ihre erste Aufgabe.
+
The two templates are based on the natural alphabet  $(26$  letters$)$  and the "Blank Space"  ("BS")   ⇒   $M = 27$.  In the German Bible, the umlauts have been replaced, for example "ä"   ⇒   "ae".
  
:Die beiden Vorlagen basieren auf dem natürlichen Alphabet (26 Buchstaben) und dem Leerzeichen (&bdquo;LZ&rdquo;) &#8658; <nobr><i>M</i> = 27.</nobr> Bei der deutschen Bibel wurden die Umlaute ersetzt, zum Beispiel &bdquo;ä&rdquo; &#8658; &bdquo;ae&rdquo;.
 
  
:Die <font color="#cc0000"><span style="font-weight: bold;">Datei 1</span></font> weist folgende Eigenschaften auf:
+
&nbsp; $\text{File 1}$&nbsp; has the following characteristics:
 
+
* The most frequent characters are&nbsp; "BS"&nbsp; with&nbsp; $19.8\%$, followed by&nbsp; "e"&nbsp;  with&nbsp; $10.2\%$&nbsp; and&nbsp; "a"&nbsp;  with&nbsp; $8.5\%$.
:* Die häufigsten Zeichen sind &bdquo;LZ&rdquo; mit 19.8%, gefolgt von &bdquo;e&rdquo; mit 10.2% und &bdquo;a&rdquo; mit 8.5%.
+
* After&nbsp; "BS",&nbsp; "t"&nbsp; occurs most frequently with&nbsp; $17.8\%$.
 
+
* Before&nbsp;  "BS",&nbsp; "d"&nbsp; is most likely.
:* Nach &bdquo;LZ&rdquo; (Leerzeichen) tritt &bdquo;t&rdquo; mit 17.8% am häufigsten auf.
+
* The entropy approximations in each case with the unit&nbsp; "bit/character"&nbsp; were determined as follows:
 
 
:* Vor einem Leerzeichen ist &bdquo;d&rdquo; am wahrscheinlichsten.
 
 
 
:* Die Entropienäherungen jeweils mit der Einheit bit/Zeichen, wurden wie folgt ermittelt:
 
 
:$$H_0 = 4.76\hspace{0.05cm},\hspace{0.2cm}
 
:$$H_0 = 4.76\hspace{0.05cm},\hspace{0.2cm}
 
H_1 = 4.00\hspace{0.05cm},\hspace{0.2cm}  
 
H_1 = 4.00\hspace{0.05cm},\hspace{0.2cm}  
Line 37: Line 32:
 
H_4 = 2.81\hspace{0.05cm}.  $$
 
H_4 = 2.81\hspace{0.05cm}.  $$
  
:Dagegen ergibt die Analyse von <font color="#009933"><span style="font-weight: bold;">Datei 2</span></font>:
+
In contrast, the analysis of&nbsp; $\text{File 2}$:
 +
* The most frequent characters are&nbsp;  "BS"&nbsp; with&nbsp; $17.6\%$&nbsp; followed by&nbsp; "e"&nbsp; with&nbsp; $14.4\%$&nbsp; and&nbsp; "n"&nbsp; with&nbsp; $8.9\%$.
 +
* After&nbsp;  "BS",&nbsp; "d"&nbsp; is most likely&nbsp; $(15.1\%)$&nbsp; followed by&nbsp; "s"&nbsp; with&nbsp; $10.8\%$.
 +
* After&nbsp;  "BS"&nbsp; and&nbsp; "d",&nbsp; the vowels&nbsp; "e"&nbsp; $(48.3\%)$,&nbsp; "i"&nbsp; $(23\%)$&nbsp; and&nbsp; "a"&nbsp; $(20.2\%)$&nbsp; are dominant.
 +
* The entropy approximations differ only slightly from those of&nbsp; $\text{File 1}$.
 +
* For larger&nbsp; $k$&ndash;values, these are slightly larger, for example&nbsp; $H_3 = 3.17$&nbsp; instead of&nbsp; $H_3 = 3.11$.
  
:* Die häufigsten Zeichen sind &bdquo;LZ&rdquo; mit 17.6% gefolgt von &bdquo;e&rdquo; mit 14.4% und &bdquo;n&rdquo; mit 8.9%.
 
  
:* Nach &bdquo;LZ&rdquo; ist &bdquo;d&rdquo; am wahrscheinlichsten (15.1%) gefolgt von &bdquo;s&rdquo; mit 10.8%.
 
  
:* Nach &bdquo;LZ&rdquo; und &bdquo;d&rdquo;  sind die Vokale &bdquo;e&rdquo; (48.3%), &bdquo;i&rdquo; (23%) und &bdquo;a&rdquo; (20.2%) dominant.
 
  
:* Die Entropienäherungen unterscheiden sich nur geringfügig von denen der Datei 1.
 
  
:* Für größere <i>k</i>&ndash;Werte sind diese etwas größer, zum Beispiel <i>H</i><sub>3</sub> = 3.11 &#8658; 3.17.
 
  
:<b>Hinweis:</b> Die Aufgabe bezieht sich auf das Kapitel 1.3. Anzumerken ist, dass unsere Analyse eher auf einen gleichen Entropiewert für Englisch und Deutsch schließen lässt. Dafür spricht auch, dass beide Übersetzungen nahezu gleich groß sind (ca. 4 Millionen Zeichen). Hätte Deutsch eine um 30% größere Entropie als Englisch, dann müsste nach unserer Meinung die englische Version um 30% länger sein, wenn man von gleichem Inhalt der beiden Übersetzungen ausgeht. Wir erheben aber keinen Anspruch auf die Richtigkeit unserer Argumentation.
+
''Hints:''
 +
*The exercise belongs to the chapter&nbsp; [[Information_Theory/Natural_Discrete_Sources|Natural Discrete Sources]].
 +
*Reference is also made to the page&nbsp; [[Information_Theory/Natural_Discrete_Sources#Synthetically_generated_texts|Synthetically Generated Texts]].
  
  
===Fragebogen===
+
 
 +
===Questions===
  
 
<quiz display=simple>
 
<quiz display=simple>
{Welche Vorlagen wurden für die hier gezeigte Textsynthese verwendet?
+
{Which templates were used for the text synthesis shown here??
|type="[]"}
+
|type="()"}
+ Die Datei 1 (rot) basiert auf einer englischen Vorlage.
+
+ $\text{File 1}$&nbsp; (red) is based on an English template.
- Die Datei 1 (rot) basiert auf einer deutschen Vorlage.
+
- $\text{File 1}$&nbsp; (red) is based on a German template.
 
 
  
{Vergleichen Sie die mittleren Wortlängen von Datei 1 und Datei 2.
+
{Compare the mean word lengths of&nbsp; $\text{File 1}$&nbsp; and&nbsp; $\text{File 2}$.
 
|type="[]"}
 
|type="[]"}
- Die Wörter der &bdquo;englischen&rdquo; Datei sind im Mittel länger.
+
- The words of the&nbsp; "English"&nbsp; file are longer on average.
+ Die Wörter der &bdquo;deutschen&rdquo; Datei sind im Mittel länger.
+
+ The words of the&nbsp; "German"&nbsp; file are longer on average.
  
  
{Welche Aussagen gelten für die Entropienäherungen?
+
{Which statements apply to the entropy approximations?
 
|type="[]"}
 
|type="[]"}
+ VORLAGE und SYNTHESE liefern ein nahezu gleiches <i>H</i><sub>1</sub>.
+
+ "TEMPLATE"&nbsp; and&nbsp; "SYNTHESIS"&nbsp; provide a nearly equal&nbsp; $H_1$.
+ VORLAGE und SYNTHESE liefern ein nahezu gleiches  <i>H</i><sub>2</sub>.
+
+ "TEMPLATE"&nbsp; and&nbsp; "SYNTHESIS"&nbsp; provide a nearly equal&nbsp; $H_2$.
+ VORLAGE und SYNTHESE liefern ein nahezu gleiches  <i>H</i><sub>3</sub>.
+
+ "TEMPLATE"&nbsp; and&nbsp; "SYNTHESIS"&nbsp; provide a nearly equal&nbsp; $H_3$.
- VORLAGE und SYNTHESE liefern ein nahezu gleiches  <i>H</i><sub>4</sub>.
+
- "TEMPLATE"&nbsp; and&nbsp; "SYNTHESIS"&nbsp; provide a nearly equal&nbsp; $H_4$.
  
  
{Welche Aussagen treffen für den &bdquo;englischen&rdquo; Text zu?
+
{Which statements are true for the&nbsp; "English"&nbsp; text?
 
|type="[]"}
 
|type="[]"}
+ Die meisten Wörter beginnen mit &bdquo;t&rdquo;.
+
+ Most words begin with&nbsp; "t".
+ Die meisten Wörter enden mit &bdquo;t&rdquo;.
+
- Most words end with&nbsp; "t".
  
  
{Welche Aussagen könnten für deutsche Texte gelten?
+
{Which statements could be true forthe&nbsp; "German"&nbsp; texts?
 
|type="[]"}
 
|type="[]"}
+ Nach &bdquo;de&rdquo; ist &bdquo;r&rdquo; am wahrscheinlichsten.
+
+ After&nbsp; "de",&nbsp; "r"&nbsp; is most likely.
+ Nach &bdquo;da&rdquo; ist &bdquo;s&rdquo; am wahrscheinlichsten.
+
+ After&nbsp; "da",&nbsp; "s"&nbsp; is most likely.
+ Nach &bdquo;di&rdquo; ist &bdquo;e&rdquo; am wahrscheinlichsten.
+
+ After&nbsp; "di",&nbsp; "e"&nbsp; is most likely.
  
  
Line 91: Line 88:
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
:<b>1.</b>&nbsp;&nbsp;Richtig ist der <u>Lösungsvorschlag 1</u>. In der Datei 1 erkennt man viele englische Wörter, in der Datei 2 viele deutsche. Sinn ergibt keiner der beiden Texte.
+
'''(1)'''&nbsp; The correct solution is <u>suggestion 1</u>.
 +
*In&nbsp; $\text{File 1}$&nbsp; you can recognise many English words, in&nbsp; $\text{File 2}$&nbsp; many German words.
 +
*Neither text makes sense.
 +
 
 +
 
 +
'''(2)'''&nbsp; Correct is <u>suggestions 2</u>. The estimations of Shannon and Küpfmüller confirm our result:
 +
*The probability of a blank space&nbsp; "BS"&nbsp; in&nbsp; $\text{File 1}$&nbsp; (English)&nbsp; $19.8\%$.&nbsp;
 +
*So on average every&nbsp; $1/0.198 = 5.05$&ndash;th character is&nbsp; "BS". &nbsp;
 +
*The average word length is therefore
 +
:$$L_{\rm M} = \frac{1}{0.198}-1 \approx 4.05\,{\rm characters}\hspace{0.05cm}.$$
 +
*Correspondingly, for&nbsp; $\text{File 2}$&nbsp; (German):
 +
:$$L_{\rm M} = \frac{1}{0.176}-1 \approx 4.68\,{\rm characters}\hspace{0.05cm}.$$
  
:<b>2.</b>&nbsp;&nbsp;Die Wahrscheinlichkeit eines Leerzeichens beträgt bei der Datei 1 (Englisch) 19.8%. Also ist im Mittel jedes 1/0.198 = 5.05&ndash;tes Zeichen ein Leerzeichen. Die mittlere Wortlänge ergibt sich daraus zu
 
:$$L_{\rm M} = \frac{1}{0.198}-1 \approx 4.05\,{\rm Zeichen}\hspace{0.05cm}.$$
 
:Entsprechend gilt für Datei 2 (Deutsch):
 
:$$L_{\rm M} = \frac{1}{0.176}-1 \approx 4.68\,{\rm Zeichen}\hspace{0.05cm}.$$
 
:Richtig ist somit der <u>Lösungsvorschlag 2</u>. Die Abschätzungen von Shannon und Küpfmüller bestätigen unser Ergebnis.
 
  
:<b>3.</b>&nbsp;&nbsp;Zur Bestimmung der Entropienäherung <i>H<sub>k</sub></i> müssen <i>k</i>&ndash;Tupel ausgewertet werden, zum Beispiel für <i>k</i> = 3 Tripel: &bdquo;aaa&rdquo;, &bdquo;aab&rdquo;, .... Nach der Generierungsvorschrift &bdquo;Neues Zeichen hängt von den beiden Vorgängern ab&rdquo; werden <i>H</i><sub>1</sub>, <i>H</i><sub>2</sub> und <i>H</i><sub>3</sub> von VORLAGE und SYNTHESE übereinstimmen, allerdings auf Grund der endlichen Dateilänge nur näherungsweise.
 
  
:Dagegen  unterscheiden sich die <i>H</i><sub>4</sub>&ndash;Näherungen stärker, da bei der Generierung der dritte Vorgänger unberücksichtigt bleibt. Bekannt ist nur, dass auch bezüglich SYNTHESE <i>H</i><sub>4</sub> < <i>H</i><sub>3</sub> gelten muss.
+
'''(3)'''&nbsp; The <u>first three statements</u> are correct, but not statement&nbsp;  '''(4)''':
 +
*To determine the entropy approximation&nbsp; $H_k$&nbsp; ,&nbsp; $k$&ndash;tuples must be evaluated, for example, for&nbsp; $k = 3$&nbsp;  the triples &nbsp; "aaa",&nbsp;  "aab", &nbsp; ....
 +
*According to the generation rule "New character depends on the two predecessors",&nbsp; $H_1$,&nbsp; $H_2$&nbsp; and&nbsp; $H_3$&nbsp; of&nbsp; "TEMPLATE"&nbsp; and&nbsp; "SYNTHESIS"&nbsp; will match, <br>but only approximately due to the finite file length.
 +
*In contrast, the&nbsp; $H_4$&nbsp; approximations differ more strongly because the third predecessor is not taken into account during generation.
 +
*It is only known that&nbsp; $H_4 < H_3$&nbsp; must also apply with regard to "SYNTHESIS".
  
:<b>4.</b>&nbsp;&nbsp;Richtig ist hier nur die <u>Aussage 1</u>. Nach einem Leerzeichen (Wortanfang) folgt &bdquo;t&rdquo; mit 17.8%, während am Wortende (vor einem Leerzeichen) &bdquo;t&rdquo; nur mit der Häufigkeit 8.3% auftritt. Insgesamt beträgt die Auftrittswahrscheinlichkeit von &bdquo;t&rdquo; über alle Positionen im Wort gemittelt 7.4%.
 
  
:Als dritter Buchstaben nach Leerzeichen und &bdquo;t&rdquo; folgt &bdquo;h&rdquo; mit fast 82% und nach &bdquo;th&rdquo; ist &bdquo;e&rdquo; mit 62% am wahrscheinlichsten. Das lässt daraus schließen, dass &bdquo;the&rdquo; in einem englischen Text überdurchschnittlich oft vorkommt und damit auch in der synthetischen Datei 1, wie die folgende Grafik zeigt. Nicht bei allen Markierungen tritt &bdquo;the&rdquo; isoliert auf &nbsp;&#8658;&nbsp; direkt vorher und nachher ein Leerzeichen.
 
[[File:P_ID2325__Inf_A_1_8d.png|center|]]
 
  
:<b>5.</b>&nbsp;&nbsp;Nach &bdquo;de&rdquo; ist tatsächlich &bdquo;r&rdquo; am wahrscheinlichsten (32.8%), gefolgt von &bdquo;n&rdquo; (28.5%), &bdquo;s&rdquo; (9.3%) und &bdquo;m&rdquo; (9.7%). Dafür verantwortlich könnten &bdquo;der&rdquo;, &bdquo;den&rdquo;, &bdquo;des&rdquo; und &bdquo;dem&rdquo; sein.
+
'''(4)'''&nbsp; Only <u>statement 1</u> is correct here:
 +
[[File:Inf_A_1_8d_vers2.png|right|frame|Occurrence of "...the..." in the English text]]
 +
*After a&nbsp; "BS"&nbsp; (beginning of a word),&nbsp; "t" follows with&nbsp; $17.8\%$, while at the end of a word&nbsp; (before a space),&nbsp; "t"&nbsp; occurs only with the frequency&nbsp; $8.3\%$.
 +
*Overall, the probability of&nbsp; "t"&nbsp; averaged over all positions in the word is&nbsp; $7.4\%$.
 +
*The third letter after&nbsp; "BS"&nbsp; and&nbsp;  "t"&nbsp; is&nbsp; "h"&nbsp; with almost&nbsp; $82\%$&nbsp; and after&nbsp; "th",&nbsp;  "e"&nbsp; is most likeky with&nbsp; $62\%$.
 +
*This suggests that&nbsp; "the"&nbsp; occurs more often than average in an English text and thus also in the synthetic&nbsp; $\text{File 1}$, as the following graph shows.
 +
*But&nbsp; "the"&nbsp; does not occur in isolation in all marks &nbsp; &#8658; &nbsp; immediately preceded and followed by a space.
 +
[[File:Inf_A_1_8e_vers2.png|right|frame|Occurrence of&nbsp; "der",&nbsp; "die",&nbsp; "das"&nbsp; in the German text]]
  
:Weiterhin gilt:
 
  
:* Nach &bdquo;da&rdquo; folgt &bdquo;s&rdquo; mit größter Wahrscheinlichkeit: 48.2%.
+
'''(5)'''&nbsp; <u>All statements</u> are true:  
 +
*After&nbsp; "de",&nbsp; "r"&nbsp; is indeed most likely&nbsp; $(32.8\%)$,&nbsp; followed by&nbsp; "n"&nbsp; $(28.5\%)$,&nbsp; "s"&nbsp; $(9.3\%)$&nbsp; and&nbsp; "m"&nbsp; $(9.7\%)$.
 +
*This could be responsible for&nbsp; "der",&nbsp; "den",&nbsp; "des"&nbsp; und&nbsp; "dem".
 +
* "da"&nbsp; is most likely followed by&nbsp; "s"&nbsp; $(48.2\%)$.
 +
* After&nbsp; "di"&nbsp; follows&nbsp; "e"&nbsp; with the highest probability &nbsp; $(78.7\%)$.
  
:* Nach &bdquo;di&rdquo; folgt &bdquo;e&rdquo; mit größter Wahrscheinlichkeit: 78.7%.
 
  
:<u>Alle Aussagen</u> treffen somit zu. Die Grafik zeigt die Datei 2 mit allen &bdquo;der&rdquo;, &bdquo;die&rdquo; und &bdquo;das&rdquo;.
+
The graph shows&nbsp; $\text{File 2}$&nbsp; with all occurrences of&nbsp; "der",&nbsp; "die",&nbsp; "das".
[[File:P_ID2326__Inf_A_1_8e.png|center|]]
+
 
 
{{ML-Fuß}}
 
{{ML-Fuß}}
  
  
  
[[Category:Aufgaben zu Informationstheorie|^1.3 Natürliche wertdiskrete Nachrichtenquellen^]]
+
[[Category:Information Theory: Exercises|^1.3 Natural Discrete Sources^]]

Latest revision as of 14:07, 10 August 2021

Two synthetically generated text files

With the Windows programme  "Discrete-Value Information Theory"  from the Chair of Communications Engineering at the TU Munich

  • one can determine the frequencies of character triplets such as  "aaa",  "aab", ... ,  "xyz", ...  from a given text file  "TEMPLATE"  and save them in an auxiliary file,
  • then create a file  "SYNTHESIS"  whereby the new character is generated from the last two generated characters and the stored triple frequencies.


Starting with the German and English Bible translations, we have thus synthesised two files, which are indicated in the graphic:

  • $\text{File 1}$  (red border),
  • $\text{File 2}$  (green border).


It is not indicated which file comes from which template.  Determining this is your first task.

The two templates are based on the natural alphabet  $(26$  letters$)$  and the "Blank Space"  ("BS")   ⇒   $M = 27$.  In the German Bible, the umlauts have been replaced, for example "ä"   ⇒   "ae".


  $\text{File 1}$  has the following characteristics:

  • The most frequent characters are  "BS"  with  $19.8\%$, followed by  "e"  with  $10.2\%$  and  "a"  with  $8.5\%$.
  • After  "BS",  "t"  occurs most frequently with  $17.8\%$.
  • Before  "BS",  "d"  is most likely.
  • The entropy approximations in each case with the unit  "bit/character"  were determined as follows:
$$H_0 = 4.76\hspace{0.05cm},\hspace{0.2cm} H_1 = 4.00\hspace{0.05cm},\hspace{0.2cm} H_2 = 3.54\hspace{0.05cm},\hspace{0.2cm} H_3 = 3.11\hspace{0.05cm},\hspace{0.2cm} H_4 = 2.81\hspace{0.05cm}. $$

In contrast, the analysis of  $\text{File 2}$:

  • The most frequent characters are  "BS"  with  $17.6\%$  followed by  "e"  with  $14.4\%$  and  "n"  with  $8.9\%$.
  • After  "BS",  "d"  is most likely  $(15.1\%)$  followed by  "s"  with  $10.8\%$.
  • After  "BS"  and  "d",  the vowels  "e"  $(48.3\%)$,  "i"  $(23\%)$  and  "a"  $(20.2\%)$  are dominant.
  • The entropy approximations differ only slightly from those of  $\text{File 1}$.
  • For larger  $k$–values, these are slightly larger, for example  $H_3 = 3.17$  instead of  $H_3 = 3.11$.




Hints:


Questions

1

Which templates were used for the text synthesis shown here??

$\text{File 1}$  (red) is based on an English template.
$\text{File 1}$  (red) is based on a German template.

2

Compare the mean word lengths of  $\text{File 1}$  and  $\text{File 2}$.

The words of the  "English"  file are longer on average.
The words of the  "German"  file are longer on average.

3

Which statements apply to the entropy approximations?

"TEMPLATE"  and  "SYNTHESIS"  provide a nearly equal  $H_1$.
"TEMPLATE"  and  "SYNTHESIS"  provide a nearly equal  $H_2$.
"TEMPLATE"  and  "SYNTHESIS"  provide a nearly equal  $H_3$.
"TEMPLATE"  and  "SYNTHESIS"  provide a nearly equal  $H_4$.

4

Which statements are true for the  "English"  text?

Most words begin with  "t".
Most words end with  "t".

5

Which statements could be true forthe  "German"  texts?

After  "de",  "r"  is most likely.
After  "da",  "s"  is most likely.
After  "di",  "e"  is most likely.


Solution

(1)  The correct solution is suggestion 1.

  • In  $\text{File 1}$  you can recognise many English words, in  $\text{File 2}$  many German words.
  • Neither text makes sense.


(2)  Correct is suggestions 2. The estimations of Shannon and Küpfmüller confirm our result:

  • The probability of a blank space  "BS"  in  $\text{File 1}$  (English)  $19.8\%$. 
  • So on average every  $1/0.198 = 5.05$–th character is  "BS".  
  • The average word length is therefore
$$L_{\rm M} = \frac{1}{0.198}-1 \approx 4.05\,{\rm characters}\hspace{0.05cm}.$$
  • Correspondingly, for  $\text{File 2}$  (German):
$$L_{\rm M} = \frac{1}{0.176}-1 \approx 4.68\,{\rm characters}\hspace{0.05cm}.$$


(3)  The first three statements are correct, but not statement  (4):

  • To determine the entropy approximation  $H_k$  ,  $k$–tuples must be evaluated, for example, for  $k = 3$  the triples   "aaa",  "aab",   ....
  • According to the generation rule "New character depends on the two predecessors",  $H_1$,  $H_2$  and  $H_3$  of  "TEMPLATE"  and  "SYNTHESIS"  will match,
    but only approximately due to the finite file length.
  • In contrast, the  $H_4$  approximations differ more strongly because the third predecessor is not taken into account during generation.
  • It is only known that  $H_4 < H_3$  must also apply with regard to "SYNTHESIS".


(4)  Only statement 1 is correct here:

Occurrence of "...the..." in the English text
  • After a  "BS"  (beginning of a word),  "t" follows with  $17.8\%$, while at the end of a word  (before a space),  "t"  occurs only with the frequency  $8.3\%$.
  • Overall, the probability of  "t"  averaged over all positions in the word is  $7.4\%$.
  • The third letter after  "BS"  and  "t"  is  "h"  with almost  $82\%$  and after  "th",  "e"  is most likeky with  $62\%$.
  • This suggests that  "the"  occurs more often than average in an English text and thus also in the synthetic  $\text{File 1}$, as the following graph shows.
  • But  "the"  does not occur in isolation in all marks   ⇒   immediately preceded and followed by a space.
Occurrence of  "der",  "die",  "das"  in the German text


(5)  All statements are true:

  • After  "de",  "r"  is indeed most likely  $(32.8\%)$,  followed by  "n"  $(28.5\%)$,  "s"  $(9.3\%)$  and  "m"  $(9.7\%)$.
  • This could be responsible for  "der",  "den",  "des"  und  "dem".
  • "da"  is most likely followed by  "s"  $(48.2\%)$.
  • After  "di"  follows  "e"  with the highest probability   $(78.7\%)$.


The graph shows  $\text{File 2}$  with all occurrences of  "der",  "die",  "das".