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!
=== Constructions ===<!-- [[empty language]] redirects here --> For finite languages, one can explicitly enumerate all well-formed words. For example, we can describe a language {{mvar|L}} as just {{mvar|L}} = {a, b, ab, cba}. The [[degeneracy (mathematics)|degenerate]] case of this construction is the '''empty language''', which contains no words at all (<span class="nounderlines">{{mvar|L}} = [[∅]]</span>). However, even over a finite (non-empty) alphabet such as Σ = {a, b} there are an infinite number of finite-length words that can potentially be expressed: "a", "abb", "ababba", "aaababbbbaab", .... Therefore, formal languages are typically infinite, and describing an infinite formal language is not as simple as writing ''L'' = {a, b, ab, cba}. Here are some examples of formal languages: * {{mvar|L}} = Σ<sup>*</sup>, the set of ''all'' words over Σ; * {{mvar|L}} = {a}<sup>*</sup> = {a<sup>''n''</sup>}, where ''n'' ranges over the natural numbers and "a<sup>''n''</sup>" means "a" repeated ''n'' times (this is the set of words consisting only of the symbol "a"); * the set of syntactically correct programs in a given programming language (the syntax of which is usually defined by a [[context-free grammar]]); * the set of inputs upon which a certain [[Turing machine]] halts; or * the set of maximal strings of [[alphanumeric]] [[ASCII]] characters on this line, i.e.,<br> the set {the, set, of, maximal, strings, alphanumeric, ASCII, characters, on, this, line, i, e}.
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)