Jump to content

Alphabet (formal languages): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Amirobot (talk | contribs)
"finite" -> "non-empty"...... "finite" is wrong in two ways: allows zero-length alphabets, and disallows infinite alphabets. Alphabets can be infinite (even uncountable)
Line 1: Line 1:
In [[computer science]] and [[mathematical logic]], an '''alphabet''' is a finite set of ''[[symbol]]s'' or ''letters'', e.g. characters or digits. The most common alphabet is {0,1}, the '''binary alphabet'''. A finite [[String (computer science)|string]] is a finite sequence of letters from an alphabet; for instance a binary string is a string drawn from the alphabet {0,1}. An infinite [[Infinite sequence#Infinite sequences in theoretical computer science|sequence]] of letters may be constructed from elements of an alphabet as well.
In [[computer science]] and [[mathematical logic]], an '''alphabet''' is a non-empty set of ''[[symbol]]s'' or ''letters'', e.g. characters or digits.<ref>{{Citation
|last1=Ebbinghaus
|first1=H.-D.
|last2=Flum
|first2=J.
|last3=Thomas
|first3=W.
|doi=
|title=Mathematical Logic
|url=http://www.springer.com/mathematics/book/978-0-387-94258-2
|publisher=[[Springer Science+Business Media|Springer]]
|location=[[New York City|New York]]
|edition=2nd
|isbn=0-387-94258-0
|year=1994
}} (defined at beginning of Part A, Section I)</ref> The most common alphabet is {0,1}, the '''binary alphabet'''. A finite [[String (computer science)|string]] is a finite sequence of letters from an alphabet; for instance a binary string is a string drawn from the alphabet {0,1}. An infinite [[Infinite sequence#Infinite sequences in theoretical computer science|sequence]] of letters may be constructed from elements of an alphabet as well.


Given an alphabet <math>\Sigma</math>, we write <math>\Sigma^*</math> to denote the set of all finite strings over the alphabet <math>\Sigma</math>. Here, the <math>{}^*</math> denotes the [[Kleene star]] operator. We write <math>\Sigma^\infty</math> (or occasionally, <math>\Sigma^\N</math> or <math>\Sigma^\omega</math>) to denote the set of all infinite sequences over the alphabet <math>\Sigma</math>.
Given an alphabet <math>\Sigma</math>, we write <math>\Sigma^*</math> to denote the set of all finite strings over the alphabet <math>\Sigma</math>. Here, the <math>{}^*</math> denotes the [[Kleene star]] operator. We write <math>\Sigma^\infty</math> (or occasionally, <math>\Sigma^\N</math> or <math>\Sigma^\omega</math>) to denote the set of all infinite sequences over the alphabet <math>\Sigma</math>.

Revision as of 11:50, 13 July 2011

In computer science and mathematical logic, an alphabet is a non-empty set of symbols or letters, e.g. characters or digits.[1] The most common alphabet is {0,1}, the binary alphabet. A finite string is a finite sequence of letters from an alphabet; for instance a binary string is a string drawn from the alphabet {0,1}. An infinite sequence of letters may be constructed from elements of an alphabet as well.

Given an alphabet , we write to denote the set of all finite strings over the alphabet . Here, the denotes the Kleene star operator. We write (or occasionally, or ) to denote the set of all infinite sequences over the alphabet .

For example, if we use the binary alphabet {0,1}, the strings (ε, 0, 1, 00, 01, 10, 11, 000, etc.) would all be in the Kleene closure of the alphabet (where ε represents the empty string)

Alphabets are important in the use of formal languages, automata and semiautomata. In most cases, for defining instances of automata, such as deterministic finite automata (DFAs), it is required to specify an alphabet from which the input strings for the automaton are built.

See also

References


  1. ^ Ebbinghaus, H.-D.; Flum, J.; Thomas, W. (1994), Mathematical Logic (2nd ed.), New York: Springer, ISBN 0-387-94258-0 (defined at beginning of Part A, Section I)