Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less than 3 are also in the language. A partially completed DFA that accepts this language is shown below. The missing arcs in the DFA are

Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less than 3 are also in the language. A partially completed DFA that accepts this language is shown below. The missing arcs in the DFA are Correct Answer <table border="1" cellpadding="0" cellspacing="0" style="width:258px;" width="258"> <tbody> <tr> <td style="height:24px;"> <p align="center"> </p> </td> <td style="height:24px;"> <p align="center">00</p> </td> <td style="height:24px;"> <p align="center">01</p> </td> <td style="height:24px;"> <p align="center">10</p> </td> <td style="height:24px;"> <p align="center">11</p> </td> <td style="height:24px;"> <p align="center">Q</p> </td> </tr> <tr> <td style="height:23px;"> <p align="center">00</p> </td> <td style="height:23px;"> <p align="center"> </p> </td> <td style="height:23px;"> <p align="center">1</p> </td> <td style="height:23px;"> <p align="center"> </p> </td> <td style="height:23px;"> <p align="center"> </p> </td> <td style="height:23px;"> <p align="center">0</p> </td> </tr> <tr> <td style="height:24px;"> <p align="center">01</p> </td> <td style="height:24px;"> <p align="center"> </p> </td> <td style="height:24px;"> <p align="center"> </p> </td> <td style="height:24px;"> <p align="center"> </p> </td> <td style="height:24px;"> <p align="center">1</p> </td> <td style="height:24px;"> <p align="center"> </p> </td> </tr> <tr> <td style="height:23px;"> <p align="center">10</p> </td> <td style="height:23px;"> <p align="center">0</p> </td> <td style="height:23px;"> <p align="center"> </p> </td> <td style="height:23px;"> <p align="center"> </p> </td> <td style="height:23px;"> <p align="center"> </p> </td> <td style="height:23px;"> <p align="center"> </p> </td> </tr> <tr> <td style="height:24px;"> <p align="center">11</p> </td> <td style="height:24px;"> <p align="center"> </p> </td> <td style="height:24px;"> <p align="center"> </p> </td> <td style="height:24px;"> <p align="center">0</p> </td> <td style="height:24px;"> <p align="center"> </p> </td> <td style="height:24px;"> <p align="center"> </p> </td> </tr> </tbody> </table>

The correct answer is option 4.

Key Points

 L={All the strings of 0's and 1's where every substring of 3 symbols has at most 2 zero's }

Case 1: If we go with option 1.

[ alt="toc1" src="//storage.googleapis.com/tb-img/production/21/07/toc1.png" style="width: 314px; height: 269px;">

If we take the substring 0000, it has a substring 000 containing more than 2 zero's so it is an invalid string but it is accepted by DFA. Hence this option is not possible.

Case 2: If we go with option 2.

[ alt="toc2" src="//storage.googleapis.com/tb-img/production/21/07/toc2.png" style="width: 321px; height: 277px;">

W=000 is a string and has a substring 000 having more than 2 zeros. Not in a language but it is accepted. So option 2 is not possible.

Case 3: If we go with option 3.

[ alt="toc3" src="//storage.googleapis.com/tb-img/production/21/07/toc3.png" style="width: 339px; height: 259px;">

W=001000 has a substring 000 having more than 2 zeros and accepted but it is not in the given language.

Case 4: If we go with option4.

[ alt="toc4" src="//storage.googleapis.com/tb-img/production/21/07/toc4.png" style="width: 326px; height: 245px;">

This machine accepts all the strings that were every substring of 3 symbols has at most 2 zeros.

So the correct answer is option 4.

Related Questions