Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Madhab
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Recent activity by Madhab
13
answers
1
GATE CSE 2009 | Question: 33
The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-and-set instruction as follows: void enter_CS(X) { while(test-and-set(X)); } void leave_CS(X) { X = 0; } In the above solution, $X$ is a memory location ... at the same time Which of the above statements are TRUE? (I) only (I) and (II) (II) and (III) (IV) only
The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-and-set instruction as follows:void enter_CS(X) { while(test-an...
24.7k
views
answered
Oct 1, 2020
Operating System
gatecse-2009
operating-system
process-synchronization
normal
+
–
13
answers
2
GATE CSE 2004 | Question: 82
Let $A[1,\ldots,n]$ be an array storing a bit ($1$ or $0$) at each location, and $f(m)$ is a function whose time complexity is $\Theta(m)$. Consider the following program fragment written in a C like language: counter = 0; for (i=1; i<=n; i++) { if ( ... The complexity of this program fragment is $\Omega(n^2)$ $\Omega (n\log n) \text{ and } O(n^2)$ $\Theta(n)$ $o(n)$
Let $A[1,\ldots,n]$ be an array storing a bit ($1$ or $0$) at each location, and $f(m)$ is a function whose time complexity is $\Theta(m)$. Consider the following program...
20.0k
views
answered
Sep 25, 2020
Algorithms
gatecse-2004
algorithms
time-complexity
normal
+
–
5
answers
3
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
Sep 16, 2020
Programming in C
gatecse-2017-set1
programming
programming-in-c
normal
numerical-answers
+
–
9
answers
4
GATE CSE 2016 Set 1 | Question: 28
A function $f: \Bbb{N^+} \rightarrow \Bbb{N^+}$ , defined on the set of positive integers $\Bbb{N^+}$, satisfies the following properties: $f(n)=f(n/2)$ if $n$ is even $f(n)=f(n+5)$ if $n$ is odd Let $R=\{ i \mid \exists{j} : f(j)=i \}$ be the set of distinct values that $f$ takes. The maximum possible size of $R$ is ___________.
A function $f: \Bbb{N^+} \rightarrow \Bbb{N^+}$ , defined on the set of positive integers $\Bbb{N^+}$, satisfies the following properties: $f(n)=f(n/2)...
21.4k
views
commented
Sep 6, 2020
Set Theory & Algebra
gatecse-2016-set1
set-theory&algebra
functions
normal
numerical-answers
+
–
4
answers
5
GATE CSE 2005 | Question: 9
The following is the Hasse diagram of the poset $\left[\{a,b,c,d,e\},≺\right]$ The poset is : not a lattice a lattice but not a distributive lattice a distributive lattice but not a Boolean algebra a Boolean algebra
The following is the Hasse diagram of the poset $\left[\{a,b,c,d,e\},≺\right]$The poset is :not a latticea lattice but not a distributive latticea distributive lattice ...
9.1k
views
commented
Sep 6, 2020
Set Theory & Algebra
gatecse-2005
set-theory&algebra
lattice
normal
+
–
8
answers
6
GATE IT 2005 | Question: 32
An unbiased coin is tossed repeatedly until the outcome of two successive tosses is the same. Assuming that the trials are independent, the expected number of tosses is $3$ $4$ $5$ $6$
An unbiased coin is tossed repeatedly until the outcome of two successive tosses is the same. Assuming that the trials are independent, the expected number of tosses is$3...
30.4k
views
answered
Sep 4, 2020
Probability
gateit-2005
probability
binomial-distribution
expectation
normal
+
–
14
answers
7
GATE CSE 2012 | Question: 12
What is the complement of the language accepted by the NFA shown below? Assume $\Sigma = \{a\}$ and $\epsilon$ is the empty string. $\phi$ $\{\epsilon\}$ $a^*$ $\{a , \epsilon\}$
What is the complement of the language accepted by the NFA shown below?Assume $\Sigma = \{a\}$ and $\epsilon$ is the empty string.$\phi$$\{\epsilon\}$$a^*$$\{a , \epsilon...
19.0k
views
commented
Aug 31, 2020
Theory of Computation
gatecse-2012
finite-automata
easy
theory-of-computation
+
–
5
answers
8
GATE CSE 2015 Set 2 | Question: 55
Which one of the following well-formed formulae is a tautology? $\forall x \, \exists y \, R(x,y) \, \leftrightarrow \, \exists y \, \forall x \, R(x, y)$ ... $\forall x \, \forall y \, P(x,y) \, \rightarrow \, \forall x \, \forall y \, P(y, x)$
Which one of the following well-formed formulae is a tautology? $\forall x \, \exists y \, R(x,y) \, \leftrightarrow \, \exists y \, \forall x \, R(x, y)$$( \forall x \,...
20.6k
views
comment reshown
Aug 15, 2020
Mathematical Logic
gatecse-2015-set2
mathematical-logic
normal
first-order-logic
+
–
12
answers
9
GATE CSE 2014 Set 1 | Question: 53
Which one of the following propositional logic formulas is TRUE when exactly two of $p,q$ and $r$ are TRUE? $(( p \leftrightarrow q) \wedge r) \vee (p \wedge q \wedge \sim r)$ $( \sim (p \leftrightarrow q) \wedge r)\vee (p \wedge q \wedge \sim r)$ ... $(\sim (p \leftrightarrow q) \wedge r) \wedge (p \wedge q \wedge \sim r) $
Which one of the following propositional logic formulas is TRUE when exactly two of $p,q$ and $r$ are TRUE?$(( p \leftrightarrow q) \wedge r) \vee (p \wedge q \wedge...
13.4k
views
commented
Aug 15, 2020
Mathematical Logic
gatecse-2014-set1
mathematical-logic
normal
propositional-logic
+
–
0
answers
10
In an examination, the score in each of the four languages
In an examination, the score in each of the four languages – Bengali, Hindi, Urdu and Telegu- can be integers between 0 and 10. Then the number of ways in which a student can secure a total score of 21 is (A) 880; (B) 760; (C) 450; (D) 1360.
In an examination, the score in each of the four languages – Bengali, Hindi, Urdu and Telegu- can be integers between 0 and 10. Then the number of ways in which a stude...
1.6k
views
commented
Mar 12, 2020
Combinatory
combinatory
+
–
12
answers
11
GATE CSE 2015 Set 3 | Question: 24
In a room there are only two types of people, namely $\text{Type 1}$ and $\text{Type 2}$. $\text{Type 1}$ people always tell the truth and $\text{Type 2}$ people always lie. You give a fair coin to a person in that room, without knowing which type ... person is of $\text{Type 2}$, then the result is tail If the person is of $\text{Type 1}$, then the result is tail
In a room there are only two types of people, namely $\text{Type 1}$ and $\text{Type 2}$. $\text{Type 1}$ people always tell the truth and $\text{Type 2}$ people always l...
17.6k
views
commented
Mar 3, 2020
Mathematical Logic
gatecse-2015-set3
mathematical-logic
difficult
logical-reasoning
+
–
2
answers
12
MadeEasy Test Series: Mathematical Logic - First Order Logic
Pardon for the screenshot though. No idea of latex.
Pardon for the screenshot though. No idea of latex.
1.1k
views
answered
Mar 1, 2020
Mathematical Logic
made-easy-test-series
first-order-logic
mathematical-logic
+
–
3
answers
13
ISRO2020-73
Given that $B(a)$ means “$a$ is a bear” $F(a)$ means “$a$ is a fish” and $E(a,b)$ means “$a $ eats $b$” Then what is the best meaning of $\forall x [F(x) \to \forall y(E(y,x)\rightarrow b(y))]$ Every fish is eaten by some bear Bears eat only fish Every bear eats fish Only bears eat fish
Given that$B(a)$ means “$a$ is a bear”$F(a)$ means “$a$ is a fish” and$E(a,b)$ means “$a $ eats $b$”Then what is the best meaning of$\forall x [F(x) \to \fora...
3.7k
views
answered
Mar 1, 2020
Mathematical Logic
isro-2020
mathematical-logic
first-order-logic
normal
+
–
9
answers
14
GATE IT 2005 | Question: 36
Let $P(x)$ and $Q(x)$ ...
Let $P(x)$ and $Q(x)$ be arbitrary predicates. Which of the following statements is always TRUE?$\left(\left(\forall x \left(P\left(x\right) \vee Q\left(x\right)\right)\r...
14.6k
views
commented
Feb 23, 2020
Mathematical Logic
gateit-2005
mathematical-logic
first-order-logic
normal
+
–
3
answers
15
GATE CSE 1992 | Question: 03,iii
How many edges can there be in a forest with $p$ components having $n$ vertices in all?
How many edges can there be in a forest with $p$ components having $n$ vertices in all?
6.4k
views
commented
Jan 20, 2020
Graph Theory
gate1992
graph-theory
graph-connectivity
descriptive
+
–
3
answers
16
GATE CSE 2014 Set 2 | Question: 52
The number of distinct minimum spanning trees for the weighted graph below is _____
The number of distinct minimum spanning trees for the weighted graph below is _____
13.5k
views
answered
Jan 20, 2020
Algorithms
gatecse-2014-set2
algorithms
spanning-tree
numerical-answers
normal
+
–
7
answers
17
GATE CSE 2010 | Question: 28
The degree sequence of a simple graph is the sequence of the degrees of the nodes in the graph in decreasing order. Which of the following sequences can not be the degree sequence of any graph? $7, 6, 5, 4, 4, 3, 2, 1$ $6, 6, 6, 6, 3, 3, 2, 2$ $7, 6, 6, 4, 4, 3, 2, 2$ $8, 7, 7, 6, 4, 2, 1, 1$ I and II III and IV IV only II and IV
The degree sequence of a simple graph is the sequence of the degrees of the nodes in the graph in decreasing order. Which of the following sequences can not be the degree...
18.4k
views
answer edited
Jan 20, 2020
Graph Theory
gatecse-2010
graph-theory
degree-of-graph
+
–
9
answers
18
GATE CSE 2006 | Question: 25
Let $S = \{1, 2, 3,\ldots, m\}, m >3.$ Let $X_1,\ldots,X_n$ be subsets of $S$ each of size $3.$ Define a function $f$ from $S$ to the set of natural numbers as, $f(i)$ is the number of sets $X_j$ that contain the element $i.$ That is $f(i)=\left | \left\{j \mid i\in X_j \right\} \right|$ then $ \sum_{i=1}^{m} f(i)$ is: $3m$ $3n$ $2m+1$ $2n+1$
Let $S = \{1, 2, 3,\ldots, m\}, m >3.$ Let $X_1,\ldots,X_n$ be subsets of $S$ each of size $3.$ Define a function $f$ from $S$ to the set of natural numbers as, $f(i)$ is...
10.9k
views
answered
Jan 18, 2020
Set Theory & Algebra
gatecse-2006
set-theory&algebra
normal
functions
+
–
5
answers
19
ISRO2020-58
Remote Procedure Calls are used for communication between two processes remotely different from each other on the same system communication between two processes on the same system communication between two processes on the separate systems none of the above
Remote Procedure Calls are used forcommunication between two processes remotely different from each other on the same systemcommunication between two processes on the sam...
4.1k
views
answered
Jan 15, 2020
Computer Networks
isro-2020
computer-networks
inter-process-communication
normal
+
–
7
answers
20
GATE CSE 2012 | Question: 45
Consider an instance of TCP's Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is $2$ MSS and the threshold at the start of the first transmission is $8$ MSS. Assume that a timeout occurs during ... Find the congestion window size at the end of the tenth transmission. $8$ MSS $14$ MSS $7$ MSS $12$ MSS
Consider an instance of TCP’s Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is $2$ MSS and the t...
38.1k
views
answered
Dec 13, 2019
Computer Networks
gatecse-2012
computer-networks
congestion-control
normal
+
–
12
answers
21
GATE CSE 2014 Set 1 | Question: 27
Let the size of congestion window of a TCP connection be $32$ KB when a timeout occurs. The round trip time of the connection is $100$ msec and the maximum segment size used is $2$ KB. The time taken (in msec) by the TCP connection to get back to $32$ KB congestion window is _________.
Let the size of congestion window of a TCP connection be $32$ KB when a timeout occurs. The round trip time of the connection is $100$ msec and the maximum segment size u...
37.5k
views
answered
Dec 13, 2019
Computer Networks
gatecse-2014-set1
computer-networks
tcp
congestion-control
numerical-answers
normal
+
–
9
answers
22
GATE CSE 2015 Set 1 | Question: 19
Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are FALSE with respect to the TCP connection? If the sequence number of a segment is $m,$ then the sequence number of the subsequent segment is always ... always less than or equal to the advertised window. III only I and III only I and IV only II and IV only
Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are FALSE with respect to the TCP connection?If the sequence number ...
18.7k
views
answered
Dec 13, 2019
Computer Networks
gatecse-2015-set1
computer-networks
tcp
normal
+
–
11
answers
23
GATE IT 2004 | Question: 35
In how many ways can we distribute $5$ distinct balls, $B_1, B_2, \ldots, B_5$ in $5$ distinct cells, $C_1, C_2, \ldots, C_5$ such that Ball $B_i$ is not in cell $C_i$, $\forall i= 1,2,\ldots 5$ and each cell contains exactly one ball? $44$ $96$ $120$ $3125$
In how many ways can we distribute $5$ distinct balls, $B_1, B_2, \ldots, B_5$ in $5$ distinct cells, $C_1, C_2, \ldots, C_5$ such that Ball $B_i$ is not in cell $C_i$, $...
11.3k
views
answered
Dec 7, 2019
Combinatory
gateit-2004
combinatory
normal
balls-in-bins
+
–
10
answers
24
GATE IT 2005 | Question: 33
Let $A$ be a set with $n$ elements. Let $C$ be a collection of distinct subsets of $A$ such that for any two subsets $S_1$ and $S_2$ in $C$, either $S_1 \subset S_2$ or $S_2\subset S_1$. What is the maximum cardinality of $C?$ $n$ $n+1$ $2^{n-1} + 1$ $n!$
Let $A$ be a set with $n$ elements. Let $C$ be a collection of distinct subsets of $A$ such that for any two subsets $S_1$ and $S_2$ in $C$, either $S_1 \subset S_2$ or $...
11.7k
views
answered
Dec 7, 2019
Set Theory & Algebra
gateit-2005
set-theory&algebra
normal
set-theory
+
–
10
answers
25
GATE CSE 2003 | Question: 18
In a bottom-up evaluation of a syntax directed definition, inherited attributes can always be evaluated be evaluated only if the definition is L-attributed be evaluated only if the definition has synthesized attributes never be evaluated
In a bottom-up evaluation of a syntax directed definition, inherited attributes canalways be evaluatedbe evaluated only if the definition is L-attributedbe evaluated only...
36.5k
views
answered
Dec 6, 2019
Compiler Design
gatecse-2003
compiler-design
syntax-directed-translation
normal
+
–
7
answers
26
GATE IT 2007 | Question: 11
Let a memory have four free blocks of sizes $4k$, $8k$, $20k$, $2k$ ... $J7$ will be completed will be $16$ $19$ $20$ $37$
Let a memory have four free blocks of sizes $4k$, $8k$, $20k$, $2k$. These blocks are allocated following the best-fit strategy. The allocation requests are stored in a q...
19.0k
views
answered
Nov 9, 2019
Operating System
gateit-2007
operating-system
memory-management
normal
+
–
8
answers
27
GATE CSE 2007 | Question: 53
Consider the following two statements: P: Every regular grammar is LL(1) Q: Every regular set has a LR(1) grammar Which of the following is TRUE? Both P and Q are true P is true and Q is false P is false and Q is true Both P and Q are false
Consider the following two statements:P: Every regular grammar is LL(1)Q: Every regular set has a LR(1) grammarWhich of the following is TRUE?Both P and Q are trueP is tr...
35.4k
views
answered
Nov 6, 2019
Compiler Design
gatecse-2007
compiler-design
grammar
normal
+
–
16
answers
28
GATE IT 2007 | Question: 83
The head of a hard disk serves requests following the shortest seek time first (SSTF) policy. What is the maximum cardinality of the request set, so that the head changes its direction after servicing every request if the total number of tracks are $2048$ and the head can start from any track? $9$ $10$ $11$ $12$
The head of a hard disk serves requests following the shortest seek time first (SSTF) policy. What is the maximum cardinality of the request set, so that the head changes...
22.8k
views
answered
Oct 5, 2019
Operating System
gateit-2007
operating-system
disk-scheduling
normal
+
–
5
answers
29
GATE CSE 2015 Set 2 | Question: 25
A computer system implements a $40\;\text{-bit}$ virtual address, page size of $8\;\text{kilobytes}$, and a $128\text{-entry}$ translation look-aside buffer $\text{(TLB)}$ organized into $32$ sets each having $4$ ways. Assume that the $\text{TLB}$ tag does not store any process id. The minimum length of the $\text{TLB}$ tag in bits is ______.
A computer system implements a $40\;\text{-bit}$ virtual address, page size of $8\;\text{kilobytes}$, and a $128\text{-entry}$ translation look-aside buffer $\text{(TLB)}...
21.4k
views
answered
Oct 4, 2019
Operating System
gatecse-2015-set2
operating-system
virtual-memory
easy
numerical-answers
+
–
9
answers
30
GATE CSE 2005 | Question: 72
Consider the following code fragment: if (fork() == 0) { a = a + 5; printf("%d, %p n", a, &a); } else { a = a - 5; printf ("%d, %p n", a,& a); } Let $u,v$ be the values printed by the parent process and $x,y$ be the values printed by the child ... $u + 10 = x \text{ and } v = y$ $u + 10 = x \text{ and } v != y$
Consider the following code fragment: if (fork() == 0) { a = a + 5; printf("%d, %p n", a, &a); } else { a = a - 5; printf ("%d, %p n", a,& a); }Let $u,v$ be the values pr...
37.0k
views
answered
Oct 1, 2019
Operating System
gatecse-2005
operating-system
fork-system-call
normal
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register