# Automata and Formal Languages. Homework 4 (1.10.2009) 1. Let

Document Sample

```					         Automata and Formal Languages. Homework 4 (1.10.2009)

1. Let L be the language recognized by the following DFA:
a                  b

a

b        a

b

Construct a DFA that recognizes the language

(a) h−1 (L) where h is the homomorphism h(0) = bab, h(1) = aba.
(b) L/baa∗ .

2. Prove that if L ⊆ Σ∗ is regular so is the language

(a) Preﬁx(L) = {u ∈ Σ∗ | ∃v ∈ Σ∗ : uv ∈ L },
(b) Suﬃx(L) = {v ∈ Σ∗ | ∃u ∈ Σ∗ : uv ∈ L },
(c) Subword(L) = {w ∈ Σ∗ | ∃u, v ∈ Σ∗ : uwv ∈ L }.

3. Show that the family of regular languages is closed under the following operations:

(a) Half(L) = {w | ww ∈ L},
(b) Shuﬄe(L1 , L2 ) = {u1 v1 u2 v2 . . . uk vk | u1 u2 . . . uk ∈ L1 , v1 v2 . . . vk ∈ L2 }.

(Language Half(L) contains all words such that ww is in L, and language Shuﬄe(L1 , L2 )
contains all words that can be obtained by shuﬄing together the letters of some words
u ∈ L1 and v ∈ L2 . The shuﬄe needs not to be perfect, i.e., the words ui and vi in the
deﬁnition are elements of Σ∗ and not necessarily single letters.)

4. Prove that there are algorithms to determine

(a) if a given regular language L is preﬁx-closed, i.e., uv ∈ L =⇒ u ∈ L,
(b) if a given regular language L is preﬁx-free, i.e., uv ∈ L, v = ε =⇒ u ∈ L,
(c) if all words of a given regular language L are square-free, i.e, ww ∈ L for all
w ∈ Σ∗ .
5. Show that there are algorithms to determine

(a) if a given regular language L is a code (see Problem 4 of the homework set 1 for
the deﬁnition of codes),
(b) if a given NFA is unambiguous (see Problem 4 of the homework set 2 for the
deﬁnition of unambiguity).

6. Find the minimum state DFA for the language recognized by the following NFA:

a                a

b

b       a
a

7. Prove that for every n ≥ 1 there exists an NFA with n states such that the equivalent
minimum state DFA has 2n states. (Hint: recall Problem 6 in the second homework
set.)

```
DOCUMENT INFO
Shared By:
Categories:
Stats:
 views: 24 posted: 1/26/2010 language: English pages: 2