I'm not sure I unders开发者_如何学运维tand if there is a difference between a finite state machine and a state machine? Am I thinking about this too hard?
I'm not sure I understand if there is a difference between a finite state machine and a state machine? Am I thinking about this too hard?
Yes, you are thinking about it too hard. :-) It depends on context.
Obviously, taken literally, the term "finite state machine" indicates a finite number of states, while "state machine" makes no such promise. So, yes, there is a difference.
However, I think, depending on the context of the conversation, people simply say "state machine" in short-hand without consider whether they mean "finite state machine" or "state machine". And in our field of software programming, where state machines are usually represented in code, we can often use "state machine" interchangeably with "finite state machine". So, really, no, there is no difference.
OTOH, if I were talking to a mathematician after night class on campus one evening, I may be more selective about the specific terms I used. So, yes, there is a difference (in this case).
Sure there's a difference. One has a finite number of states, and the other has an infinite number of states. It's kind of awkward to draw an infinite state machine, but the math that permits a finite state machine will permit an infinite state machine, as well.
Take a look at the mathematical model section of the Wikipedia page of FSM's. See where it says 'S is a finite, non-empty set of states'? Erase 'finite'. Your state transition function will become infinite as well, but that's ok, there are a lot of infinite functions.
"From.ME.to.YOU" is conflating Wikipedia's verbal shorthand with a real proclamation of equality.
The Finite State Machine (FSM) term has a precise definition in the textbooks on Automata Theory. FSM’s allow for the most precise and compressed representation of software entities behavior as they are programming language and data representation independent. The term state machine is often used loosely to describe a “FSM style” set of API’s like Statecharts. It is unfortunate that software engineers seldom use the full potential of FSMs as they were often burned by a host of problems plaguing Statecharts: e.g. non determinism.
No there is not
i quote from wikipedia
finite-state machine (FSM) or finite-state automaton (plural: automata), or simply a state machine
http://en.wikipedia.org/wiki/Finite-state_machine
Assuming you are not in a computer languages classroom, in the context of Software it is almost always a State Machine since it doesn't fit the mathematical definition of FSM (Finite State Machine). Especially when considering Business Process Management/Workflow, the number of nodes in the transition graph is finite, but the state of the process is not limited by those and has unlimited external context.
However if someone refers to FSM in software it's pedantic to point out that it doesn't meet the math definition and they are probably using that term to refer to the simpler types of state machines vs. Petri Net, BPM, Orchestration, or any number of other ways to manage states, processes, transitions, etc. There is also a huge difference from process management, persisted state machines, and the in memory kind that are used for parsing or network state, for example.
In short, it's very ambiguous if you are not in a classroom.
精彩评论