Can product DFA for intersection of two disjoint languages be minimal?












3














I know that it isn't necessary that cross product automaton for two minimal DFAs be minimal, but according to my analysis, if two DFAs do not have any common string then their cross product of minimal DFAs would be minimal. What should I do to prove this?










share|cite|improve this question





























    3














    I know that it isn't necessary that cross product automaton for two minimal DFAs be minimal, but according to my analysis, if two DFAs do not have any common string then their cross product of minimal DFAs would be minimal. What should I do to prove this?










    share|cite|improve this question



























      3












      3








      3


      1





      I know that it isn't necessary that cross product automaton for two minimal DFAs be minimal, but according to my analysis, if two DFAs do not have any common string then their cross product of minimal DFAs would be minimal. What should I do to prove this?










      share|cite|improve this question















      I know that it isn't necessary that cross product automaton for two minimal DFAs be minimal, but according to my analysis, if two DFAs do not have any common string then their cross product of minimal DFAs would be minimal. What should I do to prove this?







      finite-automata






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Dec 12 '18 at 7:22









      Yuval Filmus

      189k12177341




      189k12177341










      asked Dec 12 '18 at 3:04









      Amisha Bansal

      376




      376






















          3 Answers
          3






          active

          oldest

          votes


















          3














          No.



          Counterexample:



          Let alphabet $Sigma = left{ 0, 1 right}$, languages $L_1 = left{ w0 ,middle|, w in Sigma^ast right}$ (i.e. the last digit is $0$), $L_2 = left{ w1 ,middle|, w in Sigma^ast right}$ (i.e. the last digit is $1$). Note that $L_1 cap L_2 = emptyset$.



          Then the following DFAs $M_1$ and $M_2$ are minimal for $L_1$ and $L_2$ respectively:



          2-state DFA M_1



          2-state DFA M_2



          And the cross product of $M_1$ and $M_2$ (for the intersection of languages) is:



          complex DFA which recognizes the empty language



          But this is not minimal for the empty language. A minimal DFA for the language is:



          DFA which recognizes the empty language



          In fact, cross-product DFA of $M_1$ and $M_2$ recognizes an intersection of languages $L(M_1) cap L(M_2)$ (if a state of cross-product DFA is accepting when the original two states are both accepting on original DFAs). So in this case a generated cross-product DFA always recognizes the empty language. Since a minimal DFA for the empty language has only one state and cross-product DFA has ((#states of $M_1$) × (#states of $M_2$)) states, almost all cross-product DFAs are non-minimal.



          Also, even though if you define a state of cross-product DFA is accepting when either of the original two states is accepting, the above $(L_1, L_2)$ is a counterexample. Since $L_1 cup L_2 = Sigma^ast$, the minimal DFA has only one state.






          share|cite|improve this answer































            2














            No, the Cartesian product (a.k.a. cross product in the question) of two minimal automaton may not be minimal.



            Here are two simple counterexamples.



            Note that a DFA with only one state will either accept all words if its start state is also an accept state or accept no words otherwise.



            Let alphabet $Sigma = left{ aright}$. Let $E$ be a minimal DFA such that $L(E)$ is not empty nor all words. The number of states in $E$ must be greater than 1. Let $O$ be a minimal DFA such that $L(O)$ is the complement of $L(E)$. The number of states in $O$ must be greater than 1.



            An automaton $P$ which is an Cartesian product automaton of $E$ and $O$ must have at least 2x2=4 states.



            Suppose $P$ is constructed for the intersection of $L(E)$ and $L(O)$, i.e. the empty language. Its equivalent minimal DFA has 1 state, the start state, which is not an accept state.



            Suppose $P$ is constructed for the union of $L(E)$ and $L(O)$, i.e., ${a}^*$. its equivalent minimal DFA has 1 state, the start state, which is also an accept state.





            Please note the Cartesian product automaton of two DFA is not defined uniquely usually since it is allowed to choose different sets of accept states. This is the implicit view as in the book Introduction to the theory of computation by Michael Sipser.






            share|cite|improve this answer































              1














              Let $Q_A,Q_B$ be the number of states in $A,B$, respectively. The number of states in the product automaton is $Q_A Q_B$. Since $L(A) cap L(B) = emptyset$, the minimal automaton for $L(A) cap L(B) = emptyset$ contains a single state. This can only happen if $Q_A = Q_B = 1$, in which case $A,B in { emptyset, Sigma^* }$. We conclude that the product automaton is minimal exactly in the following three cases:





              1. $A = B = emptyset$.


              2. $A = emptyset$, $B = Sigma^*$.


              3. $A = Sigma^*$, $B = emptyset$.






              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
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f101421%2fcan-product-dfa-for-intersection-of-two-disjoint-languages-be-minimal%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                3














                No.



                Counterexample:



                Let alphabet $Sigma = left{ 0, 1 right}$, languages $L_1 = left{ w0 ,middle|, w in Sigma^ast right}$ (i.e. the last digit is $0$), $L_2 = left{ w1 ,middle|, w in Sigma^ast right}$ (i.e. the last digit is $1$). Note that $L_1 cap L_2 = emptyset$.



                Then the following DFAs $M_1$ and $M_2$ are minimal for $L_1$ and $L_2$ respectively:



                2-state DFA M_1



                2-state DFA M_2



                And the cross product of $M_1$ and $M_2$ (for the intersection of languages) is:



                complex DFA which recognizes the empty language



                But this is not minimal for the empty language. A minimal DFA for the language is:



                DFA which recognizes the empty language



                In fact, cross-product DFA of $M_1$ and $M_2$ recognizes an intersection of languages $L(M_1) cap L(M_2)$ (if a state of cross-product DFA is accepting when the original two states are both accepting on original DFAs). So in this case a generated cross-product DFA always recognizes the empty language. Since a minimal DFA for the empty language has only one state and cross-product DFA has ((#states of $M_1$) × (#states of $M_2$)) states, almost all cross-product DFAs are non-minimal.



                Also, even though if you define a state of cross-product DFA is accepting when either of the original two states is accepting, the above $(L_1, L_2)$ is a counterexample. Since $L_1 cup L_2 = Sigma^ast$, the minimal DFA has only one state.






                share|cite|improve this answer




























                  3














                  No.



                  Counterexample:



                  Let alphabet $Sigma = left{ 0, 1 right}$, languages $L_1 = left{ w0 ,middle|, w in Sigma^ast right}$ (i.e. the last digit is $0$), $L_2 = left{ w1 ,middle|, w in Sigma^ast right}$ (i.e. the last digit is $1$). Note that $L_1 cap L_2 = emptyset$.



                  Then the following DFAs $M_1$ and $M_2$ are minimal for $L_1$ and $L_2$ respectively:



                  2-state DFA M_1



                  2-state DFA M_2



                  And the cross product of $M_1$ and $M_2$ (for the intersection of languages) is:



                  complex DFA which recognizes the empty language



                  But this is not minimal for the empty language. A minimal DFA for the language is:



                  DFA which recognizes the empty language



                  In fact, cross-product DFA of $M_1$ and $M_2$ recognizes an intersection of languages $L(M_1) cap L(M_2)$ (if a state of cross-product DFA is accepting when the original two states are both accepting on original DFAs). So in this case a generated cross-product DFA always recognizes the empty language. Since a minimal DFA for the empty language has only one state and cross-product DFA has ((#states of $M_1$) × (#states of $M_2$)) states, almost all cross-product DFAs are non-minimal.



                  Also, even though if you define a state of cross-product DFA is accepting when either of the original two states is accepting, the above $(L_1, L_2)$ is a counterexample. Since $L_1 cup L_2 = Sigma^ast$, the minimal DFA has only one state.






                  share|cite|improve this answer


























                    3












                    3








                    3






                    No.



                    Counterexample:



                    Let alphabet $Sigma = left{ 0, 1 right}$, languages $L_1 = left{ w0 ,middle|, w in Sigma^ast right}$ (i.e. the last digit is $0$), $L_2 = left{ w1 ,middle|, w in Sigma^ast right}$ (i.e. the last digit is $1$). Note that $L_1 cap L_2 = emptyset$.



                    Then the following DFAs $M_1$ and $M_2$ are minimal for $L_1$ and $L_2$ respectively:



                    2-state DFA M_1



                    2-state DFA M_2



                    And the cross product of $M_1$ and $M_2$ (for the intersection of languages) is:



                    complex DFA which recognizes the empty language



                    But this is not minimal for the empty language. A minimal DFA for the language is:



                    DFA which recognizes the empty language



                    In fact, cross-product DFA of $M_1$ and $M_2$ recognizes an intersection of languages $L(M_1) cap L(M_2)$ (if a state of cross-product DFA is accepting when the original two states are both accepting on original DFAs). So in this case a generated cross-product DFA always recognizes the empty language. Since a minimal DFA for the empty language has only one state and cross-product DFA has ((#states of $M_1$) × (#states of $M_2$)) states, almost all cross-product DFAs are non-minimal.



                    Also, even though if you define a state of cross-product DFA is accepting when either of the original two states is accepting, the above $(L_1, L_2)$ is a counterexample. Since $L_1 cup L_2 = Sigma^ast$, the minimal DFA has only one state.






                    share|cite|improve this answer














                    No.



                    Counterexample:



                    Let alphabet $Sigma = left{ 0, 1 right}$, languages $L_1 = left{ w0 ,middle|, w in Sigma^ast right}$ (i.e. the last digit is $0$), $L_2 = left{ w1 ,middle|, w in Sigma^ast right}$ (i.e. the last digit is $1$). Note that $L_1 cap L_2 = emptyset$.



                    Then the following DFAs $M_1$ and $M_2$ are minimal for $L_1$ and $L_2$ respectively:



                    2-state DFA M_1



                    2-state DFA M_2



                    And the cross product of $M_1$ and $M_2$ (for the intersection of languages) is:



                    complex DFA which recognizes the empty language



                    But this is not minimal for the empty language. A minimal DFA for the language is:



                    DFA which recognizes the empty language



                    In fact, cross-product DFA of $M_1$ and $M_2$ recognizes an intersection of languages $L(M_1) cap L(M_2)$ (if a state of cross-product DFA is accepting when the original two states are both accepting on original DFAs). So in this case a generated cross-product DFA always recognizes the empty language. Since a minimal DFA for the empty language has only one state and cross-product DFA has ((#states of $M_1$) × (#states of $M_2$)) states, almost all cross-product DFAs are non-minimal.



                    Also, even though if you define a state of cross-product DFA is accepting when either of the original two states is accepting, the above $(L_1, L_2)$ is a counterexample. Since $L_1 cup L_2 = Sigma^ast$, the minimal DFA has only one state.







                    share|cite|improve this answer














                    share|cite|improve this answer



                    share|cite|improve this answer








                    edited Dec 12 '18 at 6:08

























                    answered Dec 12 '18 at 4:19









                    nekketsuuu

                    738415




                    738415























                        2














                        No, the Cartesian product (a.k.a. cross product in the question) of two minimal automaton may not be minimal.



                        Here are two simple counterexamples.



                        Note that a DFA with only one state will either accept all words if its start state is also an accept state or accept no words otherwise.



                        Let alphabet $Sigma = left{ aright}$. Let $E$ be a minimal DFA such that $L(E)$ is not empty nor all words. The number of states in $E$ must be greater than 1. Let $O$ be a minimal DFA such that $L(O)$ is the complement of $L(E)$. The number of states in $O$ must be greater than 1.



                        An automaton $P$ which is an Cartesian product automaton of $E$ and $O$ must have at least 2x2=4 states.



                        Suppose $P$ is constructed for the intersection of $L(E)$ and $L(O)$, i.e. the empty language. Its equivalent minimal DFA has 1 state, the start state, which is not an accept state.



                        Suppose $P$ is constructed for the union of $L(E)$ and $L(O)$, i.e., ${a}^*$. its equivalent minimal DFA has 1 state, the start state, which is also an accept state.





                        Please note the Cartesian product automaton of two DFA is not defined uniquely usually since it is allowed to choose different sets of accept states. This is the implicit view as in the book Introduction to the theory of computation by Michael Sipser.






                        share|cite|improve this answer




























                          2














                          No, the Cartesian product (a.k.a. cross product in the question) of two minimal automaton may not be minimal.



                          Here are two simple counterexamples.



                          Note that a DFA with only one state will either accept all words if its start state is also an accept state or accept no words otherwise.



                          Let alphabet $Sigma = left{ aright}$. Let $E$ be a minimal DFA such that $L(E)$ is not empty nor all words. The number of states in $E$ must be greater than 1. Let $O$ be a minimal DFA such that $L(O)$ is the complement of $L(E)$. The number of states in $O$ must be greater than 1.



                          An automaton $P$ which is an Cartesian product automaton of $E$ and $O$ must have at least 2x2=4 states.



                          Suppose $P$ is constructed for the intersection of $L(E)$ and $L(O)$, i.e. the empty language. Its equivalent minimal DFA has 1 state, the start state, which is not an accept state.



                          Suppose $P$ is constructed for the union of $L(E)$ and $L(O)$, i.e., ${a}^*$. its equivalent minimal DFA has 1 state, the start state, which is also an accept state.





                          Please note the Cartesian product automaton of two DFA is not defined uniquely usually since it is allowed to choose different sets of accept states. This is the implicit view as in the book Introduction to the theory of computation by Michael Sipser.






                          share|cite|improve this answer


























                            2












                            2








                            2






                            No, the Cartesian product (a.k.a. cross product in the question) of two minimal automaton may not be minimal.



                            Here are two simple counterexamples.



                            Note that a DFA with only one state will either accept all words if its start state is also an accept state or accept no words otherwise.



                            Let alphabet $Sigma = left{ aright}$. Let $E$ be a minimal DFA such that $L(E)$ is not empty nor all words. The number of states in $E$ must be greater than 1. Let $O$ be a minimal DFA such that $L(O)$ is the complement of $L(E)$. The number of states in $O$ must be greater than 1.



                            An automaton $P$ which is an Cartesian product automaton of $E$ and $O$ must have at least 2x2=4 states.



                            Suppose $P$ is constructed for the intersection of $L(E)$ and $L(O)$, i.e. the empty language. Its equivalent minimal DFA has 1 state, the start state, which is not an accept state.



                            Suppose $P$ is constructed for the union of $L(E)$ and $L(O)$, i.e., ${a}^*$. its equivalent minimal DFA has 1 state, the start state, which is also an accept state.





                            Please note the Cartesian product automaton of two DFA is not defined uniquely usually since it is allowed to choose different sets of accept states. This is the implicit view as in the book Introduction to the theory of computation by Michael Sipser.






                            share|cite|improve this answer














                            No, the Cartesian product (a.k.a. cross product in the question) of two minimal automaton may not be minimal.



                            Here are two simple counterexamples.



                            Note that a DFA with only one state will either accept all words if its start state is also an accept state or accept no words otherwise.



                            Let alphabet $Sigma = left{ aright}$. Let $E$ be a minimal DFA such that $L(E)$ is not empty nor all words. The number of states in $E$ must be greater than 1. Let $O$ be a minimal DFA such that $L(O)$ is the complement of $L(E)$. The number of states in $O$ must be greater than 1.



                            An automaton $P$ which is an Cartesian product automaton of $E$ and $O$ must have at least 2x2=4 states.



                            Suppose $P$ is constructed for the intersection of $L(E)$ and $L(O)$, i.e. the empty language. Its equivalent minimal DFA has 1 state, the start state, which is not an accept state.



                            Suppose $P$ is constructed for the union of $L(E)$ and $L(O)$, i.e., ${a}^*$. its equivalent minimal DFA has 1 state, the start state, which is also an accept state.





                            Please note the Cartesian product automaton of two DFA is not defined uniquely usually since it is allowed to choose different sets of accept states. This is the implicit view as in the book Introduction to the theory of computation by Michael Sipser.







                            share|cite|improve this answer














                            share|cite|improve this answer



                            share|cite|improve this answer








                            edited Dec 12 '18 at 6:17

























                            answered Dec 12 '18 at 6:02









                            Apass.Jack

                            7,1011533




                            7,1011533























                                1














                                Let $Q_A,Q_B$ be the number of states in $A,B$, respectively. The number of states in the product automaton is $Q_A Q_B$. Since $L(A) cap L(B) = emptyset$, the minimal automaton for $L(A) cap L(B) = emptyset$ contains a single state. This can only happen if $Q_A = Q_B = 1$, in which case $A,B in { emptyset, Sigma^* }$. We conclude that the product automaton is minimal exactly in the following three cases:





                                1. $A = B = emptyset$.


                                2. $A = emptyset$, $B = Sigma^*$.


                                3. $A = Sigma^*$, $B = emptyset$.






                                share|cite|improve this answer


























                                  1














                                  Let $Q_A,Q_B$ be the number of states in $A,B$, respectively. The number of states in the product automaton is $Q_A Q_B$. Since $L(A) cap L(B) = emptyset$, the minimal automaton for $L(A) cap L(B) = emptyset$ contains a single state. This can only happen if $Q_A = Q_B = 1$, in which case $A,B in { emptyset, Sigma^* }$. We conclude that the product automaton is minimal exactly in the following three cases:





                                  1. $A = B = emptyset$.


                                  2. $A = emptyset$, $B = Sigma^*$.


                                  3. $A = Sigma^*$, $B = emptyset$.






                                  share|cite|improve this answer
























                                    1












                                    1








                                    1






                                    Let $Q_A,Q_B$ be the number of states in $A,B$, respectively. The number of states in the product automaton is $Q_A Q_B$. Since $L(A) cap L(B) = emptyset$, the minimal automaton for $L(A) cap L(B) = emptyset$ contains a single state. This can only happen if $Q_A = Q_B = 1$, in which case $A,B in { emptyset, Sigma^* }$. We conclude that the product automaton is minimal exactly in the following three cases:





                                    1. $A = B = emptyset$.


                                    2. $A = emptyset$, $B = Sigma^*$.


                                    3. $A = Sigma^*$, $B = emptyset$.






                                    share|cite|improve this answer












                                    Let $Q_A,Q_B$ be the number of states in $A,B$, respectively. The number of states in the product automaton is $Q_A Q_B$. Since $L(A) cap L(B) = emptyset$, the minimal automaton for $L(A) cap L(B) = emptyset$ contains a single state. This can only happen if $Q_A = Q_B = 1$, in which case $A,B in { emptyset, Sigma^* }$. We conclude that the product automaton is minimal exactly in the following three cases:





                                    1. $A = B = emptyset$.


                                    2. $A = emptyset$, $B = Sigma^*$.


                                    3. $A = Sigma^*$, $B = emptyset$.







                                    share|cite|improve this answer












                                    share|cite|improve this answer



                                    share|cite|improve this answer










                                    answered Dec 12 '18 at 7:21









                                    Yuval Filmus

                                    189k12177341




                                    189k12177341






























                                        draft saved

                                        draft discarded




















































                                        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%2f101421%2fcan-product-dfa-for-intersection-of-two-disjoint-languages-be-minimal%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

                                        "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                                        Alcedinidae

                                        Origin of the phrase “under your belt”?