0

Let's say we have the language L = {w $\in$ {a,b}$^*$ : ($\exists n \in \mathbb{N} $)[$w|_b = 5^n$]}. I want to know if this is a regular language or not. How do I go about doing this? I'm familiar with the Myhill-Nerode theorem but I don't know how to apply it.

WindBreeze
  • 271
  • 1
  • 2
  • 10

1 Answers1

2

You don't need the Myhill-Nerode theorem. Suppose that $L$ was regular and let $c>0$ be its pumping length.

The word $b^{5^c}$ is in $L$ and therefore there is some positive constant $k \le c < 5^c$ such that $b^{5^c + ik} \in L$ for all integer values of $i \ge -1$. For $i =1$ you must have $b^{5^c + k} \in L$ which implies that $5^{c} + k$ is a power of $5$.

This is a contradiction since $ 5^ c < 5^c + k < 5^c + 5^c = 2 \cdot 5^c < 5^{c+1}. $

If you still want to use the Myhill-Nerode theorem you can proceed as follows: Pick any two non-negative integers $i,j$ with $i<j$ and consider the two words $x= b^{5^i}$ and $x = {5^j}$. Let $z = b^{4 \cdot 5^i}$. Notice that $xz = b^{5^i + 4 \cdot 5^i} = b^{5^{i+1}} \in L$ while $yz = b^{ 5^j + 4\cdot 5^i} \not\in L$ since $5^j < 5^j + 4 \cdot 5^i < 5^j + 4 \cdot 5^j = 5^{j+1} $. Therefore $z$ is a distinguishing extension for $x$ and $y$ and they cannot belong to the same equivalence class for the relation $R$ defined by $\alpha R \beta$ iff $\alpha \in \Sigma^*$ and $\beta \in \Sigma^*$ have no distinguishing extension. This shows that the number of equivalence classes in the quotient set $L_{/R}$ is not finite and, by the Myhill-Nerode theorem, $L$ is not regular.

Steven
  • 29,724
  • 2
  • 29
  • 49