- 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

# State the worst case number of states in DFA and NFA for a language?

A Deterministic Finite automata (DFA) is a five tuples

M=(Q, ∑, δ,q0,F)

Where,

Q − Finite set called states.

∑ − Finite set called alphabets.

δ − Q × ∑ → Q is the transition function.

q0 ∈ Q is the start or initial state.

F − Final or accept state.

Let’s see the worst case number of states in DFA for the language **A∩B and A***

Let A and B be the two states,

|A| = number of states = nA

|B| = number of states = nB

DFA = |A∩B|

=nA.nB

|A ∪ B| =nA.nB

|A*|=3/4 2^{nA}

|AB| = nA (2^{nB}-2^{nB-1})

**NFA**

The non-deterministic finite automata (NFA) also have five states same as DFA, but with different transition function, as shown follows −

δ: Q X ∑ -> 2^{Q}

Where,

Q − Finite set of states.

∑ − Finite set of the input symbol.

q0 − Initial state.

F − Final state.

δ − Transition function.

Let’s see the worst case number of states in NFA for the language **A∩B and A***

Let A and B be the two states,

|A| = number of state = nA

|B|= number of state = nB

NFA:

|AUB| = nA+nB+1

|A*| = nA+1

|AB| = nA+nB

|A∩B| = nA.nB

- Related Articles
- Construct NFA for the following language and convert it into DFA using the algorithm - L = (aa+ (bb*)c*)
- What is the difference between DFA and NFA?
- Construct a ∈-NFA for the language L = (a* + b*)
- What is the difference between DFA and NFA in compiler design?
- Convert NFA to DFA and explain the difference between them
- Give an example problem of converting NFA to DFA.
- Design DFA for language over {0,1} accepting strings with odd number of 1’s and even number of 0’s
- How to convert from NFA to DFA in TOC?
- Worst-Case Tolerance Analysis
- Design a DFA accepting a language L having number of zeros in multiples of 3
- How to convert NFA with epsilon to DFA in TOC?
- Explain with an example how to convert NFA to DFA.
- Construct ∈-NFA of Regular Language L = b + ba*
- Construct ∈-NFA of Regular Language L = {ab,ba}
- Find a permutation that causes worst case of Merge Sort in C++