Can product DFA for intersection of two disjoint languages be minimal?
up vote
3
down vote
favorite
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
New contributor
add a comment |
up vote
3
down vote
favorite
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
New contributor
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
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
New contributor
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
finite-automata
New contributor
New contributor
edited 32 mins ago
Yuval Filmus
188k12177339
188k12177339
New contributor
asked 4 hours ago
Amisha Bansal
162
162
New contributor
New contributor
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
up vote
2
down vote
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:
And the cross product of $M_1$ and $M_2$ (for the intersection of languages) is:
But this is not minimal for the empty language. A minimal DFA for the language is:
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.
add a comment |
up vote
1
down vote
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.
add a comment |
up vote
0
down vote
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:
$A = B = emptyset$.
$A = emptyset$, $B = Sigma^*$.
$A = Sigma^*$, $B = emptyset$.
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
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:
And the cross product of $M_1$ and $M_2$ (for the intersection of languages) is:
But this is not minimal for the empty language. A minimal DFA for the language is:
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.
add a comment |
up vote
2
down vote
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:
And the cross product of $M_1$ and $M_2$ (for the intersection of languages) is:
But this is not minimal for the empty language. A minimal DFA for the language is:
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.
add a comment |
up vote
2
down vote
up vote
2
down vote
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:
And the cross product of $M_1$ and $M_2$ (for the intersection of languages) is:
But this is not minimal for the empty language. A minimal DFA for the language is:
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.
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:
And the cross product of $M_1$ and $M_2$ (for the intersection of languages) is:
But this is not minimal for the empty language. A minimal DFA for the language is:
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.
edited 1 hour ago
answered 3 hours ago
nekketsuuu
672413
672413
add a comment |
add a comment |
up vote
1
down vote
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.
add a comment |
up vote
1
down vote
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.
add a comment |
up vote
1
down vote
up vote
1
down vote
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.
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.
edited 1 hour ago
answered 1 hour ago
Apass.Jack
5,7581531
5,7581531
add a comment |
add a comment |
up vote
0
down vote
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:
$A = B = emptyset$.
$A = emptyset$, $B = Sigma^*$.
$A = Sigma^*$, $B = emptyset$.
add a comment |
up vote
0
down vote
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:
$A = B = emptyset$.
$A = emptyset$, $B = Sigma^*$.
$A = Sigma^*$, $B = emptyset$.
add a comment |
up vote
0
down vote
up vote
0
down vote
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:
$A = B = emptyset$.
$A = emptyset$, $B = Sigma^*$.
$A = Sigma^*$, $B = emptyset$.
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:
$A = B = emptyset$.
$A = emptyset$, $B = Sigma^*$.
$A = Sigma^*$, $B = emptyset$.
answered 34 mins ago
Yuval Filmus
188k12177339
188k12177339
add a comment |
add a comment |
Amisha Bansal is a new contributor. Be nice, and check out our Code of Conduct.
Amisha Bansal is a new contributor. Be nice, and check out our Code of Conduct.
Amisha Bansal is a new contributor. Be nice, and check out our Code of Conduct.
Amisha Bansal 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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