Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Formal language
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Words over an alphabet == {{main article|Alphabet (formal languages)}} An ''alphabet'', in the context of formal languages, can be any [[set (mathematics)|set]]; its elements are called ''letters''. An alphabet may contain an [[countable set|infinite]] number of elements;{{NoteTag|For example, [[first-order logic]] is often expressed using an alphabet that, besides symbols such as β§, Β¬, β and parentheses, contains infinitely many elements ''x''<sub>0</sub>, ''x''<sub>1</sub>, ''x''<sub>2</sub>, β¦ that play the role of variables.}} however, most definitions in formal language theory specify alphabets with a finite number of elements, and many results apply only to them. It often makes sense to use an [[alphabet]] in the usual sense of the word, or more generally any finite [[character encoding]] such as [[ASCII]] or [[Unicode]]. A '''word''' over an alphabet can be any finite sequence (i.e., [[string (computer science)|string]]) of letters. The set of all words over an alphabet Ξ£ is usually denoted by Ξ£<sup>*</sup> (using the [[Kleene star]]). The length of a word is the number of letters it is composed of. For any alphabet, there is only one word of length 0, the ''empty word'', which is often denoted by e, Ξ΅, Ξ» or even Ξ. By [[concatenation]] one can combine two words to form a new word, whose length is the sum of the lengths of the original words. The result of concatenating a word with the empty word is the original word. In some applications, especially in [[logic]], the alphabet is also known as the ''vocabulary'' and words are known as ''formulas'' or ''sentences''; this breaks the letter/word metaphor and replaces it by a word/sentence metaphor.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)