Formal Definition
Let Σ = { } be the alphabet consisting of the symbols 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.
Read more about this topic: Dyck Language
Famous quotes containing the words formal and/or definition:
“This is no argument against teaching manners to the young. On the contrary, it is a fine old tradition that ought to be resurrected from its current mothballs and put to work...In fact, children are much more comfortable when they know the guide rules for handling the social amenities. Its no more fun for a child to be introduced to a strange adult and have no idea what to say or do than it is for a grownup to go to a formal dinner and have no idea what fork to use.”
—Leontine Young (20th century)
“The physicians say, they are not materialists; but they are:MSpirit is matter reduced to an extreme thinness: O so thin!But the definition of spiritual should be, that which is its own evidence. What notions do they attach to love! what to religion! One would not willingly pronounce these words in their hearing, and give them the occasion to profane them.”
—Ralph Waldo Emerson (18031882)