FACTOID # 42: English speaking kids are the world's biggest novel readers - but the least enthusiastic comic readers.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Formal language theory

In mathematics, logic and computer science, a formal language is a set of finite-length words (i.e. character strings) drawn from some finite alphabet, and the scientific theory that deals with these entities is known as formal language theory. Note that we can talk about formal language in many contexts (scientific, legal, linguistic and so on), meaning a mode of expression more careful and accurate, or more mannered than everyday speech. The sense of formal language dealt with in this article is the precise sense studied in formal language theory.


An alphabet might be {a, b}, 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, ε or Λ. 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).


Some examples of formal languages:

  • the set of all words over {a, b};
  • the set { an : n is a prime number };
  • the set of syntactically correct programs in a given programming language; or
  • the set of inputs upon which a certain Turing machine halts.

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

Several operations can be used to produce new languages from given ones. 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 of L1 and L2 consists of all strings which are contained in L1 and also in L2.
  • The union of L1 and L2 consists of all strings which are contained in L1 or in L2.
  • The complement of the language L1 consists of all strings over the alphabet which are not contained in L1.
  • The right quotient L1/L2 of L1 by L2 consists of all strings v for which there exists a string w in L2 such that vw is in L1.
  • The Kleene star L1* consists of all strings which can be written in the form w1w2...wn with strings wi in L1 and n ≥ 0. Note that this includes the empty string ε because n = 0 is allowed.
  • The reverse L1R contains the reversed versions of all the strings in L1.
  • The shuffle of L1 and L2 consists of all strings which can be written in the form v1w1v2w2...vnwn where n ≥ 1 and v1,...,vn are strings such that the concatenation v1...vn is in L1 and w1,...,wn are strings such that w1...wn is in L2.

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


  Results from FactBites:
 
PlanetMath: theory of formal languages (469 words)
Loosely speaking, a formal language is a language whose structrure can be specified with mathematical precision.
The study of formal languages is not only interesting as a mathematical discipline in its own right, but also because of its relevance to the foundations of mathematics, its applications, and surprising connections with other branches of mathematics.
This is version 5 of theory of formal languages, born on 2005-03-04, modified 2005-03-04.
Applications of Automata Theory (1111 words)
Automata theory is the basis for the theory of formal languages.
Formal languages are treated like mathematical sets, so they can undergo standard set theory operations such as union and intersection.
Using ideas of automata theory as a basis for generating the wide variety of life forms we see today, it becomes easier to think that sets of mathematical rules might be responsible for the complexity we notice every day.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.