Gatepoint Q&A Forum - Recent questions and answers
https://gatepoint.org/qa/qa
Powered by Question2AnswerAnswered: Theory Of Computation Test – Question 6
https://gatepoint.org/qa/6/theory-of-computation-test-question-6?show=66#a66
I think this question is too much easier !!<br />
<br />
1). (0(0+1)^+0)+(1(0+1)^+1)...regular<br />
<br />
2). After that all the language has an compare...so it is all(2,3,4) ..<br />
<br />
Not regular!!TOChttps://gatepoint.org/qa/6/theory-of-computation-test-question-6?show=66#a66Tue, 09 Apr 2019 18:47:57 +0000Answered: Theory Of Computation Test – Question 7
https://gatepoint.org/qa/7/theory-of-computation-test-question-7?show=65#a65
The correct option should be opt 2...<br />
<br />
1-the given option is wrong ,because the machine may or may not write $ (when it is in loop ).<br />
<br />
4-equivalence problem of turing machine is undecidable..so wrong<br />
<br />
2-all the string of length<=1050 ...so it is finite ...(decidable)<br />
<br />
3-complement of option 2 (decidable)<br />
<br />
Please correct if i am wrong!!<br />
<br />
Thankyou!!TOChttps://gatepoint.org/qa/7/theory-of-computation-test-question-7?show=65#a65Tue, 09 Apr 2019 18:21:07 +0000Answered: logic-gate 1992
https://gatepoint.org/qa/62/logic-gate-1992?show=63#a63
<p>The correct answer for this is option 1 only</p>
<p>As we know that standard form <img alt="" src="Jpg"></p>Discrete Mathshttps://gatepoint.org/qa/62/logic-gate-1992?show=63#a63Tue, 19 Mar 2019 14:18:16 +0000Answered: Which of the Statement is Correct about DFA,NFA?
https://gatepoint.org/qa/31/which-of-the-statement-is-correct-about-dfa-nfa?show=61#a61
1. Yes. By comparing formal definition of DFA and NFA we can say that DFA is a subset of NFA.<br />
<br />
2. Yes. Same as point 1 ( for NFA and epsilon NFA)<br />
<br />
3. Yes. Again as.<br />
<br />
4. No. The transition function of NFA doesn't have epsilon in it.<br />
<br />
P.S. Conversion of one model to another prove their power equivalence but mathematically they differ by their formal definitions.TOChttps://gatepoint.org/qa/31/which-of-the-statement-is-correct-about-dfa-nfa?show=61#a61Fri, 15 Mar 2019 18:55:09 +0000Answered: Let S be a set of integers. One can create a data structure for S so that determining whether an integer x .
https://gatepoint.org/qa/34/integers-create-data-structure-determining-whether-integer?show=57#a57
Second is False. Here's why.<br />
<br />
First merge the three sorted arrays. This will take approximately O(n) time.<br />
<br />
Now, after this step, we will have a sorted array. Now, to form a balanced binary search tree using a sorted array, we will be using a trick here, which goes as follows.<br />
<br />
Assuming T(n) is the time required to construct a balanced BST from a sorted array,<br />
<br />
1) Pick the middle element of the array. This element will the root element of our tree. All this can be done in O(1) time.<br />
<br />
2) Recursively apply step 2 for the left subtree and the right subtree of the root. - 2T(n/2) [as the array will get split into 2 equal halves].<br />
<br />
Hence we have the recurrence relation, T(n) = 2T(n/2) + c, which evaluates to O(n). Hence all this can be done in O(n), which makes the 2nd part of the question as False.Algorithmhttps://gatepoint.org/qa/34/integers-create-data-structure-determining-whether-integer?show=57#a57Wed, 13 Mar 2019 05:22:42 +0000Answered: which will execute first?
https://gatepoint.org/qa/40/which-will-execute-first?show=59#a59
It depends of the method of execution.<br />
<br />
If variable check in while loop , as well as setting of variable happens at the same time then there will be mutual exclusion or there won't be mutual exclusion.<br />
<br />
Ye it depends on the relative speed.<br />
<br />
Which process will first set the variable.<br />
<br />
Here you said is 2nd process make the condition false , so 2nd process will execute as 2nd process will simultaneously set the variable and 1st process will again be in loop. <br />
<br />
So, 2nd process will execute in this case and 1st process will wait.Operating Systemhttps://gatepoint.org/qa/40/which-will-execute-first?show=59#a59Wed, 13 Mar 2019 05:15:47 +0000Answered: State Whether True or False?
https://gatepoint.org/qa/32/state-whether-true-or-false?show=55#a55
<div style="background:#eeeeee;border:1px solid #cccccc;padding:5px 10px;">If $L \subseteq \left \{ 0 \right \}^{*}$ then $L$ is Regular ?</div>
<p> </p>
<p><strong>False,</strong> $L$ =$\left \{ 0^{p} | p \, is \, a \,prime \right \}$ is a non-regular in class.</p>
<p> </p>
<div style="background:#eeeeee;border:1px solid #cccccc;padding:5px 10px;">$L=L_{1}\bigcup L_{2}$ where $L_{1}\bigcap L_{2} = \phi$. If $L_{1}$ is regular and $L_{2}$ is non regular, then $L$ is non regular.</div>
<p> </p>
<p><strong>True.</strong> Observe that $L \bigcap {L_{1}}^{c} = L_{2}$ is not regular, and $L$ is not regular by closure properties.</p>
<p><strong>Another Approach:</strong><br>
<br>
Let, $\sum = \left \{ 0,1 \right \}$</p>
<p>$L_{1}$= Set of strings of even length ; It is Regular</p>
<p>$L_{2}$= Set of strings with prime Length >2 ; It is Non Regular</p>
<p>It satisfies : $L_{1}\bigcap L_{2} = \phi$</p>
<p>Now, You can easily observe that : $L$= $L_{1} \bigcup L_{2} $ (i.e String of Length 0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 26, 28, 29..... We can't construct DFA for this) is not Regular</p>
<p> </p>
<div style="background:#eeeeee;border:1px solid #cccccc;padding:5px 10px;">Suppose $L_{1}, L_{2} ,...$ is an infinite sequence of regular languages over alphabet ${\sum }$ . Then their union, i.e., $\bigcup _{i} L_{i}$ , is also regular.</div>
<p> </p>
<p><strong>False.</strong>Take $L_{i}=\left \{ 0^{i} 1^{i} \right \}.$ $L_{i}$ is regular because it is finite, but $\bigcup _{i} L_{i}$=$\left \{ 0^{n}1^{n} | n\geqslant 1 \right \}$ is not regular. <strong>Note that the union of finite number of languages is regular.</strong></p>
<p> </p>
<p><strong>Source: </strong><a rel="nofollow" href="https://courses.engr.illinois.edu/cs373/fa2010/Exams/midterm1sol.pdf">https://courses.engr.illinois.edu/cs373/fa2010/Exams/midterm1sol.pdf</a></p>TOChttps://gatepoint.org/qa/32/state-whether-true-or-false?show=55#a55Wed, 13 Mar 2019 04:41:12 +0000https://gateoverflow.in/2059/gate2014-3-25
https://gatepoint.org/qa/54/https-gateoverflow-in-2059-gate2014-3-25
It is given that "Assume that no error occurred during the transmission of D and D has reached B" and asked which field will not change in IP header.<br />
<br />
TTL will change after each hop. As checksum is calculated by each router, checksum will also change. But I am not getting how fragment offset is changed. Given the fact D has already reached B, even if D is fragmented, its last packet has reached B. Then how FO changes?Computer Networkhttps://gatepoint.org/qa/54/https-gateoverflow-in-2059-gate2014-3-25Wed, 13 Mar 2019 00:59:24 +0000Answered: self doubt on process
https://gatepoint.org/qa/38/self-doubt-on-process?show=50#a50
Both of these are different.<br />
<br />
Former case: If p is the probability of a process doing I/O at the same time, then probability of n processes doing the I/O at the same time will be p^n. This is absolutely correct. But (1 - p^n) does not mean that all n processes are doing CPU. (1-p^n) means negation of the first statement. Therefore, it includes all the cases where all n processes does not do the I/O simultaneously. For eg. It will also contain a case when 1 process is doing I/O but n-1 are doing CPU or the opposite etc.<br />
<br />
Latter case: This is correct. Here (1-p)^n means that all n processes are doing CPU simultaneously. And it includes only one case out of all those contained in former case (i.e. all in CPU).<br />
<br />
Evidently, (1-p)^n is less than (1-p^n)Operating Systemhttps://gatepoint.org/qa/38/self-doubt-on-process?show=50#a50Sun, 10 Mar 2019 08:08:08 +0000Answered: deadlock and progress
https://gatepoint.org/qa/39/deadlock-and-progress?show=42#a42
<p><strong>Deadlock </strong>is when one<strong> </strong>process has captured some resource and waiting for another resource which is captured by some other process.</p>
<p><strong>Progress</strong> is if two or more processes try to enter into the critical section then one process should definitely be allowed to enter into the critical section in order to achieve synchronization </p>
<p>if Progress is not satisfied then there may be a condition of Deadlock</p>
<p>Decker's algorithm follows such type of dependency.</p>Operating Systemhttps://gatepoint.org/qa/39/deadlock-and-progress?show=42#a42Sat, 09 Mar 2019 14:13:58 +0000Answered: Solve the Following Recurrence Relation
https://gatepoint.org/qa/35/solve-the-following-recurrence-relation?show=36#a36
<p><img alt="" height="551" src="https://gatepoint.org/qa/?qa=blob&qa_blobid=13569512077572372473" width="600"></p>
<p>Please refer standard books to clarify.</p>Algorithmhttps://gatepoint.org/qa/35/solve-the-following-recurrence-relation?show=36#a36Fri, 08 Mar 2019 11:25:14 +0000Answered: Theory Of Computation Test – Question 4
https://gatepoint.org/qa/4/theory-of-computation-test-question-4?show=30#a30
<p><img alt="" height="459" src="https://gatepoint.org/qa/?qa=blob&qa_blobid=5308182807769562810" width="600"></p>
The correct answer for this should be option 4
1-The language is not finite because language
accepted by this is a(ba)*.
2-total state require for this dfa should be 4.
3-ababba!=abbabaTOChttps://gatepoint.org/qa/4/theory-of-computation-test-question-4?show=30#a30Thu, 07 Mar 2019 07:18:34 +0000Answered: Theory Of Computation Test – Question 1
https://gatepoint.org/qa/1/theory-of-computation-test-question-1?show=29#a29
The correct answer for this should be option 1.<br />
<br />
The language is nothing but L={w|w€L1 intersection L2^R} and we know that intersection and reversal of two regular languages is also regular...(closed under intersection and reversal)TOChttps://gatepoint.org/qa/1/theory-of-computation-test-question-1?show=29#a29Tue, 05 Mar 2019 05:12:32 +0000Answered: Theory Of Computation Test – Question 5
https://gatepoint.org/qa/5/theory-of-computation-test-question-5?show=27#a27
As i know,pcp is undecidable problem so no any algorithm exit to find the solution for this.we can solve only hit and trail for getting answer thus, after aplying this i got only one solution that is "213"TOChttps://gatepoint.org/qa/5/theory-of-computation-test-question-5?show=27#a27Tue, 05 Mar 2019 04:54:00 +0000Answered: Theory Of Computation Test – Question 2
https://gatepoint.org/qa/2/theory-of-computation-test-question-2?show=28#a28
The answer should be option A(4 only)...because set of all non regular languages means(dcfl,cfl,csl recursive and rel)<br />
<br />
a-dcfl(not closed under union and concatenation so point no 1 and 2 are not true)<br />
<br />
b- cfl and rel are not closed under complement so point no 3 is wrong)<br />
<br />
Correct answer- ATOChttps://gatepoint.org/qa/2/theory-of-computation-test-question-2?show=28#a28Tue, 05 Mar 2019 04:53:53 +0000Theory Of Computation Test – Question 3
https://gatepoint.org/qa/3/theory-of-computation-test-question-3
<div>
<p>Consider the following statements :</p>
<p>1. There exists a RE language for which there is No Ambiguous grammar possible.<br>
2. There exists a RE language for which there is No Unambiguous grammar.</p>
<p>Which of the above statements is/are correct ?</p>
</div>
<ul>
<li>1. Both 1 and 2</li>
<li>2. Only 1</li>
<li>3. Only 2</li>
<li>4. None of 1 and 2 is correct</li>
</ul>TOChttps://gatepoint.org/qa/3/theory-of-computation-test-question-3Mon, 07 Jan 2019 10:07:09 +0000