Regular expression to NFA -- confusing regular expressions-:

Click For Summary
SUMMARY

The discussion centers on converting the regular expression R=(01+010)* into a Non-deterministic Finite Automaton (NFA). The user presents an alternative expression R=(01)*+(010)* and questions the languages accepted by both expressions. It is established that the inclusion of epsilon transitions is necessary to accurately represent the differences between the two expressions, particularly in how they handle concatenation and union operations. The user is encouraged to test both expressions with the string 01010 to further understand their acceptance criteria.

PREREQUISITES
  • Understanding of regular expressions and their syntax
  • Familiarity with Non-deterministic Finite Automata (NFA)
  • Knowledge of epsilon transitions in automata theory
  • Basic concepts of language acceptance in formal languages
NEXT STEPS
  • Learn how to construct an NFA from a regular expression using tools like JFLAP
  • Study the role of epsilon transitions in NFAs and their impact on language acceptance
  • Explore the differences between concatenation and union in regular expressions
  • Test various strings against different NFAs to observe acceptance behavior
USEFUL FOR

Students and professionals in computer science, particularly those studying automata theory, formal languages, and compiler design. This discussion is beneficial for anyone looking to deepen their understanding of regular expressions and their conversion to NFAs.

shivajikobardan
Messages
637
Reaction score
54
Homework Statement
Regular expression to NFA -- confusing regular expressions-:
Relevant Equations
none
R=(01+010)*
For it I made the below nfa which i believe seems correct. Plus the tutorials that I am following also make sure it’s correct. Q0 is initial state(forgot to mention in figure).
nmXLE14mKI4PtFf4GtDc_PgenECvC_h_m9Yrbrg99hHZh258F9.jpg


R=(01)*+(010)*

But idk how to convert this to NFA
What will be languages accepted by this NFA? Won’t it be the same as the above one?

(for some different question)
I got small hint about this. It was to add epsilon transition, but I don’t understand the need for it.
sg7PNgzhEhyEXJ1JRmtN4nIELpWrJCIUaKA7uvrJatk6oTbd2k.png

Source-: https://www.cs.wcupa.edu/rkline/fcs/nfas.html
 
Physics news on Phys.org
shivajikobardan said:
But idk how to convert this to NFA
I don't know is not good enough: make a start and show your efforts.

shivajikobardan said:
What will be languages accepted by this NFA? Won’t it be the same as the above one?
Test both expressions with the string 01010.

shivajikobardan said:
(for some different question)
I got small hint about this. It was to add epsilon transition, but I don’t understand the need for it.
The material you linked includes exactly the same pair of expressions as you have, just with different symbols. The need for the epsilon transition is to deal with the fact that (01+010)* (Example 2 (ab∪aba)*) is different from (01)*+(010)* (Example 3 (ab)*∪(aba)*. Work through that material and the examples until you understand it.
 
  • Like
Likes   Reactions: Jarvis323 and sysprog

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • Sticky
  • · Replies 0 ·
Replies
0
Views
23K
  • · Replies 3 ·
Replies
3
Views
2K
  • Sticky
  • · Replies 0 ·
Replies
0
Views
18K
  • Sticky
  • · Replies 1 ·
Replies
1
Views
26K
  • Sticky
  • · Replies 0 ·
Replies
0
Views
21K