2,546 views
5 votes
5 votes

Can Someone explain what is Myhill Nerode Theorem and different Languages CLasses is ?  ( please explain in detail )

Solution involving this as an exaple is prefered 
L={ank∣k>0,andn is a positive integer constant}

1 Answer

Best answer
12 votes
12 votes

A language is a SET of strings.

A relation is defined on a set which relates one element to another. Here, set is $\Sigma^*$ and we have $L$ a subset of it.

Now, given a set of strings I define a relation $R$ such that $aRb$ ($a$ and $b$ elements of $\Sigma^*$) if and only if for any string $z \in \Sigma^*,$  $az \in L \implies bz \in L$ and $az \notin L \implies bz \notin L$ (double implication).  Now, this relation is an equivalence relation (see for reflexivity, symmetry and transitivity). Here, if we get any $z \in \Sigma^*,$ such that $az \in L$ and $bz \notin L$ or vice verse  $z$ is called the distinguishing string and $a$ and $b$ goes to different equivalence classes (not related).

Now, how many equivalence classes can we get from a given $L$? - No easy way, but can be done with some effort. If this number is finite, then $L$ is a regular language. Further, this number also equals the number of states in the minimal DFA for $L$.

Now for the given $L$, assume $n=2$ (any other positive value for $n$ is fine, but only one value is there for $n$, whereas $k$ takes all positive values). Thus,

$L = \{aa, aaaa, aaaaaa, aaaaaaaa, \dots \}$.

$\Sigma^* = \{\epsilon, a, aa, aaa, aaaa, \dots \}$

$\epsilon$ related to $a$ ? No, because for $z = a,$ $\epsilon z  = a \notin L, $where as $az = aa \in L$.

Likewise if we do, we can see that

$\epsilon$ forms an equivalence class - this is not in $L$ but if we append "aa" we get to $L$.

$a,aaa,aaaa,\dots$ forms another equivalence class - these are not in $L$, but if we append "a" to any of these, we get to $L$.

$aa, aaaa,aaaaaa,\dots$ forms another equivalence class - these are in $L$, if we append "aa" to any of these, we remain in $L$.

No other  string remain in $\Sigma^*$as we considered all odd length strings and even length strings and also 0 length string by now. So, we got 3 equivalence class. If we see in general for $n$ it will be $n+1$ equivalence class here. A good way in GATE for these questions will be to assume $n=2$, and try a minimal DFA rather than going for equivalence classes.

https://gateoverflow.in/723/gate2001-2-5

selected by

Related questions

0 votes
0 votes
1 answer
2
jhaanuj2108 asked Sep 26, 2018
698 views
Consider the following DFA: The number of distinct sets present in all partitions while converting given DFA into minimal DFA using Myhill-Nerode theorem is ________.
1 votes
1 votes
1 answer
3
Parshu gate asked Nov 27, 2017
1,340 views
Consider a regular language L over Σ={0,1} such that L contains every string which ends with "0". The number of equivalence classes in L is ______.
7 votes
7 votes
2 answers
4
resuscitate asked Dec 5, 2015
12,025 views
The number of equivalence classes which exist for the following regular expression R are ______. $R=(a+b)^*b(a+b+\epsilon )$ what is the meaning of equivale...