- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- 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 Questions & Answers
- Design a DFA of a string with at least two 0’s and at least two 1’s
- Design a DFA accepting a language L having number of zeros in multiples of 3
- 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}
- Design a DFA accepting stringw so that the second symbol is zero and fourth is 1
- Construct DFA with Σ= {0,1} accepts all strings with 0.
- Construct a PDA that accepts (a,b)* language but not contain bbbb?
- Draw DFA which accepts the string starting with ‘ab’.
- What is minimizing of DFA in compiler design?
- Construct a TM that accepts even-length palindromes over the alphabet {0,1}?
- What is the Representation of DFA in compiler design?
- Design a TM that increments a binary number by 1
- How to call a stored procedure that accepts input parameters, using JDBC program?
- Program to design a queue that moves the most recently used element to the end of it in Python
- Design DFA for language over {0,1} accepting strings with odd number of 1’s and even number of 0’s

Advertisements