- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Construct DFA beginning with ‘a’ but does not have substring ‘aab’
Problem
Given language to construct the deterministic finite automata (DFA) is, the strings start with ‘a’ but not contain substring ‘aab’ over alphabet ∑={a,b}.
Solution
If the input is: “baabba”
The output is: string is not accepted
Because the string does not start with ‘a’, and generating a substring ‘abb’,
DFA transition diagram
The DFA transition diagram for the string beginning with ‘a’ but not having the substring as ‘aab’ is as follows −
Transition table
The transition table is as follows −
STATE | INPUT (a) | INPUT (b) |
---|---|---|
→ 0 | 1* | 4 (dead state) |
1* | 2* | 3* |
2* | 2* | 4 (dead state) |
3* | 1* | 3* |
4 (dead state) | 4 (dead state) | 4 (dead State) |
- Related Articles
- Construct DFA for strings not ending with "THE"
- Construct DFA with Σ= {0,1} accepts all strings with 0.
- Does Python have a string 'contains' substring method?
- Construct a PDA that accepts (a,b)* language but not contain bbbb?
- Why C++ does not have a virtual constructor?
- Why does a laboratory thermometer not have a kink?
- DFA for Strings not ending with “THE” in C++?
- C Program to construct DFA for Regular Expression (a+aa*b)*
- Construct the minimum DFA for any given finite automata.
- Construct DFA of alternate 0’s and 1’s
- A magnet attracts iron but it does not attract plastic. Why?
- C Program to construct a DFA which accepts L = {aN | N ≥ 1}
- Why does clinical thermometer not have alcohol ?
- Why does our urine does not have any blood cell?
- Why the animal cell does not have a cell wall?

Advertisements