Day08-ClassNotes - Rose

advertisement

MA/CSSE 474 Day 08 Announcements and Summary

Announcements:

1) Nothing new. See day 6 and 7 announcements.

Main ideas from today:

1.

Minimal-state DFSM for a language: Recap of where we are so far (assume unreachable states removed): a.

x

L

y means that

z

 

* (xz

L iff yz

L) i.

L

is an equivalence relation. ii.

[w] means " the equivalence class of

L

that contains w b.

If L is a regular language, let M be any DFSM that accepts L. Then (# of states in M) ≥ (# of equivalence classes of

L

). c.

Theorem: Let L be a regular language over some alphabet

.

Then there is a DFSM M with L=L(M) and that has precisely n states where n is the number of equivalence classes of

L

.

Any other FSM that accepts L must either have more states than M or it must be identical to M except for state names. d.

We began the proof last time. We construct the prescribed DFSM directly from

L

. i.

M = (K,

,

, s, A), where:

1.

K contains one state for each equivalence class of

L

.

2.

s = [

], the equivalence class of

under

L

.

3.

A = {[x] : x

L}. [Aside: what is the union of all of these classes?]

4.

([x], a) = [xa]. (if M is in state containing x, then, after reading the next symbol, a, it

goes to state containing xa). e.

Need to show: i.

K is finite. M regular  #equ. classes of

L

≤ #states of M, which is finite. ii.

is a well-defined function. i.e. ∀ x,y ∊ Σ*,a ∊ Σ ([x]=[y] → [xa]=[ya])

work with another student to write a proof of this iii.

L = L(M). Before we prove this, we first prove this more general lemma:

1.

Lemma:

 s,t ∊ Σ*( ([

], st) ⊦

M

* ([s], t)). f.

We prove the lemma by induction on |s|. The base case is trivial:

2.

Induction step. Assume that the claim is true for strings of length k. What can we say when |s| = k+1?

Since |s|

1, we know that s = yc, where y

 

* and c

 

.

3.

We apply e.iii.1. above to the special case t= ___ to get _______________

Thus:

4.

A smaller machine M# that also accepts L does not exist.

5.

A different machine M# that also has n states and that accepts L does not exist.

6.

Myhill-Nerode Theorem: A language is regular iff the number of equivalence classes of

L

is finite. a.

Proof: Show the two directions of the implication: b.

L regular

the number of equivalence classes of

L

is finite: If L is regular, then c.

The number of equivalence classes of

L

is finite

L regular: If the cardinality of

L

is finite, then

7.

Two approaches to minimizing a given machine a.

Start with separate states and merge. b.

Start with overclustering, and then separate distinguishable states. Successively approximate.

8.

Define ≡ (a relationship on states of a DFSM M) by p≡q iff for every string w ∊ Σ*, either w takes M to an accepting state from both p and q, or w takes M to a rejecting state from both p and q. a.

In first-order logic:

9.

We construct

as the limit of a sequence of approximating equivalence Relations

 n a.

p

 0 q iff configurations (p, ε) and (q, ε) either both lead to accepting states or both lead to nonaccepting states. I.e., ________________________________________' b.

For all k >= 0, p

 k+1 q iff both of the following are true:

Can you express the meaning of

 n p

 k q

For all a ∊ Σ, δ(p, a)

 k δ(q, a) non-recursively in concise English?

10.

Example:

11.

We can put any DFSM into a canonical form that makes it easy for us to tell whether two machines are "the same"

Download