Why is this basic language not a regular language?Binary regular language?Is the language that accepts strings concatenated with their reverse regular?Definition of a regular languageRegular language concatenation with supersetGenerators of families of langauges?Can the definition of regular languages be simplified?Prove language is regularProve a language is regular - Regular language of 0's and 1'sDoes this proof work for infinite regular languagesProving that language is regular or not
Can divisibility rules for digits be generalized to sum of digits
What defenses are there against being summoned by the Gate spell?
Theorems that impeded progress
Fencing style for blades that can attack from a distance
Is it possible to do 50 km distance without any previous training?
What is the offset in a seaplane's hull?
Why don't electron-positron collisions release infinite energy?
How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?
Watching something be written to a file live with tail
What's the output of a record cartridge playing an out-of-speed record
Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)
Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)
Why do falling prices hurt debtors?
What typically incentivizes a professor to change jobs to a lower ranking university?
What are these boxed doors outside store fronts in New York?
How much RAM could one put in a typical 80386 setup?
can i play a electric guitar through a bass amp?
Risk of getting Chronic Wasting Disease (CWD) in the United States?
Is it unprofessional to ask if a job posting on GlassDoor is real?
Why, historically, did Gödel think CH was false?
How can I make my BBEG immortal short of making them a Lich or Vampire?
Why can't I see bouncing of a switch on an oscilloscope?
How does one intimidate enemies without having the capacity for violence?
A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?
Why is this basic language not a regular language?
Binary regular language?Is the language that accepts strings concatenated with their reverse regular?Definition of a regular languageRegular language concatenation with supersetGenerators of families of langauges?Can the definition of regular languages be simplified?Prove language is regularProve a language is regular - Regular language of 0's and 1'sDoes this proof work for infinite regular languagesProving that language is regular or not
$begingroup$
L = x has an equal number of 0s & 1s
Based on the recursive definition of regular languages, isn't it possible to form a single regular language set over the binary alphabet 0,1 by doing the following?
- concatenating 0's and 1's to form each of the binary strings satisfying the condition, resulting in a regular language consisting of that single string
- union all the single-string regular languages together into one single regular language
regular-languages
New contributor
Shukie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
L = x has an equal number of 0s & 1s
Based on the recursive definition of regular languages, isn't it possible to form a single regular language set over the binary alphabet 0,1 by doing the following?
- concatenating 0's and 1's to form each of the binary strings satisfying the condition, resulting in a regular language consisting of that single string
- union all the single-string regular languages together into one single regular language
regular-languages
New contributor
Shukie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
$begingroup$
There must be something wrong with your proof attempt, since it would apply to any language and there are surely some non-regular languages. The answers explain what.
$endgroup$
– David Richerby
2 hours ago
add a comment |
$begingroup$
L = x has an equal number of 0s & 1s
Based on the recursive definition of regular languages, isn't it possible to form a single regular language set over the binary alphabet 0,1 by doing the following?
- concatenating 0's and 1's to form each of the binary strings satisfying the condition, resulting in a regular language consisting of that single string
- union all the single-string regular languages together into one single regular language
regular-languages
New contributor
Shukie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
L = x has an equal number of 0s & 1s
Based on the recursive definition of regular languages, isn't it possible to form a single regular language set over the binary alphabet 0,1 by doing the following?
- concatenating 0's and 1's to form each of the binary strings satisfying the condition, resulting in a regular language consisting of that single string
- union all the single-string regular languages together into one single regular language
regular-languages
regular-languages
New contributor
Shukie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Shukie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Shukie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 11 hours ago
ShukieShukie
61
61
New contributor
Shukie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Shukie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Shukie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$begingroup$
There must be something wrong with your proof attempt, since it would apply to any language and there are surely some non-regular languages. The answers explain what.
$endgroup$
– David Richerby
2 hours ago
add a comment |
$begingroup$
There must be something wrong with your proof attempt, since it would apply to any language and there are surely some non-regular languages. The answers explain what.
$endgroup$
– David Richerby
2 hours ago
$begingroup$
There must be something wrong with your proof attempt, since it would apply to any language and there are surely some non-regular languages. The answers explain what.
$endgroup$
– David Richerby
2 hours ago
$begingroup$
There must be something wrong with your proof attempt, since it would apply to any language and there are surely some non-regular languages. The answers explain what.
$endgroup$
– David Richerby
2 hours ago
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Every language is the union of regular languages:
$$
L = bigcup_x in L x .
$$
However, the set of regular languages is not closed under infinite unions. It isn't even closed under countably infinite unions, as your example demonstrates.
You can prove that your language is not regular in many ways. For example, if your language were regular, then so would its intersection with $0^*1^*$ be; yet this language is $ 0^n 1^n : n geq 0 $, the classical example of a non-regular language. You can also prove non-regularity of your language directly, using either the pumping lemma or Myhill–Nerode theory.
$endgroup$
add a comment |
$begingroup$
You're on the right track! There's just one thing you're missing.
The "build all the strings and union them together" approach works great—if you have a finite number of strings. There's a theorem that says "a union of finitely many regular languages is regular", but the key is the finitely many.
In this case, there are infinitely many strings in the language, so the union-them-all trick no longer works.
If you want to prove that the language is not regular (as opposed to just failing to prove that it is regular), try a fooling set proof:
- Let $F$ be the language $1^*$. It's clearly infinite.
- Let $x$ and $y$ be two distinct strings in $F$. These can be written as $1^i$ and $1^j$ with $i neq j$.
- Now, let $z$ be $0^i$. From the definition of your language, we can see that $xz$ is in the language, but $yz$ is not.
- Therefore, all the different strings in $F$ are distinguishable as prefixes. Since the language has infinitely many distinguishable prefixes, it cannot be regular.
$endgroup$
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
);
);
Shukie 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%2f106556%2fwhy-is-this-basic-language-not-a-regular-language%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
$begingroup$
Every language is the union of regular languages:
$$
L = bigcup_x in L x .
$$
However, the set of regular languages is not closed under infinite unions. It isn't even closed under countably infinite unions, as your example demonstrates.
You can prove that your language is not regular in many ways. For example, if your language were regular, then so would its intersection with $0^*1^*$ be; yet this language is $ 0^n 1^n : n geq 0 $, the classical example of a non-regular language. You can also prove non-regularity of your language directly, using either the pumping lemma or Myhill–Nerode theory.
$endgroup$
add a comment |
$begingroup$
Every language is the union of regular languages:
$$
L = bigcup_x in L x .
$$
However, the set of regular languages is not closed under infinite unions. It isn't even closed under countably infinite unions, as your example demonstrates.
You can prove that your language is not regular in many ways. For example, if your language were regular, then so would its intersection with $0^*1^*$ be; yet this language is $ 0^n 1^n : n geq 0 $, the classical example of a non-regular language. You can also prove non-regularity of your language directly, using either the pumping lemma or Myhill–Nerode theory.
$endgroup$
add a comment |
$begingroup$
Every language is the union of regular languages:
$$
L = bigcup_x in L x .
$$
However, the set of regular languages is not closed under infinite unions. It isn't even closed under countably infinite unions, as your example demonstrates.
You can prove that your language is not regular in many ways. For example, if your language were regular, then so would its intersection with $0^*1^*$ be; yet this language is $ 0^n 1^n : n geq 0 $, the classical example of a non-regular language. You can also prove non-regularity of your language directly, using either the pumping lemma or Myhill–Nerode theory.
$endgroup$
Every language is the union of regular languages:
$$
L = bigcup_x in L x .
$$
However, the set of regular languages is not closed under infinite unions. It isn't even closed under countably infinite unions, as your example demonstrates.
You can prove that your language is not regular in many ways. For example, if your language were regular, then so would its intersection with $0^*1^*$ be; yet this language is $ 0^n 1^n : n geq 0 $, the classical example of a non-regular language. You can also prove non-regularity of your language directly, using either the pumping lemma or Myhill–Nerode theory.
answered 10 hours ago
Yuval FilmusYuval Filmus
196k15184349
196k15184349
add a comment |
add a comment |
$begingroup$
You're on the right track! There's just one thing you're missing.
The "build all the strings and union them together" approach works great—if you have a finite number of strings. There's a theorem that says "a union of finitely many regular languages is regular", but the key is the finitely many.
In this case, there are infinitely many strings in the language, so the union-them-all trick no longer works.
If you want to prove that the language is not regular (as opposed to just failing to prove that it is regular), try a fooling set proof:
- Let $F$ be the language $1^*$. It's clearly infinite.
- Let $x$ and $y$ be two distinct strings in $F$. These can be written as $1^i$ and $1^j$ with $i neq j$.
- Now, let $z$ be $0^i$. From the definition of your language, we can see that $xz$ is in the language, but $yz$ is not.
- Therefore, all the different strings in $F$ are distinguishable as prefixes. Since the language has infinitely many distinguishable prefixes, it cannot be regular.
$endgroup$
add a comment |
$begingroup$
You're on the right track! There's just one thing you're missing.
The "build all the strings and union them together" approach works great—if you have a finite number of strings. There's a theorem that says "a union of finitely many regular languages is regular", but the key is the finitely many.
In this case, there are infinitely many strings in the language, so the union-them-all trick no longer works.
If you want to prove that the language is not regular (as opposed to just failing to prove that it is regular), try a fooling set proof:
- Let $F$ be the language $1^*$. It's clearly infinite.
- Let $x$ and $y$ be two distinct strings in $F$. These can be written as $1^i$ and $1^j$ with $i neq j$.
- Now, let $z$ be $0^i$. From the definition of your language, we can see that $xz$ is in the language, but $yz$ is not.
- Therefore, all the different strings in $F$ are distinguishable as prefixes. Since the language has infinitely many distinguishable prefixes, it cannot be regular.
$endgroup$
add a comment |
$begingroup$
You're on the right track! There's just one thing you're missing.
The "build all the strings and union them together" approach works great—if you have a finite number of strings. There's a theorem that says "a union of finitely many regular languages is regular", but the key is the finitely many.
In this case, there are infinitely many strings in the language, so the union-them-all trick no longer works.
If you want to prove that the language is not regular (as opposed to just failing to prove that it is regular), try a fooling set proof:
- Let $F$ be the language $1^*$. It's clearly infinite.
- Let $x$ and $y$ be two distinct strings in $F$. These can be written as $1^i$ and $1^j$ with $i neq j$.
- Now, let $z$ be $0^i$. From the definition of your language, we can see that $xz$ is in the language, but $yz$ is not.
- Therefore, all the different strings in $F$ are distinguishable as prefixes. Since the language has infinitely many distinguishable prefixes, it cannot be regular.
$endgroup$
You're on the right track! There's just one thing you're missing.
The "build all the strings and union them together" approach works great—if you have a finite number of strings. There's a theorem that says "a union of finitely many regular languages is regular", but the key is the finitely many.
In this case, there are infinitely many strings in the language, so the union-them-all trick no longer works.
If you want to prove that the language is not regular (as opposed to just failing to prove that it is regular), try a fooling set proof:
- Let $F$ be the language $1^*$. It's clearly infinite.
- Let $x$ and $y$ be two distinct strings in $F$. These can be written as $1^i$ and $1^j$ with $i neq j$.
- Now, let $z$ be $0^i$. From the definition of your language, we can see that $xz$ is in the language, but $yz$ is not.
- Therefore, all the different strings in $F$ are distinguishable as prefixes. Since the language has infinitely many distinguishable prefixes, it cannot be regular.
answered 6 hours ago
DraconisDraconis
5,762821
5,762821
add a comment |
add a comment |
Shukie is a new contributor. Be nice, and check out our Code of Conduct.
Shukie is a new contributor. Be nice, and check out our Code of Conduct.
Shukie is a new contributor. Be nice, and check out our Code of Conduct.
Shukie 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.
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%2f106556%2fwhy-is-this-basic-language-not-a-regular-language%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
$begingroup$
There must be something wrong with your proof attempt, since it would apply to any language and there are surely some non-regular languages. The answers explain what.
$endgroup$
– David Richerby
2 hours ago