({{Template:Author|Arjun Suresh|{{arjunweb}} }})
Line 25: Line 25:
 
LR_2 -> LR_3 [ label = "a" ];
 
LR_2 -> LR_3 [ label = "a" ];
 
LR_3 -> LR_4 [ label = "a" ];
 
LR_3 -> LR_4 [ label = "a" ];
LR_2 -> LR_5 [ label = "b" ];
 
 
LR_0-> LR_2 [ label = "b" ];
 
LR_0-> LR_2 [ label = "b" ];
 
LR_1 -> LR_0 [ label = "b" ];
 
LR_1 -> LR_0 [ label = "b" ];

Revision as of 14:58, 24 May 2014

1. If <math>L</math> and <math>L'</math> are both recursively enumerable, then <math>L</math> is recursive. Why?

Solution by Arjun Suresh

Given <math>L</math> is $RE$. So there is a $TM$, which accepts and halts for all words in <math>L</math>. Now, if <math>L'</math> is $RE$, then there is a $TM$, which accepts and halts for all words not in <math>L</math>. So, if a word is given (either from <math>L</math> or not from <math>L</math>), give it to both those $TM$s. If its from $L$, the first $TM$ will halt and we say it belongs to $L$. If its not from $L$, the second one will halt and we say it doesn't belong to <math>L</math>. Thus, <math>L</math> becomes recursive.

2. CYCLE(L) ={xy | yx is in L ,L is regular }

Is this statement true or false ?

Solution by Arjun Suresh

We have a DFA for L, let it be D and have n states. Now we can make a NFA for L' as follows:

For every state of D,

This is a graph with borders and nodes. Maybe there is an Imagemap used so the nodes may be linking to some Pages.



blog comments powered by Disqus

1. If <math>L</math> and <math>L'</math> are both recursively enumerable, then <math>L</math> is recursive. Why?[edit]

Solution by Arjun Suresh[edit]

Given <math>L</math> is $RE$. So there is a $TM$, which accepts and halts for all words in <math>L</math>. Now, if <math>L'</math> is $RE$, then there is a $TM$, which accepts and halts for all words not in <math>L</math>. So, if a word is given (either from <math>L</math> or not from <math>L</math>), give it to both those $TM$s. If its from $L$, the first $TM$ will halt and we say it belongs to $L$. If its not from $L$, the second one will halt and we say it doesn't belong to <math>L</math>. Thus, <math>L</math> becomes recursive.

2. CYCLE(L) ={xy | yx is in L ,L is regular }[edit]

Is this statement true or false ?

Solution by Arjun Suresh[edit]

We have a DFA for L, let it be D and have n states. Now we can make a NFA for L' as follows:

For every state of D,

This is a graph with borders and nodes. Maybe there is an Imagemap used so the nodes may be linking to some Pages.



blog comments powered by Disqus