in Theory of Computation recategorized by
2,180 views
2 votes
2 votes

Consider $L=L_1 \cap L_2$ where

$L_1 = \{ 0^m 1^m 20^n 1^n \mid m,n \geq 0 \}$

$L_2 = \{0^m1^n2^k \mid m,n,k \geq 0 \}$

Then, the language $L$ is

  1. Recursively enumerable but not context free
  2. Regular
  3. Context free but not regular
  4. Not recursive

 

in Theory of Computation recategorized by
2.2k views

1 comment

Intersection of CFL and Regular language is Context-Free Language. But not Regular. So option C.
0
0

2 Answers

2 votes
2 votes
L1 is CFL (comparison possible by single stack)   and L2 is regular (DFA is there )  so by Theorem of regular intersection

L=L1 ∩L2 must be CFL  so option C

4 Comments

Is the first Language DCFL, Sir ?
1
1
yes it is dcfl as we know deterministically what to do on rreading input string
1
1

sir L2 is not regular .observe 2^k we can not draw finite automata for this.

 

0
0
whats the problem with 2^k    , k >=0   simply a loop over alphabet 2
0
0
2 votes
2 votes
The language L1 $ \cap $ L2  is $ 0^{m} 1^{m} 2 $ which is not regular by pumping lemma. However you can easily create a CFL for this.

$ S’ \rightarrow S 2 $

$S \rightarrow 0 S 1, \epsilon $

Hence the answer is C.
edited by
by

1 comment

Typo. It should be an intersection.
1
1
Answer:

Related questions