- 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

# Construct NFA with Epsilon moves for regular expression a+ba*.

The regular expression R= a+ba* divided into r1 and r2

r1= a and r2= ba*

Let us draw Non-deterministic finite automata **(NFA) for r1** as given below −

Now, we will go for r2 = ba *

Divide r2 into r3 and r4, where, r3=b and r4=a*

The **NFA for r3** is as follows −

The **NFA for r4** is as follows −

q5 on epsilon movies goes to q6 and q8, q6 on ‘a’ goes to q7 whereas, q7 on epsilon moves goes to q6 as well as q7.

**r2= r3.r4**

Now, concatenate r3 and r4 as shown below −

q3 on input ‘b’ goes to q4, q4 on epsilon moves goes to q5, q5 on epsilon moves goes to q6, q6 on input ‘a’ goes to q7, whereas q7 on epsilon moves goes to q6 and q8.

Now, combine all expressions i.e. **R=r1+r2 =a+ba*** as shown below −

The above diagram is the final NFA with moves for the given regular expression a+ba*.

- Related Questions & Answers
- Explain NFA with epsilon transition.
- How to convert NFA with epsilon to without epsilon?
- Construct the Regular expression for the given languages.
- Construct ∈-NFA of Regular Language L = b + ba*
- Construct ∈-NFA of Regular Language L = {ab,ba}
- Construct ∈-NFA of Regular Language L = (00)*1(11)*
- Regular Expression "[^...]" construct in Java
- What is an acceptance of language by NFA with Epsilon?
- How to convert NFA with epsilon to DFA in TOC?
- Construct the Regular expression for the given languages by the user.
- C Program to construct DFA for Regular Expression (a+aa*b)*
- Construct ∈-NFA of Regular Language L = 0(0+1)*1
- Construct ∈-NFA of Regular Language L = (0+1)*(00+ 11)
- Regular Expression "d" construct in Java
- Regular Expression "A" construct in Java