Help understanding Non-determinate Finite Automaton

Click For Summary
SUMMARY

This discussion focuses on understanding non-deterministic finite automata (NFA) with epsilon transitions, specifically in relation to the regular expression a*b*c*. The user grapples with the concept that the input string "cb" matches the NFA despite initial expectations. Key insights include the role of epsilon transitions in activating states without consuming input symbols, and the importance of evaluating these transitions correctly to determine state activity during string evaluation.

PREREQUISITES
  • Understanding of non-deterministic finite automata (NFA)
  • Familiarity with epsilon transitions in automata theory
  • Knowledge of regular expressions, specifically a*b*c*
  • Basic concepts of state activation and transitions in automata
NEXT STEPS
  • Study the mechanics of epsilon transitions in NFAs
  • Learn how to construct NFAs from regular expressions
  • Explore algorithms for simulating NFAs on input strings
  • Investigate the differences between deterministic and non-deterministic finite automata
USEFUL FOR

This discussion is beneficial for students of computer science, particularly those studying automata theory, as well as educators teaching concepts related to finite automata and regular expressions.

Trentonx
Messages
36
Reaction score
0

Homework Statement


There's not a particular problem, per se, just that I seem to be missing something with my understanding of how to evaluate a string against a non-deterministic finite automaton with epsilon transitions. But one I've been working with is shown below

y7UHAWX.png


Homework Equations


NA

The Attempt at a Solution


I'm told by my professor this represents the regular expression a*b*c*. As such, I wouldn't expect the machine to match on an input string of "cb". But from my understanding, it does. You can see in the image my attempt at the states the machine would enter, given each input token. And after, the machine is in at least one goal state, so it matches. But I wouldn't expect the string "cb" to match a*b*c*

It's pretty clear I don't understand how to handle the epsilon transitions. Do I follow them to all the way, as I did above? Only follow epsilons from the current state to at most one "hop" away? Should I somehow evaluate epsilons before hand, then token and more epsilons? Are epsilons filtered somehow?
 
Physics news on Phys.org
Your interpretation seems to be that if a state cannot accept a symbol then an epsilon transition occurs. I think epsilon transitions occur without any symbol being accepted. An epsilon transition "activates" a state for the purpose of accepting symbols. Initially, the automata has states 1,2,3 active. Only state 3 can accept the "c". The "c" "blocks" states 1 and 2 so they become inactive. So after "c" is accepted, the only active state is state 3. State 3 cannot accept the "b".

If state 3 had a epsilon transistion going back to state 2 then the "b" could be accepted by state 2. However I interpret the diagram to say that epsilon transition from 2 to 3 is one-way.
 

Similar threads

Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
14K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
1
Views
6K
Replies
1
Views
9K
  • · Replies 3 ·
Replies
3
Views
2K