| Formal Language |
Article Index for Formal |
Website Links For Formal |
Information AboutFormal Language |
| CATEGORIES ABOUT FORMAL LANGUAGE | |
| formal languages | |
|
In Mathematics , Logic , and Computer Science , a formal language is a language that is defined by precise mathematical or machine processable formulas. Like languages in Linguistics , formal languages generally have two aspects:
FORMAL LANGUAGE THEORY The branch of mathematics and computer science which studies exclusively the theory of language syntax is known as formal language theory. In formal language theory, a language is nothing more than its syntax; questions of semantics are not addressed in this specialty. Elementary example In mathematics, a formal language consists of two parts, an ''alphabet'' and rules of ''syntax''. The ''alphabet'' is any set of symbols; the rules of ''syntax'' are rules that a String of these symbols must follow if it is to be considered part of the formal language. As a simple example, consider the ''alphabet'' {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, +, =} together with the following rules of ''syntax'':
Under these rules, the string "23+4=555" is in the language, the string "=234=+" is not. This formal language expresses whole numbers, well-formed addition statements, and well-formed addition equalities, but it expresses only what they look like (their Syntax ), not what they mean ( Semantics ). For instance, nowhere in these rules is it defined that 0 means the number zero, or that + means addition. The rest of this article is devoted to the basic notions of formal language theory. Definition and basic terminology In formal language theory, a language is defined as a possibly infinite set of finite-length sequences of elements drawn from a specified finite set, say . The set is called the ''alphabet'' of the language; an element of is called a ''symbol'' or ''character''; a finite sequence of symbols/characters is called a ''string''; an element of the language is called a ''word''. However, the theory is not concerned with applications at all, and therefore, completely neutral to what symbols and words actually stand for. For instance, in Linguistics , formal language theory can be applied at many different levels of language description simultaneously:
Examples As an example of a formal language, an alphabet might be , and a string over that alphabet might be . A typical language over that alphabet, containing that string, would be the set of all strings which contain the same number of symbols and . The empty word (that is, length-zero string) is allowed and is often denoted by , 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 belonging to it may be unbounded). Some more examples:
Language specification formalisms Formal language theory rarely concerns itself with particular languages (except as examples), but is mainly concerned with the study of various types of formalisms to describe languages. For instance, a language can be given as
Typical questions asked about such formalisms include:
Surprisingly often, the answer to these decision problems is "it cannot be done at all", or "it is extremely expensive" (with a precise characterization of how expensive exactly). Therefore, formal language theory is a major application area of Computability Theory and Complexity Theory . Operations on languages Certain operations on languages are common. This includes the standard set operations, such as union, intersection, and complementation. Another class of operation is the elementwise application of string operations. Examples: suppose and are languages over some common alphabet.
eg L of a language w.r.t. a given alphabet consists of all strings over the alphabet that are not in the language. Such 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 Language s are known to be closed under union, concatenation, and intersection with Regular Language s, but not closed under intersection or complementation. REFERENCES
SEE ALSO
EXTERNAL LINKS
= Drafts of some chapters in the "Handbook of Formal Language Theory", Vol. 1-3, G. Rozenberg and A. Salomaa (eds.), Springer Verlag, (1997):
|
|
|