GATE Overflow - Recent questions in Theory of Computation
https://gateoverflow.in/questions/theory-of-computation
Powered by Question2AnswerPratice guqestion
https://gateoverflow.in/233354/pratice-guqestion
Identify in the list below a sentence of length 6 that is generated by thr grammar <br />
<br />
S -> S (S) S | ε withTheory of Computationhttps://gateoverflow.in/233354/pratice-guqestionTue, 14 Aug 2018 19:02:29 +0000Dfa of lenght 2(mod 5)
https://gateoverflow.in/233244/dfa-of-lenght-2-mod-5
Construct a DFA starting with ab and congruence to 2(mod 5)Theory of Computationhttps://gateoverflow.in/233244/dfa-of-lenght-2-mod-5Tue, 14 Aug 2018 11:11:02 +0000Thoery of computation
https://gateoverflow.in/233202/thoery-of-computation
Eplison + R =Theory of Computationhttps://gateoverflow.in/233202/thoery-of-computationTue, 14 Aug 2018 07:04:19 +0000String Operation
https://gateoverflow.in/232852/string-operation
While performing a Transpose operation on a string,is it similar to the reverse operation on string or a palindromme?Theory of Computationhttps://gateoverflow.in/232852/string-operationSun, 12 Aug 2018 18:37:14 +0000Curiousity
https://gateoverflow.in/232803/curiousity
In an intersection between a regular language and a DCFL, we always tend to promote regular language to DCFL and say that the result will be intersection between DCFL and DCFL but since DCFLs are not closed under intersection we say the result will be a CFL. But I feel the answer to the original question should be DCFL because I never came across a language which is an intersection between a Regular language and a DCFL which is not DCFL<br />
<br />
Can you write a language which is an intersection between a DCFL and a regular language but not a DCFL.Theory of Computationhttps://gateoverflow.in/232803/curiousitySun, 12 Aug 2018 13:18:07 +0000CFL or CSL
https://gateoverflow.in/232752/cfl-or-csl
Are following languages CFL? If so please explain me how to draw a PDA<br />
<br />
L1 = { xww$^{R}$ : x,w $\in$ (0,1)$^{+}$ }<br />
<br />
L2 = { ww$^{R}$x : x,w $\in$ (0,1)$^{+}$ } <br />
<br />
L3 = { ww : w $\in$ (0,1)$^{+}$ }<br />
<br />
w$^{R}$ : reverseTheory of Computationhttps://gateoverflow.in/232752/cfl-or-cslSun, 12 Aug 2018 07:23:41 +0000Regular Language
https://gateoverflow.in/232740/regular-language
<p><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=2335020188137737583"></p>Theory of Computationhttps://gateoverflow.in/232740/regular-languageSun, 12 Aug 2018 06:46:58 +0000testbook test
https://gateoverflow.in/232653/testbook-test
<p>Doubt 1:</p>
<p><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=7446023529969097154"></p>
<p>according to me L1 should be subset of L2. But answer is d) L1,L2,L3 are incomparable. Please explain this question to me</p>
<p> </p>
<p> </p>
<p>Doubt 2:</p>
<p><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=2372323117501473644"></p>
<p>which type of language is L4?</p>Theory of Computationhttps://gateoverflow.in/232653/testbook-testSat, 11 Aug 2018 19:17:22 +0000DCFL vs CFL
https://gateoverflow.in/232494/dcfl-vs-cfl
Which of the following language is DCFL?<br />
<br />
L1 = { a^n b^m : n $\neq$ m : n,m > 0 }<br />
<br />
L2 = { a^n b^m c^k : m>n or m < n }Theory of Computationhttps://gateoverflow.in/232494/dcfl-vs-cflSat, 11 Aug 2018 05:55:46 +0000Linear grammar
https://gateoverflow.in/232471/linear-grammar
<p>Please follow the attachment how can we prove that the given language is not linear please explain?</p>
<p><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=598294132932476072"></p>Theory of Computationhttps://gateoverflow.in/232471/linear-grammarSat, 11 Aug 2018 02:47:46 +0000Automaton
https://gateoverflow.in/232401/automaton
Consider the Language l = {epsilon, a, b, cd , efg}<br />
<br />
which of the following automaton will accept this language?<br />
<br />
i) Finite Automaton<br />
<br />
ii) Finite Automaton with only one stack(acceptance by empty stack)<br />
<br />
iii) DPDA with 1 more stack.<br />
<br />
a) i, ii, iii<br />
<br />
b) i, ii<br />
<br />
c) i, iii<br />
<br />
d) only iiiTheory of Computationhttps://gateoverflow.in/232401/automatonFri, 10 Aug 2018 16:28:26 +0000NFA DFA
https://gateoverflow.in/232298/nfa-dfa
My doubt is it always true that the number of state in NFA is always less than number of state required in DFA for all language which are regular?Theory of Computationhttps://gateoverflow.in/232298/nfa-dfaFri, 10 Aug 2018 10:04:52 +0000Non deterministic automata
https://gateoverflow.in/232295/non-deterministic-automata
0*1*01*<br />
<br />
Draw NFA for this?Theory of Computationhttps://gateoverflow.in/232295/non-deterministic-automataFri, 10 Aug 2018 09:55:44 +0000regular expressions
https://gateoverflow.in/232289/regular-expressions
The regular expression denoting the set of all strings not containing two consecutive 1's is given by<br />
<br />
A) (0+10)*(EPSILON+0)<br />
<br />
B) (1+01)*<br />
<br />
C) (0+10)*(EPSILON+1)<br />
<br />
D) (EPSILON+0)(001)*(EPSILON+0)Theory of Computationhttps://gateoverflow.in/232289/regular-expressionsFri, 10 Aug 2018 09:10:17 +0000Regular sets
https://gateoverflow.in/232254/regular-sets
The set of all strings over (a,b) having abab as substring is represented by what regular expressions?Theory of Computationhttps://gateoverflow.in/232254/regular-setsFri, 10 Aug 2018 07:15:52 +0000Decidability
https://gateoverflow.in/232205/decidability
Let G1 be a context free grammar and G2 be a regular grammar.Is the problem L(G1) intersection L(G2) =phi decidable?Theory of Computationhttps://gateoverflow.in/232205/decidabilityFri, 10 Aug 2018 04:14:16 +0000TOC, RL
https://gateoverflow.in/232193/toc-rl
Consider the following<br />
S1: Pumping lemma is used to prove, that particular language is not regular<br />
S2: For all DCFL there exist LR(k) grammar but LL(k) may not exist.<br />
Which of the above statements are true?<br />
(a) Only S1 (b) Only S2<br />
(c) Only S1 and S2 (d) None of theseTheory of Computationhttps://gateoverflow.in/232193/toc-rlFri, 10 Aug 2018 02:57:33 +0000TOC, RL
https://gateoverflow.in/232192/toc-rl
Consider the following language L = {w ∈ (a+b)* | w has atleast as many occurrences of (bba)’s as (abb)’s}. Which of the following statements is/are true?<br />
S1: Language L is regular.<br />
S2: Complement of L is CFL.<br />
S3: Complement of L is CSL.<br />
S4: Reversal of L is CFL.Theory of Computationhttps://gateoverflow.in/232192/toc-rlFri, 10 Aug 2018 02:53:42 +0000Decidability
https://gateoverflow.in/232191/decidability
Let G1 and G2 be grammars with G1 regular.Is the problem<br />
<br />
L(G1)=L(G2)<br />
<br />
<br />
<br />
decidable when<br />
<br />
a)G2 is unrestricted,<br />
<br />
b)when G2 is context free,<br />
<br />
c)when G2 is regular?Theory of Computationhttps://gateoverflow.in/232191/decidabilityFri, 10 Aug 2018 02:51:58 +0000TOC decidability
https://gateoverflow.in/232176/toc-decidability
Let <M> be the encoding of Turing machine as a string over Σ = {0, 1}. Let L = {<M> | M is TM on input w will visit some state P}.<br />
The language L is<br />
(a) Decidable<br />
(b) Undecidable but partially decidable<br />
(c) Undecidable and not even partially decidable<br />
(d) Not a decision problemTheory of Computationhttps://gateoverflow.in/232176/toc-decidabilityFri, 10 Aug 2018 01:07:49 +0000Theory Of Computation , Decidability
https://gateoverflow.in/232174/theory-of-computation-decidability
9. Let L ≤ ML’ denote the language L is mapping reducible (many to one reducible) to language L’. Which one of the following is True?<br />
(a) If L ≤ pL’ and L’ is semidecidable then L is semidecidable.<br />
(b) If L ≤ pL’ and L is RE then L’ is RE.<br />
(c) If L ≤ pL’ and L is decidable then L’ decidable.<br />
(d) If L ≤ pL’ and L is recursive.<br />
Solution: Option (a)<br />
PLEASE ExplainTheory of Computationhttps://gateoverflow.in/232174/theory-of-computation-decidabilityFri, 10 Aug 2018 00:38:00 +0000Regular expressions
https://gateoverflow.in/232149/regular-expressions
The regular expression <br />
<br />
(aa)* + a (aa)*+ aaaaa*a* <br />
<br />
is the same as<br />
<br />
A) (a+aa+aaa)*<br />
<br />
B) aaa* + aaaaa* + aaaaaa*<br />
<br />
C) (aaa)*a****(a*+aa*)a+<br />
<br />
D) none of the aboveTheory of Computationhttps://gateoverflow.in/232149/regular-expressionsThu, 09 Aug 2018 17:41:52 +0000#Deterministic Finite Automata
https://gateoverflow.in/232008/%23deterministic-finite-automata
What is the DFA for<br />
<br />
L = { w1abw2 : w1 ∊ {a,b}* , w2 ∊ {a,b}* }Theory of Computationhttps://gateoverflow.in/232008/%23deterministic-finite-automataThu, 09 Aug 2018 07:25:27 +0000#Deterministic Finite Automata
https://gateoverflow.in/231992/%23deterministic-finite-automata
Is there any difference in (a + b)* and a*b* ?<br />
<br />
If yes then what is the language generated by this ?Theory of Computationhttps://gateoverflow.in/231992/%23deterministic-finite-automataThu, 09 Aug 2018 06:34:12 +0000self doubt TOC
https://gateoverflow.in/231974/self-doubt-toc
<p>
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="360" src="//www.youtube.com/embed/Gkk9LpHzMj8" width="640"></iframe></p>
<p>I have a doubt in the proof of membership problem that is MP = {M # x | M accepts x }....</p>
<p>here sir is telling that TM N is just a copy cat of TM M....only change is ..reject state of TM M is connected to accept state of TM N.....so if TM M accepts or rejects x then TM N halts on x....i have understood this...</p>
<p>My doubt is.....sir is telling that if TM M does not halt on x then TM N rejects x.......but I am not getting how is it possible....because if TM M is looping on x then how TM N can rejects x....also I think that since TM N is some what same like TM M ..then if TM M loops on x then TM N should loops on x....please anyone clarify my doubt....</p>
<p>Thanks in advance.. </p>Theory of Computationhttps://gateoverflow.in/231974/self-doubt-tocThu, 09 Aug 2018 06:01:08 +0000Construction of FA's -number of FA's
https://gateoverflow.in/231910/construction-of-fas-number-of-fas
Number of FA's possible for two states X,Y over the input alphabet {a,b} where X is always the initial state and the FA should accept only empty language ?Theory of Computationhttps://gateoverflow.in/231910/construction-of-fas-number-of-fasThu, 09 Aug 2018 02:27:58 +0000Construction of DFA
https://gateoverflow.in/231898/construction-of-dfa
Construct a DFA for accepting base 5 numbers divisible by 2 and 3 but not by 5Theory of Computationhttps://gateoverflow.in/231898/construction-of-dfaThu, 09 Aug 2018 01:12:34 +0000Self doubt
https://gateoverflow.in/231895/self-doubt
Can anyone explain how to reduce halting problem of TM (HTM) to acceptance problem of TM (ATM).....to prove ATM is undecidable because HTM is undecidable.......<br />
<br />
Thanks in Advance!!Theory of Computationhttps://gateoverflow.in/231895/self-doubtWed, 08 Aug 2018 21:15:14 +0000internet
https://gateoverflow.in/231606/internet
can 0*1+1* generate 01 and 11 and 011?<br />
<br />
what would be the minimal dfa ?Theory of Computationhttps://gateoverflow.in/231606/internetTue, 07 Aug 2018 19:35:34 +0000Testbook test series
https://gateoverflow.in/231506/testbook-test-series
<p>Is this given answer correct?</p>
<p style="text-align:center"><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=5232812095751343491"></p>
<p><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=2533346694097589146"></p>Theory of Computationhttps://gateoverflow.in/231506/testbook-test-seriesTue, 07 Aug 2018 11:22:49 +0000TOC - Turing Machine
https://gateoverflow.in/231444/toc-turing-machine
is it true that:-<br />
<br />
1) turing decidable languages are recursive languages.<br />
<br />
2) turing recognizable languages are recursive enumerable.Theory of Computationhttps://gateoverflow.in/231444/toc-turing-machineTue, 07 Aug 2018 06:35:11 +0000TOC - Turing Machine
https://gateoverflow.in/231440/toc-turing-machine
If M is turing Machine Then what is L(M) denoting here??<br />
<br />
1) is it denoting Language generated by turing machine<br />
<br />
or<br />
<br />
2) encoding of turing machine(in 0's and 1's) as a language?Theory of Computationhttps://gateoverflow.in/231440/toc-turing-machineTue, 07 Aug 2018 06:25:35 +0000TOC - CFG
https://gateoverflow.in/231437/toc-cfg
is grammar CFG = S->AS/epsilon<br />
<br />
A->aA/a<br />
<br />
in Chomsky Nomal form ?Theory of Computationhttps://gateoverflow.in/231437/toc-cfgTue, 07 Aug 2018 06:16:36 +0000#Test series
https://gateoverflow.in/231390/%23test-series
<p><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=951895491080047171"></p>Theory of Computationhttps://gateoverflow.in/231390/%23test-seriesTue, 07 Aug 2018 01:37:53 +0000TOC SELF DOUBT
https://gateoverflow.in/231258/toc-self-doubt
THE MINIMAL FINITE AUTOMATA THE STRING IN R=0*1*______STATES.Theory of Computationhttps://gateoverflow.in/231258/toc-self-doubtMon, 06 Aug 2018 09:17:46 +0000self doubt
https://gateoverflow.in/231141/self-doubt
Consider the question "Does a turing machine in the course of a computation revisit the starting cell (i.e the cell under the read write head at the beginning of the computation )?"is this a decidable question. Explain?Theory of Computationhttps://gateoverflow.in/231141/self-doubtSun, 05 Aug 2018 18:02:36 +0000One question
https://gateoverflow.in/231139/one-question
L={ ⟨M⟩ ∣L(M)=Σ∗ }<br />
<br />
A. L is RE but L′ is not RE<br />
<br />
B. Both L and L′ are RE<br />
<br />
C. L is not RE but L′ is RE<br />
<br />
D. Both L and L′ are not RE<br />
<br />
Yes. Both L and L' are not RE. We can have the same reduction as done for L(M) is infinite.<br />
<br />
Lets assume L is RE. So, we have a TM N which will say "yes" if given an encoding of a TM whose language is Σ∗. Now using N we try to solve non-halting problem as follows:<br />
<br />
Explanation :-<br />
A non halting problem is given as follows: Given an encoding of TM <H> and a word w, whether H does not halt on w. That is, we have to decide if H does not halt on w. This problem is proved to be not RE and so no TM can not even say "yes" for "yes" case of the problem.<br />
<br />
Now, given a halting problem (<H>, w), we proceed as follows: We make a new TM say A, which on input x, just simulates H on w for |x| steps. If H halts on w, A goes to reject state. Otherwise it accepts. So, L(A)=Σ∗ if H does not halt on w and L(A) = a finite set if H halts on w. (If H halts in |x| steps for w, any string with length greater than |w|, would certainly be not in L, making L a finite set and hence can never equal Σ∗).<br />
<br />
Now, we just give the encoding of A to our assumed TM N. If N says "accept", we have that L(A) is Σ∗ => H does not halt on w => we solved "yes" case of not halting problem, which is not possible. Hence, our initial assumption of L is RE is false. L is not RE.<br />
<br />
In this explanation given if H doesn't halt on w ,L(A) = Σ∗<br />
Sir can u explain if H is not halting how langauge of A is becoming Σ∗......????Theory of Computationhttps://gateoverflow.in/231139/one-questionSun, 05 Aug 2018 17:44:33 +0000Made easy workbook
https://gateoverflow.in/231102/made-easy-workbook
<p><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=9227875048674446481"></p>Theory of Computationhttps://gateoverflow.in/231102/made-easy-workbookSun, 05 Aug 2018 14:37:52 +0000Test Series
https://gateoverflow.in/231030/test-series
<p>Which of the following decision problems are undecidable?</p>
<p><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=10341295638514040491"></p>Theory of Computationhttps://gateoverflow.in/231030/test-seriesSun, 05 Aug 2018 10:49:02 +0000Context free Language
https://gateoverflow.in/230907/context-free-language
If a language is accepted by PDA then it is Deterministic Context free language and if it is accepted by non deterministic then Context Free?Theory of Computationhttps://gateoverflow.in/230907/context-free-languageSat, 04 Aug 2018 15:26:55 +0000Test Series
https://gateoverflow.in/230801/test-series
<p><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=16559457978840958043"></p>
<p>Please help me to find which are true?</p>Theory of Computationhttps://gateoverflow.in/230801/test-seriesSat, 04 Aug 2018 07:22:12 +0000Regular language
https://gateoverflow.in/230677/regular-language
$L=\left \{ a^{n}:\text{n is the product of two prime number} \right \}$$L$ is regular or non regular?Theory of Computationhttps://gateoverflow.in/230677/regular-languageFri, 03 Aug 2018 15:54:23 +0000Regular language
https://gateoverflow.in/230675/regular-language
Whether the language $L=\left \{ a^{n}b^{l}a^{k}:n+l+k> 5 \right \}$ is regular or not???Theory of Computationhttps://gateoverflow.in/230675/regular-languageFri, 03 Aug 2018 15:42:26 +0000self doubt
https://gateoverflow.in/230637/self-doubt
let L be a recursive enumerable language then which of the following is true<br />
<br />
(a) complement of L is decidable or undecidable but not semi decidable.<br />
<br />
(b)complement of L is undecidable.<br />
<br />
(c)complement of L is either decidable or semi decidable<br />
<br />
(d) complement of L is undecidable but partially decidable.<br />
<br />
I am confused with meaning of semi decidable and partially decidableTheory of Computationhttps://gateoverflow.in/230637/self-doubtFri, 03 Aug 2018 12:00:08 +0000regular language
https://gateoverflow.in/230602/regular-language
Explain why L={(ab)^n a^k:n>k,k>=0} is not regular?Theory of Computationhttps://gateoverflow.in/230602/regular-languageFri, 03 Aug 2018 10:15:14 +0000Right Quotient
https://gateoverflow.in/230592/right-quotient
<p><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=15404611222339524408"></p>
<p>if ba/ε is ba, then what is ε/ba ??</p>Theory of Computationhttps://gateoverflow.in/230592/right-quotientFri, 03 Aug 2018 09:37:29 +0000TOC self doubt
https://gateoverflow.in/230559/toc-self-doubt
<p>$\text{Is the language L is DCFL or CFL ?}$</p>
<p style="text-align:center"><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=515298301109584009"></p>
<p> </p>Theory of Computationhttps://gateoverflow.in/230559/toc-self-doubtFri, 03 Aug 2018 07:29:04 +0000TOC zeal
https://gateoverflow.in/230524/toc-zeal
<p style="text-align:center"><img alt="" src="https://gateoverflow.in/?qa=blob&qa_blobid=1179552756962664989"></p>
<p>Which of the following is CFL ?</p>
<p>a) L1 is CFL</p>
<p>b)L1 is CFL but L2 is not CFL</p>
<p>c)Both L1 and L2 are CFL</p>
<p>d) None</p>Theory of Computationhttps://gateoverflow.in/230524/toc-zealFri, 03 Aug 2018 04:47:27 +0000self doubt
https://gateoverflow.in/230500/self-doubt
which of the following is correct:<br />
<br />
1. countable sets are closed under union.<br />
<br />
2. countable sets are closed under intersection.<br />
<br />
3. countable sets are closed under set difference.<br />
<br />
4. countable sets are closed under kleene closure.<br />
<br />
5. countable sets are closed under concatenation.<br />
<br />
6. countable sets are closed under complementation.Theory of Computationhttps://gateoverflow.in/230500/self-doubtFri, 03 Aug 2018 02:35:16 +0000Non Monotonicity : Undecidability, Non RE
https://gateoverflow.in/230494/non-monotonicity-undecidability-non-re
L = {<M> | M is a TM that accepts all even numbers }, How L Satisfies non-monotonicity ?? ExplainTheory of Computationhttps://gateoverflow.in/230494/non-monotonicity-undecidability-non-reFri, 03 Aug 2018 02:25:27 +0000