Formal Language - Operations On Languages

Operations On Languages

Certain operations on languages are common. This includes the standard set operations, such as union, intersection, and complement. Another class of operation is the element-wise application of string operations.

Examples: suppose L1 and L2 are languages over some common alphabet.

  • The concatenation L1L2 consists of all strings of the form vw where v is a string from L1 and w is a string from L2.
  • The intersection L1L2 of L1 and L2 consists of all strings which are contained in both languages
  • The complement ¬L of a language with respect to a given alphabet consists of all strings over the alphabet that are not in the language.
  • The Kleene star: the language consisting of all words that are concatenations of 0 or more words in the original language;
  • Reversal:
    • Let e be the empty word, then eR = e, and
    • for each non-empty word w = x1xn over some alphabet, let wR = xnx1,
    • then for a formal language L, LR = {wR | wL}.
  • String homomorphism

Such string operations are used to investigate closure properties of classes of languages. A class of languages is closed under a particular operation when the operation, applied to languages in the class, always produces a language in the same class again. For instance, the context-free languages are known to be closed under union, concatenation, and intersection with regular languages, but not closed under intersection or complement. The theory of trios and abstract families of languages studies the most common closure properties of language families in their own right.

Closure properties of language families ( Op where both and are in the language family given by the column). After Hopcroft and Ullman.
Operation Regular DCFL CFL IND CSL recursive RE
Union Yes No Yes Yes Yes Yes Yes
Intersection Yes No No No Yes Yes Yes
Complement Yes Yes No No Yes Yes No
Concatenation Yes No Yes Yes Yes Yes Yes
Kleene star Yes No Yes Yes Yes Yes Yes
Homomorphism Yes No Yes Yes No No Yes
e-free Homomorphism Yes No Yes Yes Yes Yes Yes
Substitution Yes No Yes Yes Yes No Yes
Inverse Homomorphism Yes Yes Yes Yes Yes Yes Yes
Reverse Yes No Yes Yes Yes Yes Yes
Intersection with a regular language Yes Yes Yes Yes Yes Yes Yes

Read more about this topic:  Formal Language

Famous quotes containing the words operations and/or languages:

    A sociosphere of contact, control, persuasion and dissuasion, of exhibitions of inhibitions in massive or homeopathic doses...: this is obscenity. All structures turned inside out and exhibited, all operations rendered visible. In America this goes all the way from the bewildering network of aerial telephone and electric wires ... to the concrete multiplication of all the bodily functions in the home, the litany of ingredients on the tiniest can of food, the exhibition of income or IQ.
    Jean Baudrillard (b. 1929)

    Wealth is so much the greatest good that Fortune has to bestow that in the Latin and English languages it has usurped her name.
    William Lamb Melbourne, 2nd Viscount (1779–1848)