Navigation
  • Home
  • Recent
  • Most Active
  • Popular
  • Blog
  • Credits
  • RSS
  •   Interaction
  • Register
  • Statistics
  •   Help
  • Suggestions
  • Contact Us
  • How to Edit
  • Help



  • [Edit]


    In mathematics, logic, and computer science, a formal language L is a set of finite-length sequences of elements drawn from a specified finite set A of symbols. Among the more common options that are found in applications, a formal language may be viewed as being analogous to (1) a collection of words or (2) a collection of sentences. In Case 1, the set A is called the alphabet of L, whose elements are called words. In Case 2, the set A is called the lexicon or the vocabulary of L, whose elements are then called sentences. In any case, the mathematical theory that treats formal languages in general is known as formal language theory.
    Although it is common to hear the term formal language used in other contexts to refer to a mode of expression that is more disciplined or more precise than everyday speech, the sense of formal language discussed in this article is restricted to its meaning in formal language theory.

    An alphabet might be left , and a string over that alphabet might be ababba.

    A typical language over that alphabet, containing that string, would be the set of all strings which contain the same number of symbols a and b.

    The empty word (that is, length-zero string) is allowed and is often denoted by e, epsilon or Lambda. While the alphabet is a finite set and every string has finite length, a language may very well have infinitely many member strings (because the length of words in it may be unbounded).

    A question often asked about formal languages is "how difficult is it to decide whether a given word belongs to a particular language?"
    This is the domain of computability theory and complexity theory.


        Formal language
            Examples
            Specification
            Operations
            See also
            Further reading

    top

    Examples

    Some examples of formal languages:

      the set of all words over
      the set left , n is a natural number and a^ means a repeated n times
      Finite languages, such as -
      the set of syntactically correct programs in a given programming language; or

    top

    Specification

    A formal language can be specified in a great variety of ways, such as:

      Strings indicated by a decision procedure (a set of related YES/NO questions) where the answer is YES.

    top

    Operations

    Several operations can be used to produce new languages from given ones. Suppose L_ and L_ are languages over some common alphabet.
      The concatenation L_L_ consists of all strings of the form vw where v is a string from L_ and w is a string from L_.
      The intersection L_1 cap L_2 of L_ and L_ consists of all strings which are contained in L_1 and also in L_.
      The union L_1 cup L_2 of L_ and L_ consists of all strings which are contained in L_ or in L_.
      The complement of the language L_ consists of all strings over the alphabet which are not contained in L_.
      The right quotient L_/L_ of L_ by L_ consists of all strings v for which there exists a string w in L_ such that vw is in L_.
      The Kleene star L_^ consists of all strings which can be written in the form w_w_...w_ with strings w_ in L_ and n ge 0. Note that this includes the empty string epsilon because n = 0 is allowed.
      The reverse L_^ contains the reversed versions of all the strings in L_.
      The shuffle of L_ and L_ consists of all strings which can be written in the form v_w_v_w_...v_w_ where n ge 1 and v_,...,v_ are strings such that the concatenation v_...v_ is in L_ and w_,...,w_ are strings such that w_...w_ is in L_.

    top

    See also
      Syntax for the form of a language in general

    top

    Further reading
      Hopcroft, J. & Ullman, J (1979). Introduction to Automata Theory, Languages, and Computation. Addison Wesley. ISBN 0-201-02988-X

      G. Rozenberg, A. Salomaa eds. Handbook of Formal Languages. Springer-Verlag. 3 vol.

      http://icalp06.dsi.unive.it/ ICALP 2006 33rd International Colloquium on Automata, Languages and Programming.

      http://www.cs.auckland.ac.nz/CDMTCS/conferences/dlt/DLTConfSeries.html International Conferences on Developments in Language Theory






     
    Search more:
     

       
    Source Privacy License Download Contact Us Atlas
    Scientus.org Dictionary (Yet Another Wiki) RC : 1.39
    This article is licensed under the GNU Free Documentation License [copyleft]. It uses material from the Wikipedia article "Formal language". link