Expressing the n-th character of a string in set notation

47 Views Asked by At

I have an NFA like the following and need to say what language is accepted by it:

enter image description here

I have noticed that this would be an answer in set notation:

$ \{w \in \{a,b\}^*: |w| \geq 4 \ \text{and the 4th last character is an a} \} $

However, 4th last character does not really sound precise or "professional" to me. How else could you express it?

1

There are 1 best solutions below

0
On

Setting $A = {a,b}$, you could simply write your language as $A^*aA^3$.