Automata Theory and Languages, Lecture notes of Theory of Automata

Automata Theory and Languages Automata Theory and Languages Automata Theory and Languages

Typology: Lecture notes

2022/2023

Available from 06/07/2023

cynthia-std
cynthia-std šŸ‡ŗšŸ‡ø

84 documents

1 / 19

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Automata Theory and
Languages
SITE : http://www.info.univ-tours.fr/˜mirian/
Automata Theory, Languagesand Computation - M“ırian Halfeld-Ferrari – p. 1/19
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Automata Theory and Languages and more Lecture notes Theory of Automata in PDF only on Docsity!

Automata Theory and

Languages

SITE :

http://www.info.univ-tours.fr/˜mirian/

Automata Theory, Languages and Computation - MĀ“

Introduction to Automata Theory

Automata theory :

the study of abstract computing devices, or ā€machinesā€

Before computers (1930),

A. Turing

studied an abstract machine (

Turing

machine

) that had all the capabilities of today’ s computers (concerning what they

could compute).

His goal was to describe precisely the boundary between what a

computing machine could do and what it could not do. Simpler kinds of machines (

finite automata

) were studied by a number of

researchers and

useful for a variety of purposes

Theoretical developments bear directly on what computer scientists do today

Finite automata, formal grammars: design/ construction of software Turing machines: help us understand what we can expect from a software Theory of intractable problems: are we likely to be able to write a programto solve a given problem? Or we should try an approximation, a heuristic...

Automata Theory, Languages and Computation - MĀ“

The Central Concepts of Automata Theory

Automata Theory, Languages and Computation - MĀ“

Alphabet

A finite, nonempty set of symbols. Symbol:

Examples:

The binary alphabet:

0 ,^

The set of all lower-case letters:

{a, b,... , z

The set of all ASCII characters

Automata Theory, Languages and Computation - MĀ“

Powers of an alphabet (1)

If^ Σ

is an alphabet, we can express the set of all strings of a certain length from that alphabet by using the exponential notation:

k Σ : the set of strings of length

k , each of whose is in

Examples:

:^

{Ē«

}, regardless of what alphabet

is. That is

Ē«^

is the only string of

length

If^

0 ,^

, then:

,^01

,^10

,^11

,^001

,^010

,^011

,^100

,^101

,^110

,^111

Note: confusion between

and

Ī£^

is an alphabet; its members

and

are symbols

is a set of strings; its members are strings (each one of length 1)

Automata Theory, Languages and Computation - MĀ“

Kleen star āˆ— Ī£ : The set of all strings over an alphabet

{^0

,^1

Ē«,^

0 ,^

,^01

,^10

,^11

,^000

The symbol

āˆ—^

is called

Kleene star

and is named after the mathematician and

logician Stephen Cole Kleene.+ Σ

Thus:

āˆ—^

+^

Ē«}

Automata Theory, Languages and Computation - MĀ“

Languages

If^

Ī£^

is an alphabet, and

L

āˆ—, then

L

is a (formal)

language

over

Language: A (possibly infinite) set of strings all of which are chosen from someāˆ— Ī£ A language over

need not include strings with all symbols of

Thus, a language over

is also a language over any alphabet that is a superset

of

Examples:

Programming language CLegal programs are a subset of the possible strings that can be formedfrom the alphabet of the language (a subset of ASCII characters) English or French

Automata Theory, Languages and Computation - MĀ“

ırian Halfeld-Ferrari – p. 10/

Other language examples

1.^

The language of all strings consisting of

n

0 s followed by

n

1 s (

n^

{Ē«,

,^0011

,^000111

2.^

The set of strings of

0 s and

1 s with an equal number of each: {Ē«,

,^10

,^0011

,^0101

,^1001

3.^

is a language for any alphabet

4.^

āˆ…, the empty language, is a language over any alphabet

5.^

{Ē«

}, the language consisting of only the empty string, is also a language over any alphabetNOTE:

āˆ… 6^

Ē«}

since

āˆ…^

has no strings and

{Ē«

}^

has one

6.^

{w

|^

w^

consists of an equal number of

and

7.^

{^0

n^1

n^

|^ n

8.^

{^0

i^1

j^ |

i^

j}

Automata Theory, Languages and Computation - MĀ“

ırian Halfeld-Ferrari – p. 11/

Important operators on languages:Concatenation

The

concatenation

of languages

L

and

M

, denoted

L.M

or just

LM

, is the set of

strings that can be formed by taking any string in

L

and concatenating it with any string

in^

M

Example

If^ L

,^10

,^111

}^

and

M

Ē«,^

}^ then

L.M

{^001

,^10

,^111

,^001001

,^10001

,^111001

Automata Theory, Languages and Computation - MĀ“

Important operators on languages: Closure

The

closure

of a language

L

is denoted

L

āˆ—^ and represents the set of those strings that

can be formed by taking any number of strings from

L

, possibly with repetitions (

i.e.

, the

same string may be selected more than once) and concatenating all of them.Examples:

If^

L^

=^

{^0

,^1

}^

then

L

āˆ—^ is all strings of

and

If^

L^

=^

{^0

,^11

}^

then

L

āˆ—^ consists of strings of

and

such that the

come in

pairs,

e.g.

,^011

,^11110

and

Ē«.

But not

or

Formally,

L

āˆ—^ is the infinite union

S

i≄

L 0

i^ where

L

{Ē«

},^

1 L

L

, and for

i >

we

have

L

i^ =

LL... L

(the concatenation of

i^

copies of

L

Automata Theory, Languages and Computation - MĀ“

ırian Halfeld-Ferrari – p. 14/

Regular Expressions and Languages

We define the regular expressions recursively. Basis

: The basis consists of three parts:

1.^

The constants

Ē«^

and

āˆ…^

are regular expressions, denoting the language

{Ē«

}^ and

respectively. That is

L

(Ē«

Ē«}

and

L

2.^

If^ a^ is a symbol, then

a is a regular expression. This expression denotes the

language

{a

},^

i.e.

,^ L

( a

a}

NOTE: We use boldface font to denote an expression corresponding to a symbol

3.^

A variable, usually capitalised and italic such as

L

, is a variable, representing any

language.

Automata Theory, Languages and Computation - MĀ“

ırian Halfeld-Ferrari – p. 16/

Regular Expressions and Languages

Induction

: There are four parts to the inductive step, one for each of the three operators

and one for the introduction of parentheses

1.^

If^

E^

and

F

are regular expressions, then

E

F

is a regular expression denoting

the union of

L

(E

)^ and

L

(F

). That is,

L

(E

F

L

(E

)^ ∪

L

(F

2.^

If^

E^

and

F

are regular expressions, then

EF

is a regular expression denoting the

concatenation of

L

(E

)^ and

L

(F

). That is,

L

(EF

L

(E

)L

(F

3.^

If^

E^

is a regular expression, then

E

āˆ—^ is a regular expression denoting the closure

of

L

(E

). That is,

L

(E

L(

E

4.^

If^

E^

is a regular expression, then

(E

)^ is a regular expression denoting the same

as

E

. Formally,

L

E

L(

E

Automata Theory, Languages and Computation - MĀ“

Automata Theory, Languages and Computation - MĀ“