Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Ekta07_GATE
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Recent activity by Ekta07_GATE
5
answers
1
GATE IT 2007 | Question: 21
Which one of these first-order logic formulae is valid? $\forall x\left(P\left(x\right) \implies Q\left(x\right)\right) \implies \left(∀xP\left(x\right)\implies \forall xQ\left(x\right)\right)$ ... $\forall x \exists y P\left(x, y\right)\implies \exists y \forall x P\left(x, y\right)$
Which one of these first-order logic formulae is valid?$\forall x\left(P\left(x\right) \implies Q\left(x\right)\right) \implies \left(∀xP\left(x\right)\implies \forall ...
10.3k
views
commented
Oct 13, 2020
Mathematical Logic
gateit-2007
mathematical-logic
normal
first-order-logic
+
–
1
answer
2
binary semaphore
Say I have a Binary Semaphore S initialized to 1. Consider V() as Signal and P() as Wait. If I now invoke V(S), will it wait for S to become 0? Or will it go on with further execution without making any changes to S?
Say I have a Binary Semaphore S initialized to 1. Consider V() as Signal and P() as Wait. If I now invoke V(S), will it wait for S to become 0? Or will it go on with furt...
1.2k
views
commented
Mar 22, 2020
5
answers
3
GATE IT 2007 | Question: 65
Consider a selection of the form $\sigma_{A\leq 100} (r)$, where $r$ is a relation with $1000$ tuples. Assume that the attribute values for $A$ among the tuples are uniformly distributed in the interval $[0, 500].$ Which one of the following options is the best estimate of the number of tuples returned by the given selection query ? $50$ $100$ $150$ $200$
Consider a selection of the form $\sigma_{A\leq 100} (r)$, where $r$ is a relation with $1000$ tuples. Assume that the attribute values for $A$ among the tuples are unifo...
12.5k
views
answered
Jan 16, 2020
Databases
gateit-2007
databases
relational-calculus
probability
normal
+
–
5
answers
4
GATE CSE 2005 | Question: 30
Let r be a relation instance with schema R = (A, B, C, D). We define $r_1 = \pi_{A, B, C} (R)$ and $r_2=\pi_{A, D} (r)$. Let $s =r_1 \: * \: r_2$ where $*$ denotes natural join. Given that the decomposition of $r$ into $r_1$ and $r_2$ is lossy, which one of the following is TRUE? $s \subset r$ $r \cup s =r$ $r \subset s$ $r*s=s$
Let r be a relation instance with schema R = (A, B, C, D). We define $r_1 = \pi_{A, B, C} (R)$ and $r_2=\pi_{A, D} (r)$. Let $s =r_1 \: * \: r_2$ where $*$ denotes natura...
16.1k
views
commented
Jan 16, 2020
Databases
gatecse-2005
databases
relational-algebra
natural-join
normal
+
–
4
answers
5
GATE CSE 2000 | Question: 2.25
Given relations r(w, x) and s(y, z) the result of select distinct w, x from r, s is guaranteed to be same as r, provided. r has no duplicates and s is non-empty r and s have no duplicates s has no duplicates and r is non-empty r and s have the same number of tuples
Given relations r(w, x) and s(y, z) the result ofselect distinct w, x from r, s is guaranteed to be same as r, provided.r has no duplicates and s is non-emptyr and s have...
16.2k
views
commented
Jan 14, 2020
Databases
gatecse-2000
databases
sql
+
–
6
answers
6
GATE CSE 2016 Set 2 | Question: 37
Consider the following program: int f (int * p, int n) { if (n <= 1) return 0; else return max (f (p+1, n-1), p[0] - p[1]); } int main () { int a[] = {3, 5, 2, 6, 4}; printf(" %d", f(a, 5)); } Note: $\max (x, y)$ returns the maximum of $x$ and $y$. The value printed by this program is ________.
Consider the following program:int f (int * p, int n) { if (n <= 1) return 0; else return max (f (p+1, n-1), p[0] - p ); } int main () { int a[] = {3, 5, 2, 6, 4}; ...
13.4k
views
commented
Nov 25, 2019
Programming in C
gatecse-2016-set2
programming-in-c
normal
numerical-answers
recursion
+
–
5
answers
7
GATE CSE 2004 | Question: 29
The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of $n$ $n^2$ $n \log n$ $n \log^2n$
The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of$n$$n^2$$n \log n$$n \log^2n$
33.2k
views
commented
Nov 10, 2019
Algorithms
gatecse-2004
algorithms
sorting
asymptotic-notation
easy
+
–
5
answers
8
GATE CSE 2005 | Question: 81b
double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += foo(i); } return sum; } } Suppose we modify the above function $foo()$ ... time complexity for function $foo()$ is significantly reduced. The space complexity of the modified function would be: $O(1)$ $O(n)$ $O(n^2)$ $n!$
double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += foo(i); } return sum; } }Suppose we modify the above f...
10.8k
views
answered
Nov 9, 2019
Programming in C
gatecse-2005
programming
recursion
normal
+
–
5
answers
9
GATE CSE 2015 Set 1 | Question: 40
An algorithm performs $(\log N)^{\frac{1}{2}}$ find operations , $N$ insert operations, $(\log N)^{\frac{1}{2}}$ delete operations, and $(\log N)^{\frac{1}{2}}$ decrease-key operations on a set of data ... if the goal is to achieve the best total asymptotic complexity considering all the operations? Unsorted array Min - heap Sorted array Sorted doubly linked list
An algorithm performs $(\log N)^{\frac{1}{2}}$ find operations , $N$ insert operations, $(\log N)^{\frac{1}{2}}$ delete operations, and $(\log N)^{\frac{1}{2}}$ decrease-...
23.5k
views
commented
Nov 6, 2019
Algorithms
gatecse-2015-set1
algorithms
data-structures
normal
time-complexity
+
–
8
answers
10
GATE CSE 2007 | Question: 45
What is the $\text{time complexity}$ of the following recursive function? int DoSomething (int n) { if (n <= 2) return 1; else return (DoSomething (floor (sqrt(n))) + n); } $\Theta(n^2)$ $\Theta(n \log_2n)$ $\Theta(\log_2n)$ $\Theta(\log_2\log_2n)$
What is the $\text{time complexity}$ of the following recursive function?int DoSomething (int n) { if (n <= 2) return 1; else return (DoSomething (floor (sqrt(n))) + n); ...
31.7k
views
commented
Nov 4, 2019
Algorithms
gatecse-2007
algorithms
time-complexity
normal
+
–
5
answers
11
GATE CSE 1997 | Question: 1.4
The concatenation of two lists is to be performed on $O(1)$ time. Which of the following implementations of a list should be used? Singly linked list Doubly linked list Circular doubly linked list Array implementation of list
The concatenation of two lists is to be performed on $O(1)$ time. Which of the following implementations of a list should be used?Singly linked listDoubly linked listCirc...
19.3k
views
commented
Nov 1, 2019
DS
gate1997
data-structures
linked-list
easy
+
–
10
answers
12
GATE CSE 2003 | Question: 23
In a min-heap with $n$ elements with the smallest element at the root, the $7^{th}$ smallest element can be found in time $\Theta (n \log n)$ $\Theta (n)$ $\Theta(\log n)$ $\Theta(1)$
In a min-heap with $n$ elements with the smallest element at the root, the $7^{th}$ smallest element can be found in time$\Theta (n \log n)$$\Theta (n)$$\Theta(\log n)$$\...
31.7k
views
commented
Oct 26, 2019
DS
gatecse-2003
data-structures
binary-heap
+
–
12
answers
13
GATE CSE 2003 | Question: 64
Let S be a stack of size $n \geq1$. Starting with the empty stack, suppose we push the first n natural numbers in sequence, and then perform $n$ pop operations. Assume that Push and Pop operations take $X$ seconds each, and $Y$ seconds elapse between the end of one such ... S. The average stack-life of an element of this stack is $n(X+Y)$ $3Y+2X$ $n(X+Y)-X$ $Y+2X$
Let S be a stack of size $n \geq1$. Starting with the empty stack, suppose we push the first n natural numbers in sequence, and then perform $n$ pop operations. Assume th...
30.7k
views
commented
Oct 13, 2019
DS
gatecse-2003
data-structures
stack
normal
+
–
6
answers
14
GATE CSE 2015 Set 1 | Question: 35
What is the output of the following C code? Assume that the address of $x$ is $2000$ (in decimal) and an integer requires four bytes of memory. int main () { unsigned int x [4] [3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}}; printf ("%u, %u, %u", x + 3, *(x + 3), *(x + 2) + 3); } $2036, 2036, 2036$ $2012, 4, 2204$ $2036, 10, 10$ $2012, 4, 6$
What is the output of the following C code? Assume that the address of $x$ is $2000$ (in decimal) and an integer requires four bytes of memory.int main () { unsigned int ...
27.8k
views
commented
Oct 8, 2019
Programming in C
gatecse-2015-set1
programming
programming-in-c
array
normal
+
–
5
answers
15
GATE IT 2005 | Question: 59
Let $a$ and $b$ be two sorted arrays containing $n$ integers each, in non-decreasing order. Let $c$ be a sorted array containing $2n$ integers obtained by merging the two arrays $a$ and $b$. Assuming the arrays are indexed starting from $0$, consider the following ... Which of the following is TRUE? only I and II only I and IV only II and III only III and IV
Let $a$ and $b$ be two sorted arrays containing $n$ integers each, in non-decreasing order. Let $c$ be a sorted array containing $2n$ integers obtained by merging the two...
11.7k
views
commented
Oct 7, 2019
Algorithms
gateit-2005
algorithms
sorting
normal
+
–
5
answers
16
GATE CSE 2017 Set 1 | Question: 55
The output of executing the following C program is _______________ . #include<stdio.h> int total(int v) { static int count = 0; while(v) { count += v&1; v >>= 1; } return count; } void main() { static int x=0; int i=5; for(; i>0; i--) { x = x + total(i); } printf("%d\n", x); }
The output of executing the following C program is _______________ .#include<stdio.h int total(int v) { static int count = 0; while(v) { count += v&1; v >>= 1; } return c...
22.2k
views
commented
Oct 4, 2019
Programming in C
gatecse-2017-set1
programming
programming-in-c
normal
numerical-answers
+
–
1
answer
17
GATE CSE 1989 | Question: 3-viii
In which of the following case(s) is it possible to obtain different results for call-by-reference and call-by-name parameter passing? Passing an expression as a parameter Passing an array as a parameter Passing a pointer as a parameter Passing as array element as a parameter
In which of the following case(s) is it possible to obtain different results for call-by-reference and call-by-name parameter passing?Passing an expression as a parameter...
4.5k
views
commented
Sep 28, 2019
Compiler Design
gate1989
parameter-passing
runtime-environment
compiler-design
multiple-selects
+
–
8
answers
18
GATE CSE 2005 | Question: 2
An Abstract Data Type (ADT) is: same as an abstract class a data type that cannot be instantiated a data type for which only the operations defined on it can be used, but none else all of the above
An Abstract Data Type (ADT) is:same as an abstract classa data type that cannot be instantiateda data type for which only the operations defined on it can be used, but no...
19.3k
views
answered
Sep 22, 2019
DS
gatecse-2005
data-structures
normal
abstract-data-type
+
–
2
answers
19
GATE CSE 1994 | Question: 1.20
In which of the following cases is it possible to obtain different results for call-by-reference and call-by-name parameter passing methods? Passing a constant value as a parameter Passing the address of an array as a parameter Passing an array element as a parameter Passing an array
In which of the following cases is it possible to obtain different results for call-by-reference and call-by-name parameter passing methods?Passing a constant value as a ...
10.0k
views
commented
Sep 16, 2019
Programming in C
gate1994
programming
parameter-passing
easy
+
–
4
answers
20
GATE CSE 2008 | Question: 49
Given below are two finite state automata ( $\rightarrow$ indicates the start state and $F$ ...
Given below are two finite state automata ( $\rightarrow$ indicates the start state and $F$ indicates a final state)$$\overset{Y}{\begin{array}{|l|l|l|}\hline \text{} & ...
14.5k
views
commented
Jun 29, 2019
Theory of Computation
gatecse-2008
normal
theory-of-computation
finite-automata
+
–
5
answers
21
GATE IT 2007 | Question: 46
The two grammars given below generate a language over the alphabet $\{x, y, z\}$ $G1 : S \rightarrow x \mid z \mid x \ S \mid z \ S \mid y \ B$ $B \rightarrow y \mid z \mid y \ B \mid z \ B$ ... : Every $x$ is followed by at least one $y$ $G1$ : No $y$ appears after any $x$ $G2$ : Every $y$ is followed by at least one $x$
The two grammars given below generate a language over the alphabet $\{x, y, z\}$$G1 : S \rightarrow x \mid z \mid x \ S \mid z \ S \mid y \ B$ ...
5.6k
views
commented
Jun 29, 2019
Theory of Computation
gateit-2007
theory-of-computation
normal
context-free-language
+
–
1
answer
22
Bellman Ford algorithm
Consider the statements True/ False Bellman Ford algorithm reports a shortest path from source to a destination only in a directed graph which has a negative cycle.
Consider the statements True/ FalseBellman Ford algorithm reports a shortest path from source to a destination only in a directed graph which has a negative cycle.
1.4k
views
answered
Apr 29, 2019
Algorithms
algorithms
bellman-ford
true-false
+
–
0
answers
23
Ip address of class A (0 and 127)
Ip address of class 0.0.0.0 to 0.255.255.255 and 127.0.0.0 to 127.255.255.255 , where these range of address of class A is being used?
Ip address of class 0.0.0.0 to 0.255.255.255 and 127.0.0.0 to 127.255.255.255 , where these range of address of class A is being used?
369
views
asked
Jan 12, 2019
Computer Networks
computer-networks
+
–
4
answers
24
GATE IT 2008 | Question: 78
A CFG $G$ is given with the following productions where $S$ is the start symbol, $A$ is a non-terminal and $a$ and $b$ are terminals. $S \to aS \mid A$ $A \to aAb \mid bAa \mid \epsilon$ Which of the following strings is generated by the grammar above? $aabbaba$ $aabaaba$ $abababb$ $aabbaab$
A CFG $G$ is given with the following productions where $S$ is the start symbol, $A$ is a non-terminal and $a$ and $b$ are terminals.$S \to aS \mid A$$A \to aAb \mid bAa ...
8.2k
views
commented
Jan 6, 2019
Compiler Design
gateit-2008
parsing
normal
context-free-language
+
–
6
answers
25
GATE CSE 2009 | Question: 16, ISRO2017-12
Which one of the following is FALSE? There is a unique minimal DFA for every regular language Every NFA can be converted to an equivalent PDA. Complement of every context-free language is recursive. Every nondeterministic PDA can be converted to an equivalent deterministic PDA.
Which one of the following is FALSE?There is a unique minimal DFA for every regular languageEvery NFA can be converted to an equivalent PDA.Complement of every context-fr...
15.5k
views
commented
Jan 6, 2019
Theory of Computation
gatecse-2009
theory-of-computation
easy
isro2017
pushdown-automata
+
–
2
answers
26
GATE IT 2008 | Question: 33
Consider the following languages. $L_1 = \{a^i b^j c^k \mid i = j, k \geq 1\}$ $L_2 = \{a^i b^j \mid j = 2i, i \geq 0\}$ Which of the following is true? $L_1$ is not a CFL but $L_2$ is $L_1 \cap L_2 = \varnothing $ and $L_1$ is non-regular $L_1 \cup L_2$ is not a CFL but $L_2$ is There is a $4$-state PDA that accepts $L_1$, but there is no DPDA that accepts $L_2$.
Consider the following languages.$L_1 = \{a^i b^j c^k \mid i = j, k \geq 1\}$$L_2 = \{a^i b^j \mid j = 2i, i \geq 0\}$Which of the following is true?$L_1$ is not a CFL bu...
5.9k
views
commented
Jan 6, 2019
Theory of Computation
gateit-2008
theory-of-computation
normal
identify-class-language
+
–
5
answers
27
GATE CSE 2008 | Question: 48
Which of the following statements is false? Every NFA can be converted to an equivalent DFA Every non-deterministic Turing machine can be converted to an equivalent deterministic Turing machine Every regular language is also a context-free language Every subset of a recursively enumerable set is recursive
Which of the following statements is false?Every NFA can be converted to an equivalent DFAEvery non-deterministic Turing machine can be converted to an equivalent determi...
8.5k
views
commented
Jan 5, 2019
Theory of Computation
gatecse-2008
theory-of-computation
easy
recursive-and-recursively-enumerable-languages
+
–
5
answers
28
GATE IT 2005 | Question: 38
Let $P$ be a non-deterministic push-down automaton (NPDA) with exactly one state, $q$, and exactly one symbol, $Z$, in its stack alphabet. State $q$ is both the starting as well as the accepting state of the PDA. The stack is initialized with one $Z$ before the start of ... $L(P)$ and $N(P)$ are necessarily $Σ^*$. Neither $L(P)$ nor $N(P)$ are necessarily $Σ^*$
Let $P$ be a non-deterministic push-down automaton (NPDA) with exactly one state, $q$, and exactly one symbol, $Z$, in its stack alphabet. State $q$ is both the starting ...
12.2k
views
commented
Jan 4, 2019
Theory of Computation
gateit-2005
theory-of-computation
pushdown-automata
normal
+
–
5
answers
29
GATE CSE 2000 | Question: 1.4
Let $S$ and $T$ be languages over $\Sigma=\{a,b\}$ represented by the regular expressions $(a+b^*)^*$ and $(a+b)^*$, respectively. Which of the following is true? $S \subset T$ $T \subset S$ $S = T$ $S \cap T = \phi$
Let $S$ and $T$ be languages over $\Sigma=\{a,b\}$ represented by the regular expressions $(a+b^*)^*$ and $(a+b)^*$, respectively. Which of the following is true?$S \subs...
11.4k
views
commented
Dec 30, 2018
Theory of Computation
gatecse-2000
theory-of-computation
regular-expression
easy
+
–
4
answers
30
GATE CSE 2014 Set 2 | Question: 40
Consider the following function. double f(double x){ if( abs(x*x - 3) < 0.01) return x; else return f(x/2 + 1.5/x); } Give a value $q$ (to $2$ decimals) such that $f(q)$ will return $q$:_____.
Consider the following function.double f(double x){ if( abs(x*x - 3) < 0.01) return x; else return f(x/2 + 1.5/x); }Give a value $q$ (to $2$ decimals) such that $f(q)$ wi...
18.1k
views
commented
Sep 21, 2018
Programming in C
gatecse-2014-set2
programming
recursion
numerical-answers
normal
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register