Question

I have to draw a Finite Automaton that accepts the following string

Λ, a, aabc, acba and accb

In my view a(a+b+c)* this might be it's regular expression as the string is starting from a and includes an empty string as well.

Now I didn't find the logic of drawing FA as in below image enter image description here

Question 1: If the string is starting with a then in FA, We are moving from x to y while reading b Why we don't read a here.

Question 2: Why we use loop of a,b on state y and z

Was it helpful?

Solution

The language L = {λ, a, aabc, acba, accb} is finite. Therefore, L is not equivalent to the language denoted by the Kleene closure of the regular expression a(a + b + c), which is infinite. There is a simple algorithm that generates the nondeterministic finite automaton accepting a finite language, which consists of drawing paths accepting each of the strings in the language.

It's unclear what the relationship between the two languages and the diagram in the original post is, since the automaton in the diagram accepts neither language. Assuming that the nodes are labeled with their names, and circled nodes indicate acceptance, the language accepted by the automaton in the diagram is (a + b)*. In this case, the loops are used to accept the Kleene closure of (a + b). That said, it would be useful if you could clarify the meaning of the diagram.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top