GATE CSE
List - I
(M) Tn = Tn - 1 + n(N) Tn = Tn/2 + n
(O) Tn = Tn/2 + nlog n
(P) Tn = Tn - 1 + log n
List - II
(U) Tn= O(n)(V) Tn = O(nlogn)
(W) Tn = O(n2)
(X) Tn = O(log2n)

Find the number of clock cycles needed to perform the $$5$$ instructions
EMP (Employee-no, Dept-no, Employee-name, Salary)
DEPT (Dept-no, Dept-name, Location)
Write an SQL query to:
(a) Find all employee names who work in departments located at "Calcutta" and whose salary is greater than Rs.50,000.
(b) Calculate, for each department number, the number of employees with a salary greater than Rs.1,00,000.
The relational algebra expression equivalent to the following tuple calculus expression:
$$\left\{ {t|t \in r \wedge \left( {t\left[ A \right] = 10 \wedge t\left[ B \right] = 20} \right)} \right\}$$ is:(b) Let $$A$$ be a tautology and $$B$$ be any other formula. Prove that $$\left( {A \vee B} \right)$$ is a tautology.
(a) Mr. X claims the following:
If a relation R is both symmetric and transitive, then R is reflexive. For this, Mr. X offers the following proof.
"From xRy, using symmetry we get yRx. Now because R is transitive, xRy and yRx togethrer imply xRx. Therefore, R is reflextive."
Briefly point out the flaw in Mr. X' proof.
(b) Give an example of a relation R which is symmetric and transitive but not reflexive.
(a) Which of the following sets of edges is a cut?
$$\,\,\,\,$$(i)$$\,\,\,\,\left\{ {\left( {A,\,B} \right),\left( {E,\,F} \right),\left( {B,\,D} \right),\left( {A,\,E} \right),\left( {A,\,D} \right)} \right\}$$
$$\,\,\,\,$$(ii)$$\,\,\,\,\left\{ {\left( {B,\,D} \right),\left( {C,\,F} \right),\left( {A,\,B} \right)} \right\}$$
(b) What is the cardinality of a min-cut in this graph?
(c) Prove that if a connected undirected graph $$G$$ with $$n$$ vertices has a min-cut of cardinality $$k$$, then $$G$$ has at least $$(nk/2)$$ edges.
(a)$$\,\,\,\,\,$$ What is the minimum page size in bytes so that the page table for a segment requires at most one page to store it? Assume that the page size can only be a power of $$2.$$
(b)$$\,\,\,\,\,$$ Now suppose that the pages size is $$512$$ bytes. It is proposed to provide a $$TLB$$ (Translation look-aside buffer) for speeding up address translation. The proposed $$TLB$$ will be capable of storing page table entries for $$16$$ recently referenced virtual pages, in a fast cache that will use the direct mapping scheme. What is the number of tag bits that will need to be associated with each cache entry
(c)$$\,\,\,\,\,$$ Assume that each page table entry contains (besides other information) $$1$$ valid bit, $$3$$ bits for page protection and $$1$$ dirty bit. How many bits are available in page table entry for storing the aging information for the page? Assume that the page size is $$512$$ bytes.
$$\,\,\,\,\,\,\,\,\,\,$$$$\,\,\,\,\,\,\,\,\,\,$$$$\,\,\,\,\,\,\,\,\,\,$$List-$${\rm I}$$
(a) Thread $$\,\,\,\,\,\,\,\,\,\,$$$$\,\,\,\,\,\,\,\,\,\,$$(b) Virtual Address space
(c) File System $$\,\,\,\,\,\,\,\,\,\,$$(d) Signal
$$\,\,\,\,\,\,\,\,\,\,$$$$\,\,\,\,\,\,\,\,\,\,$$$$\,\,\,\,\,\,\,\,\,\,$$List-$${\rm II}$$
(1) Interrupt $$\,\,\,\,\,\,\,$$$$\,\,\,\,\,\,\,\,\,\,$$(2) Memory
(3) $$CPU$$ $$\,\,\,\,\,\,\,\,\,\,\,\,\,$$$$\,\,\,\,\,\,\,\,\,\,$$(4) Disk
int Trial (int a, int b, int c)
{
if ((a > = b) && (c < b)) return b;
else if (a > = b) return Trial (a,c,b);
else return Trial (b,a,c);
}
The function Trial:(i) assignment
(ii) for loops where the loop parameter cannot be changed within the loop
(iii) if-then-else
(iv) forward go to
(v) arbitrary go to
(vi) non-recursive procedure call
(vii) recursive procedure/function call
(viii) repeat loop,
which constructs will you not include in a programming language such that it should be possible to program the terminates (i.e., halting) function in the same programming language.
var x: real;
procedure show;
begin print(x); end;
procedure small;
var x: real;
begin x: = 0.125; show; end;
begin x:=0.25;
show; small
end;
Then the output of the program is: