Trigram

A trigram may also refer to Ba gua, a philosophical concept in ancient China. It may also refer to a three-letter acronym.

Trigrams are a special case of the n-gram, where n is 3. They are often used in natural language processing for doing statistical analysis of texts.

Frequency

A typical cryptanalytic frequency analysis finds that the 16 most common character-level trigrams in English are:[1]

Rank Trigram
1the
2and
3tha
4ent
5ing
6ion
7tio
8for
9nde
10has
11nce
12edt
13tis
14oft
15sth
16men

Because encrypted messages sent by telegraph often omit punctuation and spaces, cryptographic frequency analysis of such messages includes trigrams that straddle word boundaries. This causes trigrams such as "edt" to occur frequently, even though it may never occur in any one word of those messages.

Trigram Frequency in Turkish Language

The frequeny of most common letter trigrams in Turkish are illustrated below [2]

lar 0.00816        rin 0.00292        rın 0.00247        lan 0.00208
bir 0.00702        den 0.00288        ınd 0.00243        ığı 0.00208
ler 0.00622        ama 0.00282        eni 0.00238        adı 0.00203
eri 0.00529        nde 0.00281        ada 0.00236        sın 0.00201
arı 0.00515        edi 0.00270        ile 0.00230        sin 0.00197
yor 0.00422        anı 0.00267        ind 0.00225        esi 0.00194
ara 0.00359        ası 0.00258        ala 0.00223        yle 0.00194
nda 0.00350        dan 0.00256        nın 0.00214        ken 0.00193
ini 0.00336        nla 0.00255        anl 0.00213        rdu 0.00192
ını 0.00311        aya 0.00255        kar 0.00209        ele 0.00190

Examples

The sentence "the quick red fox jumps over the lazy brown dog" has the following word level trigrams:

the quick red
quick red fox
red fox jumps
fox jumps over
jumps over the
over the lazy
the lazy brown
lazy brown dog

And the word-level trigram "the quick red" has the following character-level trigrams (where an underscore "_" marks a space):

the he_ e_q
_qu qui uic
ick ck_ k_r
_re red

References

  1. Lewand, Robert (2000). Cryptological Mathematics. The Mathematical Association of America. p. 36. ISBN 978-0-88385-719-9. Table also available from pages.central.edu
  2. Sefik Ilkin Serengil. Attacking Turkish Texts Encrypted by Homophonic Cipher. MSc thesis, Galatasaray University, 2011.
This article is issued from Wikipedia - version of the Sunday, January 03, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.