Comp Sci Regular expression to NFA -- confusing regular expressions-:

AI Thread Summary
The discussion revolves around converting the regular expression R=(01+010)* into a non-deterministic finite automaton (NFA). The user expresses confusion about the conversion process and the role of epsilon transitions, questioning whether the languages accepted by the NFA will match the original expression. It is clarified that the inclusion of epsilon transitions is necessary to differentiate between similar expressions, as they can yield different languages. The discussion encourages the user to test both expressions with the string 01010 to better understand their acceptance criteria. Understanding these concepts is crucial for accurate NFA construction and language recognition.
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 Jarvis323 and sysprog
Thread 'Have I solved this structural engineering equation correctly?'
Hi all, I have a structural engineering book from 1979. I am trying to follow it as best as I can. I have come to a formula that calculates the rotations in radians at the rigid joint that requires an iterative procedure. This equation comes in the form of: $$ x_i = \frac {Q_ih_i + Q_{i+1}h_{i+1}}{4K} + \frac {C}{K}x_{i-1} + \frac {C}{K}x_{i+1} $$ Where: ## Q ## is the horizontal storey shear ## h ## is the storey height ## K = (6G_i + C_i + C_{i+1}) ## ## G = \frac {I_g}{h} ## ## C...

Similar threads

Replies
5
Views
2K
Replies
17
Views
3K
Replies
0
Views
22K
Replies
3
Views
2K
Replies
0
Views
17K
Replies
1
Views
25K
Replies
0
Views
21K
Back
Top