18,612 views
66 66 votes

Let $L_1$ be a regular language, $L_2$ be a deterministic context-free language and $L_3$ a  recursively enumerable, but not recursive, language. Which one of the following statements is false?

  1. $L_1 \cap L_2$  is a deterministic CFL
  2. $L_3 \cap L_1$  is recursive
  3. $L_1 \cup L_2$  is context free
  4. $L_1 \cap L_2 \cap L_3$  is recursively enumerable

3 Answers

Best answer
81 81 votes
  1. True : DCFL are closed under Intersection with Regular Languages
  2. False : $L_1$ is recursive hence also decidable, $L_3$ is RE but not Recursive hence it is undecidable. Intersection of Recursive language and Recursive Enumerable language is Recursive Enumerable language.
  3. True : $L_1$ is regular hence also CFL and every DCFL is also CFL and All CFL are closed under Union.
  4. True : $L_1$ is regular hence also RE; $L_2$ is DCFL hence also RE; RE languages are closed under Intersection
edited by
8 8 votes
L1∩L2 is a deterministic CFL because intersection of any lang. with regular is closed.

L3∩L1 is recursive is False because it should be RE {recursive enumerable not recursive}

L1∪L2 is context free is true, because every DCFL is CFL.

L1∩L2∩L3 is recursively enumerable is true.
1 1 vote

We can understand option B by thinking of constructing a TM for the language $L_1 \cap L_2$ and then analyzing if it is a halting TM or not.


Basic Info - 

  • We know $L_1$ is regular, hence recursive (decidable), and has a halting TM. Let that TM be $TM_1$.  A halting TM is one that halts and accepts for all strings that are in the language, and halts and rejects for all strings that are not in the language.
 
  • We know $L_2$ is RE but not REC, hence semi-decidable, and has a simple TM. Let that TM be $TM_2$. A simple TM is one that halts and accepts for all strings that are in the language, but may either halt and reject or loop infinitely for strings that are not in the language
 

Construction of TM $R$:

We now want to construct a TM $R$ for the language $L_1 \cap L_2$ (i.e., the set of strings $x$ that are in both $L_1$ and $L_2$).

TM $R$ is a combination of $TM_1$ and $TM_2$. On input string $x$, it follows this algorithm:

  1. Run the halting TM $TM_1$ (decider) of $L_1$ on $x$. (Since $TM_1$ decides $L_1$, this step always halts.)

  2. Check $TM_1$ result:

    • If $TM_1$ rejects (i.e., $x \notin L_1$), then reject (halt and reject).
    • If $TM_1$ accepts (i.e., $x \in L_1$), proceed to Step 3.
  3. Run $TM_2$ on $x$:

    • If $TM_2$ accepts, then $R$ accepts.
    • If $TM_2$ rejects (i.e., $x \notin L_2$), then reject (halt and reject).
    • If $TM_2$ loops (because $x \notin L_2$), $R$ loops.

Analyse $R$:

  • If $x \in L_1 \cap L_2$, then $R$ would halt and accept.
 
  • But if $x \notin L_1 \cap L_2$, then $R$ might halt and reject or it might go into an infinite loop because of Step 3.3 of the algorithm.
 

 

Hence, we will surely be able to halt and accept for all the strings in the language, but we might go into an infinite loop for strings that are not in the language. This behavior confirms that $R$ is a semi-decider for $L_1 \cap L_2$.

$$\text{Therefore, } L_1 \cap L_2 \text{ is Recursively Enumerable (RE).}$$

Answer:
Position:
Show:

Related questions

65 65 votes
5 answers 5 answers
14.1k
14.1k views
Rucha Shelke asked Sep 18, 2014
14,084 views
For $s\in (0+1)^{*}$ let $d(s)$ denote the decimal value of $s ($e.g. $d (101) = 5 ).$ Let$$L=\left \{ s\in (0+1)^*\mid d(s) \text{ mod } 5=2 \text{ and }d(s) \text{ mod ...
149 149 votes
10 answers 10 answers
54.0k
54.0k views
Rucha Shelke asked Sep 22, 2014
54,033 views
Consider the regular language $L=(111+11111)^{*}.$ The minimum number of states in any DFA accepting this languages is:$3$$5$$8$$9$
10 10 votes
2 answers 2 answers
6.8k
6.8k views
Rucha Shelke asked Sep 18, 2014
6,837 views
Let SHAM$_3$ be the problem of finding a Hamiltonian cycle in a graph $G=(V,E)$ with $|V|$ divisible by $3$ and DHAM$_3$ be the problem of determining if a Hamiltonian...
68 68 votes
7 answers 7 answers
26.3k
26.3k views
Rucha Shelke asked Sep 17, 2014
26,294 views
Let$L_1=\{0^{n+m}1^n0^m\mid n,m\geq 0 \}$,$L_2=\{0^{n+m}1^{n+m}0^m\mid n,m\geq 0\}$ and$L_3=\{0^{n+m}1^{n+m}0^{n+m}\mid n,m\geq 0\} $. Which of these languages are NOT c...