Objective
When you learn programming languages in school, none of the examples you can touch are related to the real world. Most of them focus on the level of detail in the language, there is no concept of the model, and I think, to really let others understand how the model is built, the best way is to start from a real thing, and gradually build a relationship with the physical world can be a corresponding model out. In this way, in future practice, it is easy to model unknown objects mathematically. The biggest feature of OO is not the concept of inheritance, polymorphism, but the corresponding relationship with the physical world!
Select finite automata as an example, there are several considerations:
Finite automata is almost the simplest mathematical model, that is to say, it is an object in itself
This thing is a relatively central thing in computational theory, and it's interesting.
The formal definition of finite automata is clear, precise, and simple.
Of course, the main purpose of the article is not to say that the finite state machine computing capacity, we should focus on how to learn from the examples of the basic methods of modeling. Okay, here we go:
Finite automatic machine
Finite automata is a kind of abstract machine, its descriptive ability and resources (storage) are relatively limited. Its use is very extensive, especially in the electromechanical integration of a lot of places to use, and the combination of poor automata and Markov chain is the basis of today's pattern recognition (speech recognition, optical character recognition, etc.).
The formal definition of finite automata is very simple, and is a 5-tuple group (q,σ,δ, Q0, F), where
Q is a poor set, called a state set, that defines the state of all automata
Σ is a poor set, called the alphabet.
Δ is a transfer function,qxσ-> Q
Q0∈q is actually the state
F⊆q is a set of accepted states (can have multiple accepted states s)
In other words, the above only determines a finite automaton, the automatic opportunity has two final states, accept or reject.