• Tidak ada hasil yang ditemukan

kleene's theorem

N/A
N/A
Protected

Academic year: 2025

Membagikan "kleene's theorem"

Copied!
6
0
0

Teks penuh

(1)

Athasit Surarerks

2110711

THEORY OF COMPUTATION

08 KLEENE’S THEOREM

IMPORTANT

2

All three methods of defining languages regular expression, acceptance by finite automata and acceptance by transition graph are equivalent

KLEENE’S THEOREM

3

Ø

Language accepted by a deterministic finite automaton can be defined by a transition graph.

Ø

Language accepted by a transition graph can be defined by a regular expression.

Ø

Language generated by a regular expression can be defined by a deterministic finite automaton.

KLEENE’S THEOREM

4

ü

Language accepted by a deterministic finite automaton can be defined by a transition graph.

Ø

Language accepted by a transition graph can be defined by a regular expression.

Ø

Language generated by a regular expression can be defined

by a deterministic finite automaton.

(2)

KLEENE’S THEOREM

5

Proof:

Language accepted by a transition graph can be defined by a regular expression.

Given a transition graph TG.

Find a regular expression that defines the same language.

Construct an algorithm that satisfies two criteria.

¤Work for every conceivable transition graph

¤Guarantee to finish its job in a finite time.

KLEENE’S THEOREM

6

STATEGY

Only one initial state.

A

C

D

B

E

0

01 110

KLEENE’S THEOREM

7

STATEGY

Only one initial state.

A C

D

B

E

0

01

S 110

Λ Λ

Λ

KLEENE’S THEOREM

8

STATEGY

Only one final state.

A

C

D

B

E

0

01 110

010

(3)

KLEENE’S THEOREM

9

STATEGY

Only one final state.

A C

D

B

E

0

01 110

010

F

Λ Λ

KLEENE’S THEOREM

10

STATEGY

Eliminate all internal states.

Let A be any state in a transition graph.

r, s and t be any substrings.

A t

r s

A

R+S+T

R, S, T be regular expressions.

KLEENE’S THEOREM

11

STATEGY

Eliminate all internal states.

Let A,B be states in a transition graph.

r, s, t and u be any substrings.

B

t r

s

A

u

B

r

S+T

A

u

S, T be regular expressions.

KLEENE’S THEOREM

12

STATEGY

Eliminate all internal states.

Let A,B be states in a transition graph.

r, s, t and u be any substrings.

r

… A

t

B C …

S, T be regular expressions.

s

A B

r ST

(4)

KLEENE’S THEOREM

13

STATEGY

Eliminate all internal states.

Let A,B be states in a transition graph.

r, s, t and u be any substrings.

r

… A

t

B C …

S, T, U be regular expressions.

s

A B

r SU*T

u

KLEENE’S THEOREM

14

EXAMPLE

A

C

D B

E

0

01 010 110

00

KLEENE’S THEOREM

15

EXAMPLE

A

C

D B

E

0

01 010 110

0(010)*00

KLEENE’S THEOREM

16

EXAMPLE

A

C

D B

E

0

0(010)*01 010 110

0(010)*00

(5)

KLEENE’S THEOREM

17

EXAMPLE

A

C

D B

E

0

0(010)*01 0(010)*110 010

0(010)*00

KLEENE’S THEOREM

18

EXAMPLE

A

C

D

E

0(010)*01

0(010)*110

0(010)*00

KLEENE’S THEOREM

19

Eliminate B, by create AC = r1r2*r3 create AD = r1r2*r4 delete AB

erase B when B has no input.

A

C

D

B …

r1

r4 r3 r2

KLEENE’S THEOREM

20

Determine the regular expression corresponding to this transition graph.

A B C

r1

r2

r3

r4

r5 r6

r7 r8

r9

(6)

KLEENE’S THEOREM

21

Proof:

Language generated by a regular expression can be defined by a deterministic finite automaton.

Given a regular expression.

Find an automaton that defines the same language.

Construct an algorithm that satisfies two criteria.

¤Accepts any particular letter of the alphabet. (or Λ)

¤Close under +, concatenation and Kleene’s star.

CONCLUSION

22

Let FA1 accepts the language defined by regular expression r1, FA2 accepts the language defined by regular expression r2. Then there is a FA3 accepts the language (r1+r2).

Then there is a FA4 accepts the language r1r2. Then there is a FA5 accepts the language r*.

Referensi

Dokumen terkait