{"id":842,"date":"2015-12-14T19:47:58","date_gmt":"2015-12-14T18:47:58","guid":{"rendered":"http:\/\/www.mimuw.edu.pl\/~bojan\/?page_id=842"},"modified":"2016-12-29T16:25:41","modified_gmt":"2016-12-29T15:25:41","slug":"register-transducers","status":"publish","type":"page","link":"https:\/\/www.mimuw.edu.pl\/~bojan\/20152016-2\/jezyki-automaty-i-obliczenia-2\/6-transducers\/register-transducers","title":{"rendered":"Register transducers"},"content":{"rendered":"<p>Two-way automata are easy to describe, but a pain to work with. For example, it is difficult to show that they cannot do something, or it is difficult to show that they are closed under composition. Finally, it would be nice to have a one way model for efficiency reasons (the buzzword here is\u00a0<em>streaming<\/em>). This is where register automata come in, a model also known as streaming transducers.\u00a0 In the end, we will prove that it is equivalent to deterministic two-way automata with output.<\/p>\n<p>A <em>register transducer<\/em> consists of the following ingredients:<br \/>\n\u2022 an input alphabet <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;\"\/>;<br \/>\n\u2022 an output alphabet <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-6a76799f4c1833cdbda79a51e7a1783f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#71;&#97;&#109;&#109;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: -1px;\"\/>;<br \/>\n\u2022 a set of 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;\"\/> with a distinguished initial state <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-e680d3396108ecab7ad1bf91fb52920b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#48;&#32;&#92;&#105;&#110;&#32;&#81;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"45\" style=\"vertical-align: -3px;\"\/>;<br \/>\n\u2022 a set of registers <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-2c3ed362727b958141ddb6d2af724ecd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#82;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"12\" style=\"vertical-align: 0px;\"\/>;<br \/>\n\u2022 a transition function<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 40px;\"><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-7ceb0d14f783b527750b4287908336aa_l3.png\" height=\"40\" width=\"226\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#58;&#32;&#81;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#92;&#83;&#105;&#103;&#109;&#97;&#32;&#92;&#116;&#111;&#32;&#81;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#92;&#117;&#110;&#100;&#101;&#114;&#98;&#114;&#97;&#99;&#101;&#123;&#40;&#82;&#32;&#92;&#116;&#111;&#32;&#40;&#82;&#32;&#92;&#99;&#117;&#112;&#32;&#92;&#71;&#97;&#109;&#109;&#97;&#41;&#94;&#42;&#41;&#125;&#95;&#123;&#92;&#116;&#101;&#120;&#116;&#123;&#114;&#101;&#103;&#105;&#115;&#116;&#101;&#114;&#32;&#117;&#112;&#100;&#97;&#116;&#101;&#125;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>\u2022 an output function<\/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-4de799fea27401bc86d92b133a4c6c9d_l3.png\" height=\"17\" width=\"129\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#111;&#117;&#116;&#32;&#58;&#32;&#81;&#32;&#92;&#116;&#111;&#32;&#40;&#82;&#32;&#92;&#99;&#117;&#112;&#32;&#92;&#71;&#97;&#109;&#109;&#97;&#41;&#94;&#42;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>The automaton is run as follows. The registers store words over the output alphabet. Initially, every register stores the empty word. When the automaton is in state <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;\"\/> and it reads a letter <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b9876851baf92019e82e43590932dc73_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\"\/>, transition function is applied to <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-f0ba7f4e64c7a811d2c32643884d39f8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#113;&#44;&#97;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"33\" style=\"vertical-align: -4px;\"\/>, yielding a new state <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;\"\/> and a register update<\/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-5a33bee4ebf62d8967654d32121bc026_l3.png\" height=\"17\" width=\"116\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#102;&#32;&#58;&#32;&#82;&#32;&#92;&#116;&#111;&#32;&#40;&#82;&#32;&#92;&#99;&#117;&#112;&#32;&#92;&#71;&#97;&#109;&#109;&#97;&#41;&#94;&#42;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>Then, in parallel, each register <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-5f9ee823cc3794980fa8bb3288c67777_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#114;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"7\" style=\"vertical-align: 0px;\"\/> is\u00a0set to <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-66a6e3ae729888b1b6e5eef83647a2f8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#102;&#40;&#114;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"28\" style=\"vertical-align: -4px;\"\/>, with the register names replaced by\u00a0their contents. For example\u00a0if <\/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-0d1927cc67b34007a157340c07c2be38_l3.png\" height=\"16\" width=\"72\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#102;&#40;&#114;&#41;&#61;&#32;&#114;&#97;&#114;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> with <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b9876851baf92019e82e43590932dc73_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\"\/> being an input letter, then register <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-5f9ee823cc3794980fa8bb3288c67777_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#114;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"7\" style=\"vertical-align: 0px;\"\/> is replaced by its previous contents, then <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b9876851baf92019e82e43590932dc73_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\"\/>, and then its previous contents again.<\/p>\n<p>After the entire word has been processed, with the last state used being <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;\"\/>, then the automaton outputs <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-0779df46f25db72aa172aa2524d65653_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#111;&#117;&#116;&#40;&#113;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"41\" style=\"vertical-align: -4px;\"\/>, with register names\u00a0replaced by\u00a0their contents.<\/p>\n<p><strong>Copyless restriction.\u00a0<\/strong>The model, as defined above, goes beyond two-way automata with output. For example, one could initially set a register to <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-b9876851baf92019e82e43590932dc73_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\"\/>, and then duplicate its contents in every step, thus creating an output of exponential length. To avoid this, one introduces the following\u00a0<em>copyless restriction.\u00a0<\/em>We say that a register update<\/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-5a33bee4ebf62d8967654d32121bc026_l3.png\" height=\"17\" width=\"116\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#102;&#32;&#58;&#32;&#82;&#32;&#92;&#116;&#111;&#32;&#40;&#82;&#32;&#92;&#99;&#117;&#112;&#32;&#92;&#71;&#97;&#109;&#109;&#97;&#41;&#94;&#42;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>is\u00a0<em>copyless\u00a0<\/em>if\u00a0every register <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-f1b29fb53216e05a4ad6d131f0ca75c8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#114;&#32;&#92;&#105;&#110;&#32;&#82;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"39\" style=\"vertical-align: -1px;\"\/> appears in at most one word\u00a0<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-f66953d0b93b16ae3dfb0bd0e060fdde_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#102;&#40;&#115;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"27\" style=\"vertical-align: -4px;\"\/>, and in that word it appears at most once. The intuition is that the register contents are physical objects and can only be moved around and not duplicated.<\/p>\n<p>From now on, when we say register automaton, we assume that all register updates in the transition function are copyless.\u00a0The output function need not be copyless, since it is applied only once, and requiring it to be copyless does not weaken the model.<\/p>\n<p><strong>Future oracle.\u00a0<\/strong>A register automaton with a future oracle is defined as follows. The future oracle is a an automaton over the input alphabet, which is deterministic from right to left. If the states of the future oracle are <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-4ea9c849f1f3ffe3aee17ed595d147c0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"12\" style=\"vertical-align: 0px;\"\/>, then the transition function of the register automaton using this oracle is the same as in the definition of a register automaton, except that instead of seeing the current input letter from <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;\"\/>, one sees the state of the future oracle in <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-content\/ql-cache\/quicklatex.com-4ea9c849f1f3ffe3aee17ed595d147c0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"12\" style=\"vertical-align: 0px;\"\/>, as obtained by reading the remaining input, beginning at the end of the input and ending in the first position that has not been read yet.<\/p>\n<p>We now show that future oracles can be eliminated. In this particular model, past oracles do not make much sense, since they can be simulated by the state of the automaton.<\/p>\n<p><strong>Theorem.\u00a0<\/strong><em>For every register transducer with a\u00a0future\u00a0oracle, there is\u00a0register transducer\u00a0(without any oracle), which defines the same function from words to words.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Two-way automata are easy to describe, but a pain to work with. For example, it is difficult to show that they cannot do something, or it is difficult to show that they are closed under composition. Finally, it would be nice to have a one way model for efficiency reasons (the buzzword here is\u00a0streaming). This [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":789,"menu_order":3,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-842","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/pages\/842"}],"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=842"}],"version-history":[{"count":4,"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/pages\/842\/revisions"}],"predecessor-version":[{"id":1246,"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/pages\/842\/revisions\/1246"}],"up":[{"embeddable":true,"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/pages\/789"}],"wp:attachment":[{"href":"https:\/\/www.mimuw.edu.pl\/~bojan\/wp-json\/wp\/v2\/media?parent=842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}