0

How do I go about finding a language recognized by the following automaton? And is it possible to find a corresponding regular expression? I've read some posts about the same issue here on CS.SE but none of the approaches seem to give me a solution.

enter image description here

EDIT: I've just learned Arden's theorem and the method of solving this with a system of regular expressions (as this is actually not covered in my course but looks a lot more practical and easier than just 'guessing').

What I've got so far:

If we label the states clockwise from 1 to 5, such that the accepted state is $X_3$, I get the following equations.

$$\begin{cases} X_1 = 0X_1 + 1X_4 \\ X_2 = 0X_2 + 1X_1 \\ X_3 = 0X_3 + 1X_2 + \epsilon \\ X_4 = 0X_4 + 1X_5 \\ X_5 = 0X_5 + 1X_3 \end{cases}$$

If I apply Arden's theorem to every one of these, I get:

$$\begin{cases} X_1 = 0^*1X_4 \\ X_2 = 0^*1X_1 \\ X_3 = 0^*(1X_2 + \epsilon) \\ X_4 = 0^*1X_5 \\ X_5 = 0^*1X_3 \end{cases}$$

Substituting until reaching an equation for $X_3$ gives me the following: $$X_3=0^*10^*10^*10^*10^*1X_3+0^*$$ And apply Arden's theorem one last time: $$X_3=0^*(0^*10^*10^*10^*10^*1)^*$$ Which would be the regular expression for this automaton, however this does not seem to be right at all. Any suggestions or tips where I (could) have gone wrong?

  • 2
    What did you try? Where did you get stuck? To find the language, consider what journeys through the graph from the start state to the accepting state can look like. Can you describe all of those? Since automata and regular expressions define exactly the same set of languages, there's definitely a regular expression for this language. There are algorithms for converting DFAs to regular expressions but, in this case, once you've figured out what the language is, the RE shouldn't be hard. – David Richerby Aug 03 '15 at 19:14
  • The automaton already defines its language! What kind of representation are you looking for? Converting to regular expressions has indeed been covered comprehensively at our reference question. In case you want a "set constructor" formulation of the language, here's a hint: what can you say about the number of ones and zeroes in the words this automaton accepts? – Raphael Aug 03 '15 at 19:21
  • @DavidRicherby I've edited my question. I'm well aware that there a probably better 'techniques' as mentioned in your comments but I'm really interested in the Arden's lemma, now that I've seen it. – Robin Haveneers Aug 04 '15 at 09:39
  • @Raphael as well – Robin Haveneers Aug 04 '15 at 09:39
  • You are right, that regular expression does not look correct. However, "check my answer" questions are generally frowned upon since they admit only "yes/no answers". You should be able to check your steps yourself, provided the description in the reference question is good enough; if you don't understand parts of it, comment there or ask a new question if it's an understanding as opposed to a presentation issue. – Raphael Aug 04 '15 at 09:45
  • Okay I understand. I'm sorry if this is becoming a mess. There is one part where I'm a little confused now that I look at it again. In the reference question, using the equation system, the equations are formed by writing down all the arrows that LEAVE a certain state. However, online, and in my own solution, I write down the arrows that arrive in a certain state. Does this make a difference? I've read numerous articles about Arden's method and most (if not all) of them use the method of writing down 'arriving' arrows. – Robin Haveneers Aug 04 '15 at 09:52
  • $X_i$ is the regular expression corresponding to the automaton with start state $i$. So the regular expression you care about is $X_1$, not $X_3$. – David Richerby Aug 04 '15 at 09:55
  • Don't be too hasty to discount "guessing". For this FA, the zeros clearly have nothing to do with the accepted strings and you can get to the final state by seeing $2, 7, 12, 17, \dotsc$ 1s, so the language is ${w\in{0,1}^*\mid n_1(w)\equiv 2\pmod 5}$, where $n_1(w)$ counts the number of 1s in $w$. – Rick Decker Aug 04 '15 at 15:48

0 Answers0