Let M be a deterministic finite automata as shown below:
Let S denote the set of 7 bit binary strings in which the first, the fourth and the last bits are 1. The number of strings in S that accepted by M is equal to
Open in App
Solution
The DFA has an unreachable state, so lets first simplify the DFA.
Now we can see that the DFA represents set of strings not containing '101' as a substring.We have count number of 7 bit binary strings in which the first, 4th and 7th bits is '1', which go to theaccepting state of DFA.1__1__1b1b2b3b4b5b6b7(b2,b3)can be either (0,0) or (1,1)Rightarrow 2 ways(b5,b6)can be either (0,0) or (1,1)Rightarrow 2 waysTotal number of ways=2×2=4so there are 4 strings which will be accepted by M.