Question: To prove that regular languages are closed under f ( L ) , where f ( L ) = { w in L | no

To prove that regular languages are closed under f (L), where
f (L)={w in L | no proper prefix of w is in L},
1
we can use existing closure properties, build a DFA and prove it does recognize
the language.
Let P be the language which consists of proper prefixes of all strings in L,.e.,
P ={w in L | all proper prefixes of w}
P =
(
w in L
prefixes(w)
)
. Here, prefixes(w) represents the set of all proper prefixes of (w).
f (L) can be expressed as the set difference of L and P.
f (L)= L\P
1. Construct a DFA, M for P :
For each string w in L, modify the DFA for L to accept all proper prefixes
of w. This can be achieved by marking the states that correspond to
proper prefixes as accepting states.
The resulting DFA recognizes the set of all strings with a proper prefix in
L.
Construction of M :
1. States: Q=
2. Initial State:
0=
3. Accepting States: .
4. Transition Function:
since L and P are regular, f(L) is also regular since regular languages are closed under set difference

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!