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

DM2 automata BK TPHCM

3 305 0

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 3
Dung lượng 120,14 KB

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

Nội dung

Exercise for chapter 4 (Part 2) Determinisation 1 Introduction In this exercise, we will pratice mainly on automata determinisation from NFA (nondeterministic finite automata) to DFA (deterministic finite automata). Students should review the slide and related documents for chapter 4 before doing the exercises below.

Trang 1

Exercise for chapter 4 (Part 2)

Determinisation

In this exercise, we will pratice mainly on automata determinisation - from NFA (nondeterministic finite automata) to DFA (deterministic finite automata) Students should review the slide and related documents for chapter 4 before doing the exercises below

Question 1

Give an execution of the following DFA on 0001, 01001, and 0110

0

1

1

0

1 0 Solution

• (A, 0001) → (A, 001) → (A, 01) → (A, 1) → (B, −) ⇒ 0001 is a valid word

• (A, 01001) → (A, 1001) → (B, 001) → (C, 01) → (C, 1) → (B, −) Then, 01001 is a valid word

• (A, 0110) → (A, 110) → (B, 10) → (A, 0) → (A, −) Since A is not an accepting state, then 0110

is an invalid word

2

Question 2

Convert the following NFA into DFA

Give an execution of the DFA on aaba, bbabbbaa, bababaa and bbabbbabbbabba

Solution

First, we need define transition table containing useful sets of states as follows

DFA could be determined in which each state refers a useful sets of NFA state

Trang 2

{A} {A, B} {C}

2

Question 3

Convert the following NFA into DFA

D

b

b a

Question 4

Convert the following NFA into DFA

C

D b

b

a

a

b

a, b

b

b

b, ε

Question 5

Find a regular expression for the set {anbm: (n + m) is even }

Determine the corresponding DFA (or NFA and then convert NFA to DFA)

Question 6

Give a regular expression for the language on Σ = {a, b, c} containing no run of a’s of length greater than two

Determine the corresponding DFA (or NFA and then convert NFA to DFA)

Trang 3

Question 7.

Give a regular expression for the language on Σ = {a, b} containing all strings not ending in ab Determine the corresponding DFA (or NFA and then convert NFA to DFA)

Question 8

Give a DFA that accepts L = ((a + b)∗b(a + ab)∗)

Question 9

Let Σ = {a, b, c} Give complet DFA’s for the sets consisting of

a) all strings with exactly one ’a’

b) all strings of even length

c) all strings which the number of appearances of ’b’ is divisible by 3

d) all strings ending with ’a’

e) all strings not ending with ’a’

f) all non-empty strings not ending with ’a’

g) all strings with at least one ’a’

h) all strings with at most one ’a’

i) all strings without any ’a’

j) all strings including at least one a and whose the first appearance of ’a’ is not followed by a ’c’

Ngày đăng: 14/07/2016, 22:36

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN