{"id":198,"date":"2015-04-23T12:14:02","date_gmt":"2015-04-23T10:14:02","guid":{"rendered":"http:\/\/duch.mimuw.edu.pl\/~bojan\/podpunkt\/?page_id=198"},"modified":"2015-09-22T16:27:02","modified_gmt":"2015-09-22T14:27:02","slug":"1-introduction-to-monoids","status":"publish","type":"page","link":"https:\/\/www.mimuw.edu.pl\/~bojan\/20142015-2\/alg\/1-introduction-to-monoids","title":{"rendered":"1. Introduction to monoids"},"content":{"rendered":"<p>A monoid is a set with an empty element, and an associative multiplication\u00a0operation. We present two formal definitions of this concept, namely the classical one in Definition 1, and a slightly nonstandard one in Definition 2.<\/p>\n<p><strong>Definition 1.\u00a0<\/strong>A monoid consists of a universe <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-361fcbd59862666c6a4178483821b904_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"17\" style=\"vertical-align: 0px;\"\/> together with an identity element <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-8e775251f6f92491eb3e7c7da8359416_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#49;&#32;&#92;&#105;&#110;&#32;&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"43\" style=\"vertical-align: -1px;\"\/> and a multiplication\u00a0operation, denoted multiplicatively, which is associative in the sense that <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 16px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-1d11dba27e881f453784b474db8323a9_l3.png\" height=\"16\" width=\"151\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#40;&#109;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#110;&#41;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#107;&#32;&#61;&#32;&#109;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#40;&#110;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#107;&#41;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> holds for every <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-53c2256916ddbf53adbbad7e808af990_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#44;&#110;&#44;&#107;&#32;&#92;&#105;&#110;&#32;&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"82\" style=\"vertical-align: -3px;\"\/>. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b06cee67d5b1a769f0a344ace98d5692_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#66;&#111;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/><\/p>\n<p>The definition says that the order of evaluation in a monoid is not important, i.e. that different ways of parenthesising a sequence of elements in the monoid will yield the same result as far as monoid multiplication is concerned. This is made explicit in the following fact, which is implicitly presented to students already in primary school (at least this was the case for me).<\/p>\n<p><strong>Fact 1.\u00a0<\/strong>Let <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-361fcbd59862666c6a4178483821b904_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"17\" style=\"vertical-align: 0px;\"\/> be a monoid, and let <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-09f22c854365a86267f8fbee480ec449_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#49;&#44;&#92;&#108;&#100;&#111;&#116;&#115;&#44;&#109;&#95;&#107;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"76\" style=\"vertical-align: -3px;\"\/> be a sequence of elements in \u00a0<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-361fcbd59862666c6a4178483821b904_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"17\" style=\"vertical-align: 0px;\"\/>. For any possible way of parenthesising the sequence and multiplying it in the monoid, the result is the same.<\/p>\n<p><strong>Proof. <\/strong>A parenthesisation can be viewed as a binary tree, where the leaves are labelled by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-09f22c854365a86267f8fbee480ec449_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#49;&#44;&#92;&#108;&#100;&#111;&#116;&#115;&#44;&#109;&#95;&#107;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"76\" style=\"vertical-align: -3px;\"\/> when read from left to right. The associativity equation in Definition 1 says that doing a rotation does not affect the value of a tree. Every two trees that have the same sequence of leaves can be transformed into each other using a finite sequence of rotations. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b06cee67d5b1a769f0a344ace98d5692_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#66;&#111;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/><\/p>\n<p>In light of the above proof, the definition of associativity in Definition 1 might seem a little bit of a hack. An alternative definition is presented below. The key is that the multiplication\u00a0operation is no longer binary, but takes in an arbitrary word. This allows a new statement of the associativity condition, in the form of a commuting diagram. The new statement, easily seen to be equivalent with the classical definition in Definition 1, will be a basis for further <a title=\"8. Monads\" href=\"http:\/\/duch.mimuw.edu.pl\/~bojan\/podpunkt\/20142015-2\/alg\/8-monads\">generalisations later in the lecture<\/a>. Also because of these later generalisations, we write some of the subsequence definitions, like homomorphisms, in terms of commuting diagrams.<\/p>\n<p><strong>Definition 2<\/strong>. A monoid consists of a universe <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-361fcbd59862666c6a4178483821b904_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"17\" style=\"vertical-align: 0px;\"\/> together with a\u00a0multiplication\u00a0operation <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 14px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-7ec610b0981cbdc27c8440a5171667f5_l3.png\" height=\"14\" width=\"106\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#92;&#109;&#117;&#108;&#116;&#110;&#111;&#97;&#114;&#103;&#32;&#58;&#32;&#77;&#94;&#42;&#32;&#92;&#116;&#111;&#32;&#77;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> which maps each one letter word <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-a27dd73ff3c909d2773964c02b4a4298_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"14\" style=\"vertical-align: 0px;\"\/> \u00a0to <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-a27dd73ff3c909d2773964c02b4a4298_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"14\" style=\"vertical-align: 0px;\"\/>, and which is associative in the sense that the following diagram commutes <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 80px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-15ea419be1906afd07ef5d71d72c03a7_l3.png\" height=\"80\" width=\"138\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#92;&#120;&#121;&#109;&#97;&#116;&#114;&#105;&#120;&#123;&#40;&#77;&#94;&#42;&#41;&#94;&#42;&#32;&#92;&#97;&#114;&#91;&#114;&#93;&#94;&#123;&#92;&#102;&#108;&#97;&#116;&#116;&#110;&#111;&#97;&#114;&#103;&#125;&#32;&#92;&#97;&#114;&#91;&#100;&#93;&#95;&#123;&#92;&#109;&#117;&#108;&#116;&#110;&#111;&#97;&#114;&#103;&#94;&#42;&#125;&#32;&#38;&#32;&#77;&#94;&#42;&#32;&#92;&#97;&#114;&#91;&#100;&#93;&#94;&#123;&#92;&#109;&#117;&#108;&#116;&#110;&#111;&#97;&#114;&#103;&#125;&#32;&#92;&#92;&#32;&#77;&#94;&#42;&#32;&#92;&#97;&#114;&#91;&#114;&#93;&#95;&#123;&#92;&#109;&#117;&#108;&#116;&#110;&#111;&#97;&#114;&#103;&#125;&#32;&#38;&#32;&#77;&#125;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> where <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-5fd97796b9a03c379371fb158c131be2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#102;&#108;&#97;&#116;&#116;&#110;&#111;&#97;&#114;&#103;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"23\" style=\"vertical-align: 0px;\"\/> flattens a word of words into a word in the obvious way, while <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-c222e11f42f5149983970beb60fa751a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#109;&#117;&#108;&#116;&#110;&#111;&#97;&#114;&#103;&#94;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"35\" style=\"vertical-align: 0px;\"\/> applies the\u00a0multiplication\u00a0operation to every word in a word of words.<\/p>\n<p><strong>Fact.\u00a0<\/strong>The two definitions are the same.<\/p>\n<p><b>Proof.\u00a0<\/b>Using Fact 1. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b06cee67d5b1a769f0a344ace98d5692_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#66;&#111;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/><\/p>\n<p><strong>Example 1.<\/strong>\u00a0If <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-aeb6fee794feaade92eebde4e9865fd9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#83;&#105;&#103;&#109;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/> is a set, then <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-dd9e926acd5eebf940a5272c41665efa_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#83;&#105;&#103;&#109;&#97;&#94;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"17\" style=\"vertical-align: 0px;\"\/> is a monoid, where the identity is the empty words, and concatenation is the monoid operation.\u00a0<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b06cee67d5b1a769f0a344ace98d5692_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#66;&#111;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/><\/p>\n<hr \/>\n<p><strong>Monoid homomorphisms<\/strong><\/p>\n<p>A monoid homomorphism if a function between monoids that preserves the structure of monoids, i.e.\u00a0a\u00a0<em>monoid homomorphism<\/em> between monoids <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-361fcbd59862666c6a4178483821b904_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"17\" style=\"vertical-align: 0px;\"\/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-155044c0e39cc120d08458d7852cae72_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#78;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"14\" style=\"vertical-align: 0px;\"\/> \u00a0is a function <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 12px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-be18c2b3a150fe23974498a73045586e_l3.png\" height=\"12\" width=\"77\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#104;&#32;&#58;&#32;&#77;&#32;&#92;&#116;&#111;&#32;&#78;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> \u00a0which preserves the identity element\u00a0and which is consistent with the multiplication\u00a0operation in the sense that <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 16px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-9a49cb59e3f67c5accd5d65aee7a2ef9_l3.png\" height=\"16\" width=\"151\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#104;&#40;&#109;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#110;&#41;&#32;&#61;&#32;&#104;&#40;&#109;&#41;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#104;&#40;&#110;&#41;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>An alternative definition of a homomorphism would be that the following diagram commutes<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 78px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-68ea84dbbe0bc8a8eff5eacbb54025b5_l3.png\" height=\"78\" width=\"140\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#92;&#120;&#121;&#109;&#97;&#116;&#114;&#105;&#120;&#123;&#77;&#94;&#42;&#32;&#92;&#97;&#114;&#91;&#114;&#93;&#94;&#123;&#104;&#94;&#42;&#125;&#32;&#92;&#97;&#114;&#91;&#100;&#93;&#95;&#123;&#92;&#109;&#117;&#108;&#116;&#32;&#77;&#125;&#32;&#38;&#32;&#78;&#94;&#42;&#32;&#92;&#97;&#114;&#91;&#100;&#93;&#94;&#123;&#92;&#109;&#117;&#108;&#116;&#32;&#78;&#125;&#32;&#92;&#92;&#32;&#77;&#32;&#92;&#97;&#114;&#91;&#114;&#93;&#95;&#104;&#32;&#38;&#32;&#78;&#125;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> with the two downward arrows representing the multiplication operations\u00a0in the respective monoids.<\/p>\n<p>Using monoid homomorphisms, we can express the following universal property of the monoid <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-dd9e926acd5eebf940a5272c41665efa_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#83;&#105;&#103;&#109;&#97;&#94;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"17\" style=\"vertical-align: 0px;\"\/>. It is generated by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-aeb6fee794feaade92eebde4e9865fd9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#83;&#105;&#103;&#109;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/>, and it is the biggest monoid generated by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-aeb6fee794feaade92eebde4e9865fd9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#83;&#105;&#103;&#109;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/> \u00a0in the following sense. For every monoid <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-155044c0e39cc120d08458d7852cae72_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#78;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"14\" style=\"vertical-align: 0px;\"\/> that is generated by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-aeb6fee794feaade92eebde4e9865fd9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#83;&#105;&#103;&#109;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/>, there exists a surjective monoid homomorphism <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 14px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-38fa76124c4eb76045dba8c493133b06_l3.png\" height=\"14\" width=\"81\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#104;&#32;&#58;&#32;&#92;&#83;&#105;&#103;&#109;&#97;&#94;&#42;&#32;&#92;&#116;&#111;&#32;&#77;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> which is the identity on the <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-aeb6fee794feaade92eebde4e9865fd9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#83;&#105;&#103;&#109;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/> generators. \u00a0This is property goes under the name &#8220;<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-dd9e926acd5eebf940a5272c41665efa_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#83;&#105;&#103;&#109;&#97;&#94;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"17\" style=\"vertical-align: 0px;\"\/> is the free monoid with generators <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-aeb6fee794feaade92eebde4e9865fd9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#83;&#105;&#103;&#109;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/>&#8220;.<\/p>\n<p>Monoid homomorphisms are closely related with functions that are compositional in the sense defined below. Let <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-361fcbd59862666c6a4178483821b904_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"17\" style=\"vertical-align: 0px;\"\/> be a monoid, and let <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-985853afefa0f9d11b09264aa12867af_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#88;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"14\" style=\"vertical-align: 0px;\"\/> be a set. A function <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 12px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-fc586640061a09379fcfa6ab7336098b_l3.png\" height=\"12\" width=\"77\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#104;&#32;&#58;&#32;&#77;&#32;&#92;&#116;&#111;&#32;&#88;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> is called <em>compositional<\/em>\u00a0if for every <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-917e014ed5b1e159101debae9a9c139c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#44;&#32;&#110;&#32;&#92;&#105;&#110;&#32;&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"66\" style=\"vertical-align: -3px;\"\/>, the value <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-9f2bd23f75492f17aa376e9f64213c07_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;&#40;&#109;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#110;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"54\" style=\"vertical-align: -4px;\"\/> is uniquely determined by the values <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-6a5d69e90f046ea724f1909a626f5760_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;&#40;&#109;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"34\" style=\"vertical-align: -4px;\"\/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-0485769f8e99eac1a63f674d158670a5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;&#40;&#110;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"29\" style=\"vertical-align: -4px;\"\/>. Again, compositionality can be stated in terms of terms of a commuting diagram: \u00a0<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-60f817b38fe1ea150775070c85afb9ae_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"9\" style=\"vertical-align: 0px;\"\/> is compositional if there is some function <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-8b7fe942aec8b84c9c115ed8d2bf42f3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#109;&#117;&#108;&#116;&#32;&#88;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"40\" style=\"vertical-align: -2px;\"\/> such that the following diagram commutes:\u00a0<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 78px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-3af53db2ce10aa8e420a9f77a6a91333_l3.png\" height=\"78\" width=\"140\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#92;&#120;&#121;&#109;&#97;&#116;&#114;&#105;&#120;&#123;&#77;&#94;&#42;&#32;&#92;&#97;&#114;&#91;&#114;&#93;&#94;&#123;&#104;&#94;&#42;&#125;&#32;&#92;&#97;&#114;&#91;&#100;&#93;&#95;&#123;&#92;&#109;&#117;&#108;&#116;&#32;&#77;&#125;&#32;&#38;&#32;&#88;&#94;&#42;&#32;&#92;&#97;&#114;&#91;&#100;&#93;&#94;&#123;&#92;&#109;&#117;&#108;&#116;&#32;&#88;&#125;&#32;&#92;&#92;&#32;&#77;&#32;&#92;&#97;&#114;&#91;&#114;&#93;&#95;&#104;&#32;&#38;&#32;&#88;&#125;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p><strong>Lemma.<\/strong> Let <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-361fcbd59862666c6a4178483821b904_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"17\" style=\"vertical-align: 0px;\"\/> be a monoid, and let <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-7e17283b497efc391cf7a428aa58d3a4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;&#32;&#58;&#32;&#77;&#32;&#92;&#116;&#111;&#32;&#88;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"77\" style=\"vertical-align: -1px;\"\/> be a sujrective compositional function. Then there exists (a unique) monoid structure on <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-985853afefa0f9d11b09264aa12867af_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#88;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"14\" style=\"vertical-align: 0px;\"\/> which makes <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-60f817b38fe1ea150775070c85afb9ae_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"9\" style=\"vertical-align: 0px;\"\/> into a monoid homomorphism.<\/p>\n<p><strong>Proof.<\/strong>\u00a0 Saying that <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-9f2bd23f75492f17aa376e9f64213c07_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;&#40;&#109;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#110;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"54\" style=\"vertical-align: -4px;\"\/> is uniquely determined by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-6a5d69e90f046ea724f1909a626f5760_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;&#40;&#109;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"34\" style=\"vertical-align: -4px;\"\/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-0485769f8e99eac1a63f674d158670a5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;&#40;&#110;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"29\" style=\"vertical-align: -4px;\"\/>, as in the definition of compositionally, means that there is a function <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 14px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-531bf2dec412cbf38da878381f361514_l3.png\" height=\"14\" width=\"108\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#102;&#32;&#58;&#32;&#88;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#88;&#32;&#92;&#116;&#111;&#32;&#88;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> such that every <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-f534bd11bc93f2298466b1bed06cc7b8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#44;&#110;&#32;&#92;&#105;&#110;&#32;&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"66\" style=\"vertical-align: -3px;\"\/> satisfy <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 16px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b984444be69dc348a8d42742818d8b49_l3.png\" height=\"16\" width=\"173\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#104;&#40;&#109;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#110;&#41;&#32;&#61;&#32;&#102;&#40;&#104;&#40;&#109;&#41;&#44;&#104;&#40;&#110;&#41;&#41;&#46;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>One uses <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-f93f283f23c84021475a1b4449b05867_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#102;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"9\" style=\"vertical-align: -3px;\"\/> to be the product operation in <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-985853afefa0f9d11b09264aa12867af_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#88;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"14\" style=\"vertical-align: 0px;\"\/>, and takes the identity to be the image under <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-60f817b38fe1ea150775070c85afb9ae_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"9\" style=\"vertical-align: 0px;\"\/> of the identity. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b06cee67d5b1a769f0a344ace98d5692_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#66;&#111;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/><\/p>\n<hr \/>\n<p><strong>Recognising languages<\/strong><\/p>\n<p>In this lecture, we will be interested in monoid as an alternative to finite automata, i.e. we will use monoids to recognise languages.<\/p>\n<p><strong>Definition<\/strong>. A language <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-a6ccb424a819b1bee6d09fa6b1b2b4c1_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#32;&#92;&#115;&#117;&#98;&#115;&#101;&#116;&#101;&#113;&#32;&#65;&#94;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"49\" style=\"vertical-align: -2px;\"\/> is said to be <em>recognised<\/em> by a monoid homomorphism <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 14px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-2e01e83cdc5fad50b1e50eebe4d4732d_l3.png\" height=\"14\" width=\"81\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#104;&#32;&#58;&#32;&#65;&#94;&#42;&#32;&#92;&#116;&#111;&#32;&#77;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> if membership in <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-ac2f63572b4c38b8fd7c6b645842a676_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#119;&#32;&#92;&#105;&#110;&#32;&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"41\" style=\"vertical-align: -1px;\"\/> is determined uniquely by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b02c1bdce524d39f0260adfcf826ae08_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;&#40;&#119;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"32\" style=\"vertical-align: -4px;\"\/>. In other words, there exists a subset <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-5fc786dd9ffb035c15494861611b06e1_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#70;&#32;&#92;&#115;&#117;&#98;&#115;&#101;&#116;&#101;&#113;&#32;&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"50\" style=\"vertical-align: -2px;\"\/> such that <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 16px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-1b973a3204353bce30b4bdd01c36cc53_l3.png\" height=\"16\" width=\"181\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#119;&#32;&#92;&#105;&#110;&#32;&#76;&#32;&#92;&#113;&#113;&#117;&#97;&#100;&#92;&#116;&#101;&#120;&#116;&#123;&#105;&#102;&#102;&#125;&#32;&#92;&#113;&#113;&#117;&#97;&#100;&#32;&#104;&#40;&#119;&#41;&#32;&#92;&#105;&#110;&#32;&#70;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> holds for every word <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-416a3d43deb90a72bd9fa86ed12ae4de_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#119;&#32;&#92;&#105;&#110;&#32;&#65;&#94;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"49\" style=\"vertical-align: -1px;\"\/>. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b06cee67d5b1a769f0a344ace98d5692_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#66;&#111;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/><\/p>\n<p>The following theorem shows that, as far as recognising languages is concerned, finite monoids and finite automata are equivalent.<\/p>\n<p><strong>Theorem 1. <\/strong>The following conditions are equivalent for every language <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-a6ccb424a819b1bee6d09fa6b1b2b4c1_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#32;&#92;&#115;&#117;&#98;&#115;&#101;&#116;&#101;&#113;&#32;&#65;&#94;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"49\" style=\"vertical-align: -2px;\"\/>:<br \/>\n\u2022 <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-c2289d1b720dbeb200c7be3944b43068_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"10\" style=\"vertical-align: 0px;\"\/> is recognised by a finite automaton;<br \/>\n\u2022 <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-c2289d1b720dbeb200c7be3944b43068_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"10\" style=\"vertical-align: 0px;\"\/> is recognised by a monoid homomorphism into a finite monoid.<\/p>\n<p><strong>Proof.<\/strong>\u00a0From a monoid one creates a deterministic automaton, whose states are elements of the monoid, and where the transition relation is obtained from the monoid operation in the obvious way. This proves the bottom-up implication. For the top-down implication, let us transform a nondeterministic automaton into a monoid.\u00a0<strong>\u00a0<\/strong>\u00a0Let <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-18e28edde062708c335091f4c8dac07c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#32;&#65;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: -1px;\"\/> be a nondeterministic automaton with input alphabet <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-6363e50f682c03591aa80dd1c1c3d8ac_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#65;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"12\" style=\"vertical-align: 0px;\"\/> and states <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-bed8547872890507f19a89d0b85aac65_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#81;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"12\" style=\"vertical-align: -3px;\"\/>. Define the function \u00a0<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 17px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-278a659abd64050c91a51fca9df7e287_l3.png\" height=\"17\" width=\"130\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#58;&#32;&#65;&#94;&#42;&#32;&#92;&#116;&#111;&#32;&#80;&#40;&#81;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#81;&#41;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> which sends a word <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-eedf2e7eca2b090be6b3ece6f6e31f7b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#119;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"11\" style=\"vertical-align: 0px;\"\/> to the set of pairs <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-4d6073e394bbb9ede4c67a7fe79524bc_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#112;&#44;&#113;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"32\" style=\"vertical-align: -4px;\"\/> such that there exists a run of the automaton which begins in <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-80c4e54e1e3be2cd42e31542a3f54526_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"9\" style=\"vertical-align: -3px;\"\/>, reads the word <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-eedf2e7eca2b090be6b3ece6f6e31f7b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#119;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"11\" style=\"vertical-align: 0px;\"\/>, and ends in <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-7b295853314f2d5a3c49b7e96e28be64_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"7\" style=\"vertical-align: -3px;\"\/>. One can show that <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-438e8fdf591faeec515845e54abcb185_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#101;&#108;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"7\" style=\"vertical-align: 0px;\"\/> is compositional, and therefore there is a monoid structure on its image which makes it into a monoid homomorphism. The appropriate multiplication\u00a0operation is simply composition of relations, while the identity is the identity relation. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b06cee67d5b1a769f0a344ace98d5692_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#66;&#111;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/><\/p>\n<p>Note how the transformation from a nondeterministic finite automaton\u00a0to a monoid incurs an exponential blowup. Note also that the transformation from nondeterministic finite automaton\u00a0to a deterministic finite automaton\u00a0is exponential, but going directly from a nondeterministic finite automaton\u00a0to monoids is not doubly exponential.<\/p>\n<hr \/>\n<p><strong>The syntactic monoid<\/strong><\/p>\n<p>Deterministic finite automaton have minimisation, i.e. there is always a minimal deterministic automaton that can be obtained from any other automaton by quotienting. The same holds for monoids, as proved in the following theorem.<\/p>\n<p><strong>Theorem 2.\u00a0<\/strong>For every language <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-a6ccb424a819b1bee6d09fa6b1b2b4c1_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#32;&#92;&#115;&#117;&#98;&#115;&#101;&#116;&#101;&#113;&#32;&#65;&#94;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"49\" style=\"vertical-align: -2px;\"\/> there exists a monoid homomorphism <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 16px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-019d900439b79838b7cbc94b5cf2d573_l3.png\" height=\"16\" width=\"85\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#104;&#32;&#58;&#32;&#65;&#94;&#42;&#32;&#92;&#116;&#111;&#32;&#32;&#77;&#44;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> called the <em>syntactic homomorphism of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-c2289d1b720dbeb200c7be3944b43068_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"10\" style=\"vertical-align: 0px;\"\/>,\u00a0<\/em>which recognises it and \u00a0is minimal in the sense that for every surjective monoid \u00a0homomorphism <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 16px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-d4169bccee052d7e903b27d4eab004c0_l3.png\" height=\"16\" width=\"78\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#103;&#32;&#58;&#32;&#65;&#94;&#42;&#32;&#92;&#116;&#111;&#32;&#78;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> which also recognises <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-c2289d1b720dbeb200c7be3944b43068_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"10\" style=\"vertical-align: 0px;\"\/>, there exists a unique monoid homomorphism which makes the following diagram commute <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 70px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-ab6fa8bc11fcb84aaba273dab2f6acba_l3.png\" height=\"70\" width=\"81\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#92;&#120;&#121;&#109;&#97;&#116;&#114;&#105;&#120;&#123;&#32;&#65;&#94;&#42;&#32;&#92;&#97;&#114;&#91;&#114;&#93;&#94;&#104;&#32;&#92;&#97;&#114;&#91;&#100;&#114;&#93;&#32;&#95;&#103;&#38;&#32;&#77;&#32;&#92;&#92;&#32;&#38;&#32;&#78;&#92;&#97;&#114;&#91;&#117;&#93;&#95;&#102;&#32;&#125;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p><strong>Proof.\u00a0<\/strong>Define the\u00a0<em>syntactic equivalence of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-c2289d1b720dbeb200c7be3944b43068_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"10\" style=\"vertical-align: 0px;\"\/>\u00a0<\/em>to be the equivalence relation on <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-68f635567d898c129ebfcb2ef85b14e0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#65;&#94;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"18\" style=\"vertical-align: 0px;\"\/> which identifies two words <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-11d683daa814c97df2979a3d35c57389_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#119;&#44;&#119;&#39;&#32;&#92;&#105;&#110;&#32;&#65;&#94;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"71\" style=\"vertical-align: -3px;\"\/> if \u00a0<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 15px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-30e862708364cea70a967a2477a00e52_l3.png\" height=\"15\" width=\"196\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#119;&#117;&#118;&#32;&#92;&#105;&#110;&#32;&#76;&#32;&#92;&#113;&#113;&#117;&#97;&#100;&#92;&#116;&#101;&#120;&#116;&#123;&#105;&#102;&#102;&#125;&#32;&#92;&#113;&#113;&#117;&#97;&#100;&#32;&#119;&#117;&#39;&#118;&#32;&#92;&#105;&#110;&#32;&#76;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> holds for every <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-1649003ee5f7c08ba8daee2e3ff95a4a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#117;&#44;&#118;&#32;&#92;&#105;&#110;&#32;&#65;&#94;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"61\" style=\"vertical-align: -3px;\"\/>. One can show that the function, call it <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-60f817b38fe1ea150775070c85afb9ae_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"9\" style=\"vertical-align: 0px;\"\/>, \u00a0that maps a word to its equivalence class is compositional, and therefore by Lemma 1, the set of equivalence classes is equipped with a monoid structure that makes <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-60f817b38fe1ea150775070c85afb9ae_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"9\" style=\"vertical-align: 0px;\"\/> into a monoid homomorphism. It is not difficult to check that <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-60f817b38fe1ea150775070c85afb9ae_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"9\" style=\"vertical-align: 0px;\"\/> is minimal as required in the theorem. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b06cee67d5b1a769f0a344ace98d5692_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#66;&#111;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"11\" style=\"vertical-align: 0px;\"\/><\/p>\n<p><strong>Exercise.\u00a0<\/strong>Prove that surjectivity is important in the above theorem.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A monoid is a set with an empty element, and an associative multiplication\u00a0operation. We present two formal definitions of this concept, namely the classical one in Definition 1, and a slightly nonstandard one in Definition 2. Definition 1.\u00a0A monoid consists of a universe together with an identity element and a multiplication\u00a0operation, denoted multiplicatively, which is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":42,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-198","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/pages\/198"}],"collection":[{"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/comments?post=198"}],"version-history":[{"count":6,"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/pages\/198\/revisions"}],"predecessor-version":[{"id":527,"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/pages\/198\/revisions\/527"}],"up":[{"embeddable":true,"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/pages\/42"}],"wp:attachment":[{"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/media?parent=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}