723 views
2 2 votes

L={WW|W belongs to (0+1)+}
in machines where stack is used is replaced by a queue which supports insert and delete operations.. then the above language is?
1)regular
2)DCFL
3)CFL
4)CSL
************************************************
i think its CFL but not DCFL.. whenever input is equal to front of the queue, we keep deleting contents of queue and keep moving the input pointer  untill input is being equal to front,finally queue shud be empty. And this shud be done non deterministically.

 

1 Answer

Best answer
2 2 votes

Using queue we can achieve the same functionality for the language L = WW as the language L = W.WR is simulated using a stack . But we don't know with confidence that where the first half will be completed. So it is also showing non deterministic behavior.

Hence the given language using a queue can be referred a CFL but not DCFL..

• selected by
Position:
Show:

Related questions

0 0 votes
0 0 answers
311
311 views
1 1 vote
1 1 answer
188
188 views
GO Classes asked Aug 26
188 views
A system uses two feedback queues:$\text{Q1}$: Round Robin with time quantum $10$ ms $\text{Q2}$: Shortest Job First $\text{Q1}$ has higher priority than $\text{Q2}$ New ...
2 2 votes
1 1 answer
160
160 views
GO Classes asked Aug 14
160 views
Consider the standard BFS algorithm, except for one modification:A vertex is marked as visited only when it is removed from the queue, instead of when it is first inserte...
2 2 votes
1 1 answer
143
143 views
GO Classes asked Aug 13
143 views
Consider two vertices $x$ and $y$ that are simultaneously on the FIFO queue at some point during the execution of breadth-first search from $s$ in an undirected graph.Whi...