Using Myhill-Nerode to prove a language is not regular?

  • Context: MHB 
  • Thread starter Thread starter Lolligirl
  • Start date Start date
  • Tags Tags
    Language Regular
Click For Summary

Discussion Overview

The discussion revolves around using the Myhill-Nerode theorem to prove that certain languages are not regular. Participants explore two specific languages: one defined by Fibonacci numbers and the other consisting of palindromes. The conversation focuses on understanding the theorem's notation, equivalence classes, and how to apply the theorem effectively to these languages.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • Some participants discuss the definition and implications of the Myhill-Nerode theorem, particularly the concept of equivalence classes and their role in determining regularity.
  • One participant suggests that to prove a language is not regular, it is sufficient to find infinitely many words that are not equivalent with respect to the equivalence relation defined by the language.
  • For the Fibonacci language, participants propose examining words of the form \( a^{\text{Fib}(k)} \) for \( k > 0 \) and argue about the equivalence of different Fibonacci indices.
  • In the palindrome language, participants consider pairs of words and their suffixes to demonstrate non-equivalence, but there is uncertainty about the sufficiency of their examples.
  • There is a discussion about the notation \( \equiv_L \) and its meaning, with some participants seeking clarification on how to apply it in their proofs.
  • Some participants express confusion about the correct approach to selecting words and suffixes for their arguments, particularly in relation to the Fibonacci language.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the application of the Myhill-Nerode theorem to the Fibonacci language, with differing opinions on the choice of words and suffixes. There is also disagreement on the interpretation of certain examples in the palindrome language, leading to uncertainty about the proofs being proposed.

Contextual Notes

Participants highlight the importance of selecting an infinite set of non-equivalent words and the need to understand the equivalence relation's definition fully. There are unresolved questions regarding the specific forms of words to use in their arguments and how to demonstrate non-equivalence effectively.

Who May Find This Useful

This discussion may be useful for students and researchers interested in formal language theory, particularly those studying the Myhill-Nerode theorem and its applications in proving language regularity or non-regularity.

Lolligirl
Messages
22
Reaction score
0
Hello everyone! :D

I've been looking at the definition and proof of the Myhill-Nerode theorem for awhile now and cannot figure out what the notation is trying to tell me. Here are the languages I'm trying to apply it to, and then I'll explain what I think we're trying to do:

Question:
Prove these two languages are not regular by using Myhill-Nerode:
1. { aFib(k) | k>0 } (this is set {a1, a1, a2, a3, a5, a8, a13, a21, … })

2. { w | w ∈ {a, b}* and w = wR } (this is the set of palindromes; it contains strings like aa, abba, abaaba, etc.)

Okay, so I know Myhill-Nerode basically gives us a property P such that R is regular if and only if P(R). And I know an equivalence relation is reflexive, symmetric, and transitive and that we want to divide these languages up into right invariant equivalence classes. But how do we pick the classes we're considering (if that makes sense)? What are we looking for each time we're trying to apply this theorem?

For the Fibonacci one, for instance, would we choose to look at aFib(j) for j >= 0?
And for the palindrome one, wwR^j for j >= 0?

I'm not sure what we're trying to look for here. Could anyone help me figure this out?
 
Last edited:
Technology news on Phys.org
Lolligirl said:
But how do we pick the classes we're considering (if that makes sense)? What are we looking for each time we're trying to apply this theorem?
The theorem says that a language $L$ is regular iff the number of equivalence classes in the associated relation $\equiv_L$ is finite. Here $u\equiv_L v$ if $uw\in L\iff vw\in L$ for all $w$. So to prove that $L$ is not regular it is sufficient to find infinitely many words that are not equivalent w.r.t. $\equiv_L$.

For Fobinacci numbers, prove that $a^{\text{Fib}(k)}$ where $\text{Fib}(k)>1$ are not equivalent. Note that the equivalence relation is defined on all words, not only on those in the language, and often it is convenient to choose an infinite set of non-equivalent words not necessarily in the language. But in this case the words in the language form such set as well.

For $L=\{ww^R\mid w\in\{a,b\}^*\}$, show that $a^mb\not\equiv_L a^nb$ if $m\ne n$.
 
I'm sorry, but what does $\equiv_L$, and subsequently $u\equiv_L v$ if $uw\in L\iff vw\in L$ for all $w$, mean? I always get a little hung up on the notation. :B Is $\equiv_L$ "the equivalence class of L", or?
 
The notation $\equiv$ is commonly used to denote equivalence relations. The equivalence class of $x$ w.r.t. $\equiv$ is often denoted by $[x]_{\equiv}$ or just $[x]$.

One way to state the Myhill-Nerode theorem is to introduce a concrete equivalence relation based on the language $L$ itself. I denoted it by $\equiv_L$. By definition, $u\equiv_L v$ if $uw\in L\iff vw\in L$ for all $w$. Then the theorem says that $L$ is regular iff $\equiv_L$ has a finite number of equivalence classes.

Perhaps in your course the theorem was formulated in a slightly different way. Could you post it? The idea of proving that $L$ is not regular is still the same: to find infinitely many words that can be distinguished (w.r.t. membership in $L$) by their suffixes. That is, to find $u_1,u_2,\dots$ such that if $i\ne j$, then there exists a $w$ such that $u_iw\in L$, but $u_jw\notin L$ or vice versa.
 
The version I've seen is this:

Myhill-Nerode Theorem
The following are equivalent:
1. L is accepted by some DFA.
2. L is the union of some of the classes of a right invariant equivalence relation, R, of finite index.
3. The specific right invariance equivalence relation RL where x RL y iff ∀z [ xz ∈ L iff yz ∈ L ] has finite index.

Definition: R is a right invariant equivalence relation iff R is an equivalence relation and ∀z [ x R y implies xz R yz ].
Note: This is only meaningful for relations over strings.

I see how this is pretty similar to the one you posted! For the palindrome one, you are saying that we must prove amb is not in the same equivalence class of L as anb if m is not equal to n? So on the Fibonacci problem, what else do we need to do in regards to the equivalence classes?

Here's my try on the Fibonacci one:
Consider ai and aj where i,j > 0 but i != j.
aiai-1 is in the language, but ajaj-1 is not when i != j.
This shows that there is a separate equivalence class [ajaj-1] induced by RL for each i != j.
Thus, the index of RL is infinite and thus L cannot be regular.
 
Last edited:
Lolligirl said:
The version I've seen is this:

Myhill-Nerode Theorem
The following are equivalent:
1. L is accepted by some DFA.
2. L is the union of some of the classes of a right invariant equivalence relation, R, of finite index.
3. The specific right invariance equivalence relation RL where x RL y iff ∀z [ xz ∈ L iff yz ∈ L ] has finite index.
My version states the equivalence of (1) and (3).

Lolligirl said:
And for the palindrome one, you are saying that we must prove amb is not in the same equivalence class of L as anb if m is not equal to n?
Yes.

Lolligirl said:
Here's my try on the Fibonacci one:
Consider ai and aj where i,j > 0 but i != j.
aiai-1 is in the language, but ajaj-1 is not when i != j.
Do you mean $a^{\text{Fib}(i-1)}$ instead of $a^{i-1}$ and similarly for others? First, both $a^{\text{Fib}(i)}a^{\text{Fib}(i-1)}\in L$ and $a^{\text{Fib}(j)}a^{\text{Fib}(j-1)}\in L$. Second, adding different suffixes does not disprove $R_L$. What you probably mean is that $a^{\text{Fib}(i)}a^{\text{Fib}(i-1)}\in L$, but $a^{\text{Fib}(j)}a^{\text{Fib}(i-1)}\notin L$ if $\text{Fib}(i),\text{Fib}(j)>1$.
 
Okay, I think I'm getting the palindrome one now after looking over the explanation over and over.

So, with the palindrome question, let's use the pairs aba and bab, which both belong to L, and add ba to them both. Then we get ababa, which still belongs to L, but babba, which does not. Thus, L cannot be regular. Is that correct?

For the Fibonacci one, though, I don't think my original thought of aFib(i) and aFib(j), and adding aFib(i-1) to them both, would work. I say that because, let's say we choose i to be 5 and j to be 3. Then neither aFib(i)aFib(i-1) or aFib(j)aFib(i-1) belong to L because aFib(i-1) aka aFib(4) doesn't. And then if I choose two numbers i and j lower than that, they both end up belonging to L. Is my chosen suffix to add, wrong?
 
Last edited:
Lolligirl said:
So, with the palindrome question, let's use the pairs aba and bab, which both belong to L, and add ba to them both. Then we get ababa, which still belongs to L, but babba, which does not. Thus, L cannot be regular. Is that correct?
It is true that $aba\in L$, $bab\in L$, $ababa\in L$ and $babba\notin L$, but it does not show that $L$ is not regular because
Evgeny.Makarov said:
to prove that $L$ is not regular it is sufficient to find infinitely many words that are not equivalent w.r.t. $\equiv_L$.
Note also that you don't have to choose the first pair of words in $L$ (though this is not wrong, either). As I said earlier,
Evgeny.Makarov said:
Note that the equivalence relation is defined on all words, not only on those in the language, and often it is convenient to choose an infinite set of non-equivalent words not necessarily in the language.

Lolligirl said:
For the Fibonacci one, though, I don't think my original thought of aFib(i) and aFib(j), and adding aFib(i-1) to them both, would work. I say that because, let's say we choose i to be 5 and j to be 3. Then neither aFib(i)aFib(i-1) or aFib(j)aFib(i-1) belong to L because aFib(i-1) aka aFib(4) doesn't.
I don't agree. aFib(i)aFib(i-1) = aFib(i)+Fib(i-1) = aFib(i+1) ∈ L. I also don't know why you say that aFib(4) ∉ L since $\{L=a^{\text{Fib}(k)}\mid k>0\}$.
 
I am not sure I understand what you mean...pick an infinite set? So you mean pick a form that isn't specific? So instead of aba and bab and adding ba to them, something like choosing aibiai and biaibi, then adding ba to those instead?. I thought we were just trying to disprove regularity for just one case and thus disproved it, that must've been where I misunderstood.

So then I'm more confused on the Fibonacci one. What does aFib(i) actually represent? That there is Fib(i) number of a's in the string? But what is Fib(i)? Would Fib(4) be the fourth Fibonacci number, and thus be 3?
 
  • #10
Lolligirl said:
I am not sure I understand what you mean...pick an infinite set?
Yes.

Lolligirl said:
So instead of aba and bab and adding ba to them, something like choosing aibiai and biaibi, then adding ba to those instead?.
Yes, something like that. I suggested a suitable infinite family of words back in post #2.

Lolligirl said:
I thought we were just trying to disprove regularity for just one case
We are. It's just a question of facts we rely on to disprove regularity. In this case, it's Myhill-Nerode theorem, which says that $L$ is regular iff the number of equivalence classes of $R_L$ (which I denoted by $\equiv_L$) is finite. So, disproving the fact that $L$ is regular using this theorem consists of showing that the number of equivalence classes of $R_L$ is infinite. And this is shown by exhibiting infinitely many words such that no two of them are related by $R_L$.

Lolligirl said:
So then I'm more confused on the Fibonacci one. What does aFib(i) actually represent? That there is Fib(i) number of a's in the string?
Yes.

Lolligirl said:
But what is Fib(i)? Would Fib(4) be the fourth Fibonacci number, and thus be 3?
That's how I understood it. The only thing is that there are slightly different definitions of Fibonacci numbers: some start with 1, 1 and others with 0, 1. In any case, as I understand it, Fib(i) is a Fibonacci number by definition.
 

Similar threads

Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 5 ·
Replies
5
Views
14K