|
|
|
|
|
Let be an alphabet. We then define the following using the powers of an alphabet and infinite union, where
.
where is the element called empty string. A string is an element of , meaning that it is a grouping of symbols from one after another (via concatenation). For example, is a string, and is a
different string. A string is also commonly called a word. , like , contains all finite strings except that does not contain the empty string . Given a string
, a string is a substring of if for some strings
. For example,
, and (the empty string) are all substrings of the string .
Definition. A language over is a subset of , meaning that it is a set of strings made from the symbols in the alphabet .
Take for example an alphabet
. The following are all languages over :
-
,
-
,
- The empty set
. In the context of languages,
is called the empty language.
A language is said to be proper if the empty string does not belong to it:
. Otherwise, it is improper. In the examples above, the first language is improper, while the rest are proper. A language can be arbitrarily formed, or constructed via some set of rules called a formal grammar.
Remark. A language can also be described in terms of “infinite” alphabets. For example, in model theory, a language is built from a set of symbols, together with a set of variables. These sets are often infinite. Another way of generalizing the notion of a language is to allow the strings to have infinite lengths. The way to do this is to think of a string as a partial function from some set to the alphabet such that
. Then the length of a string is just
. This specializes to the finite case if we take to be the set of all non-negative integers.
|
"language" is owned by mps. [ full author list (4) | owner history (2) ]
|
|
(view preamble)
See Also: alphabet, context-free language, regular language, deterministic finite automaton, non-deterministic finite automaton, Kleene star, formal grammar, first-order language, first order language, word
| Also defines: |
string, empty language, substring, proper language, improper language |
|
|
Cross-references: integers, length of a string, partial function, lengths, variables, model theory, terms, formal grammar, empty set, subset, finite, contains, concatenation, empty string, union, infinite, alphabet
There are 160 references to this entry.
This is version 23 of language, born on 2002-02-03, modified 2007-11-27.
Object id is 1767, canonical name is Language.
Accessed 17752 times total.
Classification:
| AMS MSC: | 03C07 (Mathematical logic and foundations :: Model theory :: Basic properties of first-order languages and structures) | | | 68Q45 (Computer science :: Theory of computing :: Formal languages and automata) |
|
|
|
|
|
|
Pending Errata and Addenda
|
|
|
|
|
|
|
|
|
|
|