Unit 3.-Finite Automatic: 3.1 Concepts: Definition and Classification of Finite Automata (AF) - Definition 1
Unit 3.-Finite Automatic: 3.1 Concepts: Definition and Classification of Finite Automata (AF) - Definition 1
Unit 3.-Finite Automatic: 3.1 Concepts: Definition and Classification of Finite Automata (AF) - Definition 1
com
Definition 1
The Finite Automaton is the most restrictive machine of all and of course it can be
defined as a particular case of a TM. We can also see it as an AP without a battery.
Obviously, when removing the battery, the only thing left is the finite input tape.
This abstract mathematical model represents the solution of the type 3 or LR
language acceptance problem. 3.1a
Definition 2
Definition 3
A finite automaton has a set of states and its "control" passes from one state to
another in response to external "inputs". One of the fundamental differences
between the classes of finite automata is whether said control is "deterministic",
which means that the automaton cannot be in more than one state at the same time,
or "non-deterministic", which means that yes it can be in several states at the same
time.
AF Classification
Transition tables:
• Rows headed by states( Q )
• Columns headed by input symbols ( E-)
to b
TABLE
->p what
*q q3 r
q3 r
r q3
Transition diagrams:
• Nodes labeled by states(Q)
• Arcs between nodes labeled with ( E-)
• Q0 is marked with ->
• The final state is marked with * or with a double circle
f(p,a) = qf(p,b) = r
f(q,a) = qf(q,b) = r
f(r,a) = rf(r,b) = r
states (Q): p, q, r
initial state :p
end state: q
symbols: a,b
AFD
AFND
To convert an AFD into an AFN that recognizes the same language. This algorithm,
often called subset construction, is useful for simulating an NFA by means of a
computer program. In the transition table of an AFN, each entry is a set of states;
in the transition table of an AFD, each entry is just a state. The general idea behind
the AFN to AFD construction is that each state of the AFD corresponds to a set of
states of the AFN. The AFD uses a state to locate all possible states the AFN can be
in after reading each symbol from the input. That is, after reading it will enter a1,
a2,. ..an, the AFD is in a state that represents the subset T of AFN states reachable
from the AFN start state along some path labeled a1, a2,. ..an.
of AFD can be exponentially in the number of states of the AFN but in practice this
worst case rarely occurs. Algorithm (Construction of subsets) Construction of an
AFD from an AFN. Entry. A NFA N Exit. An AFD D that accepts the same Method
language. The algorithm builds a table of transitions tranD for D. Each state of the
DFA is a set of states of the AFN, and tranD is constructed so that D will simulate
"in parallel" all possible moves that N can perform with a given input string. The
operations in the following table are used to locate the sets of AFN states (s
represents an AFN state, and T a set of AFN states).
It is observed that the AFN of Figure 1 has two transitions from state "0" with
input "a"; that is, it can go to state "0" or to 1.
ERs, AFDs, and AFNDs are equivalent mechanisms for denoting regular
languages. In these three sections we will demonstrate this by converting ER
→ AFND → AFD → ER. The first two conversions are very relevant in practice, as
they allow efficient verifiers or search engines to be built from ERs.
There are algorithms that relate the specification of tokens -regular expressions-,
with their recognition -finite automata-. It is possible given a regular expression to
obtain the DFA that recognizes the strings of the language denoted by the regular
expression. It is also possible to obtain the AFND that recognizes the language
represented by said regular expression.
The algorithm that allows to build the deterministic finite automaton is beyond
the scope of these notes (the student does not have the prerequisites for its study
in this course). However, the algorithm used for the construction of the non-
deterministic finite automaton AFND is relatively simple to apply, since it is based
on simple rules. There are many variants of this algorithm called "Thompson's
Algorithm".
This algorithm is syntax-driven, that is, it uses the syntactic structure of the
regular expression to guide the process of building the AFND automaton.
Suppose that N(s) and N(t) are AFND's for the regular expressions s and t,
respectively.
a) For the regular expression s | t(alternating), construct the following AFND, N(s|t) :
Minimization of an AFD
Two states of a deterministic finite automaton are equivalent states if, when
joined into a single state, they can recognize the same regular language as if they
were separate. This union of states involves the union of both its input and output
transitions. If two states are not equivalent, they are said to be distinguishable
states. A final state with a non-final state will never be equivalent.
A DFA is minimized if all its states are distinguishable and reachable. An AFD
minimization algorithm is as follows:
For each pair (p, q) and each symbol a of the alphabet, such that r = δ(p,a) and s = δ(q,a): If
(r, s) has already been marked, then p and q are also distinguishable , therefore mark the
entry (p, q).
Otherwise, place (p, q) in a list associated with the input (r, s). Group the pairs of
unmarked states.
After the third step, if the created table is completely marked, then the initial AFD
was already minimal.
Example
In the first example figure, an automaton is shown with the inaccessible state d,
which can be removed immediately. Then the table of pairs of states is built, and
then, according to the third line of the algorithm, the rows and columns
corresponding to the final states c and g are marked, except for the cell that
represents the pair (c,g), since being both final states, they can be equivalent
states. Subsequently, the remaining cells are marked according to the fourth line
of the algorithm, noting that the pair (b, f) is associated with the pair (c, g), and
thus finally the final automaton is obtained, grouping the states b and f, as well as
c and g, as shown in the second figure of the example.
Two states of a deterministic finite automaton are equivalent states if, when joined
into a single state, they can recognize the same regular language as if they were
separated. This union of states involves the union of both its input and output
transitions. If two states are not equivalent, they are said to be distinguishable
states. A final state with a non-final state will never be equivalent. 3.5 A DFA is
minimized if all its states are distinguishable and attainable. An AFD minimization
algorithm is as follows:
1. If (r, s) has already been marked, then p and q are also distinguishable, so mark
the entry (p, q). 2. Otherwise, place (p, q) in a list associated with the input (r, s).
After the third step, if the created table is completely marked, then the initial AFD
was already minimal. The computational complexity of the problem of minimizing
a DFA is polynomial. In fact, there are algorithms even more efficient than the one
shown in this article (although less intuitive). However, the problem of minimizing
a nondeterministic finite automaton is NP-complete and PSPACE-complete.
For this, we assign classes to the different states, being for the first iteration,
C1( class 1 ) for the final states and C2( class 2 ) for the rest of the states.
Q/E1 to b to b
*p p what
C1 C1
*q r p C1 C1
*r r r C1 C1
-> s youp C2 C1
you youor C2 C2
or youv C2 C2
v v or C2 C2
Next, we have verified that no extra class has been created, therefore, the Q/E2
will be the minimum equivalent. To represent such an automaton, we will
consider the classes as the states and we will represent their corresponding
transitions.
Q/E2 to b
*p C1 C1
*q C1 C1
*r C1 C1
-> s C3 C1
you C3 C3
or C3 C3
v C3 C3
- The green light will turn on for 10 seconds. Similarly is the situation of the
color red.
- For the yellow light it will be 4 seconds
Defining System States and State Transition Triggers
The state can be described as a pattern of six bits where each position represents
one light from each traffic light. Therefore, the value of a position will be activated
if the traffic light is on.
The transitions are a pair of actions that activate or deactivate the lights at the two traffic
lights. (Mtz, nd)
Finite state machines are important in the application in electronics, they are
symbol acceptors, the most important applications that we have in electronics is
in the creation of circuits, since it has to recognize that a chain of symbols is
identical to another and so let the data pass. (Mtz, nd)
1. COMMUNICATIONS PROTOCOL
A communications protocol is the set of standardized rules for representation,
signaling, authentication, and error detection required to send information over a
communication channel. An example of a simple communications protocol
adapted to voice communication is the case of a radio announcer speaking to his
listeners. Communication protocols for digital communication over computer
networks have features designed to ensure reliable data exchange over a
communication channel.
imperfect communication. Communication protocols follow certain rules for the
system to function properly. (Mtz, nd)
2. TELEPHONY
• The DUAL Finite State Machine performs the entire decision process for all
route calculations.
• FSM DUAL (Broadcast Update Algorithm) tracks all routes, uses their metrics
to select efficient and loop-free routes, and selects routes with the least cost
path to insert into a routing table. (Mtz, nd)
MICROWAVE OVEN:The microwave oven has one door. If the door is closed, then
it may or may not be in operation (depending on whether it is turned on or off).
When it is on, it is not possible to open the oven door without first turning it off.
Let's also assume the following: at any time it is possible to set the cooking mode.
Cellular automata are useful tools for modeling any system in the universe. They
can be considered as a good alternative to differential equations and have been
used to model physical systems, such as interactions between particles, galaxy
formation, kinetics of molecular systems and crystal growth, as well as various
biological systems at the cellular, multicellular and population levels.
For all this, its application is very varied, such as Simulation of evacuation of ships
and movie theaters, market research and advertising effects, entertainment, art,
research, simulation of physical, chemical and biological processes,
growth and spread of cancer cells, epidemiology, finance and economics, crystal
growth, pigmentation patterns in snails, developmental biology, dispersal of trees
within an ecosystem, theory of relativity, chemical reactions, population dynamics,
co-evolution, geology , quantum dots, vehicular traffic, neural networks and
artificial intelligence, cryptography, thermodynamics and hydrodynamics. Etc.
(Universidad Mayor de San Andres)
Example
Each cell changes state based on the state of neighboring cells. For example, a cell
in "plant" state changes to "empty" state if there is an ant near the plant: the ant
eats the plant. Other state changes are also subject to the result of a uniform
pseudo-random function, and occur, if the other conditions are met, according to
a certain probability. For example, a cell in the "empty" state changes to the "ant"
state only if there is an ant close to the plant and also with a certain probability
(only if the ant "decides" to take that direction).
The state of each cell can be defined by different variables: ants, like plants, have
a certain amount of energy. But, in addition, ants have an inertia regarding the
direction of movement, which causes a tendency to move in the same direction,
and a "type", since there are "red", "pink", "orange" ants, "yellow" and "green"
that correspond to different probabilities of moving, watering, fighting or
reproducing.
In this automaton, the changes of state are directed only by the "ants", so that the
"execution" of an ant causes a change of state in itself and in other possible cells
of the "plant" type. This last point leads to the possibility of looking at the
program from another point of view: as a set of simple mobile automata whose
state is defined, among others, by their position on the X and Y axes. That is,
instead of seeing a grid whose cells change state, we see a set of ants that move
along some Cartesian axes. Indeed, the automaton has not been programmed as
a set of cells with different properties, but rather as several sets (or several
automata
superimposed): a set of ants, another of plants and another of obstacles, checking
that any of them does not exist in the same position as another. (REDcientifica,
undated)
CONCLUSIONS
- Turn on
- Stop
- To wash; a light indicator L, and a switch located on the door.
Events (inputs) are the activation of the console buttons and the door switch.
The indicator light is an action (output) that must be executed.
- off
- on
- Washing up
0 1
TO L off
AND TO L Washing up
L L Washing up