![]() |
|
|
| |
|
||||
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:
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.
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.
de:Formale Sprache es:Lenguaje formal fr:Langage formel ja:形式言語 nl:Formele taal pl:Język formalny zh:形式语言 |
|
|
|
|
|
|
|
Copyright 2008 WordIQ.com - Privacy Policy
::
Terms of Use
:: Contact Us
:: About Us This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Formal language". |