1,266 views
0 votes
0 votes

Q-1 Why $Half(L)={x|for\  some\  y\  such\  that\  |x|=|y|,xy\ is\ in\ L}$  i.e first half of strings in L is regular? Here L is a regular language

Q-2 If h(a)=01 , h(b)=0  Find  h-1(L)  where  L={w|w contain equal  no  of 1's  and  0's}

Q-3 If L is regular then L1={uv:u ∈L, v∈LR} is regular? Plz explain this too..

Q-4 $L1={xy|x∈L\  and\  y∉L, L\  is\ regular}$ is regular ?

1 Answer

1 votes
1 votes

FIRST NOTICE FOR ALL QUESTIONS  it is said L is regular. hence it would have a DFA and finite number of states.

in QUESTION 1 now string are in two parts x and y. and it is said |x| = |y| ..  as L is regular it would need finite steps to generate ITS strings. and so if it takes finite steps to generate xy.. IT WOULD SURELY TAKE finite steps to generate x and y ..the two halves .. HENCE HALF(L) IS REGULAR as x and y can be done in finite steps wich is apropert of FINITE AUTOMATA

in QUESTION 2 it is said about homomorphic inverse ..and we know given a string homomorphic inverse is how using alphabets we can derive a string.HERE  eg 0101 can be by aa as no of 0 and 1 is equal.hence  if we want n sequences it would be of the form an.   REGULAR EXPRESSIONS ARE CLOSED UNDER HOMOMORPHIC INVERSE 

in  Question 3 it is said that NOTICE L1 IS made up of concatination of L and LR. . we know L has dfa and that dfa can be reversed (by interchanging final and start start). hence L1 is nothing but a concatenation of two REgular languages and L1 IS REGULAR

NOW watch the 4 question,  L1 is made up of x and y ..  where x ∈ L hence  REGULAR . now y ∉ L THAT MEANS IT IS COMPLEMENT OF L . we again know we can complement DFA  .. hence again it is reduced to a case of CONCATENATION OF TWO REGULAR LANGUAGES. HENCE IT IS REGULAR

Related questions

0 votes
0 votes
1 answer
3
codingo1234 asked Aug 20, 2017
494 views
Let L be CFL and M a regular language. Language L ⋂ M is always(a) always regular (b) never regular(c) always DCFL (d) always context free language
1 votes
1 votes
1 answer
4