recategorized by
1,097 views
2 votes
2 votes

In the Given language $L=\{ab, aa, baaa\}$, ____ number of strings are in $L^*$

  1. baaaba
  2. aabaaaa
  3. baaabaaaabaa
  4. baaabaaa

 

  1. $1$
  2. $2$
  3. $3$
  4. $4$
recategorized by

1 Answer

1 votes
1 votes

Scan from Left to Right and divide the string into seperate substrings such that it matches  ab or aa or baaa .

If all the divided substrings obtained matches with any one of  ab or aa or baaa then that string is present in $L^{*}$

  1. $baaaba$ $=$ $baaa$ $ba$ $\rightarrow$ It is not in $L^{*}$
  2. $aabaaaa$ $=$ $aa$ $baaa$ $a$  $\rightarrow$ It is not in $L^{*}$
  3. $baaabaaaabaa $ $=$ $baaa$ $baaa$ $ab$ $aa$ $\rightarrow$ It is in $L^{*}$
  4. $baaabaaa$ $=$ $baaa$ $baaa$ $\rightarrow$ It is in $L^{*}$

$\because$ 2 strings are in $L^{*}$

$\therefore$ Option B is correct.

Answer:

Related questions

0 votes
0 votes
3 answers
1
Arjun asked Dec 7, 2018
951 views
Consider the following Finite State Automaton. The language accepted by the automaton is given by the regular expression.$ab^*b^*$$a^*b^*$$b^*b$$b^*ab^*$
3 votes
3 votes
1 answer
4