what is automata

Upload: adeel-ahmed-durrani

Post on 04-Oct-2015

10 views

Category:

Documents


0 download

DESCRIPTION

What is Automata

TRANSCRIPT

What is AutomataAcceptors and recognizers (also sequence detectors) produce a binary out-put, saying either yes or no to answer whether the input is accepted by themachine or not. All states of the FSM are said to be either accepting or notaccepting. At the time when all input is processed, if the current state is anaccepting state, the input is accepted; otherwise it is rejected. As a rule theinput are symbols (characters); actions are not used. The example in figure2 shows a finite state machine which accepts the word nice. In this FSMthe only accepting state is number 7.The machine can also be described as defining a language, which wouldcontain every word accepted by the machine but none of the rejected ones;we say then that the language is accepted by the machine. By definition, thelanguages accepted by FSMs are the regular languages - that is, a languageis regular if there is some FSM that accepts it.Start stateThe start state is usually shown drawn with an arrow pointing at it fromany whereAccept stateAn accept state (sometimes referred to as an accepting state) is a state atwhich the machine has successfully performed its procedure. It is usuallyrepresented by a double circle.An example of an accepting state appears on the right in this diagram ofa deterministic finite automaton (DFA) which determines if the binary input4contains an even number of 0s.S1 (which is also the start state) indicates the state at which an even num-ber of 0s has been input and is therefore defined as an accepting state. Thismachine will give a correct end state if the binary number contains an evennumber of zeros including a string with no zeros.

Transducers generate output based on a given input and/or a state usingactions. They are used for control applications and in the field of computa-tional linguistics. Here two types are distinguished:Moore machineThe FSM uses only entry actions, i.e. output depends only on the state.The advantage of the Moore model is a simplification of the behaviour. Con-sider an elevator door. The state machine recognizes two commands com-mand open and command close which trigger state changes. The entryaction (E:) in state Opening starts a motor opening the door, the entryaction in state Closing starts a motor in the other direction closing thedoor. States Opened and Closed dont perform any actions. They sig-nal to the outside world (e.g., to other state machines) the situation: dooris open or door is closed.Mealy machineThe FSM uses only input actions, i.e., output depends on input and state.The use of a Mealy FSM leads often to a reduction of the number of states.The example in figure 4 shows a Mealy FSM implementing the same be-haviour as in the Moore example (the behaviour depends on the implementedFSM execution model and will work, e.g., for virtual FSM but not for eventdriven FSM). There are two input actions (I:): start motor to close the doorif command close arrives and start motor in the other direction to open thedoor if command open arrives. The opening and closing intermediatestates are not shown.Figure 2: Transducer FSM: Mealy model exampleA further distinction is between deterministic (DFA) and non-deterministic(NDFA, GNFA) automata. In deterministic automata, for each state there isexactly one transition for each possible input. In non-deterministic automata,there can be none, one, or more than one transition from a given state fora given possible input. This distinction is relevant in practice, but not intheory, as there exists an algorithm which can transform any NDFA into anequivalent but much more complex DFA.The FSM with only one state is called a combinatorial FSM and uses onlyinput actions. This concept is useful in cases where a number of FSM arerequired to work together, and where it is convenient to consider a purely6combinatorial part as a form of FSM to suit the design tools.