Suppose that L is a regular language. Prove that the language p r e f i x (L )={w | x, wx L } is regular. (For example, if L = {abc, def}, prefix(L) = {?, a, ab, abc, d, de, def}.)
prefix(x) : any string that is initial substring of string x is known as prefix of string x.
e.g : for x= abab , prefix strings are : a, ab, aba, abab
Prefix(L) : Prefix language of language L can be defined as set of all prefix of all strings of language L.
----------------------------------------------------------------------------------------------------------------------------------------------------------
if L is regular language , then there exist DFA(deterministic finite automata) for language L. lets say DFA D recognize given regular language L.
Now create new dfa D' such that:
- it has transition function and all states similar to D.
- for each state s ∈ D, if there's an accepting state reachable from s in D, then the corresponding state in D′ will be an accepting state.
here D' will accept the language Prefix(L).
hence we can create DFA for Prefix(L) using DFA of L.
so we can say that Prefix(L) is also regular language if L is regular.
if there is any doubt regarding question then you can ask in comment section.
Suppose that L is a regular language. Prove that the language p r e f i...
Prove that the following language is not regular: L = { w | w ∈ {a,b,c,d,e}* and w = wr}. So L is a palindrome made up of the letters a, b, c, d, and e.
Suppose that (a-r, a) C E or (a, a + r) C E, f : E → R, L E R, and (1) Prove that there exist numbers 0 < δ < r and M > 0 such that If(x)| < M for all (2) Prove that if L is nonzero, then there exist numbers 0 < δ < r and η > 0 such that limx→af(x) = L xEEwith 0 < |x-a| < δ. If(x)| > η for all...
Prove that language L on {a, b}, L={ v | v = vR} is not regular use string ab^nab^na
3. Use the pumping lemma to prove the following language is not regular . Use the pumping lemma to prove the following language is not regular Where is the stringwbut with all the Os replaced by Is and all the し1 = {te E Σ.ead I te _ wu) is replaced by 0s. For example, if w = 00110 then w = 11001.
2. If L is a regular language, prove that the language 11 = { uv/ u E 1 , |v|-2) is also regular. (Hint: Can you build an NFA of L1 using an NFA of a language L? Use N, the NFA of the language L)
Question 1: Every language is regular T/F Question 2: There exists a DFA that has only one final state T/F Question 3: Let M be a DFA, and define flip(M) as the DFA which is identical to M except you flip that final state. Then for every M, the language L(M)^c (complement) = L( flip (M)). T/F Question 4: Let G be a right linear grammar, and reverse(G)=reverse of G, i.e. if G has a rule A -> w B...
6.[15 points] Recall the pumping lemma for regular languages: Theorem: For every regular language L, there exists a pumping length p such that, if s€Lwith s 2 p, then we can write s xyz with (i) xy'z E L for each i 2 0, (ii) ly > 0, and (iii) kyl Sp. Prove that A ={a3"b"c?" | n 2 0 } is not a regular language. S= 6.[15 points] Recall the pumping lemma for regular languages: Theorem: For every regular...
1. Construct a DFSM to accept the language: L w E ab): w contains at least 3 as and no more than 3 bs) 2. Let E (acgt and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg. ge. Construct both a DFSM to accept the language and a regular expression that represents the language. 3. Let ab. For a string w E , let w denote the string w with the...
2. Suppose L is a regular language, and M = (Q, 8, 8, 90, A) is a deterministic finite state machine such that L(M) = L. Prove that if Q =2 then one of the following hold: (i) L= (ii) E EL, or (iii) Sa e such that a EL. (Hint: prove one of the three hold for each possible configuration of A and 90).
[10 marks] We know from our discussion that the language Onlnln-0} is not regular. Is the language L {0"w1nIn 〉 0, w E {0, 1)'} regular! Be sure to prove your answer [10 marks] We know from our discussion that the language Onlnln-0} is not regular. Is the language L {0"w1nIn 〉 0, w E {0, 1)'} regular! Be sure to prove your answer