Loading in 5 sec....

Deterministic Finite AutomatonPowerPoint Presentation

Deterministic Finite Automaton

- 102 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about ' Deterministic Finite Automaton' - nevina

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Deterministic Finite Automaton

- A deterministic finite automaton (DFA) is a five-tuple A = (Q, , , q0, F) where
- Q is a finite set of states
- is a finite set of input symbols
- is a function : Q Q called transition function
- q0 Q is called the start state
- F Q is called the set of accepting states

Deterministic Finite Automaton

- Transition diagram for a DFA is graph defined as follows:
- For each state there is a node labeled by the state
- If (q, a) = p, then there is an arc from q to p labeled by a
- There is an arrow into the start state q0 labeled start, The arrow does not originate at any node
- Nodes corresponding to accepting states marked by double circles

Deterministic Finite Automaton

- A transition table is a tabular representation of the transition function. Rows of the table correspond to states and columns correspond to input symbols. The entry if the cell indexed by state q and input a is (q, a). The start state is marked with an arrow, the final states are marked with *.

Deterministic Finite Automaton

- Transition function on strings:
Let w=xa

1)

2)

Deterministic Finite Automaton

- A DFA accepts a string w if is a final state
- The set of all strings accepted by a DFA, A, is the language of the DFA denoted by L(A). The DFA A is said to accept/define a language L if L(A) = L

Nondeterministic Finite Automaton

- A nondeterministic finite automaton (DFA) is a five-tuple A = (Q, , , q0, F) where
- Q is a finite set of states
- is a finite set of input symbols
- is a function : Q 2Q called transition function
- q0 Q is called the start state
- F Q is called the set of accepting states

Nondeterministic Finite Automaton

- Extended transition function:
- The language of an NFA A = (Q, , , q0, F):

Equivalence of DFA and NFA

- Subset construction:
Let N = (QN,, N, q0, FN) be an NFA, construct a DFA

D = (QD, , D, {q0 }, FD ) as follows:

- QD is the set of all subsets of QN
- FD is the set of subsets S of QN whose intersection with FN is not empty
- For each set S QN and each input symbol a

Equivalence of DFA and NFA

- Theorem: If D = (QD, , D, {q0 }, FD ) is the DFA constructed from the NFA N = (QN,, N, q0, FN) by the subset construction, then L(D) = L(N)
- Theorem: A language L is accepted by some DFA if and only if L is accepted by some NFA

0

1

q0

q1

q2

q3

Finite Automata with -transitions- An -NFA N = (Q, , , q0, F) where the definitions of Q, , q0, and F are same as for an NFA. is defined as follows:
: Q X {} 2Q

Function ECLOSE

- Epsilon-closure (ECLOSE):
/* associates a set of states with a given state */

basis: state q is in ECLOSE(q)induction: if p is in ECLOSE(q) and (p, ) contains r, then r also is in ECLOSE(q)

Eliminating -transitions

Let E = (QE,, E, q0, FE), then the equivalent DFA

D = (QD, , D, qD , FD ) is defined as follows:

- QD is the set of subsets of QE
- qD = ECLOSE({q0 })
- (S, a) = ECLOSE( E (p, a)) where p S
- FD = {S | S is in QD and SFE }

Download Presentation

Connecting to Server..