10.30 non-deterministic automata NFA into a DFA determine

1. with NFA M = ({0,1,2,3}, {a, b}, f, 0, {3}), where f (0, a) = {0,1} f (0, b) = {0} f (1, b) = {2} f (2, b) = {3}

   State transition matrix shown, state transition diagrams, identification and description of the NFA is what kind of language.

 A: The state transition matrix:

 

a

b

0

{0,1}

{0}

1

 

{2}

2

 

{3}

State transition diagram:

 

 

 

 

Language :( a * | b *) abb

2.NFA determine into DFA

1. Solution multifunctions: subset Method

NFA 1). Above the Exercise 1

2). P64 page Exercise 3

2. Empty arc resolved: to find all the initial state and a new state ε- closure

1). Figure 2 distributed to you

2) .P50 3.6 FIG.

 A: 1. (1)

 

 

a

b

0

e {0} = {0}

e {0} = {0,1}

e {0} = {0}

1

{0,1}

e {0} = {0,1}

e {1} = {0,2}

2

{0,2}

e {0} = {0,1}

e {2} = {0,3}

3

{0,3}

e {0} = {0,1}

e {0} = {0}

 

 

 

(2)

 

 

0

1

0

e {S} = {S}

e {S} = {VQ}

ε {S} = {} QU

1

e {VQ}

ε {VQ} = {} JEH

ε {Q} = {Q}

2

e {QU}

e {Q} = {V}

ε {Q} = {} which is

3

e {ZV}

ε {} = {JEH JEH}

e {ZV} = {Z}

4

e {V}

e {V} = {Z}

 

5

e {QUZ}

e {QZ} = {ZV}

ε = {{} which is subordinate}

6

e {Z}

e {Z} = {Z}

e {Z} = {Z}

 

 

 

2.(1)

 

 

0

1

2

0

ε{A} = {ABC}

ε{A} = {ABC}

ε{B} = {BC}

ε{C} = {C}

1

{BC}

 

ε{B} = {BC}

ε{C} = {C}

2

{C}

 

 

ε{C} = {C}

 

  

(2)

 

 

a

b

X

e {0} = {0,1,2,4,7}

e {3,8} = {1,2,3,4,6,7,8}

e {5} = {1,2,4,5,6,7}

Y

{1,2,3,4,6,7,8}

e {3,8} = {1,2,3,4,6,7,8}

e {5,9} = {1,2,4,5,6,7,9}

WITH

{1,2,4,5,6,7}

e {3,8} = {1,2,3,4,6,7,8}

e {5} = {1,2,4,5,6,7}

V

{1,2,4,5,6,7,9}

e {3,8} = {1,2,3,4,6,7,8}

e {5,10} = {} 1,2,4,5,6,7,10

B

{1,2,4,5,6,7,10}

e {3,8} = {1,2,3,4,6,7,8}

e {5} = {1,2,4,5,6,7}

 

 

 

Child collection method:

Subset f (q, a) = {q1, q2, ..., qn}, the state set

将{q1,q2,…,qn}看做一个状态A,去记录NFA读入输入符号之后可能达到的所有状态的集合。

步骤:

1).根据NFA构造DFA状态转换矩阵

①确定DFA的字母表,初态(NFA的所有初态集)

②从初态出发,经字母表到达的状态集看成一个新状态

③将新状态添加到DFA状态集

④重复23步骤,直到没有新的DFA状态

2).画出DFA

3).看NFA和DFA识别的符号串是否一致。

 

Guess you like

Origin www.cnblogs.com/Azan1999/p/11768971.html