The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
Facebook Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
Recent activity by vijaycs
User vijaycs
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
User vijaycs
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
2
answers
1
GATE200881
The subsetsum problem is defined as follows. Given a set of $n$ positive integers, $S = \{ a_1, a_2, a_3, \dots , a_n \}$, and positive integer $W$, is there a subset of $S$ whose elements sum to $W$? A dynamic program for solving this problem uses a $\text{2dimensional}$ Boolean ... implies that there is a subset whose elements sum to $W$? $X[1, W]$ $X[n, 0]$ $X[n, W]$ $X[n1, n]$
commented
Apr 18, 2017
in
Algorithms

2.8k
views
gate2008
algorithms
normal
dynamicprogramming
4
answers
2
GATE2014344
The memory access time is $1$ $nanosecond$ for a read operation with a hit in cache, $5$ $nanoseconds$ for a read operation with a miss in cache, $2$ $nanoseconds$ for a write operation with a hit in cache and $10$ $nanoseconds$ for a write ... operations. The cache hitratio is $0.9$. The average memory access time (in nanoseconds) in executing the sequence of instructions is ______.
commented
Apr 5, 2017
in
CO and Architecture

8.3k
views
gate20143
coandarchitecture
cachememory
numericalanswers
normal
1
answer
3
What will be the output of the following C program? If you think it will give a runtime error, you need to mention it.
commented
Apr 2, 2017
in
Programming

238
views
programminginc
3
answers
4
TIFR2017B8
For any natural number $n$, an ordering of all binary strings of length $n$ is a Gray code if it starts with $0^n$, and any successive strings in the ordering differ in exactly one bit (the first and last string must also differ by one bit). Thus, for ... code, if two strings are separated by $k$ other strings in the ordering, then they must differ in exactly $k$ bits none of the above
commented
Mar 31, 2017
in
Digital Logic

882
views
tifr2017
digitallogic
binarycodes
graycode
4
answers
5
TIFR2017A11
Let $f \: \circ \: g$ denote function composition such that $(f \circ g)(x) = f(g(x))$. Let $f: A \rightarrow B$ such that for all $g \: : \: B \rightarrow A$ and $h \: : \: B \rightarrow A$ ... is onto (surjective) $f$ is onetoone (injective) $f$ is both onetoone and onto (bijective) the range of $f$ is finite the domain of $f$ is finite
commented
Mar 31, 2017
in
Set Theory & Algebra

1.2k
views
tifr2017
settheory&algebra
functions
1
answer
6
Synchronization  SelfDoubt
1. Does starvation freedom imply bounded waiting ? 2. Does bounded waiting imply starvation freedom ? Explain with example.
commented
Mar 28, 2017
in
Operating System

643
views
processsynchronization
deadlock
2
answers
7
ISRO201160
A total of 9 units of a resource type available, and given the safe state shown below, which of the following sequence will be a safe state? Process Used Max $P_1$ 2 7 $P_2$ 1 6 $P_3$ 2 5 $P_4$ 1 4 $\langle P_4, P_1, P_3, P_2\rangle$ $\langle P_4, P_2, P_1, P_3\rangle $ $\langle P_4, P_2, P_3, P_1\rangle $ $\langle P_3, P_1, P_2, P_4 \rangle$
commented
Mar 28, 2017
in
Operating System

2.1k
views
isro2011
operatingsystem
resourceallocation
6
answers
8
GATE2017127
A multithreaded program $P$ executes with $x$ number of threads and uses $y$ number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are nonreentrant, i.e., if a thread holds a lock $l$, then it cannot reacquire lock $l$ without releasing it. If a thread ... are: $x = 1, y = 2$ $x = 2, y = 1$ $x = 2, y = 2$ $x = 1, y = 1$
commented
Mar 27, 2017
in
Operating System

10.5k
views
gate20171
operatingsystem
processsynchronization
normal
1
answer
9
MadeEasy Subject Test: Programming & DS  Binary Tree
commented
Mar 26, 2017
in
DS

215
views
madeeasytestseries
datastructures
binarytree
1
answer
10
complexity
Let there are n elements in array and number of sorted subarray is log n of size n/ log n each then what is the time complexity to sort given array
commented
Mar 26, 2017
in
Algorithms

125
views
4
answers
11
GATE2017242
The next state table of a $2$ ... $T_1 = Q_1+Q_0, \quad T_0= \bar{Q_1} \bar{Q_0}$ $T_1 = \bar{Q_1}Q_0, \quad T_0= Q_1 + Q_0$
commented
Feb 14, 2017
in
Digital Logic

3.5k
views
gate20172
digitallogic
digitalcounter
5
answers
12
GATE2017227
If $w, x, y, z$ are Boolean variables, then which one of the following is INCORRECT? $wx+w(x+y)+x(x +y) = x+wy$ $\overline{w \bar{x}(y+\bar{z})} + \bar{w}x = \bar{w} + x + \bar{y}z$ $(w \bar{x}(y+x\bar{z}) + \bar{w} \bar{x}) y = x \bar{y}$ $(w+y)(wxy+wyz) = wxy+wyz$
answer edited
Feb 14, 2017
in
Digital Logic

3.9k
views
gate20172
digitallogic
booleanalgebra
normal
4
answers
13
GATE200761
Consider the table employee(empId, name, department, salary) and the two queries $Q_1, \, Q_2$ below. Assuming that department 5 has more than one employee, and we want to find the employees who get higher salary than anyone in the department 5, which one of the ... $Q_2$ is the correct query Both $Q_1$ and $Q_2$ produce the same answer Neither $Q_1$ nor $Q_2$ is the correct query
commented
Feb 9, 2017
in
Databases

7.3k
views
gate2007
databases
sql
normal
verbalability
1
answer
14
Divide and conquer
Reply with solution @Arjun sir,@habibkhan,@vijaycs
answer selected
Feb 7, 2017
in
Algorithms

326
views
algorithms
divideandconquer
0
answers
15
Vgate2
here SJF is given as well as priorities are given, given answer followes only priority scheduling but i think priority is used in case where there is a tie between two processes in SJF what is the correct approach?
commented
Feb 4, 2017
in
DS

179
views
2
answers
16
GATE200476
In an $M \times N$ matrix all nonzero entries are covered in $a$ rows and $b$ columns. Then the maximum number of nonzero entries, such that no two are on the same row or column, is $\leq a +b$ $\leq \max(a, b)$ $\leq \min(Ma, Nb)$ $\leq \min(a, b)$
commented
Jan 31, 2017
in
Linear Algebra

3.1k
views
gate2004
linearalgebra
normal
matrices
1
answer
17
2s complement Notation
What is the difference betwen 2s complent of a number and 2s complement representation of a number .
commented
Jan 31, 2017
in
Digital Logic

487
views
numberrepresentation
4
answers
18
UGCNETDEC2016III50
Consider a disk queue with I/O requests on the following cylinders in their arriving order: 6, 10, 12, 54, 97, 73, 128, 15, 44, 110, 34, 45 The disk head is assumed to be at cylinder 23 and moving in the direction of decreasing number of cylinders. Total number of cylinders in the disk is 150. The disk head movement using SCANscheduling algorithm is: 172 173 227 228
commented
Jan 31, 2017
in
Others

3.3k
views
ugcnetdec2016iii
2
answers
19
UGCNETDEC2016III10
For a database relation R(A,B,C,D) where the domains of A, B, C and D include only atomic values, only the following functional dependencies and those that can be inferred from them are: $A \rightarrow C$ $B \rightarrow D$ The relation R is ... as in second normal form Second normal form but not in third normal form Both in second normal form as well as in third normal form
answer selected
Jan 31, 2017
in
Others

345
views
ugcnetdec2016iii
3
answers
20
Complexity
int loop(int n) { for(int i=1;i<=n;i++) { for(int j=1;j<n;j+=i) { O(1) } } } What is the time complexity of above code segment?
answer selected
Jan 30, 2017
in
DS

499
views
timecomplexity
algorithms
1
answer
21
Time Complexity of the given code ?
#include <stdio.h> int main(void) { for(i=1;i<=n;i*=2) { for(j=0;j<=i;j++) { for(k=0;k<=n;k++) { ..... O(1)....; } } } return 0; } What is the time complexity of given code ?
commented
Jan 29, 2017
in
Algorithms

320
views
timecomplexity
algorithms
programminginc
1
answer
22
Pipeline : ans should be 13 or 14?
Here loading result should take in ALU ,rt?
commented
Jan 29, 2017
in
CO and Architecture

241
views
pipelining
0
answers
23
DBMS is it 1 or 2
S : R1(x ) R2(x ) W1(x ) W2(x); Transactions can commit any place after their last operation executed. The number of statements are correct schedule (s) __________. 1. S is conflict serializable schedule. 2. S is view serializable schedule 3. S is recoverable schedule 4. S is cascadeless Rollback, Recoverable schedule 5. S is strict recoverable schedule.
commented
Jan 28, 2017
in
Databases

58
views
databases
2
answers
24
PTE paging
consider a paging system with 48bit virtual address space.Each address defers to a byte in memory.suppose the size of page is 16KB and the main memory size is 16GB.The minimum size of page table with each entry need 2 protection bits is _____ (in GB) now what should be ... . should i round it to 3bytes and make answer as 48GB or shuld i keep it as it is and write the answer as 44GB?
commented
Jan 28, 2017
in
Operating System

238
views
operatingsystem
paging
2
answers
25
MadeEasy Test Series
Consider the following schedule S : r1(A) w2(A) r3(A) w4(A) r5(A) w6(A) The number of schedules equal to given schedule(s) which not conflict equal to schedule(s) are _______.
commented
Jan 28, 2017
in
Databases

380
views
databases
transactions
0
answers
26
MadeEasy  Synchronization
How option B would confirm  Bounded waiting.??
asked
Jan 26, 2017
in
Operating System

300
views
madeeasytestseries
processsynchronization
3
answers
27
Gatebook
Consider languages L1 and L2 over {0,1) alphabet. L2= {w/w contains some x as a substring and x belongs to L1} Which of the following must be true? I. If L1 is regular, L2 is also regular II. If L1 is CFL, L2 is also CFL III. If L1 is recursive, L2 is also recursive (A). I and II only (B). I, II, III only (C). I and III only (D). II and III only
commented
Jan 25, 2017
in
Theory of Computation

331
views
gatebook_toc
theoryofcomputation
regularlanguages
0
answers
28
MADE EASY TEST SERIES
Consider the following C program segment: struct node What is the output of above C program when it runs on a root node of a binary tree? prints nodes at K distance from root node. print nodes of Kth level of binary tree. Both (a) and (b) None of these
commented
Jan 25, 2017
in
DS

211
views
binarytree
3
answers
29
GATE BOOK
Maximum number of keys a BTree of order 5 and height 4 can have ? Note: An order P BTree can have at most P1 keys in a node. (A) 2500 (B) 3905 (C) 3124 (D) 4500
answer selected
Jan 25, 2017
in
Databases

142
views
1
answer
30
GATEBOOK
answer selected
Jan 25, 2017
in
DS

102
views
2
answers
31
Time Complexity
Suppose that each row of an n x n array A consists of 1's and 0's such that in any row of A, all the 1's come before any 0's in that row. Assuming A is already in memory, what is the complexity of the most efficient algorithm for finding the row of A that contains the most 1's? A. $O(n2)$ B. $O(logn)$ C. $O(n)$ D. $O(nlogn)$
answer selected
Jan 25, 2017
in
Algorithms

285
views
timecomplexity
algorithms
asymptoticnotations
1
answer
32
Testbook live Testseries
Which of the following statements are false ? $1.$ A depthfirst search of a directed graph always produces the same number of tree edges (i.e., independent of the order in which the vertices are provided and independent of the order of the ... between any two vertices will not change. $4.$ Dijkstra's algorithm may not terminate if the graph contains negative weight edges.
commented
Jan 24, 2017
in
Algorithms

399
views
algorithms
testseries
1
answer
33
Gate Practice Question
int j=0; for(i=0;i<n;i++) { for(i=0;i<2n;i++) { while(j<n) { j++; } } } time complexity.? a.$O(n^{2})$ b.$O(n^{4})$ c.$O(n^{3})$ d.$O(n)$
answer selected
Jan 23, 2017
in
Algorithms

181
views
timecomplexity
asymptoticnotations
1
answer
34
No. of injective functions ( TestBook Test Series 2 )
answer selected
Jan 23, 2017
in
Set Theory & Algebra

233
views
functions
discretemathematics
1
answer
35
Simultaneous vs hierarchical Memory
Can anyone explain me definition of these two?I am not talking about formulas,only behaviour/definition.
answer selected
Jan 21, 2017
in
CO and Architecture

1.3k
views
coandarchitecture
1
answer
36
C programming
#include <stdio.h> int f(int *a,int b) { b = b1; if(b == 0) return 1; else { *a = *a+1; return *a + f(a,b) ; } } int main() { int X = 5; printf("%d\n",f(&X,X)); } Predict the output If the return statement was return f(a,b)+ *a ; What would have been the output here ? Explain why there is change in output (if any)
comment edited
Jan 20, 2017
in
Programming

1.2k
views
programminginc
1
answer
37
MadeEasy Full Length Test: Operating System  Process Synchronization
asked
Jan 18, 2017
in
Operating System

395
views
madeeasytestseries
operatingsystem
processsynchronization
1
answer
38
Dijkstra
Which of the following procedure results same output as Dijkstra’s algorithm on unweighted graph with ‘n’ vertices ? a) BFS b) DFS c) Kruskal d) Prims
answer selected
Jan 16, 2017
in
Algorithms

316
views
algorithms
1
answer
39
geek mock 2017 #60
Which option is true about the SQL query given below? SELECT firstName, lastName FROM Employee WHERE lastName BETWEEN 'A%' AND 'D%'; A) It will display all the employees having last names starting with the alphabets 'A' till 'D' inclusive of A and exclusive of D ... 'A' and 'D' excluding the names starting with 'A' and 'D since between is inclusive shouldn't D also to be included
answer selected
Jan 16, 2017
in
Databases

360
views
geekmock2017
databases
2
answers
40
Nonisomorphic graphs
How many nonisomorphic simple graph are there with N vertices, where N = 4 ?
answer selected
Jan 16, 2017
in
Graph Theory

3.8k
views
50,737
questions
57,324
answers
198,412
comments
105,177
users