search
Log In

Recent activity by Mr_22B

8 answers
1
Consider the regular language $L=(111+11111)^{*}.$ The minimum number of states in any DFA accepting this languages is: $3$ $5$ $8$ $9$
commented Jan 22, 2018 in Theory of Computation 13.6k views
3 answers
2
Consider a RISC machine where each instruction is exactly $4$ bytes long. Conditional and unconditional branch instructions use PC-relative addressing mode with Offset specified in bytes to the target location of the branch instruction. Further the Offset is always with respect to ... $i,$ then the decimal value of the Offset is ____________ .
commented Jan 8, 2018 in CO and Architecture 7k views
8 answers
3
Consider the following grammar: stmt $\rightarrow$ if expr then expr else expr; stmt | $0$ expr $\rightarrow$ term relop term | term term $\rightarrow$ id | number id $\rightarrow$ a | b | c number $\rightarrow [0-9]$ where relop is a relational operator (e.g.. $<$ ... example. the program if $e_1$ then $e_2$ else $e_3$ has $2$ control flow paths. $e_1 \rightarrow e_2$ and $e_1 \rightarrow e_3$.
commented Jan 8, 2018 in Compiler Design 10.5k views
2 answers
4
Consider a Binary Search Tree is created using element 1 to n in following order: 3, 2, 1, 6, 5, 4, 9, 8, 7, 12, 11, 10, ....., n – 3, n – 4, n – 5, n – 2, n – 1, n What is the worst time complexity of searching a number in the Binary Search Tree?
answered Jan 3, 2018 in DS 409 views
1 answer
5
anyone who can solve this by this methos i think it has some mistakes ?
commented Dec 27, 2017 in Databases 606 views
1 answer
6
$S \rightarrow aBA$ $A \rightarrow \epsilon$ $B \rightarrow a$ Here in the given grammar, what will be the look ahead of B's production:- $S \rightarrow a.BA , \$ $ $B \rightarrow .a \text{ , X}$ What will come at the place of X, I think it should be "\$", As $ A \rightarrow \epsilon$, So, B's lookahead should be \$. right?
answered Dec 27, 2017 in Compiler Design 172 views
1 answer
7
Boolean expression Y+(X+Y)+(X+Y')(X'+Y) IS equivalent to A)X'Y B) XY' C)Y D)X'Y' please explain i think ans is 1 but ans is given as C
commented Dec 27, 2017 in Digital Logic 103 views
1 answer
8
I read some where that if thier is one comparision at any time then only CFL otherwise CSL? plz give proof.
commented Dec 25, 2017 in Theory of Computation 226 views
2 answers
10
What is the time complexity to insert a new Node in a singly circular linked list at Starting ? (Number of nodes in list = N) A. O(1) B. O(N)
commented Dec 13, 2017 in Programming 924 views
1 answer
11
The number of ways we can insert 11, 12, 13, 14, 15, 16, 17 in empty binary search tree such that resulting tree has the height of 6 = ___________ [height of a tree with single node is 0.]
asked Dec 10, 2017 in Programming 129 views
1 answer
12
What will be complexity to reverse the directed graph?(By reverse i mean reverse direction of all edges).Assume graph is represented by adjacency list. i) No extra space ii)May use extra space
answered Nov 23, 2017 in Programming 198 views
1 answer
13
E-->TE/a T-->ET/b first set of E and T??
answered Nov 23, 2017 in Compiler Design 89 views
1 answer
14
https://www.youtube.com/watch?v=Z4rgivgkNVc&t=1s anyone please tell me if i choose f instead of b at 7:21 then answer will be different there are so many different answers possible here ??
answered Nov 17, 2017 in Digital Logic 59 views
0 answers
15
When should one stop preparing a subject? Gate has a huge syllabus. Even in a single subject a lot of topics are there. Obviously one must understand the basics of all topics. But my question is at what point should one be satisfied with a subject preparation and ... find more questions to solve. This question is specially for people who had sat for gate before and secured a good rank. Thanks.
commented Nov 17, 2017 in Revision 176 views
2 answers
16
(1). Both BFS and DFS require $\Omega (N)$ storage for their operation. (2). If we double the weight of every edge in the Graph shortest path between any two vertices will not change. Which of the following is/are True ? (and in every question of shortest path we have to think about negative weight ?)
commented Nov 14, 2017 in Algorithms 553 views
2 answers
17
2 answers
18
In an unweighted, undirected connected graph, the shortest path from a node S to every other node is computed most efficiently, in terms of time complexity by (A) Dijkstra's algorithm starting from S (B) Warshall's algorithm (C) performing a DFS starting from S (D) performing a BFS starting from S
answered Nov 13, 2017 in Algorithms 244 views
3 answers
19
Consider n elements that are equally distributed in k stacks. In each stack, elements of it are arranged in ascending order (min is at the top in each of the stack and then increasing downwards). Given a queue of size n in which we have to put all n elements in increasing order. What will be the time complexity of the best known algorithm?
answered Nov 4, 2017 in DS 1k views
4 answers
20
Consider the quick sort algorithm on a set of $n$ numbers, where in every recursive subroutine of the algorithm, the algorithm chooses the median of that set as the pivot. Then which of the following statements is TRUE? The running time of the algorithm is $\Theta (n).$ The running time ... algorithm is $\Theta (n^{1.5})$. The running time of the algorithm is $\Theta (n^{2})$. None of the above.
commented Nov 4, 2017 in Algorithms 1.6k views
1 answer
21
can masters theorem be used when base condition is given in a recurrence ? can we directly apply masters theorem to any recurrence ?
commented Nov 3, 2017 in Algorithms 88 views
6 answers
22
Let $n = m!$. Which of the following is TRUE? $m = \Theta (\log n / \log \log n)$ $m = \Omega (\log n / \log \log n)$ but not $m = O(\log n / \log \log n)$ $m = \Theta (\log^2 n)$ $m = \Omega (\log^2 n)$ but not $m = Ο( (\log^2 n)$ $m = \Theta (\log^{1.5} n)$
commented Nov 3, 2017 in Algorithms 3.3k views
10 answers
23
Consider the following functions $f(n) = 3n^{\sqrt{n}}$ $g(n) = 2^{\sqrt{n}{\log_{2}n}}$ $h(n) = n!$ Which of the following is true? $h(n)$ is $O(f(n))$ $h(n)$ is $O(g(n))$ $g(n)$ is not $O(f(n))$ $f(n)$ is $O(g(n))$
commented Nov 3, 2017 in Algorithms 11.8k views
2 answers
24
Which of the following is the correct output for the program given below? #include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int n) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } (a) 0 2 1 0 (b) 1 1 2 0 (c) 0 1 0 2 (d) 0 1 2 0
answered Oct 31, 2017 in Programming 95 views
1 answer
25
The average number of probe required when inserting an element with load factor alpha (assume uniform hashing) 1 / 1-alpha how? Please explain
answered Oct 31, 2017 in Algorithms 271 views
...