0% found this document useful (0 votes)
147 views4 pages

Deterministic Finite Acceptors

Deterministic finite automata (DFAs) and nondeterministic finite automata (NFAs) are both types of finite state machines that accept or reject strings of symbols. DFAs are deterministic, having a single transition for each symbol, while NFAs can have nondeterministic transitions. Both define the same class of regular languages. Any NFA can be converted to an equivalent DFA, showing that NFAs and DFAs have equal computational power despite NFAs allowing nondeterminism.

Uploaded by

somu6402
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
147 views4 pages

Deterministic Finite Acceptors

Deterministic finite automata (DFAs) and nondeterministic finite automata (NFAs) are both types of finite state machines that accept or reject strings of symbols. DFAs are deterministic, having a single transition for each symbol, while NFAs can have nondeterministic transitions. Both define the same class of regular languages. Any NFA can be converted to an equivalent DFA, showing that NFAs and DFAs have equal computational power despite NFAs allowing nondeterminism.

Uploaded by

somu6402
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Deterministic Finite Acceptors

DFAs are:

Deterministic--there is no element of choice


Finite--only a finite number of states and arcs
Acceptors--produce only a yes/no answer

A DFA is drawn as a graph, with each state represented by a circle.

One designated state is the start state.

Some states (possibly including the start state) can be designated as final states.

Arcs between states represent state transitions -- each such arc is labeled with the symbol that
triggers the transition.

Formal Definition of a DFA


A deterministic finite acceptor or dfa is a quintuple:
M = (Q, , , q0, F)
where

Q is a finite set of states,


is a finite set of symbols, the input alphabet,
:Q
Q is a transition function,
q0 Q is the initial state,
F Q is a set of final states.

Note: The fact that


of .

is a function implies that every vertex has an outgoing arc for each member

We can also define an extended transition function


:Q

as
Q.

If a DFA M = (Q, , , q0, F) is used as a membership criterion, then the set of strings
accepted by M is a language. That is,
L(M) = {w
:
(q0, w) F}.
Languages that can be defined by dfas are called regular languages.

Nondeterministic Finite Acceptors


A finite-state automaton can be nondeterministic in either
or both of two ways:
A state may have
two or more arcs
emanating from it
labeled with the
same symbol. When
arc may be

the symbol occurs in the input, either


followed.
A state may have one or more arcs emanating from it labeled with (the empty string) . These
arcs may optionally be followed without looking at the input or consuming an input symbol.

Due to nondeterminism, the same string may cause an nfa to end up in one of several different
states, some of which may be final while others are not. The string is accepted if any possible
ending state is a final state.

Example NFAs

Formal Definition of NFAs


The extension of our notation to NFAs is somewhat strained.
A nondeterministic finite acceptor or nfa is defined by the quintuple
M = (Q,

, q0, F)

where

Q is a finite set of states,


is a finite set of symbols, the input alphabet,
:Q (
{ })
2 is a transition function,
q0 Q is the initial state,
F Q is a set of final states.

These are all the same as for a dfa except for the definition of

Transitions on are allowed in addition to transitions on elements of , and


The range of is 2 rather than Q. This means that the values of are not elements of
Q, but rather are sets of elements of Q.

The language defined by nfa M is defined as


L(M) = {w
:

(q0, w)

DFA = NFA
Two acceptors are equivalent if the accept the same language.
A DFA is just a special case of an NFA that happens not to have any null transitions or multiple
transitions on the same symbol. So DFAs are not more powerful than NFAs.

For any NFA, we can construct an equivalent DFA (see below). So NFAs are not more powerful
than DFAs. DFAs and NFAs define the same class of languages -- the regular languages.
To translate an NFA into a DFA, the trick is to label each state in the DFA with a set of states
from the NFA. Each state in the DFA summarizes all the states that the NFA might be in. If the
NFA contains |Q| states, the resultant DFA could contain as many as |2 | states. (Usually far
fewer states will be needed.)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy