





























































Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!






























































Marco Della Vedova
Wednesday 4th^ November, 2015 15:
http://robot.unipv.it/toolleeo
Models of computation and abstract machines
In computer science, automata theory is the study of mathematical objects called abstract machines or automata and the computational problems that can be solved using them.
Automata comes from the Greek word αὺτόματα = “self-acting”
An abstract machine (a.k.a. abstract computer) is a theoretical model of a computer hardware or software systems. A model of computation is the definition of the set of allowable operations used in computation and their respective costs. It is used for:
Turing Machine in complexity theory
Turing machines are not intended as a practical computing technology, but rather as a thought experiment representing a computing machine. It is believed that if a problem can be solved by an algorithm, there exists a Turing machine that solves the problem (Church–Turing thesis). Furthermore, it is known that everything that can be computed on other models of computation known to us today, such as a RAM machine, Conway’s Game of Life, cellular automata or any programming language can be computed on a Turing machine. Since Turing machines are easy to analyze mathematically, and are believed to be as powerful as any other model of computation, the Turing machine is the most commonly used model in complexity theory.
Finite State Machines (FSMs)
A Finite State Machine (a.k.a. finite state automaton) is an abstract device (simpler than a Turing machine), consisting of:
if the output is produced and how it is produced: before or after a transition.
Example of FSM: an edge-detector
The function of an edge detector is to detect transitions between two symbols in the input sequence, say 0 and 1. It does this by outputting 0 as long as the most recent input symbol is the same as the previous one. However, when the most recent one differs from the previous one, it outputs a 1. By convention, the edge detector always outputs 0 after reading the very first symbol. Thus we have the following input output sequence pairs for the edge-detector, among an infinite number of possible pairs:
inputs −→ outputs 0 1 1 1 −→ 0 1 0 0 0 1 1 1 1 0 −→ 0 1 0 0 0 1 1 0 1 0 1 0 −→ 0 1 1 1 1 1
Graphical representation of FSM using graphs
This graphical representation is knows as state diagram. A state diagram is a direct graph with a special node representing the initial state.
Exercise: math model of edge detector
What (Σ, Γ, S, s 0 , δ) are for the edge-detector FSM?
Tabular representation of a FSMs’ transition function
The transition function δ : S × Σ → S × Γ can be represented by a tabular with states on the rows and inputs on the columns. In each cell there is a tuple s, γ indicating the next state and the output. For example, for the edge-detector FSM, the transition table is:
State machines as discrete dynamic system
Transitions between states govern the discrete dynamics of the state machine and the mapping of inputs to outputs. The FSM evolves in a sequence of transitions. We can number these transitions starting from 0 for the initial state. Specifically, let x : N → S to be a function that gives the state of an FSM at transition k ∈ N. Let u : N → Σ and y : N → Γ denote that input and output at each transition. Hence, x(0) ∈ S is the first input and y(0) ∈ Γ the first output. The dynamics of the state machine is given by: { x(0) = s 0 (x(k + 1), y(k)) = δ(x(k), u(k)) The previous system can be rewritten (in accordance to the standard notation for dynamical systems) as: { x(k + 1) = δ′(x(k), u(k)), x(0) = s 0 y(k) = δ′′(x(k), u(k))
When does a transition occur?
Nothing in the definition of a state machine constrains when it reacts. As a discrete system, we do not need to talk explicitly about the amount of time that passes between transitions, since it is actually irrelevant to the behavior of a FSM. Still, a FSM could be:
Mealy FSM and Moore FSM
With these assumptions, a Moore machine is strictly causal
Notion of causality
strictly causal systems are useful to build feedback systems
Mealy FSM vs Moore FSM
Exercises