AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman...

19
AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani

Transcript of AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman...

Page 1: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

AUTOMATA THEORY

Reference Introduction to Automata Theory Languages and Computation

Hopcraft, Ullman and Motwani

Page 2: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

Automata Theory

Automata theory is the abstract computing device or

machine.

Finite automata involves states and transitions among

states in response to inputs.

Finites automata are a useful model for many important

kinds of h/w and s/w.

Page 3: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

Why Study Automata Theory?

There are several reasons why the study of automata

and complexity is an important part of the core of

Computer science.

Page 4: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

Why Study Automata Theory?

Some of the most important kinds :

1. Software for designing and checking the behavior of

digital circuits.

2. The “lexical analyzer” of a typical compiler, that is, the

compiler component that breaks the input text into

logical units, such as identifiers, keywords and

punctuations.

Page 5: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

Why Study Automata Theory?

3. Software for scanning large bodies of text, such as

collections of web pages, to find occurrences of words,

phrases, or other patterns.

4. Software for verifying systems of all types that have a finite

number of distinct states, such as communications

protocols or protocols for secure exchange of

information.

Page 6: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

A finite automata modeling on/off switch

The devices remember whether it is in the “on” state or

“off” state and it allows the user to press a button whose

effect is different.

offstart onpush

push

Page 7: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

The states are represented by circles, In this example two

states “on” and “off”.

One of the states is designated by the start states.

It is often necessary to indicate one or more states as “final”

or “accepting” states.

A finite automata modeling on/off switch

Page 8: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

This figure shows finite automation that could be part

of a lexical analyzer. The job of this automation is to

recognize the keyword then.

A finite Automation modeling recognition of then

t th the thentstart h e n

Page 9: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

A finite Automation has a set of states and its control moves

from one state to another in response to external inputs.

One of the crucial distinction among classes of finite automata

is whether that control is “deterministic” meaning that the

automation cannot be in more than one state at one time or

“nondeterministic” meaning that it may be in several states at

one.

Introduction to Finite Automata

Page 10: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

Automata and Complexity

What can a computer do? --- Computability:

Studying problems which can be solved by

computer, called decidable problems.

Decidability is the main topic in

computability.

Automata and Complexity

Page 11: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

Automata and Complexity

What can a computer do efficiently? ---

Computational Complexity:

Studying tractable problems solvable with some slowly

growing function (like polynomial) of input size, &

intractable problems solvable with fast growing function

(like exponential).

Intractability is the main topic of computational complexity.

Automata and Complexity

Page 12: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

Three basic concepts

Alphabet --- a set of symbols

Strings --- a sequence of symbols from an alphabet

Language --- a set of strings from the same alphabet

Central Concepts of Automata Theory

Page 13: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

Alphabets : finite, nonempty set of symbols. Conventional notation --- S Ex: 1. ∑ = {0,1} the binary

alphabet, 2. ∑ = {a, b, c, . . . z} 3. The set of all ASCII

characters

Central Concepts of Automata Theory

Page 14: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

Strings: finite sequences of symbols chosen from

some alphabet Ex: 01101 is string from the binary alphabet

∑ = {0,1} .

Empty string e --- a string with zero

occurrences of symbols

Length |w| of string w --- the number of

positions for symbols in w

Examples --- |0111|=4, |e|=0, …

Contd.

Page 15: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

Powers of an Alphabets:

∑º={€}∑1={0,1}∑2={00,01,10,11}∑3={000,001,010,011,100,101,110,111}

Central Concepts of Automata Theory

Page 16: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

Language: A language is set of strings all of which chosen

from ∑* .

Example:1. The language of all strings consisting of n 0’s

followed by n 1’s:

{€,01,0011,000111,…..}

Central Concepts of Automata Theory

Page 17: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

2. The set of strings of 0’s and 1’s with an equal number each:{€,01,10,0011,0101,1001…..}

3. The set of binary number whose value is prime:{10,11,101,111,1011,…..}

Central Concepts of Automata Theory

Page 18: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

Problem:

In automata theory, a problem is the

question of deciding whether a given

string is a member of some particular

language.

Central Concepts of Automata Theory

Page 19: AUTOMATA THEORY Reference Introduction to Automata Theory Languages and Computation Hopcraft, Ullman and Motwani.

End of Class