Example 1: Draw a DFA for the language accepting strings ending with ‘0’ over input alphabets ∑={0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-zJLW-DkLlkg/X5rAwaLH0XI/AAAAAAAAGdA/tjmxZnyz6jwYTap61fHCl-0qWf_MySHRwCLcBGAsYHQ/w400-h246/image.png)
Example 2: Draw a DFA for the language accepting strings ending with ‘01’ over input alphabets ∑={0, 1} ?
Solution:
Example 3: Draw a DFA for the language accepting strings ending with ‘00’ over input alphabets ∑={0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-DZWAjHa6SPs/X5vsUiIB2fI/AAAAAAAAGjY/VXpqIPVyuX04MsOlqs8KjfU5EaN5wKslwCLcBGAsYHQ/w400-h180/image.png)
Example 4: Draw a DFA for the language accepting strings ending with ‘011’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-2S1ViG_56yQ/X5q9gxjEjhI/AAAAAAAAGcY/qZnhmCLLIrgbG-2SCxbzotBrqz3ApgjXACLcBGAsYHQ/w400-h163/image.png)
Example 5: Draw a DFA for the language accepting strings ending with ‘0110’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-7irh-FFgVyg/X5q_MIHbwTI/AAAAAAAAGcs/J-BceT2CC94ctC4sGnLoRzmqJHauXF4kQCLcBGAsYHQ/w400-h149/image.png)
Example 6: Draw a DFA for the language accepting strings ending with ‘0011’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-0Qbu541YLm0/X5q__UxA7qI/AAAAAAAAGc4/Tr99MMi1aHYOfcxlZNwZQ5W4106P0QYXwCLcBGAsYHQ/w400-h156/image.png)
Example 7: Draw a DFA for the language accepting strings with ‘0’ only over input alphabets ∑={0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-0Gl-26obkzM/X5rDiDomgJI/AAAAAAAAGdc/MPKJWgW40ucUiFhngoWtXnyTC7X5KB1ewCLcBGAsYHQ/w400-h281/image.png)
Example 8: Draw a DFA for the language accepting strings with ‘0’ and ‘1’ only over input alphabets ∑={0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-GdjSIwEQj6A/X5rFtWWAG4I/AAAAAAAAGd0/tYJsxkRFYQ84YiUhMHXeNoJ8Hv7kVX81QCLcBGAsYHQ/w400-h349/image.png)
Example 9: Draw a DFA for the language accepting strings starting with ‘0’ over input alphabets ∑={0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-VzMji1XFbEA/X5rHgGJTbOI/AAAAAAAAGeI/g9GOfACg2bs8cc7YWOX915CU5DwpuAC4wCLcBGAsYHQ/w400-h291/image.png)
Example 10: Draw a DFA for the language accepting strings starting with ‘01’ over input alphabets ∑={0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-FFZLMwMhIts/X5rHFllJLmI/AAAAAAAAGeA/fVO1c2DHE7kOm9dYNTK7dcMnge6TZPXjwCLcBGAsYHQ/w400-h254/image.png)
Example 11: Draw a DFA for the language accepting strings starting with ‘00’ over input alphabets ∑={0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-ChinKpRqqy4/X5rH5Ejbg8I/AAAAAAAAGeU/G5I-YP9nOcAF6gd_3LnovqygP08UCIblACLcBGAsYHQ/w400-h244/image.png)
Example 12: Draw a DFA for the language accepting strings starting with ‘011’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-6QQalkslu0M/X5rrrLV0gCI/AAAAAAAAGe0/MZRM0Tru-s4BfL7r0_ugznXvDhp3AhCvACLcBGAsYHQ/w400-h189/image.png)
Example 13: Draw a DFA for the language accepting strings starting with ‘0110’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-iwPVuH-bsTA/X5rrUHEaxgI/AAAAAAAAGes/5Z1OBcm5yTAZodFMNjQ9MCX0oCUKq4z2QCLcBGAsYHQ/w400-h151/image.png)
Example 14: Draw a DFA for the language accepting strings starting with ‘0011’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-U9py-J6kbqU/X5rsNVNQeCI/AAAAAAAAGfA/aNFSTfrqwfgybLeSxZ3GSwb3_o6trIKAQCLcBGAsYHQ/w400-h146/image.png)
Example 15: Draw a DFA for the language accepting strings starting with ‘00’ or ’11’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-65StEOwNNRw/X5ruqFP6cII/AAAAAAAAGfM/wu9GhJeszYAJ6EidokwLZNtm3IapR4cuQCLcBGAsYHQ/w400-h316/image.png)
Example 16: Draw a DFA for the language accepting strings without substring ‘00’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-aTHc2EcOqRY/X5rvuT6CrwI/AAAAAAAAGfY/CiNnrfKEmhI0qJFgW1i7GjD3LPdSqZ95QCLcBGAsYHQ/w400-h141/image.png)
Example 17: Draw a DFA for the language accepting even binary numbers strings over input alphabets ∑ = {0, 1} ?
Soluntion:
![](https://lh3.googleusercontent.com/-G-VW0zXpkGQ/X5rypscgpmI/AAAAAAAAGfk/kg0frSPZOAwbZvF3VLTVSNJebrhQIwxjgCLcBGAsYHQ/image.png)
Example 18: Draw a DFA for the language accepting odd binary numbers strings over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-Qk5bf5D-M5E/X5rzJDWuUII/AAAAAAAAGfs/Or1G8W2fC_Ext22uZrgJtylL5X9DSaqOwCLcBGAsYHQ/image.png)
Example 19: Draw a DFA for the language accepting odd or even binary numbers strings over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-ly8J1rI6apQ/X5r0CuGHTbI/AAAAAAAAGf4/NW2bAz8rZ_8VM5WCfV2pVnhHM2Ul4U6AgCLcBGAsYHQ/w400-h354/image.png)
Example 20: Draw a DFA for the language accepting strings containg even number of total zeros over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-rZkoL1ef8Gg/X5r0i_LjPwI/AAAAAAAAGgA/PIAwrBGn3xgq9B_hQKzL2a_K5iB9yLQPgCLcBGAsYHQ/w400-h209/image.png)
Example 21: Draw a DFA for the language accepting strings starting and ending with different characters over input alphabets ∑ = {0, 1} ?
Soluiton:
![](https://lh3.googleusercontent.com/-LNmhzgK_g5Y/X5r1nroRTCI/AAAAAAAAGgM/LS1woo6ooa4cAXWYOFT5ja6UkR-50DJkACLcBGAsYHQ/w400-h288/image.png)
Example 22: Draw a DFA for the language accepting strings starting and ending with same character over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-41n8L4Tp5RE/X5r2CFrXkhI/AAAAAAAAGgU/9gevE8BmNvkq-G0MNzO6EKYpYWxQ11QHQCLcBGAsYHQ/image.png)
Example 23: Draw a DFA for the language accepting strings starting and ending with ‘0’ always over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-p7Lj-fFJQx4/X5r3DybhUFI/AAAAAAAAGgg/abxr3dAkzBUSXihN-b4tick6zLSmQhYTwCLcBGAsYHQ/w400-h254/image.png)
Example 24: Draw a DFA for the language accepting strings containing three consecutives ‘0’ always over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-66m5f3Go53A/X5r4Ug-s4oI/AAAAAAAAGgs/1_fZjKBdQ5EQgEZRpwaJQUnFVmoZTB3WQCLcBGAsYHQ/w400-h106/image.png)
Example 25: Draw a DFA for the language accepting strings such that each ‘0’ is immediately preceded and followed by ‘1’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-lv7ATPT-QPA/X5r57pudSVI/AAAAAAAAGg4/1s2fY3fCi0wdmQKn9eUpapTJcNYH6SrAQCLcBGAsYHQ/w400-h215/image.png)
Example 26: Draw a DFA for the language accepting strings containing at most two ‘0’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-UfsTL1iEUJw/X5r7Mm6JH_I/AAAAAAAAGhE/EfWAqoXj2fMfgt64ZroLNKyMMK8eCKFaQCLcBGAsYHQ/w400-h244/image.png)
Example 27: Draw a DFA for the language accepting strings containing at least two ‘0’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-BE9zOUWHRdM/X5r7pq-q7LI/AAAAAAAAGhM/IVnhbq003KISEsgDoKRPCuXeR-x18F2jwCLcBGAsYHQ/w400-h144/image.png)
Example 28: Draw a DFA for the language accepting strings containing exactly two ‘0’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-N9_zoibhwDw/X5r8Eo993fI/AAAAAAAAGhY/yrLY51Ki7U4yJn-EuL6qqomEglHob1pAACLcBGAsYHQ/image.png)
Example 29: Draw a DFA for the language accepting strings with ‘011’ as substring over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-sfZ3nInH_cA/X5r8ym9l-OI/AAAAAAAAGhg/HJVb4mlYx141TNLb13AylqfM8a5oF3yGwCLcBGAsYHQ/w400-h116/image.png)
Example 30: Draw a DFA for the language accepting strings ending in either ’01’, or ’10’ over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-7WfO2HchXhk/X5r-J-CoBEI/AAAAAAAAGhs/V4tduDUhcQcXQ4l6zqO_bnn3r971BGKZQCLcBGAsYHQ/w400-h297/image.png)
Example 31: Draw a DFA for the language accepting strings containing ’01’, or ’10’ as substring over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-tTd6JRsOb_o/X5r_Af0PsAI/AAAAAAAAGh4/Nrfz0vPPEtcPADbluKggxovl2oE0Mf6AwCLcBGAsYHQ/w400-h280/image.png)
Example 32: Draw DFA that accepts any string which ends with 1 or it ends with an even number of 0’s following the last 1. Alphabets are {0,1}.
Solution:
![](https://1.bp.blogspot.com/-fA3ZMj0qOlU/X4DTcaCrHCI/AAAAAAAAGY8/6g0rAzT2E0QPUxZFAoAcJh-oo6oPegdoQCLcBGAsYHQ/w400-h244/image.png)
Example 33: Construct DFA accepting set of all strings containing even no. of a’s and even no. of b’s over input alphabet {a,b}.
Solution:
![](https://1.bp.blogspot.com/-60fyjodrB5c/X4DCUaq_5HI/AAAAAAAAGYI/Vn2opo46Iboo3wCtUdVv7CVNBGVNJDnfQCPcBGAYYCw/s320/dfa%2Beven%2B00%2Band%2B11.png)
Example 34: Give DFA accepting the language over alphabet {0,1} such that all strings of 0 and 1 ending in 101.
Solution:
![](https://1.bp.blogspot.com/-8mzTBa5SvUw/X4Ar6OE9tHI/AAAAAAAAGXE/VZ5ynV2WD50lMaCdkr_XQeoGBqoJwVcDgCLcBGAsYHQ/w400-h101/image.png)
Example 35: Construct DFA for anb | n>=0.
Solution:
![](https://1.bp.blogspot.com/-B6YscZX7qK0/X4AnrGUIw2I/AAAAAAAAGW4/4nYYFLPy5ogBr1DXlimpg8s0-k3l-bojQCLcBGAsYHQ/w400-h143/image.png)
Example 36: construct DFA for binary integer divisible by 3 ?
Solution:
![](https://1.bp.blogspot.com/-2YAY7bYZOAE/X4AlxZPzhdI/AAAAAAAAGWw/xsLSN5cZoMYRaRHpa6_m0LKvb4jz9tawACPcBGAYYCw/s320/dfa%2Bto%2Bnfa.png)
Example 37: Draw a DFA for the language accepting strings containing neither ’00’, nor ’11’ as substring over input alphabets ∑ = {0, 1} ?
Solution:
![](https://lh3.googleusercontent.com/-H2fnU9sEXtU/X5r__vcVc6I/AAAAAAAAGiE/K7iIvXTTf_YeVKq_T1I2NQ7GdXCgCzAbwCLcBGAsYHQ/w400-h281/image.png)