Constructive proof to show the quotient of two regular languages is regular












5














I have a question regarding the quotient of two regular languages, $R$ and $L$.



I saw the answers to this question: are regular languages closed under division
and the proof sketch is not constructive, because $L$ can be any language.
I'm thinking about a constructive proof when $L$ is regular: how can we construct that $F2$ group in the case when $L$ is regular?



We can't go over every word $x$ in $L$ and check if $delta(q,x)in F1$ in the case when $L$ is infinite...










share|cite|improve this question









New contributor




A.G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    5














    I have a question regarding the quotient of two regular languages, $R$ and $L$.



    I saw the answers to this question: are regular languages closed under division
    and the proof sketch is not constructive, because $L$ can be any language.
    I'm thinking about a constructive proof when $L$ is regular: how can we construct that $F2$ group in the case when $L$ is regular?



    We can't go over every word $x$ in $L$ and check if $delta(q,x)in F1$ in the case when $L$ is infinite...










    share|cite|improve this question









    New contributor




    A.G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      5












      5








      5


      1





      I have a question regarding the quotient of two regular languages, $R$ and $L$.



      I saw the answers to this question: are regular languages closed under division
      and the proof sketch is not constructive, because $L$ can be any language.
      I'm thinking about a constructive proof when $L$ is regular: how can we construct that $F2$ group in the case when $L$ is regular?



      We can't go over every word $x$ in $L$ and check if $delta(q,x)in F1$ in the case when $L$ is infinite...










      share|cite|improve this question









      New contributor




      A.G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I have a question regarding the quotient of two regular languages, $R$ and $L$.



      I saw the answers to this question: are regular languages closed under division
      and the proof sketch is not constructive, because $L$ can be any language.
      I'm thinking about a constructive proof when $L$ is regular: how can we construct that $F2$ group in the case when $L$ is regular?



      We can't go over every word $x$ in $L$ and check if $delta(q,x)in F1$ in the case when $L$ is infinite...







      automata regular-languages finite-automata






      share|cite|improve this question









      New contributor




      A.G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|cite|improve this question









      New contributor




      A.G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|cite|improve this question




      share|cite|improve this question








      edited Dec 25 at 17:02









      Apass.Jack

      7,0511533




      7,0511533






      New contributor




      A.G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Dec 25 at 13:44









      A.G

      283




      283




      New contributor




      A.G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      A.G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      A.G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          2 Answers
          2






          active

          oldest

          votes


















          4














          In the question you link to, the automaton for the operation "division" (usually known as "quotient") $L_1/L_2$ is obtained from a FSA $M_1 = (Q,Sigma,delta,q_0,F_1)$ for $L_1$ by changing the final states. The new states are given as $F_2={qin Q mid delta(q,x)in F_1 text{ for some } xin L_2}$.



          The quotient is regular for regular $L_1$ even when $L_2$ is arbitrarily complex.




          We can't go over every word $x$ in $L_2$ and check if $delta(q,x)in F_1$
          in the case when $L$ is infinite...




          You are right that in general the construction is not effective. We just know how the final states are chosen, but we cannot definitely say which states are final. But in case $L_2$ is regular, we can determine which states are final, as regular languages are closed under intersection.



          For any state $q$ change $M_1$ simply by setting $q$ as its new initial state (instead of $q_0$): $M_q = (Q,Sigma,delta,q,F_1)$. Now $q$ is final (in $F_2$) iff the intersection $L(M_q) cap L_2$ is nonempty. Because any $x$ is the intersection is precisely an $xin L_2$ for which $delta(q,x)in F_1$ as required.






          share|cite|improve this answer





























            4














            The quotient of two languages $R$ and $L$ is
            $$R/L = left{xin Sigma^{*} : exists y in L. xy in Rright}$$



            Here is a constructive solution using a non-deterministic finite automaton (NFA) to show $R/L$ is regular when both $R$ and $L$ are regular.



            Let $(Q_1,Sigma,delta_1,s_1,F_1)$ and $(Q_2,Sigma,delta_2,s_2,F_2)$ be deterministic finite automata for $R$ and $L$ respectively. Define a NFA



            $$D=(Q_1 times {s_2} times {1} cup Q_1 times Q_2times {2}, Sigma, delta, (s_1,s_2, 1), F_1 times F_2times {2})$$
            where the transitions are:





            • $delta((q_1,s_2,1),sigma) = { (delta_1(q_1,sigma),s_2, 1)}$.


            • $delta((q_1,s_2,1),epsilon) = { (q_1,s_2, 2)}$.


            • $delta((q_1,q_2,2),sigma) = { (delta_1(q_1,sigma),delta_2(q_2,sigma), 2)}$.


            I'll leave it as an exercise for you to verify the language accepted by $D$ is $R/L$.






            share|cite|improve this answer





















              Your Answer





              StackExchange.ifUsing("editor", function () {
              return StackExchange.using("mathjaxEditing", function () {
              StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
              StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
              });
              });
              }, "mathjax-editing");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "419"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });






              A.G is a new contributor. Be nice, and check out our Code of Conduct.










              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f102037%2fconstructive-proof-to-show-the-quotient-of-two-regular-languages-is-regular%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              4














              In the question you link to, the automaton for the operation "division" (usually known as "quotient") $L_1/L_2$ is obtained from a FSA $M_1 = (Q,Sigma,delta,q_0,F_1)$ for $L_1$ by changing the final states. The new states are given as $F_2={qin Q mid delta(q,x)in F_1 text{ for some } xin L_2}$.



              The quotient is regular for regular $L_1$ even when $L_2$ is arbitrarily complex.




              We can't go over every word $x$ in $L_2$ and check if $delta(q,x)in F_1$
              in the case when $L$ is infinite...




              You are right that in general the construction is not effective. We just know how the final states are chosen, but we cannot definitely say which states are final. But in case $L_2$ is regular, we can determine which states are final, as regular languages are closed under intersection.



              For any state $q$ change $M_1$ simply by setting $q$ as its new initial state (instead of $q_0$): $M_q = (Q,Sigma,delta,q,F_1)$. Now $q$ is final (in $F_2$) iff the intersection $L(M_q) cap L_2$ is nonempty. Because any $x$ is the intersection is precisely an $xin L_2$ for which $delta(q,x)in F_1$ as required.






              share|cite|improve this answer


























                4














                In the question you link to, the automaton for the operation "division" (usually known as "quotient") $L_1/L_2$ is obtained from a FSA $M_1 = (Q,Sigma,delta,q_0,F_1)$ for $L_1$ by changing the final states. The new states are given as $F_2={qin Q mid delta(q,x)in F_1 text{ for some } xin L_2}$.



                The quotient is regular for regular $L_1$ even when $L_2$ is arbitrarily complex.




                We can't go over every word $x$ in $L_2$ and check if $delta(q,x)in F_1$
                in the case when $L$ is infinite...




                You are right that in general the construction is not effective. We just know how the final states are chosen, but we cannot definitely say which states are final. But in case $L_2$ is regular, we can determine which states are final, as regular languages are closed under intersection.



                For any state $q$ change $M_1$ simply by setting $q$ as its new initial state (instead of $q_0$): $M_q = (Q,Sigma,delta,q,F_1)$. Now $q$ is final (in $F_2$) iff the intersection $L(M_q) cap L_2$ is nonempty. Because any $x$ is the intersection is precisely an $xin L_2$ for which $delta(q,x)in F_1$ as required.






                share|cite|improve this answer
























                  4












                  4








                  4






                  In the question you link to, the automaton for the operation "division" (usually known as "quotient") $L_1/L_2$ is obtained from a FSA $M_1 = (Q,Sigma,delta,q_0,F_1)$ for $L_1$ by changing the final states. The new states are given as $F_2={qin Q mid delta(q,x)in F_1 text{ for some } xin L_2}$.



                  The quotient is regular for regular $L_1$ even when $L_2$ is arbitrarily complex.




                  We can't go over every word $x$ in $L_2$ and check if $delta(q,x)in F_1$
                  in the case when $L$ is infinite...




                  You are right that in general the construction is not effective. We just know how the final states are chosen, but we cannot definitely say which states are final. But in case $L_2$ is regular, we can determine which states are final, as regular languages are closed under intersection.



                  For any state $q$ change $M_1$ simply by setting $q$ as its new initial state (instead of $q_0$): $M_q = (Q,Sigma,delta,q,F_1)$. Now $q$ is final (in $F_2$) iff the intersection $L(M_q) cap L_2$ is nonempty. Because any $x$ is the intersection is precisely an $xin L_2$ for which $delta(q,x)in F_1$ as required.






                  share|cite|improve this answer












                  In the question you link to, the automaton for the operation "division" (usually known as "quotient") $L_1/L_2$ is obtained from a FSA $M_1 = (Q,Sigma,delta,q_0,F_1)$ for $L_1$ by changing the final states. The new states are given as $F_2={qin Q mid delta(q,x)in F_1 text{ for some } xin L_2}$.



                  The quotient is regular for regular $L_1$ even when $L_2$ is arbitrarily complex.




                  We can't go over every word $x$ in $L_2$ and check if $delta(q,x)in F_1$
                  in the case when $L$ is infinite...




                  You are right that in general the construction is not effective. We just know how the final states are chosen, but we cannot definitely say which states are final. But in case $L_2$ is regular, we can determine which states are final, as regular languages are closed under intersection.



                  For any state $q$ change $M_1$ simply by setting $q$ as its new initial state (instead of $q_0$): $M_q = (Q,Sigma,delta,q,F_1)$. Now $q$ is final (in $F_2$) iff the intersection $L(M_q) cap L_2$ is nonempty. Because any $x$ is the intersection is precisely an $xin L_2$ for which $delta(q,x)in F_1$ as required.







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Dec 25 at 23:19









                  Hendrik Jan

                  20.7k2464




                  20.7k2464























                      4














                      The quotient of two languages $R$ and $L$ is
                      $$R/L = left{xin Sigma^{*} : exists y in L. xy in Rright}$$



                      Here is a constructive solution using a non-deterministic finite automaton (NFA) to show $R/L$ is regular when both $R$ and $L$ are regular.



                      Let $(Q_1,Sigma,delta_1,s_1,F_1)$ and $(Q_2,Sigma,delta_2,s_2,F_2)$ be deterministic finite automata for $R$ and $L$ respectively. Define a NFA



                      $$D=(Q_1 times {s_2} times {1} cup Q_1 times Q_2times {2}, Sigma, delta, (s_1,s_2, 1), F_1 times F_2times {2})$$
                      where the transitions are:





                      • $delta((q_1,s_2,1),sigma) = { (delta_1(q_1,sigma),s_2, 1)}$.


                      • $delta((q_1,s_2,1),epsilon) = { (q_1,s_2, 2)}$.


                      • $delta((q_1,q_2,2),sigma) = { (delta_1(q_1,sigma),delta_2(q_2,sigma), 2)}$.


                      I'll leave it as an exercise for you to verify the language accepted by $D$ is $R/L$.






                      share|cite|improve this answer


























                        4














                        The quotient of two languages $R$ and $L$ is
                        $$R/L = left{xin Sigma^{*} : exists y in L. xy in Rright}$$



                        Here is a constructive solution using a non-deterministic finite automaton (NFA) to show $R/L$ is regular when both $R$ and $L$ are regular.



                        Let $(Q_1,Sigma,delta_1,s_1,F_1)$ and $(Q_2,Sigma,delta_2,s_2,F_2)$ be deterministic finite automata for $R$ and $L$ respectively. Define a NFA



                        $$D=(Q_1 times {s_2} times {1} cup Q_1 times Q_2times {2}, Sigma, delta, (s_1,s_2, 1), F_1 times F_2times {2})$$
                        where the transitions are:





                        • $delta((q_1,s_2,1),sigma) = { (delta_1(q_1,sigma),s_2, 1)}$.


                        • $delta((q_1,s_2,1),epsilon) = { (q_1,s_2, 2)}$.


                        • $delta((q_1,q_2,2),sigma) = { (delta_1(q_1,sigma),delta_2(q_2,sigma), 2)}$.


                        I'll leave it as an exercise for you to verify the language accepted by $D$ is $R/L$.






                        share|cite|improve this answer
























                          4












                          4








                          4






                          The quotient of two languages $R$ and $L$ is
                          $$R/L = left{xin Sigma^{*} : exists y in L. xy in Rright}$$



                          Here is a constructive solution using a non-deterministic finite automaton (NFA) to show $R/L$ is regular when both $R$ and $L$ are regular.



                          Let $(Q_1,Sigma,delta_1,s_1,F_1)$ and $(Q_2,Sigma,delta_2,s_2,F_2)$ be deterministic finite automata for $R$ and $L$ respectively. Define a NFA



                          $$D=(Q_1 times {s_2} times {1} cup Q_1 times Q_2times {2}, Sigma, delta, (s_1,s_2, 1), F_1 times F_2times {2})$$
                          where the transitions are:





                          • $delta((q_1,s_2,1),sigma) = { (delta_1(q_1,sigma),s_2, 1)}$.


                          • $delta((q_1,s_2,1),epsilon) = { (q_1,s_2, 2)}$.


                          • $delta((q_1,q_2,2),sigma) = { (delta_1(q_1,sigma),delta_2(q_2,sigma), 2)}$.


                          I'll leave it as an exercise for you to verify the language accepted by $D$ is $R/L$.






                          share|cite|improve this answer












                          The quotient of two languages $R$ and $L$ is
                          $$R/L = left{xin Sigma^{*} : exists y in L. xy in Rright}$$



                          Here is a constructive solution using a non-deterministic finite automaton (NFA) to show $R/L$ is regular when both $R$ and $L$ are regular.



                          Let $(Q_1,Sigma,delta_1,s_1,F_1)$ and $(Q_2,Sigma,delta_2,s_2,F_2)$ be deterministic finite automata for $R$ and $L$ respectively. Define a NFA



                          $$D=(Q_1 times {s_2} times {1} cup Q_1 times Q_2times {2}, Sigma, delta, (s_1,s_2, 1), F_1 times F_2times {2})$$
                          where the transitions are:





                          • $delta((q_1,s_2,1),sigma) = { (delta_1(q_1,sigma),s_2, 1)}$.


                          • $delta((q_1,s_2,1),epsilon) = { (q_1,s_2, 2)}$.


                          • $delta((q_1,q_2,2),sigma) = { (delta_1(q_1,sigma),delta_2(q_2,sigma), 2)}$.


                          I'll leave it as an exercise for you to verify the language accepted by $D$ is $R/L$.







                          share|cite|improve this answer












                          share|cite|improve this answer



                          share|cite|improve this answer










                          answered Dec 25 at 22:00









                          Apass.Jack

                          7,0511533




                          7,0511533






















                              A.G is a new contributor. Be nice, and check out our Code of Conduct.










                              draft saved

                              draft discarded


















                              A.G is a new contributor. Be nice, and check out our Code of Conduct.













                              A.G is a new contributor. Be nice, and check out our Code of Conduct.












                              A.G is a new contributor. Be nice, and check out our Code of Conduct.
















                              Thanks for contributing an answer to Computer Science Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              Use MathJax to format equations. MathJax reference.


                              To learn more, see our tips on writing great answers.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f102037%2fconstructive-proof-to-show-the-quotient-of-two-regular-languages-is-regular%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              How did Captain America manage to do this?

                              迪纳利

                              南乌拉尔铁路局