Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Advanced Topics - Automata and Complexity Theory - Lecture Slides, Slides of Theory of Automata

Some concept of Automata and Complexity Theory are Administrivia, Closure Properties, Context-Free Grammars, Decision Properties, Deterministic Finite Automata, Intractable Problems, More Undecidable Problems. Main points of this lecture are: Advanced Topics, Regular Languages, Interesting Applications, Around Finite Automata, Many Variations, Finite Automata, Minimization, Two-Way Finite Automata, Finite-State Transducers, Advanced Regular Expressions

Typology: Slides

2012/2013

Uploaded on 04/29/2013

juni
juni 🇮🇳

4

(17)

122 documents

1 / 35

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Chapter Nine:
Advanced Topics
in
Regular Languages
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23

Partial preview of the text

Download Advanced Topics - Automata and Complexity Theory - Lecture Slides and more Slides Theory of Automata in PDF only on Docsity!

Chapter Nine:

Advanced Topics

in

Regular Languages

There are many more things to learn about finite automata than

are covered in this book. There are many variations with

interesting applications, and there is a large body of theory.

Especially interesting, but beyond the scope of this book, are the

various algebras that arise around finite automata. This

chapter gives just a taste of some of these advanced topics.

DFA Minimization

• Questions of DFA size:

– Given a DFA, can we find one with fewer states

that accepts the same language?

– What is the smallest DFA for a given language?

– Is the smallest DFA unique, or can there be more

than one "smallest" DFA for the same language?

• All these questions have neat answers…

Eliminating Unnecessary States

• Unreachable states, like some of those

introduced by the subset construction, can

obviously be eliminated

• Even some of the reachable states may be

redundant…

Still More Equivalent States

  • In both q 1 and q 2 , the machine accepts if and only if the rest of the string consists of 0 or more a s
  • They're equivalent and can be combined…

q 0^ a q 1

a

a,b

b

q 2

b b

a

Minimized

  • No more equivalencies
  • This is a minimum-state DFA for the language, { xay | x ∈ { b }* and y ∈ { a }*}

q 0^ a

a

a,b

b b

  • We have:
    • L ( M , q 0 ) = { xay | x ∈ { b }* and y ∈ { a }*}
    • L ( M , q 1 ) = { x | x ∈ { a }*}
    • L ( M , q 2 ) = { x | x ∈ { a }*}
    • L ( M , q 3 ) = {}
    • L ( M , q 4 ) = {}
  • So q 1 ≡ q 2 and q 3 ≡ q 4

q 0^ a q 1

a

q 3

a,b

b

q 2

q 4

a,b

b b

a

DFA Minimization Procedure

• Two steps:

– 1. Eliminated states that are not reachable from

the start state

– 2. Combine all equivalent states, so that no two

remaining states are equivalent to each other

• Step 2 is the construction of a new DFA whose

states are the equivalence classes of the

original: the quotient construction

Automating Minimization

• Is there an algorithm that can efficiently

detect equivalent states and so perform the

minimization?

• Yes: a DFA with state set Q and alphabet Σ can

be minimized in O(|Σ| | Q | log | Q |) time

• (reference in the book)

Minimizing NFAs

• Results are not as clean for NFAs

• We can still eliminate unreachable states

• We can still combine equivalent states, using a

similar definition of equivalence

• But the result is not necessarily a unique

minimum-state NFA for the language

• (reference in the book)

Two-Way Finite Automata

• DFAs and NFAs read their input once, left to

right

• We can try to make these models more

powerful by allowing re-reading

• Treat the input like a tape, and allow the

automaton to move its read head left or right

on each move

– Two-way deterministic finite automata (2DFA)

– Two-way nondeterministic finite automata (2NFA)

2DFA Example

  • Input string x 1 x 2 … xn -1 xn
  • Special endmarker symbols frame the input
  • The head can't move past them

x 1 x 2 ... x n -1 x n

2DFA

Theorems 9.2.1 And 9.2.

  • (Stated here without proof)
  • So adding two-way reading to finite automata does not increase their definitional power
  • A little more tweaking will give us more power later:
    • adding the ability to write as well as read yields LBAs (linear bounded automata), which are much more powerful
    • Adding the ability to write unboundedly far past the end markers yields the Turing machines, still more powerful

There is a 2DFA for a language L if and only if L is regular.

There is a 2NFA for a language L if and only if L is regular.

Outline

• 9.1 DFA Minimization

• 9.2 Two-Way Finite Automata

• 9.3 Finite-State Transducers

• 9.4 Advanced Regular Expressions