edited by
14,975 views
61 votes
61 votes

Consider the following deterministic finite state automaton $M$.

Let $S$ denote the set of seven bit binary strings in which the first, the fourth, and the last bits are $1$. The number of strings in $S$ that are accepted by $M$ is

  1. $1$
  2. $5$
  3. $7$
  4. $8$
edited by

7 Answers

0 votes
0 votes
Regular expression : (1+01)*000*1(0+1)*

they ask: 1_ _1 _ _ 1
 
so possiblities are : from regular expression : 00 must be string
                                    
                                   10 0 1 _ _ 1 ------> 1001 (0+1)*  1
                                               0 0
                                               0 1
                                               1 0
                                               1 1

                                 1 _ _ 1 0 0 1 -------> 1 (1+01)* 1001
                                    1 1 1
                                    1 0 1
                                    0 1 1

there for total : 4+3 = 7 string can be possible.
0 votes
0 votes

here you can see there are 4 casses  
case 1) 1 followed by 001--->1001(this takes me to final and after there are four possiblity again and all possiblity will keep me at final

you can see in figure).
case 2 )1followed by 011--->1011 by reading this i will stay at starting  then after only one case that took me to final which is 001

so from here i get one more string which get accepted

case 3) it also gives one valid string
case 4) also gives one valid string 

so totol 7 string are possible.
and you can see in figure

 

–3 votes
–3 votes

Can be easily done via brute force method.

The string is 1_ _ 1_ _ 1. 4 places, 0 or 1 for each. Hence  24 combinations.

Answer:

Related questions