in Theory of Computation retagged by
316 views
4 votes
4 votes

Below you see the transition table of a finite state automaton. The initial state is $0;$ the final state is $4.$ $\emptyset$ denotes the fail state, where no successful transition is possible for the given symbol. Note that when encountering a $b$ in state $2,$ two transitions are possible: we can either stay in state $2$ or move on to state $3$.

Which of the following regular expressions matches the FSA? (The regular expression has to match exactly the same set of strings that is accepted by the FSA: not more, not less.)

  1. $\mathrm{abb}^+\mathrm{c}(\mathrm{cc})^*$
  2. $\mathrm{abbb}^* \mathrm{c}^+$
  3. $\mathrm{abbb}^+\mathrm{c}^+\mathrm{c}$
  4. $a b^* b b(c c)^+$
in Theory of Computation retagged by
316 views

2 Answers

0 votes
0 votes
A short cut method to eliminate the options is to observe only ‘c’ can lead us to final state and also on encountering 1st ‘c’ we are getting into final state 4 from state 3 , but if we again encounter ‘c’ i.e 2 times , we get away from final state ( back to 3).
That means this will accept strings with odd c’s , which is generated by c(cc)*.

Thus option A , is correct solution.
0 votes
0 votes

By using a transition table we can draw the given finite automata which look like the below:

The above FSM accepts strings like $abbc,abbbc,abbccc,abbccccc,...$ one occurrence of $a$, followed by two or more numbers of $b’s$, followed by an odd number of c’s.

Option D) it is wrong because it generates strings of ending even number of c’s like $cc,cccc,cccccc,..$

Option C) It can generate $abbbcc$ which is rejected by the above FA.

Option B) It can generate one or more occurrences of c’s same as the above reason.

Option A) it is true. RE is $abb^*bc(cc)^*$. as we know that $r.r^*=r^+$ after simplifying the reg expression we get $abb^+c(cc)^*$

Option $(A)$ is correct.

Answer:

Related questions