+ All Categories
Home > Technology > MELJUN CORTES Automata Theory

MELJUN CORTES Automata Theory

Date post: 26-Jun-2015
Category:
Upload: meljun-cortes
View: 173 times
Download: 3 times
Share this document with a friend
Description:
MELJUN CORTES Automata Theory
Popular Tags:
31
MELJUN CORTES MELJUN CORTES
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 q0,q1,q2,...., qn, where qi ∈ Q such that q0 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.


Recommended