Docsity
Docsity

Prepara i tuoi esami
Prepara i tuoi esami

Studia grazie alle numerose risorse presenti su Docsity


Ottieni i punti per scaricare
Ottieni i punti per scaricare

Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium


Guide e consigli
Guide e consigli


computazionale matema, Dispense di Matematica Computazionale

prof simpatico ma computazionale is bad

Tipologia: Dispense

2025/2026

Caricato il 08/01/2026

andrea-bazzani
andrea-bazzani 🇮🇹

4 documenti

1 / 51

Toggle sidebar

Questa pagina non è visibile nell’anteprima

Non perderti parti importanti!

bg1
Automata and Computability Michele Amoretti
High Performance Computing
Automata and Computability
Prof. Michele Amoretti
High Performance Computing 2024/2025
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33

Anteprima parziale del testo

Scarica computazionale matema e più Dispense in PDF di Matematica Computazionale solo su Docsity!

Automata and Computability

Prof. Michele Amoretti

High Performance Computing 2024/

Summary

  • Finite Automata
  • Pushdown Automata
  • Turing Machines
  • Decidability
  • Reducibility

Deterministic Finite Automaton (DFA) Formally, a DFA is a 5-tuple (Q,Σ,δ,q 0 ,F) where

  1. Q is a finite set called the states
  2. Σ is a finite set called the alphabet
  3. δ:Q×ΣQ is the transition function
  4. q 0 ∈ Q is the start state
  5. F ⊆ Q is the set of accept states Intuitively, a DFA represents a system that can be in a finite number of different states. As a consequence of some input (in a finite alphabet), the DFA makes a transition from the current state to another. The output is accept if, after reading the last input, the DFA enters an accept state, and reject if it does not.

Deterministic Finite Automaton (DFA) The DFA can be represented by means of a table that is called state transition table. A much more suggestive representation of a DFA is the state diagram , in which the automaton is represented by means of an oriented graph, where nodes are states and arcs are transitions, the latter being labeled with the symbol whose reading causes the transition itself. The initial state is a node with an entering arrow, while accept states are double-circled nodes.

Finite State Transducer (FST) An FST is a DFA whose output is a string and not just accept or reject. Formally, an FST is a 7-tuple (Q,Σ,δ,q 0 ,F,O,η) where

  1. Q is a finite set called the states
  2. Σ is a finite set called the alphabet
  3. δ:Q×ΣQ is the transition function
  4. q 0 ∈ Q is the start state
  5. F ⊆ Q is the set of accept states
  6. O is the finite set of output symbols
  7. η:Q×ΣO is the output function

Finite State Transducer (FST) Example A manufacturer robot receives saucers and small cups on an input conveyor belt, and puts assembled “small cup on saucer” on an output conveyor belt. Rules:

  1. If both hands are free, the robot grasps the input object (either small cup or saucer) with its left hand.
  2. If the robot already has an object in its left hand, the new incoming object must be different and it is grasped with the right hand.
  3. The robot puts the small cup on the saucer and puts the assembled item on the output conveyor belt.
  4. When the input sequence ends, both hands of the robot must be free.

Nondeterminism Nondeterminism is a generalization of determinism. In a nondeterministic machine, several choices may exist for the next state at any point.

Nondeterministic Finite Automaton (NFA) Formally, an NFA is a 5-tuple (Q,Σ,δ,q 0 ,F) where

  1. Q is a finite set of states
  2. Σ is a finite alphabet
  3. δ:Q×ΣεP(Q) is the transition function
  4. q 0 ∈Q is the start state
  5. F⊆Q is the set of accept states where Σε = Σ∪{ε} and P(Q) is the power set of Q, i.e., the collection of all subsets of Q. The symbol ε represents the empty string. The NFA takes a state and an input symbol or the empty string and produces the set of possible next states.

Equivalence of NFAs and DFAs Surprisingly, DFAs and NFAs recognize the same class of languages. It is useful because describing an NFA for a given language sometimes is much easier than describing a DFA for that language.

A language is called a regular language if some NFA recognizes it.

Example NFA DFA

Pushdown Automata Many languages cannot be described by means of finite automata. Pushdown automata are like finite automata but have an extra component called a stack. The stack provides extra additional memory beyond the finite amount available in the control, allowing pushdown automata to recognize some nonregular languages. Like finite automata, pushdown automata can be deterministic or nondeterministic.

Deterministic Pushdown Transducer (DPT) A DPT is a DPA whose output is a string and not just accept or reject. Formally, a DPT is a 8-tuple (Q,Σ,Γ,δ,q 0 ,F,O,η) where

  1. Q is a finite set called the states
  2. Σ is a finite set called the alphabet
  3. Γ is a finite set called the stack alphabet
  4. δ:Q×Σ×ΓQ×Γ is the transition function
  5. q 0 ∈Q is the start state
  6. F⊆Q is the set of accept states
  7. O is the finite set of output symbols
  8. η:Q×Σ×ΓO is the output function

Deterministic Pushdown Transducer (DPT) Example A manufacturer robot that assembles saucers and small cups: if it already has a saucer and receives another saucer, it is not able to accept it and stops. Solution: we provide the robot with a stack (initially empty).

Deterministic Pushdown Transducer (DPT) Example The stack always contains objects of the same type, either saucers or small cups. If the stack has infinite capacity, no FST can model this robot that has an infinite number of possible states.

Nondeterministic Pushdown Automaton (NPA) Formally, an NPA is a 6-tuple (Q,Σ,Γ,δ,q 0 ,F) where

  1. Q is a finite set of states
  2. Σ is the input alphabet
  3. Γ is the stack alphabet
  4. δ:Q×Σε×ΓεP(Q×Γε) is the transition function
  5. q 0 ∈Q is the start state
  6. F⊆Q is the set of accept states where Σε = Σ∪{ε}, Γε = Γ∪{ε} and P(Q×Γε) is the power set of Q×Γε, i.e., the collection of all subsets of Q×Γε. The symbol ε represents the empty string.