Top Banner
MELJUN CORTES MELJUN CORTES
31

MELJUN CORTES automata theory

Jul 15, 2015

Download

Technology

MELJUN CORTES
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: MELJUN CORTES automata theory

MELJUN CORTESMELJUN CORTES

Page 2: MELJUN CORTES automata theory

Automata are abstract mathematical models of machines that perform computations on an input by moving through a series of states or configurations.

Page 3: MELJUN CORTES automata theory

Automaton

An automaton is represented formally by the 5-tuple of elements {Q,Σ,δ,q0,A}, where:

▪ Q is a finite set of states.

▪ Σ is a finite set of symbols.

Page 4: MELJUN CORTES automata theory

Automaton

An automaton is represented formally by the 5-tuple of elements {Q,Σ,δ,q0,A}, where:

▪ δ is the transition function.

▪ q0 is the start state, where q0 Q.∈

▪ A is a set of states of Q (i.e. A Q) called ⊆ accept states.

Page 5: MELJUN CORTES automata theory

Input word

An automaton reads a finite string of symbols a1,a2,...., an , where ai Σ, which is called a ∈ input word.

Accepting word

A word w Σ* is accepted by the automaton if ∈qn A.∈

Page 6: MELJUN CORTES automata theory

Run

A run of the automaton on an input word w = a1,a2,...., an Σ*, is a sequence of states q∈ 0,q1,q2,...., qn, where qi Q such that q∈ 0 is the start state and qi = δ(qi-1,ai) for 0 < i ≤ n.

Page 7: MELJUN CORTES automata theory
Page 8: MELJUN CORTES automata theory

A finite automaton (FA) is a simple idealized machine used to recognize patterns within input taken from some character set (or alphabet) C.

Page 9: MELJUN CORTES automata theory

A finite automaton consists of:

a finite set S of N states a special start state a set of final (or accepting) states a set of transitions T from one state to another,

labeled with chars in C

As noted above, we can represent a FA graphically, with nodes for states, and arcs for transitions.

Page 10: MELJUN CORTES automata theory

We execute our FA on an input sequence as follows: Begin in the start state If the next input char matches the label on a

transition from the current state to a new state, go to that new state

Continue making transitions on each input char▪ If no move is possible, then stop▪ If in accepting state, then accept

Page 11: MELJUN CORTES automata theory
Page 12: MELJUN CORTES automata theory

It is a finite state machine which accepts the word "nice". In this FSM the only accepting state is number 7.

Page 13: MELJUN CORTES automata theory
Page 14: MELJUN CORTES automata theory

For each input symbol in Σ, there is exactly one transition of each state (possibly back to the state itself).

It do not accept empty strings.

Page 15: MELJUN CORTES automata theory

A deterministic finite automaton (DFA) consists of

A finite set of states (often denoted Q) A finite set Σ of symbols (alphabet) A transition function that takes as argument a

state and a symbol and returns a state (often denoted δ)

Page 16: MELJUN CORTES automata theory

A start state often denoted q0 A set of final or accepting states (often denoted F)

We have q0 Q and F Q∈ ⊆

Page 17: MELJUN CORTES automata theory

So a DFA is mathematically represented as a 5-uple (Q, Σ, δ, q0, F )

The transition function δ is a function in Q × Σ Q→ Q × Σ is the set of 2-tuples (q, a) with q Q and a ∈ ∈

Σ

Page 18: MELJUN CORTES automata theory

How to present a DFA? With a transition table

Page 19: MELJUN CORTES automata theory

How to present a DFA? With a transition table

Inputs

0 1

Page 20: MELJUN CORTES automata theory

How to present a DFA? With a transition table

Inputs States

0 1

q0

q1

q2

Page 21: MELJUN CORTES automata theory

How to present a DFA? With a transition table

The indicates the →start state

0 1

q0

q1

q2

Page 22: MELJUN CORTES automata theory

How to present a DFA? With a transition table

The indicates the →start state

The indicates the ∗final state(s)

0 1

q0

q1

* q2

Page 23: MELJUN CORTES automata theory

How to present a DFA? With a transition table

δ (q0,0) = q1

δ (q0,0) = q0

0 1

q0 q1 q0

q1

* q2

Page 24: MELJUN CORTES automata theory

How to present a DFA? With a transition table

δ (q0,0) = q1

δ (q0,0) = q0

δ (q1,0) = q2

δ (q1,0) = q1

0 1

q0 q1 q0

q1 q2 q1

* q2

Page 25: MELJUN CORTES automata theory

How to present a DFA? With a transition table

δ (q0,0) = q1

δ (q0,0) = q0

δ (q1,0) = q2

δ (q1,0) = q1

δ (q2,0) = q2

δ (q2,0) = q2

0 1

q0 q1 q0

q1 q2 q1

* q2 q2 q2

Page 26: MELJUN CORTES automata theory

Construct a DFA that accepts the language

L = {010, 1}

( Σ = {0, 1} )

Page 27: MELJUN CORTES automata theory

Construct a DFA that accepts the language

L = {010, 1}

( Σ = {0, 1} )

Page 28: MELJUN CORTES automata theory

Set of all strings over {0,1} where 1 is always even.

Page 29: MELJUN CORTES automata theory

Set of all strings over {0,1} where 1 is always even.

Page 30: MELJUN CORTES automata theory

Set of all strings over {0,1} where 1 is always odd.

Page 31: MELJUN CORTES automata theory

Set of all strings over {0,1} where 1 is always odd.