Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Wack61917y"Trash state" refering to a sink from which no condition that would be acceptable is reachable.
-
sauyon177yIt's not necessary because by the def'n of an NFA you don't have to have paths for every letter in your alphabet and if there is no path corresponding to an input that state is removed (essentially what you're doing with a trash state).
-
Wack61917yAlright. Supose I got a language like L = {0,1}* and want to match if the amont of 0 mod 3 is equal to 1, do I then just need to states, let's call them p0 and p1, where init points to p0 and then arrows for the input of 0 from p0->p0, p0->p1, p1->p0 and p1->p1, with p1 as accepting state?
-
Wack61917ySo I'm still kind of stuck. Any fellow CS student care to help me out? I need to make a NFA but got stuck there, so I created first 3 FA (no problem), tried to merge them, which kind of is a cluster fuck when trying to merge FA1 and FA2... But how the fuck do I create a NFA out of it?
Related Rants
Question: when modeling a language using a nondeterministic finite state machine, do I have to add a "trash" state, if a deterministic one would need one or can it just be obmited and if so why?
question
cs
computer science
theoretical cs