(Created page with " Let Σ = {a, b, c}. Which of the following statements is true ? a)For any A ⊆ Σ*, if A is regular, then so is {xx | x ∊ A} '''b)For any A ⊆ Σ*, if A is regular, the...")
 
(Solution)
Line 17: Line 17:
 
This procedure works as the equivalence of 2 DFAs is decidable.
 
This procedure works as the equivalence of 2 DFAs is decidable.
  
 +
$\{a^nb^nc*a*b^nc^n|n>0\} $
  
 +
This is CFL. But if we make L from A as per (d), it'll be
 +
L = {a^nb^nc^n|n>0} which is not context free..
  
  

Revision as of 01:57, 31 January 2014

Let Σ = {a, b, c}. Which of the following statements is true ?

a)For any A ⊆ Σ*, if A is regular, then so is {xx | x ∊ A}

b)For any A ⊆ Σ*, if A is regular, then so is {x | xx ∊ A}

c)For any A ⊆ Σ*, if A is context-free, then so is {xx | x ∊ A}

d)For any A ⊆ Σ*, if A is context-free, then so is {x | xx ∊ A}

Solution

We can get a DFA for L as follows: Take DFA for A. Let S be its start state. For each state D of A, consider 2 separate DFAs, one with S as the start state and D as the final state and another with D as the start state and final state in final states of A. If both these DFAs accept same language make D as final state.

This procedure works as the equivalence of 2 DFAs is decidable.

$\{a^nb^nc*a*b^nc^n|n>0\} $

This is CFL. But if we make L from A as per (d), it'll be L = {a^nb^nc^n|n>0} which is not context free..








blog comments powered by Disqus

Let Σ = {a, b, c}. Which of the following statements is true ?

a)For any A ⊆ Σ*, if A is regular, then so is {xx | x ∊ A}

b)For any A ⊆ Σ*, if A is regular, then so is {x | xx ∊ A}

c)For any A ⊆ Σ*, if A is context-free, then so is {xx | x ∊ A}

d)For any A ⊆ Σ*, if A is context-free, then so is {x | xx ∊ A}

Solution[edit]

We can get a DFA for L as follows: Take DFA for A. Let S be its start state. For each state D of A, consider 2 separate DFAs, one with S as the start state and D as the final state and another with D as the start state and final state in final states of A. If both these DFAs accept same language make D as final state.

This procedure works as the equivalence of 2 DFAs is decidable.









blog comments powered by Disqus