- 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

# Design a DFA that accepts at most 3 a"s

Construct deterministic finite automata that accepts at most 3 a’s over an alphabet ∑={a,b}.

At most 3 a’s means,

The string contains 0 to max 3 a’s and any number of b’s.

L= {Ð„,a,aa,aaa,ab,abb,bab,bbabaa, bbabaabbb,…..}

## Construct DFA

Let’s construct DFA step by step −

**Step 1**

**Valid inputs **− aaa, a, aa,ε .

**Step 2**

**Valid inputs** − b, ba, baa, baaa, bb, bba, bbba,…

**Step 3**

**Valid input** − bab, abba, abbbaa, babba,…

**Step 4**

**Valid inputs** − babab, aabb, aaba, bbbaaba, …

**Step 5**

**Valid inputs** − aaabbb, aaabab, baaaba, …

**Step 6**

**InValid inputs** − aaaa, aaabab, baaaba,

- Related Articles
- Design a DFA of a string with at least two 0â€™s and at least two 1â€™s
- Design a DFA machine accepting odd numbers of 0â€™s or even numbers of 1â€™s
- C Program to construct a DFA which accepts L = {aN | N â‰¥ 1}
- Draw DFA which accepts the string starting with â€˜abâ€™.
- Design a DFA accepting a language L having number of zeros in multiples of 3
- Construct DFA with Î£= {0,1} accepts all strings with 0.
- Design a DFA accepting stringw so that the second symbol is zero and fourth is 1
- What is minimizing of DFA in compiler design?
- Design DFA for language over {0,1} accepting strings with odd number of 1â€™s and even number of 0â€™s
- Construct a PDA that accepts (a,b)* language but not contain bbbb?
- What is the Representation of DFA in compiler design?
- Create bash alias that accepts parameters
- Construct DFA of alternate 0â€™s and 1â€™s
- Construct a TM that accepts even-length palindromes over the alphabet {0,1}?
- What is the difference between DFA and NFA in compiler design?

Advertisements