kidzsearch.com > wiki
Formal language
In mathematics, logic, and computer science, a formal language is a language that is defined in a precise mathematical way. A language is defined using a set called the alphabet of the language. The members of the alphabet are usually called symbols of the language. The language is a set of sequences of symbols of the alphabet. The sequences usually have finite length. The sequences that are members of the language are called the words of the language or strings.
A precise definition is that a formal language [math]\boldsymbol{L}[/math] is typically characterized as an ordered pair of sets [math]\boldsymbol{L}=(\boldsymbol{A},\boldsymbol{F})[/math]. [math]\boldsymbol{A}[/math] is the alphabet, and each element of [math] \boldsymbol{F} [/math] is a sequence of elements.
Formal languages have lots of uses. A formal language is often thought of as:
 a collection of words
or
 a collection of sentences
In the first case, the set [math]\boldsymbol{A}[/math] is called the alphabet of [math]\boldsymbol{L}[/math], and the elements of [math]\boldsymbol{F}[/math] are called words. In the second, the set [math]\boldsymbol{A}[/math] is called the lexicon or the vocabulary of [math]\boldsymbol{F}[/math], while the elements of [math]\boldsymbol{F}[/math] are then called sentences. 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 meaning natural language that is more stilted, disciplined or precise than everyday speech, this article refers to the meaning in formal language theory, in maths, logic or computer science.
As an example of formal language, an alphabet might be [math]\left \{ a , b \right \}[/math]. One string over that alphabet is [math]ababba\,[/math].
A typical language over that alphabet, containing that string, would be the set of all strings which contain the same number of symbols [math]a\,[/math] and [math]b\,[/math].
The empty word (that is, lengthzero string) is allowed and is often denoted by [math] e\, [/math], [math] \epsilon\, [/math] or [math] \Lambda\, [/math]. While the alphabet is a finite set and every string has finite length, a language may very well have infinitely many member strings. This is because the length of words belonging to 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 kind of question that computability theory and complexity theory ask.
Examples
Some examples of formal languages:
 the set of all words over [math]{a, b}\,[/math]
 the set [math]\left \{ a^{n}\right\}[/math], where [math]n\,[/math] is a natural number and [math]a^n\,[/math] means [math]a\,[/math] repeated [math]n\,[/math] times
 Finite languages, such as [math]\{\{a,b\},\{a, aa, bba\}\}\,[/math]
 the set of syntactically correct programs in a given programming language; or
 the set of inputs upon which a certain Turing machine halts.
Specification
A formal language can be specified in a great variety of ways, such as:
 Strings produced by some formal grammar (see Chomsky hierarchy);
 Strings described or matched by a regular expression;
 Strings accepted by some automaton, such as a Turing machine or finite state automaton;
 Strings indicated by a decision procedure (a set of related YES/NO questions) where the answer is YES.
Other pages
 Language for languages in general
 Syntax for the form of a language in general
 Semantics for the meanings in a language
 Natural language for languages that are not formal
 Computer language for application of formal languages in computing
 Programming language for the application of formal languages to program computers
Further reading
 Hopcroft, J. & Ullman, J. (1979). Introduction to Automata Theory, Languages, and Computation. AddisonWesley.
.
 Helena Rasiowa and Roman Sikorski (1970). The Mathematics of Metamathematics (3^{rd} ed. ed.). PWN., chapter 6 Algebra of formalized languages.
 Rozemberg, G. & Salomaa, A. (eds.) (1979). Introduction to Automata Theory, Languages, and Computation. AddisonWesley.
.
Other websites
 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

