Recent questions tagged gatecse-2003

6 6 votes
0 0 answers
2.2k
2.2k views
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...
4 4 votes
0 0 answers
1.3k
1.3k views
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 s...
129 129 votes
10 answers 10 answers
39.8k
39.8k views
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...
43 43 votes
4 4 answers
16.0k
16.0k views
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 com...
94 94 votes
11 answers 11 answers
31.5k
31.5k views
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 complex...
54 54 votes
5 answers 5 answers
22.1k
22.1k views
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...
78 78 votes
8 answers 8 answers
24.8k
24.8k views
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.$$\begin{ar...
78 78 votes
6 answers 6 answers
26.5k
26.5k views
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 t...
144 144 votes
11 answers 11 answers
52.2k
52.2k views
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)$$\...
80 80 votes
10 answers 10 answers
31.9k
31.9k views
Consider the function $f$ defined below.struct item { int data; struct item * next; }; int f(struct item *p) { return ((p == NULL) || (p->next == NULL)|| ((p->data <= p -...
64 64 votes
6 answers 6 answers
20.2k
20.2k views
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 = ...
70 70 votes
9 answers 9 answers
20.2k
20.2k views
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$ is initialized to an integer $\...
67 67 votes
11 answers 11 answers
21.1k
21.1k views
Consider three data items $D1, D2,$ and $D3,$ and the following execution schedule of transactions $T1, T2,$ and $T3.$ In the diagram, $R(D)$ and $W(D)$ denote the action...
65 65 votes
7 answers 7 answers
24.6k
24.6k views
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)Grad...
65 65 votes
9 answers 9 answers
23.7k
23.7k views
Consider the following functional dependencies in a database.$$\begin{array}{|l|l|}\hline \text{Date_of_Birth } \to \text{Age} & \text{Age } \to \text{Eligibility} \\\hli...
110 110 votes
11 answers 11 answers
49.3k
49.3k views
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...
39 39 votes
7 answers 7 answers
23.2k
23.2k views
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 size that ca...
102 102 votes
11 answers 11 answers
48.8k
48.8k views
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$ and $172.56....
49 49 votes
3 answers 3 answers
12.2k
12.2k views
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:P...
137 137 votes
9 answers 9 answers
36.9k
36.9k views
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 processes were crea...
58 58 votes
5 answers 5 answers
22.9k
22.9k views
Which of the following is NOT an advantage of using shared, dynamically linked libraries as opposed to using statistically linked libraries?Smaller sizes of executable fi...
2 2 votes
2 2 answers
7.7k
7.7k views
Consider the following class definitions in a hypothetical Object Oriented language that supports inheritance and uses dynamic binding. The language should not be assumed...
49 49 votes
5 answers 5 answers
17.0k
17.0k views
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...
85 85 votes
6 answers 6 answers
26.5k
26.5k views
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 thi...
5 5 votes
0 0 answers
5.8k
5.8k views
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...
75 75 votes
5 answers 5 answers
28.8k
28.8k views
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$) such that $(v_k, v_{k+1})...
72 72 votes
13 answers 13 answers
25.0k
25.0k views
The following are the starting and ending times of activities $A, B, C, D, E, F, G$ and $H$ respectively in chronological order: $“a_s \: b_s \: c_s \: a_e \: d_s \: c_e ...
41 41 votes
3 answers 3 answers
12.5k
12.5k views
What is the weight of a minimum spanning tree of the following graph?$29$$31$$38$$41$
112 112 votes
5 answers 5 answers
31.9k
31.9k views
Let $G =(V,E)$ be an undirected graph with a subgraph $G_1 = (V_1, E_1)$. Weights are assigned to edges of $G$ as follows.$$w(e) = \begin{cases} 0 \text{, if } e \in E_...
45 45 votes
8 answers 8 answers
19.2k
19.2k views
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 letters is used in...