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
Answers by Sandeep_Uniyal
28
votes
1
GATE CSE 2011 | Question: 49
Consider the following recursive C function that takes two arguments. unsigned int foo(unsigned int n, unsigned int r) { if (n>0) return ((n%r) + foo(n/r, r)); else return 0; } What is the return value of the function $\text{foo}$ when it is called as $\text{foo(513, 2)}$? $9$ $8$ $5$ $2$
Consider the following recursive C function that takes two arguments.unsigned int foo(unsigned int n, unsigned int r) { if (n>0) return ((n%r) + foo(n/r, r)); else return...
5.5k
views
answered
Apr 28, 2016
Algorithms
gatecse-2011
algorithms
recursion
identify-function
normal
+
–
58
votes
2
GATE CSE 2011 | Question: 53
Consider a network with five nodes, $N1$ to $N5$, as shown as below. The network uses a Distance Vector Routing protocol. Once the routes have been stabilized, the distance vectors at different nodes are as follows. N1: $(0, 1, 7, 8, 4)$ ... the NEXT ROUND of update, what will be the cost to $N1$ in the distance vector of $N3$ ? $3$ $9$ $10$ $\infty$
Consider a network with five nodes, $N1$ to $N5$, as shown as below.The network uses a Distance Vector Routing protocol. Once the routes have been stabilized, the distanc...
23.7k
views
answered
Apr 28, 2016
Computer Networks
gatecse-2011
computer-networks
routing
distance-vector-routing
normal
+
–
12
votes
3
GATE IT 2007 | Question: 85
Consider the $B^{+}$ tree in the adjoining figure, where each node has at most two keys and three links. Keys $K15$ and then $K25$ are inserted into this tree in that order. Now the key $K50$ is deleted from the $B^+$ tree resulting after the two ... (i) and (ii) are true Statements (ii) and (iii) are true Statements (iii) and (i) are true All the statements are false
Consider the $B^{+}$ tree in the adjoining figure, where each node has at most two keys and three links.Keys $K15$ and then $K25$ are inserted into this tree in that orde...
18.8k
views
answered
Jan 20, 2015
Databases
gateit-2007
databases
b-tree
normal
+
–
0
votes
4
GATE IT 2007 | Question: 74
Consider a token ring topology with N stations (numbered 1 to N) running token ring protocol where the stations are equally spaced. When a station gets the token it is allowed to send one frame of fixed size. Ring latency is tp, while the transmission time of a frame is tt. ... utilization of the token ring when tt =3 ms, tp = 5 ms, N = 10 is 0.545 0.6 0.857 0.961
Consider a token ring topology with N stations (numbered 1 to N) running token ring protocol where the stations are equally spaced. When a station gets the token it is al...
3.6k
views
answered
Jan 20, 2015
Computer Networks
gateit-2007
computer-networks
token-ring
normal
out-of-syllabus-now
+
–
65
votes
5
GATE IT 2007 | Question: 66
Consider the following two transactions$: T1$ and $T2.$ ...
Consider the following two transactions$: T1$ and $T2.$$\begin{array}{clcl} T1: & \text{read (A);} & T2: & \text{read (B);} \\ & \text{read (B);} & & \text{read (A);} \\ ...
18.0k
views
answered
Jan 20, 2015
Databases
gateit-2007
databases
transaction-and-concurrency
normal
+
–
1
votes
6
GATE IT 2007 | Question: 63
A group of $15$ routers is interconnected in a centralized complete binary tree with a router at each tree node. Router $i$ communicates with router $j$ by sending a message to the root of the tree. The root then sends the message back down to router $j$ ... mean number of hops per message, assuming all possible router pairs are equally likely is $3$ $4.26$ $4.53$ $5.26$
A group of $15$ routers is interconnected in a centralized complete binary tree with a router at each tree node. Router $i$ communicates with router $j$ by sending a mess...
19.0k
views
answered
Jan 20, 2015
Computer Networks
gateit-2007
computer-networks
routing
binary-tree
normal
+
–
34
votes
7
GATE IT 2007 | Question: 56
Synchronization in the classical readers and writers problem can be achieved through use of semaphores. In the following incomplete code for readers-writers problem, two binary semaphores mutex and wrt are used to obtain synchronization wait (wrt) writing is performed signal ... mutex), wait (mutex), signal (wrt) signal (mutex), wait (mutex), signal (mutex), wait (mutex)
Synchronization in the classical readers and writers problem can be achieved through use of semaphores. In the following incomplete code for readers-writers problem, two ...
10.5k
views
answered
Jan 20, 2015
Operating System
gateit-2007
operating-system
process-synchronization
normal
+
–
19
votes
8
GATE IT 2007 | Question: 41
Following table indicates the latencies of operations between the instruction producing the result and instruction using the result. ... to execute the above code segment assuming each instruction takes one cycle to execute? $7$ $10$ $13$ $14$
Following table indicates the latencies of operations between the instruction producing the result and instruction using the result.$$\begin{array}{|l|l|c|} \hline \textb...
25.0k
views
answered
Jan 20, 2015
CO and Architecture
gateit-2007
co-and-architecture
machine-instruction
normal
+
–
49
votes
9
GATE IT 2007 | Question: 28
Consider a hash function that distributes keys uniformly. The hash table size is $20$. After hashing of how many keys will the probability that any new key hashed collides with an existing one exceed $0.5$. $5$ $6$ $7$ $10$
Consider a hash function that distributes keys uniformly. The hash table size is $20$. After hashing of how many keys will the probability that any new key hashed collide...
29.3k
views
answered
Jan 20, 2015
DS
gateit-2007
data-structures
hashing
probability
normal
+
–
–2
votes
10
GATE IT 2007 | Question: 26
Consider $n$ jobs $J_1, J_2 \dots J_n$ such that job $J_i$ has execution time $t_i$ and a non-negative integer weight $w_i$ ... the jobs? Non-decreasing order of $t_i$ Non-increasing order of $w_i$ Non-increasing order of $w_it_i$ Non-increasing order of $w_i/t_i$
Consider $n$ jobs $J_1, J_2 \dots J_n$ such that job $J_i$ has execution time $t_i$ and a non-negative integer weight $w_i$. The weighted mean completion time of the jobs...
14.6k
views
answered
Jan 20, 2015
Operating System
gateit-2007
operating-system
process-scheduling
normal
+
–
59
votes
11
GATE IT 2007 | Question: 17
Exponentiation is a heavily used operation in public key cryptography. Which of the following options is the tightest upper bound on the number of multiplications required to compute $b^n \bmod{m}, 0 \leq b, n \leq m$ ? $O(\log n)$ $O(\sqrt n)$ $O\Biggl (\frac{n}{\log n} \Biggr )$ $O(n)$
Exponentiation is a heavily used operation in public key cryptography. Which of the following options is the tightest upper bound on the number of multiplications require...
8.8k
views
answered
Jan 20, 2015
Algorithms
gateit-2007
algorithms
time-complexity
normal
+
–
–1
votes
12
GATE IT 2007 | Question: 7
Which of the following input sequences for a cross-coupled $R-S$ flip-flop realized with two $NAND$ gates may lead to an oscillation? $11, 00$ $01, 10$ $10, 01$ $00, 11$
Which of the following input sequences for a cross-coupled $R-S$ flip-flop realized with two $NAND$ gates may lead to an oscillation?$11, 00$$01, 10$$10, 01$$00, 11$
22.4k
views
answered
Jan 20, 2015
Digital Logic
gateit-2007
digital-logic
normal
flip-flop
+
–
64
votes
13
GATE IT 2006 | Question: 65
In the $\text{4B/5B}$ encoding scheme, every $4$ bits of data are encoded in a $5$-bit codeword. It is required that the codewords have at most $1$ leading and at most $1$ trailing zero. How many are such codewords possible? $14$ $16$ $18$ $20$
In the $\text{4B/5B}$ encoding scheme, every $4$ bits of data are encoded in a $5$-bit codeword. It is required that the codewords have at most $1$ leading and at most $1...
10.1k
views
answered
Jan 19, 2015
Computer Networks
gateit-2006
computer-networks
encoding
combinatory
normal
out-of-gate-syllabus
+
–
109
votes
14
GATE IT 2006 | Question: 64
Suppose that it takes $1$ unit of time to transmit a packet (of fixed size) on a communication link. The link layer uses a window flow control protocol with a window size of $N$ packets. Each packet causes an ack or a nak to be generated by the receiver, and ack/nak transmission times are ... $1- \dfrac{ N}{i}$ $\dfrac{i}{(N + i)}$ $1$ $1 - e^{\left(\frac{i}{N}\right)}$
Suppose that it takes $1$ unit of time to transmit a packet (of fixed size) on a communication link. The link layer uses a window flow control protocol with a window size...
12.9k
views
answered
Jan 19, 2015
Computer Networks
gateit-2006
computer-networks
sliding-window
normal
+
–
7
votes
15
GATE IT 2006 | Question: 56
For each of the four processes $P_1, P_2, P_3,$ and $P_4$. The total size in kilobytes $(KB)$ ... $\text{S < P < T}$ $\text{S < T < P}$ $\text{T < S < P}$
For each of the four processes $P_1, P_2, P_3,$ and $P_4$. The total size in kilobytes $(KB)$ and the number of segments are given below.$$\small \begin{array}{|c|c|c|}\h...
29.1k
views
answered
Jan 19, 2015
Operating System
gateit-2006
operating-system
memory-management
difficult
+
–
22
votes
16
GATE IT 2006 | Question: 37
For a state machine with the following state diagram the expression for the next state $S^+$ in terms of the current state $S$ and the input variables $x$ and $y$ is $S^+ = S' . y' + S . x$ $S^+ = S. x . y' + S' . y . x'$ $S^+ = x . y'$ $S^+ = S' . y + S . x'$
For a state machine with the following state diagram the expression for the next state $S^+$ in terms of the current state $S$ and the input variables $x$ and $y$ is$S^+ ...
8.4k
views
answered
Jan 19, 2015
Theory of Computation
gateit-2006
theory-of-computation
finite-automata
normal
+
–
46
votes
17
GATE IT 2006 | Question: 25
Consider the undirected graph $G$ defined as follows. The vertices of $G$ are bit strings of length $n$. We have an edge between vertex $u$ and vertex $v$ if and only if $u$ and $v$ differ in exactly one bit position (in other words, $v$ can be obtained from $u$ by ... $\left(\frac{1}{n}\right)$ $\left(\frac{2}{n}\right)$ $\left(\frac{3}{n}\right)$
Consider the undirected graph $G$ defined as follows. The vertices of $G$ are bit strings of length $n$. We have an edge between vertex $u$ and vertex $v$ if and only if ...
13.2k
views
answered
Jan 19, 2015
Graph Theory
gateit-2006
graph-theory
graph-coloring
normal
+
–
–4
votes
18
GATE IT 2006 | Question: 12
In the working-set strategy, which of the following is done by the operating system to prevent thrashing? It initiates another process if there are enough extra frames. It selects a process to suspend if the sum of the sizes of the working-sets exceeds the total number of available frames. I only II only Neither I nor II Both I and II
In the working-set strategy, which of the following is done by the operating system to prevent thrashing?It initiates another process if there are enough extra frames.It ...
10.6k
views
answered
Jan 18, 2015
Operating System
gateit-2006
operating-system
process-scheduling
normal
+
–
4
votes
19
GATE IT 2006 | Question: 11
If all the edge weights of an undirected graph are positive, then any subset of edges that connects all the vertices and has minimum total weight is a Hamiltonian cycle grid hypercube tree
If all the edge weights of an undirected graph are positive, then any subset of edges that connects all the vertices and has minimum total weight is aHamiltonian cyclegri...
8.9k
views
answered
Jan 18, 2015
Graph Theory
gateit-2006
graph-theory
graph-connectivity
normal
+
–
0
votes
20
GATE IT 2006 | Question: 3
In the automaton below, $s$ is the start state and $t$ is the only final state. Consider the strings $u = abbaba, v = bab, \text{and} w = aabb$. Which of the following statements is true? The automaton accepts $u$ and $v$ but not $w$ The automaton accepts each ... $w$ The automaton rejects each of $u, v,$ and $w$ The automaton accepts $u$ but rejects $v$ and $w$
In the automaton below, $s$ is the start state and $t$ is the only final state.Consider the strings $u = abbaba, v = bab, \text{and} w = aabb$. Which of the following sta...
4.9k
views
answered
Jan 18, 2015
Theory of Computation
gateit-2006
theory-of-computation
finite-automata
easy
+
–
–1
votes
21
GATE IT 2006 | Question: 5
Which regular expression best describes the language accepted by the non-deterministic automaton below? $(a + b)^* \ a(a + b)b$ $(abb)^*$ $(a + b)^* \ a(a + b)^* \ b(a + b)^*$ $(a + b)^*$
Which regular expression best describes the language accepted by the non-deterministic automaton below?$(a + b)^* \ a(a + b)b$$(abb)^*$$(a + b)^* \ a(a + b)^* \ b(a + b)^...
6.0k
views
answered
Jan 18, 2015
Theory of Computation
gateit-2006
theory-of-computation
regular-expression
normal
+
–
–6
votes
22
GATE IT 2006 | Question: 2
For the set $N$ of natural numbers and a binary operation $f : N \times N \to N,$ an element $z \in N$ is called an identity for $f,$ if $f (a, z) = a = f(z, a),$ for all $a \in N.$ Which of the following binary operations have an identity? $f (x, y) = x + y - 3$ $f (x, y) = \max(x, y)$ $f (x, y) = x^y$ I and II only II and III only I and III only None of these
For the set $N$ of natural numbers and a binary operation $f : N \times N \to N,$ an element $z \in N$ is called an identity for $f,$ if $f (a, z) = a = f(z, a),$ for all...
9.6k
views
answered
Jan 18, 2015
Set Theory & Algebra
gateit-2006
set-theory&algebra
easy
binary-operation
+
–
11
votes
23
GATE IT 2005 | Question: 73
On a TCP connection, current congestion window size is Congestion Window = $4$ KB. The window size advertised by the receiver is Advertise Window = $6$ KB. The last byte sent by the sender is LastByteSent = $10240$ and the last byte acknowledged by ... LastByteAcked = $8192$. The current window size at the sender is: $2048$ bytes $4096$ bytes $6144$ bytes $8192$ bytes
On a TCP connection, current congestion window size is Congestion Window = $4$ KB. The window size advertised by the receiver is Advertise Window = $6$ KB. The last byte ...
26.1k
views
answered
Jan 18, 2015
Computer Networks
gateit-2005
computer-networks
congestion-control
normal
+
–
9
votes
24
Whether given CFL is Regular is Decidable?
Which of the following are True? $S1$: Every NFA can be converted to equivalent PDA $S2$: Whether a given CFL is Regular is decidable. 1. $S1$ 2. $S2$ 3. Both 4. None
Which of the following are True?$S1$: Every NFA can be converted to equivalent PDA$S2$: Whether a given CFL is Regular is decidable.1. $S1$ ...
3.9k
views
answered
Jan 18, 2015
Theory of Computation
theory-of-computation
context-free-language
decidability
+
–
55
votes
25
GATE IT 2005 | Question: 58
Let $a$ be an array containing $n$ integers in increasing order. The following algorithm determines whether there are two distinct numbers in the array whose difference is a specified number $S > 0$. i = 0; j = 1; while (j < n ){ if (E) j++; else if (a[j] - a[i] == S) break; else i+ ... $a[j] - a[i] < S$ $a[i] - a[j] < S$ $a[i] - a[j] > S$
Let $a$ be an array containing $n$ integers in increasing order. The following algorithm determines whether there are two distinct numbers in the array whose difference i...
9.8k
views
answered
Jan 18, 2015
Programming in C
gateit-2005
programming
normal
programming-in-c
+
–
27
votes
26
GATE IT 2005 | Question: 53
The following$ C$ function takes two ASCII strings and determines whether one is an anagram of the other. An anagram of a string s is a string obtained by permuting the letters in s. int anagram (char *a, char *b) { int count [128], j; for (j = 0; j < 128; j++) count[j] = 0; j ... [j]]++ A: count [a[j++]]++ and B: count[b[j]]-- A: count [a[j]]++ and B: count[b[j++]]--
The following$ C$ function takes two ASCII strings and determines whether one is an anagram of the other. An anagram of a string s is a string obtained by permuting the l...
12.2k
views
answered
Jan 18, 2015
Algorithms
gateit-2005
normal
identify-function
+
–
107
votes
27
GATE IT 2005 | Question: 42
Two concurrent processes $P1$ and $P2$ use four shared resources $R1, R2, R3$ and $R4$ ... binary semaphores are used to enforce the above scheduling constraints, what is the minimum number of binary semaphores needed? $1$ $2$ $3$ $4$
Two concurrent processes $P1$ and $P2$ use four shared resources $R1, R2, R3$ and $R4$, as shown below.$$\begin{array}{|l|l|}\hline \textbf{P1} & \textbf{P2} \\ \text...
12.8k
views
answered
Jan 18, 2015
Operating System
gateit-2005
operating-system
process-synchronization
normal
+
–
10
votes
28
GATE IT 2005 | Question: 40
A language $L$ satisfies the Pumping Lemma for regular languages, and also the Pumping Lemma for context-free languages. Which of the following statements about $L$ is TRUE? $L$ is necessarily a regular language. $L$ is necessarily a context-free language, but not necessarily a regular language. $L$ is necessarily a non-regular language. None of the above
A language $L$ satisfies the Pumping Lemma for regular languages, and also the Pumping Lemma for context-free languages. Which of the following statements about $L$ is TR...
15.6k
views
answered
Jan 18, 2015
Theory of Computation
gateit-2005
theory-of-computation
pumping-lemma
easy
+
–
60
votes
29
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.4k
views
answered
Jan 17, 2015
Theory of Computation
gateit-2005
theory-of-computation
pushdown-automata
normal
+
–
–2
votes
30
GATE CSE 2014 Set 2 | Question: 6
The dual of a Boolean function $F(x_1,x_2,\dots,x_n,+, .,')$, written as $F^D$ is the same expression as that of $F$ with $+$ and $⋅$ swapped. $F$ is said to be self-dual if $F = F^D$. The number of self-dual functions with $n$ Boolean variables is $2^n$ $2^{n-1}$ $2^{2^{n}}$ $2^{2^{n-1}}$
The dual of a Boolean function $F(x_1,x_2,\dots,x_n,+, .,')$, written as $F^D$ is the same expression as that of $F$ with $+$ and $⋅$ swapped. $F$ is said to be self-du...
12.4k
views
answered
Jan 17, 2015
Digital Logic
gatecse-2014-set2
digital-logic
normal
dual-function
+
–
Page:
1
2
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register