Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Kathleen
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Questions by Kathleen
18
votes
3
answers
151
GATE CSE 1994 | Question: 27
Draw a precedence graph for the following sequential code. The statements are numbered from $S_1$ to $S_6$ $S_1$ read n $S_2$ i := 1 $S_3$ if i > n next $S_4$ a(i) := i+1 $S_5$ i := i+1 $S_6$ next : write a(i) Can this graph be converted to a concurrent program using parbegin-parend construct only?
Draw a precedence graph for the following sequential code. The statements are numbered from $S_1$ to $S_6$$S_1$read n$S_2$i := 1$S_3$if i n next$S_4$a(i) := i+1$S_5$i :=...
6.0k
views
asked
Oct 5, 2014
Operating System
gate1994
operating-system
process-synchronization
normal
descriptive
+
–
32
votes
3
answers
152
GATE CSE 1994 | Question: 26
A queue $Q$ containing $n$ items and an empty stack $S$ are given. It is required to transfer all the items from the queue to the stack, so that the item at the front of queue is on the TOP of the stack, and the order of all other ... which can be performed on the queue and stack are Delete, Insert, Push and Pop. Do not assume any implementation of the queue or stack.
A queue $Q$ containing $n$ items and an empty stack $S$ are given. It is required to transfer all the items from the queue to the stack, so that the item at the front of ...
7.3k
views
asked
Oct 5, 2014
DS
gate1994
data-structures
queue
stack
normal
descriptive
+
–
29
votes
6
answers
153
GATE CSE 1994 | Question: 25
An array $A$ contains $n$ integers in non-decreasing order, $A[1] \leq A[2] \leq \cdots \leq A[n]$. Describe, using Pascal like pseudo code, a linear time algorithm to find $i, j,$ such that $A[i]+A[j]=a$ given integer $M$, if such $i, j$ exist.
An array $A$ contains $n$ integers in non-decreasing order, $A \leq A \leq \cdots \leq A[n]$. Describe, using Pascal like pseudo code, a linear time algorithm to find $...
4.9k
views
asked
Oct 5, 2014
DS
gate1994
data-structures
array
normal
descriptive
+
–
30
votes
2
answers
154
GATE CSE 1994 | Question: 24
An independent set in a graph is a subset of vertices such that no two vertices in the subset are connected by an edge. An incomplete scheme for a greedy algorithm to find a maximum independent set in a tree is given below: V: Set of all ... I); Complete the algorithm by specifying the property of vertex $u$ in each case. What is the time complexity of the algorithm?
An independent set in a graph is a subset of vertices such that no two vertices in the subset are connected by an edge. An incomplete scheme for a greedy algorithm to fin...
5.7k
views
asked
Oct 5, 2014
Algorithms
gate1994
algorithms
graph-algorithms
normal
descriptive
+
–
5
votes
0
answers
155
GATE CSE 1994 | Question: 23
Suppose we have a computer with single register and only three instructions given below: ... $T \rightarrow (E)\mid id$ Write a syntax directed translation to generate code using this grammar for the computer described above.
Suppose we have a computer with single register and only three instructions given below:$$\begin{array}{ll} \text{LOAD addren} & \text{; load register} \\ \text{} & \te...
1.0k
views
asked
Oct 5, 2014
Compiler Design
gate1994
compiler-design
grammar
syntax-directed-translation
descriptive
unsolved
+
–
1
votes
1
answer
156
GATE CSE 1994 | Question: 22
Consider the program below: Program main: var r:integer; procedure two: begin write (r); end procedure one: var r:integer; begin r:=5; two; end begin r:=2; two; one; two; end What is printed by the above program if Static scoping is assumed for all variables; Dynamic scoping is assumed for all variables. Give reasons for your answer.
Consider the program below:Program main: var r:integer; procedure two: begin write (r); end procedure one: var r:integer; begin r:=5; two; end begin r:=2; two; one; two; ...
1.8k
views
asked
Oct 5, 2014
Programming in C
gate1994
programming
variable-binding
normal
out-of-gate-syllabus
+
–
37
votes
3
answers
157
GATE CSE 1994 | Question: 21
Consider the following recursive function: function fib (n:integer);integer; begin if (n=0) or (n=1) then fib := 1 else fib := fib(n-1) + fib(n-2) end; The above function is run on a computer with a stack of $64$ bytes. Assuming ... an address takes $2$ bytes each, estimate the maximum value of $n$ for which the stack will not overflow. Give reasons for your answer.
Consider the following recursive function:function fib (n:integer);integer; begin if (n=0) or (n=1) then fib := 1 else fib := fib(n-1) + fib(n-2) end;The above function i...
25.4k
views
asked
Oct 5, 2014
Programming in C
gate1994
programming
recursion
normal
descriptive
+
–
16
votes
3
answers
158
GATE CSE 1994 | Question: 20
A grammar $G$ is in Chomsky-Normal Form (CNF) if all its productions are of the form $A \to BC$ or $A \to a$, where $A,B$ and $C$, are non-terminals and $a$ is a terminal. Suppose $G$ is a CFG in CNF and $w$ is a string in $L(G)$ of length $n$, then how long is a derivation of $w$ in $G$?
A grammar $G$ is in Chomsky-Normal Form (CNF) if all its productions are of the form $A \to BC$ or $A \to a$, where $A,B$ and $C$, are non-terminals and $a$ is a terminal...
4.9k
views
asked
Oct 5, 2014
Compiler Design
gate1994
compiler-design
grammar
normal
descriptive
+
–
28
votes
4
answers
159
GATE CSE 1994 | Question: 19
Given a set: $S = \left\{x \mid \text{ there is an x-block of 5's in the decimal expansion of } \pi\right\}$ (Note: $x$-$block$ is a maximal block of $x$ successive $5$'s) Which of the following statements is true with ... that a language $L_1$ is regular and that the language $L_1 \cup L_2$ is regular, is the language $L_2$ always regular? Prove your answer.
Given a set:$$S = \left\{x \mid \text{ there is an x-block of 5's in the decimal expansion of } \pi\right\}$$(Note: $x$-$block$ is a maximal block of $x$ successive $5$'s...
5.4k
views
asked
Oct 5, 2014
Theory of Computation
gate1994
theory-of-computation
identify-class-language
normal
descriptive
+
–
19
votes
2
answers
160
GATE CSE 1994 | Question: 18a
State whether the following statements are True or False with reasons for your answer A subroutine cannot always be used to replace a macro in an assembly language program.
State whether the following statements are True or False with reasons for your answerA subroutine cannot always be used to replace a macro in an assembly language program...
2.9k
views
asked
Oct 5, 2014
Compiler Design
gate1994
compiler-design
normal
assembler
true-false
descriptive
+
–
12
votes
2
answers
161
GATE CSE 1994 | Question: 17a
State whether the following statements are True or False with reasons for your answer: Coroutine is just another name for a subroutine.
State whether the following statements are True or False with reasons for your answer:Coroutine is just another name for a subroutine.
2.6k
views
asked
Oct 5, 2014
Compiler Design
gate1994
compiler-design
normal
assembler
true-false
descriptive
+
–
3
votes
0
answers
162
GATE CSE 1994 | Question: 16
Every element $a$ of some ring $(R, +, o)$ satisfies the equation $a\;o\;a=a$. Decide whether or not the ring is commutative.
Every element $a$ of some ring $(R, +, o)$ satisfies the equation $a\;o\;a=a$. Decide whether or not the ring is commutative.
539
views
asked
Oct 5, 2014
Set Theory & Algebra
gate1994
set-theory&algebra
ring
normal
out-of-gate-syllabus
descriptive
+
–
18
votes
2
answers
163
GATE CSE 1994 | Question: 15
Use the patterns given to prove that $\sum\limits_{i=0}^{n-1} (2i+1) = n^2$ (You are not permitted to employ induction) Use the result obtained in (A) to prove that $\sum\limits_{i=1}^{n} i = \frac{n(n+1)}{2}$
Use the patterns given to prove that$\sum\limits_{i=0}^{n-1} (2i+1) = n^2$(You are not permitted to employ induction)Use the result obtained in (A) to prove that $\sum\li...
2.0k
views
asked
Oct 5, 2014
Combinatory
gate1994
combinatory
proof
summation
descriptive
+
–
29
votes
1
answer
164
GATE CSE 1994 | Question: 14a
Consider $B^+$ - tree of order $d$ shown in figure. (A $B^+$ - tree of order $d$ contains between $d$ and $2d$ keys in each node) Draw the resulting $B^+$ - tree after $100$ is inserted in the figure below.
Consider $B^+$ - tree of order $d$ shown in figure. (A $B^+$ - tree of order $d$ contains between $d$ and $2d$ keys in each node)Draw the resulting $B^+$ - tree after $10...
7.3k
views
asked
Oct 5, 2014
Databases
gate1994
databases
b-tree
normal
descriptive
+
–
18
votes
3
answers
165
GATE CSE 1994 | Question: 13
Consider the following relational schema: COURSES (cno, cname) STUDENTS (rollno, sname, age, year) REGISTERED_FOR (cno, rollno) The underlined attributes indicate the primary keys for the relations. The year' attribute for the STUDENTS relation indicates the year in ... for cno $322.$ Write a SQL query to print the age and year of the youngest student in each year.
Consider the following relational schema:COURSES (cno, cname)STUDENTS (rollno, sname, age, year)REGISTERED_FOR (cno, rollno)The underlined attributes indicate the primary...
6.3k
views
asked
Oct 5, 2014
Databases
gate1994
databases
relational-algebra
sql
normal
descriptive
+
–
21
votes
4
answers
166
GATE CSE 1994 | Question: 12
Assume that a CPU has only two registers $R_1$ and $R_2$ and that only the following instruction is available $XOR \: R_i, R_j;\{R_j \leftarrow R_i \oplus R_j, \text{ for } i, j =1, 2\}$ Using this XOR instruction, find an instruction sequence in ... and $R_2$ The line p of the circuit shown in figure has stuck at $1$ fault. Determine an input test to detect the fault.
Assume that a CPU has only two registers $R_1$ and $R_2$ and that only the following instruction is available $XOR \: R_i, R_j;\{R_j \leftarrow R_i \oplus R_j, \text{ for...
3.8k
views
asked
Oct 5, 2014
CO and Architecture
gate1994
co-and-architecture
machine-instruction
normal
descriptive
+
–
25
votes
2
answers
167
GATE CSE 1994 | Question: 11
Find the contents of the flip-flop $Q_2, Q_1$ and $Q_0$ in the circuit of figure, after giving four clock pulses to the clock terminal. Assume $Q_2Q_1Q_0=000$ initially.
Find the contents of the flip-flop $Q_2, Q_1$ and $Q_0$ in the circuit of figure, after giving four clock pulses to the clock terminal. Assume $Q_2Q_1Q_0=000$ initially.
5.9k
views
asked
Oct 5, 2014
Digital Logic
gate1994
digital-logic
sequential-circuit
digital-counter
circuit-output
normal
descriptive
+
–
0
votes
0
answers
168
GATE CSE 1994 | Question: 10
470
views
asked
Oct 5, 2014
CO and Architecture
gate1994
co-and-architecture
8085-microprocessor
out-of-syllabus-now
+
–
31
votes
7
answers
169
GATE CSE 1994 | Question: 9
Following $7$ ... that at most $1$ bit could be corrupted). If the message contains an error find the bit which is erroneous and gives correct message.
Following $7$ bit single error correcting hamming coded message is received.$$\overset{7\qquad 6\qquad 5 \qquad 4\qquad 3 \qquad 2 \qquad 1}{\boxed{1 \qquad 0\qquad 0 \qq...
8.6k
views
asked
Oct 5, 2014
Computer Networks
gate1994
computer-networks
error-detection
hamming-code
normal
descriptive
+
–
35
votes
3
answers
170
GATE CSE 1994 | Question: 8
A rooted tree with $12$ nodes has its nodes numbered $1$ to $12$ in pre-order. When the tree is traversed in post-order, the nodes are visited in the order $3, 5, 4, 2, 7, 8, 6, 10, 11, 12, 9, 1$. Reconstruct the original tree from this information, that is, find the parent of each node, and show the tree diagrammatically.
A rooted tree with $12$ nodes has its nodes numbered $1$ to $12$ in pre-order. When the tree is traversed in post-order, the nodes are visited in the order $3, 5, 4, 2, 7...
7.1k
views
asked
Oct 5, 2014
DS
gate1994
data-structures
binary-tree
normal
descriptive
+
–
Page:
« prev
1
...
3
4
5
6
7
8
9
10
11
12
13
...
61
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register