Constructive proof to show the quotient of two regular languages is regular
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
New contributor
add a comment |
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
New contributor
add a comment |
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
New contributor
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
automata regular-languages finite-automata
New contributor
New contributor
edited Dec 25 at 17:02
Apass.Jack
7,0511533
7,0511533
New contributor
asked Dec 25 at 13:44
A.G
283
283
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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.
add a comment |
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$.
add a comment |
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.
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%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
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.
add a comment |
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.
add a comment |
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.
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.
answered Dec 25 at 23:19
Hendrik Jan
20.7k2464
20.7k2464
add a comment |
add a comment |
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$.
add a comment |
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$.
add a comment |
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$.
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$.
answered Dec 25 at 22:00
Apass.Jack
7,0511533
7,0511533
add a comment |
add a comment |
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.
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.
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%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
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