<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tcs.nju.edu.cn/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=61.6.239.245</id>
	<title>TCS Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://tcs.nju.edu.cn/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=61.6.239.245"/>
	<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Special:Contributions/61.6.239.245"/>
	<updated>2026-05-02T18:53:35Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Formal_language&amp;diff=7553</id>
		<title>Formal language</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Formal_language&amp;diff=7553"/>
		<updated>2017-02-25T00:57:20Z</updated>

		<summary type="html">&lt;p&gt;61.6.239.245: Fixed typo, Fixed grammar, Added links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Language&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Some examples of formal languages:&lt;br /&gt;
&lt;br /&gt;
* the set of all words over &amp;lt;math&amp;gt;{a, b}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
* the set &amp;lt;math&amp;gt;\left \{ a^{n}\right\}&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;n\,&amp;lt;/math&amp;gt; is a [[natural number]] and &amp;lt;math&amp;gt;a^n\,&amp;lt;/math&amp;gt; means &amp;lt;math&amp;gt;a\,&amp;lt;/math&amp;gt; repeated &amp;lt;math&amp;gt;n\,&amp;lt;/math&amp;gt; times&lt;br /&gt;
* finite languages, such as &amp;lt;math&amp;gt;\{\{a,b\},\{a, aa, bba\}\}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
* the set of syntactically correct programs in a given programming language; or&lt;br /&gt;
* the set of inputs upon which a certain [[Turing machine]] halts.&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
A formal language can be specified in a great variety of ways, such as:&lt;br /&gt;
&lt;br /&gt;
* Strings produced by some [[formal grammar]] (see [[Chomsky hierarchy]]);&lt;br /&gt;
* Strings described or matched by a [[regular expression]];&lt;br /&gt;
* Strings accepted by some [[automaton]], such as a [[Turing machine]] or [[Finite state machine|finite state automaton]];&lt;br /&gt;
* Strings indicated by a [[decision problem|decision procedure]] (a set of related YES/NO questions) where the answer is YES.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Operations==&lt;br /&gt;
Several operations can be used to produce new languages from given ones. Suppose &amp;lt;math&amp;gt;\boldsymbol{L}_{1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\boldsymbol{L}_{2}&amp;lt;/math&amp;gt; are languages over some common alphabet.&lt;br /&gt;
* The &#039;&#039;[[concatenation]]&#039;&#039; &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\boldsymbol{L}_{2}\,&amp;lt;/math&amp;gt; consists of all strings of the form &amp;lt;math&amp;gt;vw\,&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;v\,&amp;lt;/math&amp;gt; is a string from &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;w\,&amp;lt;/math&amp;gt; is a string from &amp;lt;math&amp;gt;\boldsymbol{L}_{2}\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The &#039;&#039;intersection&#039;&#039; &amp;lt;math&amp;gt;\boldsymbol{L}_1 \cap \boldsymbol{L}_2&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\boldsymbol{L}_{2}\,&amp;lt;/math&amp;gt; consists of all strings which are contained in &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt; and also in &amp;lt;math&amp;gt;\boldsymbol{L}_{2}\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The &#039;&#039;union&#039;&#039; &amp;lt;math&amp;gt;\boldsymbol{L}_1 \cup \boldsymbol{L}_2&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\boldsymbol{L}_{2}\,&amp;lt;/math&amp;gt; consists of all strings which are contained in &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt; or in &amp;lt;math&amp;gt;\boldsymbol{L}_{2}\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The &#039;&#039;complement&#039;&#039;  &amp;lt;math&amp;gt;\complement \boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt; of the language &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt; consists of all strings over the alphabet which are not contained in &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The &#039;&#039;right quotient&#039;&#039; &amp;lt;math&amp;gt;\boldsymbol{L}_{1}/\boldsymbol{L}_{2}\,&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt; by &amp;lt;math&amp;gt;\boldsymbol{L}_{2}\,&amp;lt;/math&amp;gt; consists of all strings &amp;lt;math&amp;gt;v\,&amp;lt;/math&amp;gt; for which there exists a string &amp;lt;math&amp;gt;w\,&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;\boldsymbol{L}_{2}\,&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;vw\,&amp;lt;/math&amp;gt; is in &amp;lt;math&amp;gt;\boldsymbol{L}_{1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The &#039;&#039;[[Kleene star]]&#039;&#039; &amp;lt;math&amp;gt;\boldsymbol{L}_{1}^{*}&amp;lt;/math&amp;gt; consists of all strings which can be written in the form &amp;lt;math&amp;gt;w_{1}w_{2}...w_{n}\,&amp;lt;/math&amp;gt; with strings &amp;lt;math&amp;gt;w_{i}\,&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n \ge 0&amp;lt;/math&amp;gt;. Note that this includes the empty string &amp;lt;math&amp;gt;\epsilon\,&amp;lt;/math&amp;gt; because &amp;lt;math&amp;gt;n = 0\,&amp;lt;/math&amp;gt; is allowed.&lt;br /&gt;
* The &#039;&#039;reverse&#039;&#039; &amp;lt;math&amp;gt;\boldsymbol{L}_{1}^{R}\,&amp;lt;/math&amp;gt; contains the reversed versions of all the strings in &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The &#039;&#039;shuffle&#039;&#039; of &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\boldsymbol{L}_{2}\,&amp;lt;/math&amp;gt; consists of all strings which can be written in the form &amp;lt;math&amp;gt;v_{1}w_{1}v_{2}w_{2}\dots v_{n}w_{n}&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;n \ge 1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v_{1},\dots,v_{n}\,&amp;lt;/math&amp;gt; are strings such that the concatenation &amp;lt;math&amp;gt;v_{1}\dots v_{n}&amp;lt;/math&amp;gt; is in &amp;lt;math&amp;gt;\boldsymbol{L}_{1}\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;w_{1},\dots,w_{n}&amp;lt;/math&amp;gt; are strings such that &amp;lt;math&amp;gt;w_{1}\dots w_{n}&amp;lt;/math&amp;gt; is in &amp;lt;math&amp;gt;\boldsymbol{L}_{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Other pages ==&lt;br /&gt;
* [[Language]] for languages in general&lt;br /&gt;
* [[Syntax]] for the form of a language in general&lt;br /&gt;
* [[Semantics]] for the meanings in a language&lt;br /&gt;
* [[Natural language]] for languages that are not formal&lt;br /&gt;
* [[Computer language]] for application of formal languages in computing&lt;br /&gt;
* [[Programming language]] for the application of formal languages to program computers&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* {{cite book&lt;br /&gt;
 | author = Hopcroft, J. &amp;amp; Ullman, J.&lt;br /&gt;
 | title = Introduction to Automata Theory, Languages, and Computation &lt;br /&gt;
 | publisher = Addison-Wesley&lt;br /&gt;
 | year = 1979&lt;br /&gt;
 | isbn=0-201-02988-X}}&lt;br /&gt;
* {{cite book&lt;br /&gt;
 | author = Helena Rasiowa and Roman Sikorski&lt;br /&gt;
 | title = The Mathematics of Metamathematics&lt;br /&gt;
 | publisher = PWN&lt;br /&gt;
 | year = 1970&lt;br /&gt;
 | edition = 3&amp;lt;sup&amp;gt;rd&amp;lt;/sup&amp;gt; ed.}}, chapter 6 &#039;&#039;Algebra of formalized languages&#039;&#039;.&lt;br /&gt;
* {{cite book&lt;br /&gt;
 | author = Rozemberg, G. &amp;amp; Salomaa, A. (eds.)&lt;br /&gt;
 | title = Introduction to Automata Theory, Languages, and Computation &lt;br /&gt;
 | publisher = Addison-Wesley&lt;br /&gt;
 | year = 1979&lt;br /&gt;
 | isbn=978-3-540-61486-9}}&lt;br /&gt;
&lt;br /&gt;
== Other websites ==&lt;br /&gt;
* http://icalp06.dsi.unive.it/ ICALP 2006 33rd International Colloquium on Automata, Languages and Programming.&lt;br /&gt;
* http://www.cs.auckland.ac.nz/CDMTCS/conferences/dlt/DLTConfSeries.html International Conferences on Developments in Language Theory&lt;br /&gt;
&lt;br /&gt;
[[Category:Mathematics]]&lt;br /&gt;
[[Category:Programming languages]]&lt;/div&gt;</summary>
		<author><name>61.6.239.245</name></author>
	</entry>
</feed>