# Welcome back

## Find a book, put up your feet, stay awhile

Sign in with Facebook

Sorry, we are unable to log you in via Facebook at this time. Please try again later.

or

Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more

Download

Standard view

Full view

of .

Look up keyword or section

Like this

Share on social networks

42Activity

×

0 of .

Results for: No results containing your search query

P. 1

AutomataRatings:

5.0

(1)|Views: 2,397|Likes: 47Published by kirivarnan

See more

See less

https://www.scribd.com/doc/15961341/Automata

05/13/2013

text

original

Theory of Automata & Formal Languages

Finite Automata

DFA Definition

: A DFA is 5-tuple or quintuple M = (Q,

∑

,

δ

, q

0

, A) whereQ is non-empty, finite set of states.

∑

is non-empty, finite set of input alphabets.

δ

is transition function, which is a mapping from Q x

∑

to Q.q

0

∈

Q is the start state.A

⊆

Q is set of accepting or final states.

Note: For each input symbol

a

, from a given state there is exactly one transition (there can beno transitions from a state also) and we are sure (or can determine) to which state themachine enters. So, the machine is called

deterministic

machine. Since it has finite number of states the machine is called Deterministic finite machine or Deterministic Finite Automatonor Finite State Machine (FSM).The language accepted by DFA is

L(M) = { w | w

∈

∑

* and

δ

*(q

0

, w)

∈

A }The non-acceptance of the string

w

by an FA or DFA can be defined in formalnotation as:L(M) = { w | w

∈

∑

* and

δ

*(q

0

, w)

∉

A }

DFA to accepting strings of a’s and b’s starting with the string ab

Fig.2.7 Transition diagram to accept string ab(a+b)*

So, the DFA which accepts strings of a’s and b’s starting with the string

ab

is givenby M = (Q,

∑

,

δ

, q

0

, A) whereQ = {q

0

, q

1

, q

2

, q

3

}

∑

= {a, b}q

0

is the start stateA = {q

2

}.

δ

is shown the transition table 2.4.

←Σ→

δ

a b

→

q

0

q

1

q

3

q

1

q

3

q

2

q

2

q

2

←

S t a t e s

→

q

3

q

3

q

3

q

2

a,b

q

2

q

1

q

0

a b

q

3

aa,bb

2

Draw a DFA to accept string of 0’s and 1’s ending with the string 011.

Obtain a DFA to accept strings of a’s and b’s having a sub string aaObtain a DFA to accept strings of a’s and b’s except those containing the substring aab.

Obtain DFAs to accept strings of a’s and b’s having exactly one a,

Obtain a DFA to accept strings of a’s and b’s having even number of a’s and b’s

The machine to accept even number of a’s and b’s is shown in fig.2.22.

q

3

q

1

q

2

q

0

1 00011 10

q

2

q

1

b

q

0

a aba,b

q

3

a ba

q

2

q

1

q

0

a,bbba

q

1

q

0

b a,ba

q

2

ba

q

1

b

q

0

a,a

q

1

b

q

0

ba a

q

3

b

q

2

ba a

q

4

a,

3Fig.2.22 DFA to accept even no. of a’s and b’s

Regular language

Definition

: Let M = (Q,

∑

,

δ

, q

0

, A) be a DFA. The language L is regular if thereexists a machine M such that L = L(M).

Applications of Finite Automata

String matching/processingCompiler Construction

The various compilers such as C/C++, Pascal, Fortran or any other compiler aredesigned using the finite automata. The DFAs are extensively used in the buildingthe various phases of compiler such asLexical analysis (To identify the tokens, identifiers, to strip of thecomments etc.)Syntax analysis (To check the syntax of each statement or control statementused in the program)Code optimization (To remove the un wanted code)Code generation (To generate the machine code)

Other applications

The concept of finite automata is used in wide applications. It is not possible tolist all the applications, as there are infinite numbers of applications. This sectionlists some applications:1. Large natural vocabularies can be described using finite automaton whichincludes the applications such as spelling checkers and advisers, multi-language dictionaries, to indent the documents, in calculators to evaluatecomplex expressions based on the priority of an operator etc. to name afew. Any editor that we use uses finite automaton for implementation.2. Finite automaton is very useful in recognizing difficult problems i.e.,sometimes it is very essential to solve an un-decidable problem. Eventhough there is no general solution exists for the specified problem, usingtheory of computation, we can find the approximate solutions.

q

1

q

0

b

q

2

baab

q

3

baa

You've already reviewed this. Edit your review.

1 hundred reads

1 thousand reads

Sathiyaseelan Thiru ⓋⓛⓅ liked this

Osama Alvi liked this

Mocin ⎝⎲⏝⎲⎠ liked this

RenatoDosSantosLeal liked this

Safaa Alradadi liked this

Anirudh Taklu Kaushik liked this

Divya Vidhyadharan liked this

Beso Al-tameme liked this

- Read and print without ads
- Download to keep your version
- Edit, email or read offline

© Copyright 2015 Scribd Inc.

Language:

Choose the language in which you want to experience Scribd:

Sign in with Facebook

Sorry, we are unable to log you in via Facebook at this time. Please try again later.

or

Password Reset Email Sent

Join with Facebook

Sorry, we are unable to log you in via Facebook at this time. Please try again later.

or

By joining, you agree to our

read free for one month

Personalized recommendationsbased on books you love

Syncing across all your devices

Join with Facebook

or Join with EmailSorry, we are unable to log you in via Facebook at this time. Please try again later.

Already a member? Sign in.

By joining, you agree to our

to download

Personalized recommendationsbased on books you love

Syncing across all your devices

Continue with Facebook

Sign inJoin with emailSorry, we are unable to log you in via Facebook at this time. Please try again later.

By joining, you agree to our

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

CANCEL

OK

You've been reading!

NO, THANKS

OK

scribd