1. Trang chủ
  2. » Công Nghệ Thông Tin

Chapter 2: Finite Automata

40 239 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Finite Automata
Chuyên ngành Automata Theory
Thể loại Lecture Notes
Định dạng
Số trang 40
Dung lượng 171,5 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Chapter 2: Finite Automata...  Mastering the following concepts: – Deterministic Finite Accepter DFA – Nondeterministic Finite Accepter NFA – DFA and NFA Equivalence... Example 2.23 Let

Trang 1

Chapter 2: Finite Automata

Trang 2

 Mastering the following concepts:

– Deterministic Finite Accepter (DFA)

– Nondeterministic Finite Accepter (NFA)

– DFA and NFA Equivalence

Trang 3

Deterministic Finite Accepter (DFA)

M = (Q, ∑, δ, q0, F)

Q: finite set of internal states

∑: finite set of symbols - input alphabet

δ: Q × ∑ → Q transition function

q0∈Q: initial state

F⊆Q: set of final states

Trang 7

Example 2.2

3

Letter Digit

Letter or Digit

Letter or Digit 2

Trang 8

Extended Transition Function

δ*(q, λ) = q

δ*(q, wa) = δ(δ*(q, w), a)

Example 2.2: δ(q0, a) = q1 & δ(q1, b) = q2 ⇒ δ*(q0, ab) = q2

Trang 9

Languages and DFAs

M = (Q, ∑ , δ , q0, F) L(M) = {w ∈∑* | δ*(q0, w) ∈ F} L(M) = {w ∈∑* | δ*(q0, w) ∉ F}

Trang 10

b

Trang 12

Example 2.4:

trap state

a, b a

b

Trang 14

Transition Table

 A table used to represent an automaton

 Rows headers: states

 Columns headers: input symbols

 Entries: next states

Trang 15

b

Trang 18

Regular Languages

Trang 21

Nondeterministic Finite Accepter (NFA)

M = (Q, ∑, δ, q0, F)

Q: finite set of internal states

∑: finite set of symbols - input alphabet

δ: Q × (∑ ∪ {λ}) → 2Q transition function

q0∈Q: initial state

F⊆Q: set of final states

Trang 24

Extended Transition Function

δ*(qi, w) = Qj

δ*(qi, w) contains qj iff there is a walk

labelled w from qi to qj

Trang 27

How to calculate δ*

Evaluate all walks of length at most Λ + (1 + Λ )|w|; Λ is the

number of λ -edges

) ( )

, (

| { )

q closure T

*(

) 1

|

|, )};

, ( { (

) ,

(

*

b q p

c c b a

c p closure

a

q

δ

δ λ

δ

= +

=

=

Trang 28

0,1

Trang 29

NFA and Languages

M = (Q, ∑ , δ , q0, F) L(M) = {w ∈∑* | δ*(q0, w) ∩ F ≠ ∅ }

Trang 32

Equivalence of DFA and NFA

 Two automata are equivalent if they accept the same language

 For a given language, we can usually find unlimited accepters (both deterministic and nondeterministic)

Trang 34

NFA and DFA

NFA: δ*(q, w) = {qi, qj, , qk}  label of one state in DFA

Trang 37

Theorem 2.2

Given MN = (QN, ∑ , δN, q0N, FN)

there exists MD = (QD, ∑ , δD, q0D, FD) such that L(MD) = L(MN)

Trang 38

3 Every state of GD containing qf ∈ FN is a final vertex.

4 If λ ∈ L(MN) then {q0N} is also a final vertex.

Trang 40

• Exercises: 1, 5, 6, 11, 14, 17, 15, 17 of Section 2.1 - Linz’s book

• Exercises: 3, 4, 6, 7, 9, 10 of Section 2.2 - Linz’s book

• Exercises: 3, 8, 11, 12 of Section 2.3 - Linz’s

book

Ngày đăng: 13/05/2014, 10:21

TỪ KHÓA LIÊN QUAN

w