Dyck language

from Wikipedia, the free encyclopedia

In theoretical computer science , the Dyck languages are specific context-free formal languages , i.e. type 2 languages ​​according to the Chomsky hierarchy . They are named after the mathematician Walther von Dyck .

For every natural number , the Dyck language is the word set of correctly bracketed (well-formed) expressions with different pairs of brackets. Inductive can be defined as follows:

  • (Where is the empty word .)
  • If so, then also applies .
  • If so, it also applies to everyone . (Where is the -th opening bracket.)

The Dyck language can include the two brackets [,] and (,). Then, for example:

A word from a Dyck language can be reduced to an empty word by gradually replacing each pair of brackets that appear in the correct order with the empty word . A Dyck word can be represented as a Rutishauser Klammergebirge. The position of the bracket in the word is shown on the abscissa and the respective bracket depth is shown on the ordinate . Dyck languages ​​are deterministically context-free and therefore in particular context-free . However, they are not regular .

Grammar of the Dyck language :

For there are productions of the kind .