Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Recent activity by Gateasp2020
3
answers
1
GATE IT 2007 | Question: 49
Consider the following grammars. Names representing terminals have been specified in capital letters. ... $G_1$ and $G_2$ are regular Both $G_1$ and $G_2$ are context-free but neither of them is regular
Consider the following grammars. Names representing terminals have been specified in capital letters.$$\begin{array}{llll}\hline \text{$G1$ :} & \text{stmnt} & \text{$\...
12.9k
views
commented
Sep 28, 2019
Theory of Computation
gateit-2007
theory-of-computation
context-free-language
normal
+
–
0
answers
2
DECIDABILITY
WHICH OF THE FOLLOWING IS DECIDABLE? 1.WHEATHER AN ARBITRARY TURING MACHINE PRINTS SOME NON BLANK CHARACTER 2.WHEATHER A TURING MACHINE PRINTS A SPECIFIC CHARACTER 3.THE SET OF CODES FOR TURING MACHINE THAT NEVER MAKE A LEFT MOVE. 4. WHEATHER T.M EVER MOVES ITS HEAD TO ... STATE Q WHEN STARTED WITH INPUT W FROM ITS INITIAL STATE 6.T.M VISITS STATE Q ON SOME INPUT WITHIN 10 STEPS. 7.
WHICH OF THE FOLLOWING IS DECIDABLE?1.WHEATHER AN ARBITRARY TURING MACHINE PRINTS SOME NON BLANK CHARACTER2.WHEATHER A TURING MACHINE PRINTS A SPECIFIC CHARACTER3.THE SET...
1.7k
views
commented
Sep 18, 2019
1
answer
3
What is the minimum pumping length of the following languages
This is from the first chapter questions of Sipser's book on TOC. I am stuck in some of the questions where we are asked to find the pumping length of the following languages. Find the minimum pumping length of the following regular languages:- L=$0^*1^+0^+1^* \cup \ 10^*1$ L=001 U 0*1* L=0*1* L=10 (11* 0)* 0 L= ∊
This is from the first chapter questions of Sipser's book on TOC. I am stuck in some of the questions where we are asked to find the pumping length of the following langu...
18.1k
views
commented
Aug 27, 2019
Theory of Computation
theory-of-computation
pumping-lemma
+
–
1
answer
4
Loop level parallelism
Consider 4 stage instruction pipeline where different instructions are spending different cycles at different stages shown below: The following loop is executed in the pipeline The number of cycles saved using the loop level parallelism over without loop level parallelism to executed the above program is _______ (in cycles).
Consider 4 stage instruction pipeline where different instructions are spending different cycles at different stages shown below:The following loop is executed in the pip...
1.6k
views
commented
Aug 25, 2019
CO and Architecture
co-and-architecture
+
–
2
answers
5
OS FORK---OUTPUT
int main(void) { int var1=100; int pid; if(pid==fork()) var1=200; fork(); printf("%d",var1); return 0; } what could be the output ? a)100 100 200 200 b)200 200 200 200 c)none
int main(void) { int var1=100; int pid; if(pid==fork()) var1=200; fork(); printf("%d",var1); return 0; }what could be the output ?a)100 100 200 200b)200 200 200 200c)none...
1.5k
views
commented
Aug 25, 2019
Operating System
operating-system
fork-system-call
+
–
1
answer
6
Test by Bikram | Theory of Computation | Test 2 | Question: 19
Which of the following statements is correct about the given Turing Machine transitions below? ... in $\Sigma ^*$. TM halts on all strings of even length. I and II II and IV II and III I , II and III
Which of the following statements is correct about the given Turing Machine transitions below?$\begin{array}{|c|c|c|c|} \hline \delta & 0 & 1 & B \\ \hline q0 & (q1,1,R) ...
456
views
commented
Aug 21, 2019
Theory of Computation
tbb-toc-2
theory-of-computation
turing-machine
+
–
1
answer
7
GATE Overflow | Compiler Design | Test 1 | Parsing | Question: 4
Which of the following statements is FALSE? In a SLR(1) parser, it is allowable for both shift and reduce items to be in the same state In a SLR(1) parser, it is allowable for multiple reduce items to be in the same state All SLR(1) grammars are LR(0) All LR(0) grammars are SLR(1)
Which of the following statements is FALSE?In a SLR(1) parser, it is allowable for both shift and reduce items to be in the same stateIn a SLR(1) parser, it is allowable ...
3.6k
views
commented
Aug 19, 2019
Compiler Design
go-cd-1
+
–
1
answer
8
test series question
(int *) a means the base address of the array a ,(int *) a+1 means the address of 2nd element in the array. or base address of 2nd row of the array ? please clear this doubt i am facing problems in these type of question or if anyone knows basics of these types problems please explain that one. 1, 1, 1, 1 ... , 4 1, 1, 1, 1 2, 4, 2, 4 3, 0, 3, 0 4, 2, 4, 2 5, 5, 5, 5 6, 0, 6, 0
(int *) a means the base address of the array a ,(int *) a+1 means the address of 2nd element in the array. or base address of 2nd row of the array ? please clear this do...
3.2k
views
commented
Aug 19, 2019
Programming in C
array-of-pointers
+
–
1
answer
9
Testbook Test Series: Compiler Design - Runtime Environments
Which of the Following is True ? A. Symbol table Construction is during the analysis part of the Compiler. B. Type checking is Done during Syntax Analysis phase C. SDD with only synthesized attribute have an order of evaluation D. Both A and C Please Explain the C part only rest are easy :)
Which of the Following is True ?A. Symbol table Construction is during the analysis part of the Compiler.B. Type checking is Done during Syntax Analysis phaseC. SDD with ...
877
views
commented
Aug 18, 2019
Compiler Design
compiler-design
runtime-environment
testbook-test-series
+
–
1
answer
10
access link
1.5k
views
commented
Aug 18, 2019
Compiler Design
compiler-design
runtime-environment
test-series
+
–
1
answer
11
#DS Inserting elements into Min Heap?
The number of distinct min heap are possible with keys 1, 2, 3, 4, 5 are ________. I know, there are variance of this question for Max heap and even for Min heap, the answer won't change, but I just wanna know if my technique is right or not. == ... value. -> Lastly the right sub tree => 1C1 = 1 Totally - 1*4C3*1*2*1 = 8. Is this approach correct?
The number of distinct min heap are possible with keys 1, 2, 3, 4, 5 are ________.I know, there are variance of this question for Max heap and even for Min heap, the answ...
619
views
commented
Aug 15, 2019
DS
algorithms
binary-heap
data-structures
+
–
1
answer
12
Testbook Test Series: Programming & DS - Stack
A queue is implemented using two stacks S1 and S2. Initially the queue contains 1, 2, 3, 4 from front to rear. The following operations are performed in the queue: delete, insert (5), delete, Then how many total no. of push and pop operations are needed to perform ... ? a) Push: 12 Pop: 13 b) Push: 15 Pop: 16 c) Push: 11 Pop: 10 d) Push: 12 Pop: 11
A queue is implemented using two stacks S1 and S2. Initially the queue contains 1, 2, 3, 4 from frontto rear. The following operations are performed in the queue: delete,...
1.3k
views
commented
Aug 15, 2019
DS
testbook-test-series
data
data-structures
stack
+
–
1
answer
13
GATE CSE 1992 | Question: 02,xiii
For a context free grammar, FOLLOW(A) is the set of terminals that can appear immediately to the right of non-terminal $A$ in some "sentential" form. We define two sets LFOLLOW(A) and RFOLLOW(A) by replacing the word "sentential" ... FOLLOW(A) and RFOLLOW(A) are always the same. All the three sets are identical. All the three sets are different.
For a context free grammar, FOLLOW(A) is the set of terminals that can appear immediately to the right of non-terminal $A$ in some "sentential" form. We define two sets L...
8.1k
views
commented
Aug 13, 2019
Compiler Design
gate1992
parsing
compiler-design
normal
multiple-selects
+
–
6
answers
14
TIFR CSE 2013 | Part B | Question: 18
Let $S$ be a set of numbers. For $x \in S$, the rank of $x$ is the number of elements in $S$ that are less than or equal to $x$. The procedure $\textsf{Select}(S, r)$ takes a set $S$ of numbers and a rank $r\left(1 \leq r \leq |S|\right)$ and returns the ... $|S|$ constant · $|S||R|$ constant · $|R| \log |S|$ constant · $|S|(1 + \log |R|)$
Let $S$ be a set of numbers. For $x \in S$, the rank of $x$ is the number of elements in $S$ that are less than or equal to $x$. The procedure $\textsf{Select}(S, r)$ tak...
2.5k
views
commented
Aug 13, 2019
Algorithms
tifr2013
algorithms
quick-sort
time-complexity
+
–
1
answer
15
random variables
Consider two independent random variables $X$ and $Y$ with identical distributions.The variables $X$ and $Y$ take value $0, 1$ and $2$ with probabilities $\frac{1}{2},\frac{1}{4}$ $and$ $\frac{1}{4}$ respectively. What is conditional probability $P\left [ \frac{X+Y=2}{X-Y=0} \right ]?$
Consider two independent random variables $X$ and $Y$ with identical distributions.The variables $X$ and $Y$ take value $0, 1$ and $2$ with probabilities $\frac{1}{2},\fr...
4.8k
views
commented
Aug 10, 2019
Probability
probability
conditional-probability
random-variable
+
–
1
answer
16
Ace Test Series: CO & Architecture - Disk
In the solution to this question, it is given that the number of rotations needed is 2.75. How we got 2.75?
In the solution to this question, it is given that the number of rotations needed is 2.75. How we got 2.75?
1.2k
views
commented
Jul 27, 2019
CO and Architecture
ace-test-series
co-and-architecture
disk
doubt
numerical-answers
+
–
4
answers
17
GATE CSE 1997 | Question: 3.9
Thrashing reduces page I/O decreases the degree of multiprogramming implies excessive page I/O improve the system performance
Thrashingreduces page I/Odecreases the degree of multiprogrammingimplies excessive page I/Oimprove the system performance
13.4k
views
commented
Jul 27, 2019
Operating System
gate1997
operating-system
page-replacement
easy
+
–
1
answer
18
MadeEasy Test Series: Digital Logic - Digital Counter
The modulus value of the below asynchronous counter is __________.
The modulus value of the below asynchronous counter is __________.
1.8k
views
commented
Jul 25, 2019
Digital Logic
made-easy-test-series
digital-logic
digital-counter
+
–
2
answers
19
State and explain master theorem
State and explain master theorem. Can Master’s method be applied to recurrence , $T(n) = 4T(n/2) + n^2logn$ ? Why or why not ?
State and explain master theorem.Can Master’s method be applied to recurrence , $T(n) = 4T(n/2) + n^2logn$ ?Why or why not ?
2.0k
views
commented
Jul 25, 2019
Algorithms
algorithms
master-theorem
time-complexity
+
–
1
answer
20
UGC NET CSE | June 2019 | Part 2 | Question: 4
Suppose that a connected planar graph has six vertices, each of degree four. Into how many regions is the plane divided by a planar representation of this graph? $6$ $8$ $12$ $20$
Suppose that a connected planar graph has six vertices, each of degree four. Into how many regions is the plane divided by a planar representation of this graph?$6$$8$$12...
8.5k
views
commented
Jul 10, 2019
Graph Theory
ugcnetcse-june2019-paper2
graph-planarity
handshaking-theorem
+
–
1
answer
21
Lexical Analysis: Self Doubt
The above diagram is Transition Diagrams for identifiers. As we can see that the identifier is said to be accepted if it starts with a letter and ends with a valid delimiter, which includes blank symbol, arithmetic, logical operator, left parenthesis, right ... with a delimiter and + is a valid delimiter and the error in declaration will not be detected at this stage...
The above diagram is Transition Diagrams for identifiers. As we can see that the identifier is said to be accepted if it starts with a letter and ends with a valid delimi...
1.9k
views
commented
Jun 27, 2019
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
2
answers
22
Peter Linz Edition 4 Exercise 8.1 Question 5 (Page No. 212)
Is the language L = {$a^nb^m : n = 2^m$} context-free?
Is the language L = {$a^nb^m : n = 2^m$} context-free?
610
views
commented
Jun 25, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
pumping-lemma
context-free-language
+
–
0
answers
23
Peter Linz Edition 4 Exercise 8.1 Question 8 (Page No. 212)
Determine whether or not the following languages are context-free. (a) $L=$ {$a^nww^Ra^n : n ≥ 0, w ∈$ {$a,b$}*} (b) $L=$ {$a^nb^ja^nb^j : n ≥ 0, j ≥ 0$}. (C) $L=$ {$a^nb^ja^jb^n : n ≥ 0, j ≥ 0$}. (d) $L=$ {$a^nb^ja^kb^l : n + j ≤ k + l$ ... $ L=$ {$a^nb^nc^j : n ≤j$}. (g) $L=$ {$w ∈$ {$a, b, c$}* $: n_a(w)= n_b (w)=2n_c(w)$}.
Determine whether or not the following languages are context-free.(a) $L=$ {$a^nww^Ra^n : n ≥ 0, w ∈$ {$a,b$}*}(b) $L=$ {$a^nb^ja^nb^j : n ≥ 0, j ≥ 0$}.(C) $L=$ {...
724
views
commented
Jun 25, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
context-free-language
pumping-lemma
proof
+
–
3
answers
24
GateBook Test Series: Digital Logic - Boolean Algebra
What is the time complexity for checking whether an assignment of truth values to variables $x_1,\dots ,x_n$ satisfies a given formula $f(x_1\dots,x_n)$? $O(2^n)$ $O(g(n))$ where $g$ is a polynomial $O(log(n))$ None of the above
What is the time complexity for checking whether an assignment of truth values to variables $x_1,\dots ,x_n$ satisfies a given formula $f(x_1\dots,x_n)$?$O(2^n)$$O(g(n))$...
1.3k
views
commented
May 27, 2019
Digital Logic
gatebook
digital-logic
boolean-algebra
+
–
5
answers
25
GATE CSE 1998 | Question: 3b
Give a regular expression for the set of binary strings where every $0$ is immediately followed by exactly $k$ $1$'s and preceded by at least $k$ $1$’s ($k$ is a fixed integer)
Give a regular expression for the set of binary strings where every $0$ is immediately followed by exactly $k$ $1$'s and preceded by at least $k$ $1$’s ($k$ is a fixed...
8.9k
views
commented
May 13, 2019
Theory of Computation
gate1998
theory-of-computation
regular-expression
easy
descriptive
+
–
2
answers
26
GATE CSE 1997 | Question: 70
Following is a state table for time finite state machine. ... . For example if states $X$ and $Y$ are equivalent then use $XY$ as the name for the equivalent state in the minimal machine).
Following is a state table for time finite state machine.$$\begin{array}{|l|ll|}\hline \textbf{Present State} & \textbf{Next State Output} \\ & \textbf{Input- 0} & \t...
7.9k
views
commented
May 13, 2019
Theory of Computation
gate1997
theory-of-computation
minimal-state-automata
descriptive
+
–
5
answers
27
GATE CSE 2002 | Question: 2.14
Which of the following is true? The complement of a recursive language is recursive The complement of a recursively enumerable language is recursively enumerable The complement of a recursive language is either recursive or recursively enumerable The complement of a context-free language is context-free
Which of the following is true?The complement of a recursive language is recursiveThe complement of a recursively enumerable language is recursively enumerableThe complem...
11.4k
views
commented
May 8, 2019
Theory of Computation
gatecse-2002
theory-of-computation
easy
closure-property
+
–
2
answers
28
GATE CSE 2001 | Question: 6
Give a deterministic PDA for the language $L=\{a^ncb^{2n} \mid n \geq 1\}$ over the alphabet $\Sigma = \{a,b,c\}$. Specify the acceptance state.
Give a deterministic PDA for the language $L=\{a^ncb^{2n} \mid n \geq 1\}$ over the alphabet $\Sigma = \{a,b,c\}$. Specify the acceptance state.
5.1k
views
commented
May 5, 2019
Theory of Computation
gatecse-2001
theory-of-computation
normal
pushdown-automata
descriptive
+
–
2
answers
29
Made Easy Test Series
What is worst case time complexity to delete middle element from the min heap of n distinct elements? O(logn) O(n) O(nlogn) O($n^{2}$)
What is worst case time complexity to delete middle element from the min heap of n distinct elements?O(logn)O(n)O(nlogn)O($n^{2}$)
2.2k
views
commented
May 5, 2019
Algorithms
made-easy-test-series
time-complexity
+
–
1
answer
30
Array of Pointers-Self Doubt
$1)$ How to access array element with array of pointers? By pointer to an array we can access like this $(*a)[0]$,$(*a)[22]$, .. like this right? but how with array of pointer? $2)$Check these three codes , one of them use array and one of them use ... main(void) { if(*(ptr+5)==*(ptr+3)){ printf("Equal"); } else{ printf("Not Equal"); } return 0; }
$1)$ How to access array element with array of pointers? By pointer to an array we can access like this $(*a)[0]$,$(*a)[22]$,….. like thisright?but how with array of po...
838
views
commented
May 5, 2019
Programming in C
pointers
programming-in-c
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register