Dyck language

Dyck language

In the theory of formal languages of computer science, mathematics, and linguistics, the Dyck language is the language consisting of balanced strings of parentheses [ and ]. It is important in the parsing of expressions that must have a correctly nested sequence of parentheses, such as arithmetic or algebraic expressions. It is named after the mathematician Walther von Dyck.

Contents

Formal definition

Let Σ = { [, ] } be the alphabet consisting of the symbols [ and ] and let Σ denote its Kleene closure. For any element u ∈ Σ with length |u| we define partial functions insert : Σ × (N ∪ {0}) → Σ and delete : Σ × N → Σ by

insert(u, j) = u with "[]" inserted into the jth position
delete(u, j) = u with "[]" deleted from the jth position

with the understanding that insert(u, j) is undefined for j > |u| and delete(u, j) is undefined if j > |u| − 2. We define an equivalence relation R on Σ as follows: for elements a, b ∈ Σ we have (a, b) ∈ R if and only if there exists a finite sequence of applications of the insert and delete functions starting with a and ending with b, where the empty sequence is allowed. That the empty sequence is allowed accounts for the reflexivity of R. Symmetry follows from the observation that any finite sequence of applications of insert to a string can be undone with a finite sequence of applications of delete. Transitivity is clear from the definition.

The equivalence relation partitions the language Σ into equivalence classes. If we take ε to denote the empty string, then the language corresponding to the equivalence class Cl(ε) is called the Dyck language.

Properties

  • The Dyck language is closed under the operation of concatenation.
  • By treating Σ as an algebraic monoid under concatenation we see that the monoid structure transfers onto the quotient Σ/R, resulting in the syntactic monoid of the Dyck language. The class Cl(ε) will be denoted 1.
  • The syntactic monoid of the Dyck language is not commutative: if u = Cl([) and v = Cl(]) then uv = Cl([]) = 1 ≠ Cl(][) = vu.
  • With the notation above, uv = 1 but neither u nor v are invertible in Σ/R.
  • The syntactic monoid of the Dyck language is isomorphic to the bicyclic semigroup by virtue of the properties of Cl([) and Cl(]) described above.
  • By the Chomsky–Schützenberger theorem, any context-free language is a homomorphic image of the intersection of some regular language with a homomorphic preimage of the Dyck language on two parentheses.
  • The Dyck language with two distinct types of parentheses can be recognized in the complexity class TC0.

See also

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Dyck — is a surname, and may refer to: Anthony van Dyck (Flemish artist) Cornelius Van Allen Van Dyck (American missionary) Howard Dyck (Canadian conductor) Lillian Dyck (Canadian senator) Peter George Dyck (Canadian politician) Rand Dyck (Canadian… …   Wikipedia

  • Walther von Dyck — Walther Franz Anton von Dyck (December 6, 1856 November 5, 1934) was a German mathematician. He is credited with being the first to define a mathematical group, in the modern sense. He made important contributions to combinatorial group theory.… …   Wikipedia

  • Sḵwx̱wú7mesh language — language name=Squamish nativename=Sḵwx̱wú7mesh snichim pronunciation=sqʷχʷuʔməʃ sniʧim familycolor=American states=Canada region=British Columbia speakers=≈12 15 [Dyck (2004: 5, n. 4), citing Peter Jacobs of the Squamish Nation, and Cook, Eung Do …   Wikipedia

  • Cayuga language — language name=Cayuga nativename=Gayogohó:nUnicode|ǫ’ familycolor=American states=Canada region=Six Nations of the Grand River First Nation speakers= 100 200 fam1=Iroquoian fam2=Northern Iroquoian fam3=Lake Iroquoian fam4=Iroquois Proper… …   Wikipedia

  • Anthony van Dyck — Van Dyck redirects here. For other uses, see Van Dyck (disambiguation). Self Portrait With a Sunflower showing the gold collar and medal King Charles I gave him in 1633. The sunflower may represent the king, or royal patronage.[1] Sir Anthony van …   Wikipedia

  • Cornelius Van Allen Van Dyck — Part of a series on Protestant missions to the Middle East Background Christianity Protestantism Missions timeline People Samuel Marinus Zwemer Anthony Norris Groves …   Wikipedia

  • Plautdietsch language — Plautdietsch Spoken in Argentina, Belize, Bolivia, Brazil, Canada, Germany, Mexico, Paraguay, Peru, Russia, United States, Ukraine, Uruguay Native speakers 260,710 – 318,500 …   Wikipedia

  • East Cree language — East Cree Īyiyū Ayimūn (N), Īnū Ayimūn (S) Spoken in Canada Region Quebec Native speakers 12,600  (1997) …   Wikipedia

  • Binary tree — Not to be confused with B tree. A simple binary tree of size 9 and height 3, with a root node whose value is 2. The above tree is unbalanced and not sorted. In computer science, a binary tree is a tree data structure in which each node has at… …   Wikipedia

  • Catalan number — For names of numbers in Catalan, see List of numbers in various languages#Occitano Romance. In combinatorial mathematics, the Catalan numbers form a sequence of natural numbers that occur in various counting problems, often involving recursively… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”