Recent questions tagged gate1997

1 1 vote
0 0 answers
2.2k
2.2k views
In this GATE ques- Part a) For Size balanced tree the recurrence (max height) is T(h)=T(h-1) +T(h-2) +1, solving which we getT(0)=1, T(1)=2,T(2)=1+2+1=4, T(3)=4+2+1=7Here...
21 21 votes
2 answers 2 answers
6.8k
6.8k views
Consider the following relational database schema:EMP (eno name, age)PROJ (pno name)INVOLVED (eno, pno)EMP contains information about employees. PROJ about projects and i...
1 1 vote
0 0 answers
747
747 views
Let * be define as x*y=x'+y. let z=x*y value of z*x is ...1>x'+y2>x3>04>1
4 4 votes
0 0 answers
1.1k
1.1k views
Which of the following is essential for converting an infix expression into postfix?a - An operator stackb - An operand stackc - both a and bd - A parse treeI understand ...
1 1 vote
3 answers 3 answers
1.7k
1.7k views
A computer has six tape drivers, with n processes competing for them. Each process may need two drivers. What is the maximum value of n for the system to be deadlock free...
20 20 votes
5 answers 5 answers
12.6k
12.6k views
Consider the following relational database schema:EMP (eno name, age)PROJ (pno name)INVOLVED (eno, pno)EMP contains information about employees. PROJ about projects and i...
53 53 votes
6 answers 6 answers
13.8k
13.8k views
An operating system handles requests to resources as follows.A process (which asks for some resources, uses them for some time and then exits the system) is assigned a un...
47 47 votes
4 answers 4 answers
12.4k
12.4k views
A program $P$ reads and processes $1000$ consecutive records from a sequential file $F$ stored on device $D$ without using any file system facilities. Given the following...
11 11 votes
4 answers 4 answers
3.6k
3.6k views
A concurrent system consists of $3$ processes using a shared resource $R$ in a non-preemptible and mutually exclusive manner. The processes have unique priorities in the ...
21 21 votes
1 answers 1 answer
5.7k
5.7k views
Following floating point number format is given$f$ is a fraction represented by a $6-bit$ mantissa (includes sign bit) in sign magnitude form, $e$ is a $4-bit$ exponent (...
28 28 votes
1 answers 1 answer
5.9k
5.9k views
Let $f=(\bar{w} + y)(\bar{x} +y)(w+\bar{x}+z)(\bar{w}+z)(\bar{x}+z)$Express $f$ as the minimal sum of products. Write only the answer.If the output line is stuck at $0$, ...
27 27 votes
3 answers 3 answers
14.3k
14.3k views
Following is a state table for time finite state machine.$$\begin{array}{|c|ll|}\hline \textbf{Present State} & \textbf{$\qquad\qquad\quad$Next State Output} \\ & \tex...
0 0 votes
0 0 answers
895
895 views
5 5 votes
1 1 answer
2.0k
2.0k views
The language $L,$ defined by the following grammar, allows use of real or integer data in expressions and assignment statements.<assign-stmt :: <LHS := <E <E ::...
0 0 votes
0 0 answers
659
659 views
52 52 votes
6 answers 6 answers
9.9k
9.9k views
Given that $L$ is a language accepted by a finite state machine, show that $L^P$ and $L^R$ are also accepted by some finite state machines, where$L^P = \left\{s \mid ss' ...
37 37 votes
1 answers 1 answer
19.4k
19.4k views
Construct a finite state machine with minimum number of states, accepting all strings over $(a,b)$ such that the number of $a$'s is divisible by two and the number of $b$...
73 73 votes
6 answers 6 answers
27.1k
27.1k views
A $B^+$ - tree of order $d$ is a tree in which each internal node has between $d$ and $2 d$ key values. An internal node with $M$ key values has $M + 1$ children. The roo...
40 40 votes
3 answers 3 answers
8.3k
8.3k views
Consider the following piece of 'C' code fragment that removes duplicates from an ordered list of integers.Node *remove-duplicates (Node* head, int *j) { Node *t1, *t2; ...
38 38 votes
2 answers 2 answers
8.8k
8.8k views
An array $A$ contains $n \geq 1$ positive integers in the locations $A , A , \dots A[n]$. The following program fragment prints the length of a shortest sequence of conse...
30 30 votes
3 answers 3 answers
8.9k
8.9k views
A size-balanced binary tree is a binary tree in which for every node the difference between the number of nodes in the left and right subtree is at most $1$. The distance...
19 19 votes
6 answers 6 answers
9.0k
9.0k views
Consider the following function.Function F(n, m:integer):integer; begin if (n<=0) or (m<=0) then F:=1 else F:F(n-1, m) + F(n-1, m-1); end;Use the recurrence relation $\b...
25 25 votes
4 answers 4 answers
8.7k
8.7k views
Let $R$ be a reflexive and transitive relation on a set $A$. Define a new relation $E$ on $A$ as$E=\{(a, b) \mid (a, b) \in R \text{ and } (b, a) \in R \}$Prove that $E$ ...
70 70 votes
4 answers 4 answers
13.5k
13.5k views
Let $F$ be the set of one-to-one functions from the set $\{1, 2, \dots, n\}$ to the set $\{1, 2,\dots, m\}$ where $m\geq n\geq1$.How many functions are members of $F$?How...
77 77 votes
7 answers 7 answers
18.2k
18.2k views
Consider a hash table with $n$ buckets, where external (overflow) chaining is used to resolve collisions. The hash function is such that the probability that a key value ...
33 33 votes
4 answers 4 answers
11.4k
11.4k views
Consider the grammar$S \rightarrow bSe$$S \rightarrow PQR$$P \rightarrow bPc$$P \rightarrow \varepsilon$$Q \rightarrow cQd$$Q \rightarrow \varepsilon$$R \rightarrow dRe...
5 5 votes
1 answers 1 answer
2.8k
2.8k views
Consider the following program in Pseudo-Pascal syntax.program what: var z: integer procedure recur(x): begin if x <= 40 then begin x:x+z recur(x); z:=x+10 end end(*recur...
50 50 votes
4 answers 4 answers
12.3k
12.3k views
Consider a graph whose vertices are points in the plane with integer co-ordinates $(x,y)$ such that $1 \leq x \leq n$ and $1 \leq y \leq n$, where $n \geq 2$ is an intege...
0 0 votes
0 0 answers
787
787 views
0 0 votes
0 0 answers
1.0k
1.0k views