Recent questions tagged gatecse-2003

1.2k
views
0 answers
5 votes
Consider this GATE 2003 question: https://gateoverflow.in/937/gate2003-46Here, instead of XOR gates we had OR gates, then which of the following operations can we perform?$A + B, A - B\ and\ A + 1$
1.0k
views
0 answers
4 votes
Consider the following logic program P A(x) <- B(x, y), C(y) <- B(x,x) Which of the following first order sentences is equivalent to P?Can anyone explain how it can be solved ?
24.7k
views
6 answers
84 votes
A processor uses $\text{2-level}$ page tables for virtual to physical address translation. Page tables for both levels are stored in the main memory. Virtual and physical addresses are ... \text{8 KB}$\text{12 KB}$\text{16 KB}$\text{20 KB}$
10.2k
views
3 answers
29 votes
Consider the following assembly language program for a hypothetical processor $A, B,$ and $C$ are $8$ bit registers. The meanings of various instructions are shown as comments ... rotate $A$ through carry flag by one bit$\text{ADD A,} \#1$
20.4k
views
9 answers
71 votes
In a permutation $a_1\ldots a_n$, of $n$ distinct integers, an inversion is a pair $(a_i, a_j)$ such that $i < j$ and $a_i > a_j.$What would be the worst case time ... $ inversions?$\Theta(n^2)$\Theta(n\log n)$\Theta(n^{1.5})$\Theta(n)$
13.3k
views
5 answers
44 votes
The following program fragment is written in a programming language that allows global variables and does not allow nested declarations of functions.global int i=100, j=5; void ... $25, 220$25, 15$115, 105$
15.8k
views
7 answers
55 votes
Suppose we want to synchronize two concurrent processes $P$ and $Q$ using binary semaphores $S$ and $T$. The code for the processes $P$ and $Q$ ... $X, P(S)$ at $Y, P(T)$ at $Z, S$ and $T$ initially $1$
16.7k
views
6 answers
61 votes
Consider the following circuit composed of XOR gates and non-inverting buffers.The non-inverting buffers have delays $\delta_1 = 2 ns$ and $\delta_2 = 4 ns$ as shown in the figure ... $ during the interval from $0$ to $10$ ns?$1$2$3$4$
33.3k
views
10 answers
82 votes
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)$
18.6k
views
6 answers
57 votes
Consider the function $f$ defined below.struct item { int data; struct item * next; }; int f(struct item *p) { return ((p == NULL) || (p-> ... sorted in non-increasing order of data valuenot all elements in the list have the same data value
13.0k
views
5 answers
40 votes
Consider the C program shown below:#include<stdio.h> #define print(x) printf("%d", x) int x; void Q(int z) { z+=x; print(z); } void P(int *y) { int x = *y + 2; Q(x); *y ... $22 \ 12 \ 11$14 \ 6 \ 6$7 \ 6 \ 6$
12.7k
views
7 answers
56 votes
In the following $C$ program fragment, $j$, $k$, $n$ and TwoLog_n are integer variables, and $A$ is an array of integers. The variable $n$ ... right\}$\left\{m \mid m \leq n, \text{m is prime} \right\}${ }
11.8k
views
6 answers
46 votes
Consider three data items $D1, D2,$ and $D3,$ and the following execution schedule of transactions $T1, T2,$ and $T3.$ In the diagram, $R(D)$ ... $T3; T2; T1$The schedule is not serializable
16.1k
views
3 answers
46 votes
Consider the set of relations shown below and the SQL query that follows.Students: (Roll_number, Name, Date_of_birth)Courses: (Course_number, Course_name, Instructor)Grades ... in at least one of the courses taught by KorthNone of the above
15.5k
views
3 answers
42 votes
Consider the following functional dependencies in a database. ... in third normal formin third normal form but not in BCNFin BCNFin none of the above
29.5k
views
7 answers
80 votes
Host $A$ is sending data to host $B$ over a full duplex link. $A$ and $B$ are using the sliding window protocol for flow control. The send and receive window sizes are $5$ ... $12.33 \times 10^6$ Bps$15.00 \times 10^6$ Bps
14.4k
views
6 answers
25 votes
A $2$ $km$ long broadcast LAN has $10^7$ bps bandwidth and uses CSMA/CD. The signal travels along the wire at $2 \times 10^8$ m/s. What is the minimum packet ... ?$50$ $\text{bytes}$100$ $\text{bytes}$200$ $\text{bytes}$None of the above
30.6k
views
6 answers
58 votes
The subnet mask for a particular network is $255.255.31.0.$ Which of the following pairs of $\text{IP}$ addresses could belong to this network?$172.57.88.62$ ... .203.31.87$ and $191.234.31.88$128.8.129.43$ and $128.8.161.55$
7.2k
views
3 answers
31 votes
Suppose we want to synchronize two concurrent processes $P$ and $Q$ using binary semaphores $S$ and $T$. The code for the processes $P$ and $Q$ is shown below.Process P:Process Q ... $Y, V(T)$ at $Z, S$ initially $1$ , and $T$ initially $0$
20.4k
views
4 answers
92 votes
A uni-processor computer system only has two processes, both of which alternate $10$ $\text{ms}$ CPU bursts with $90$ $\text{ms}$ I/O bursts. Both the ... for the two processesRound robin scheduling with a time quantum of $5$ $\text{ms}$
16.8k
views
4 answers
51 votes
Which of the following is NOT an advantage of using shared, dynamically linked libraries as opposed to using statistically linked libraries?Smaller sizes of ... need not be re-linked to take advantage of newer versions of libraries
5.7k
views
2 answers
2 votes
Consider the following class definitions in a hypothetical Object Oriented language that supports inheritance and uses dynamic binding. The language should not be assumed to be ... the above program fragment will be1 2 12 1 12 1 22 2 2
9.6k
views
5 answers
40 votes
The following program fragment is written in a programming language that allows global variables and does not allow nested declarations of functions.global int i=100, j=5; void P ... $25, 220$25, 15$115, 105$
14.9k
views
6 answers
60 votes
The following resolution rule is used in logic programming.Derive clause $(P \vee Q)$ from clauses $(P\vee R),(Q \vee ¬R)$Which of the following statements related to ... $P$ and $Q$ are unsatisfiable
4.0k
views
0 answers
5 votes
Consider the following logic program P$\begin{align*} A(x) &\gets B(x,y), C(y) \\ &\gets B(x,x) \end{align*}$Which of the following first order sentences is equivalent to P? ...
18.2k
views
4 answers
61 votes
Let $G= (V,E)$ be a directed graph with $n$ vertices. A path from $v_i$ to $v_j$ in $G$ is a sequence of vertices ($v_{i},v_{i+1}, \dots , v_j$ ... $j$ to $k$, every simple path from $j$ to $k$ contains at most $A[j,k]$ edges
14.8k
views
11 answers
50 votes
The following are the starting and ending times of activities $A, B, C, D, E, F, G$ and $H$ ... $4$5$6$
7.9k
views
3 answers
25 votes
What is the weight of a minimum spanning tree of the following graph?$29$31$38$41$
20.6k
views
5 answers
86 votes
Let $G =(V,E)$ be an undirected graph with a subgraph $G_1 = (V_1, E_1)$. Weights are assigned to edges of $G$ ... to all vertices of $G$G_1$ is connected$V_1$ forms a clique in $G$G_1$ is a tree
10.5k
views
7 answers
31 votes
Consider the following $2-3-4$ tree (i.e., B-tree with a minimum degree of two) in which each data item is a letter. The usual alphabetical ordering of ... tree.What is the result of inserting $G$ in the above tree?None of the above