Skip to content

Tag Archives: GATE-GATE CS 1997

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… Read More
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, m-1); end; Use… Read More
Let R be a reflexive and transitive relation on a set A. Define a new relation E on A as E= {(a,b) ∣ (a,b)∈R and… Read More
Let F be the set of one-to-one functions from the set {1,2,…,n} to the set {1,2,…,m}, where m ≥n ≥ 1. a. How many functions are… Read More
A hash function h defined h(key)=key mod 7, with linear probing, is used to insert the keys 44, 45, 79, 55, 91, 18, 63 into… Read More
Consider the grammar S→ bSe S→ PQR P→ bPc P→ ε Q→ cQd Q→ ε R→ dRe R→ ε where S,P,Q,R are non-terminal symbols with… Read More
[5-Marks question] 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);… Read More
[5-Marks question] Consider a graph whose vertices are points in the plane with integer co-ordinates (x,y) such that 1≤x≤n and 1≤y≤n, where n≥2 is an… Read More
[5-Marks question] Let L = {a1,  a2, ………., an} n ≥ 0 be a list whose Pascal representation is type list = record next:↑ list;… Read More
A D flip-flop is to be connected to an 8085 microprocessor chip as a 1-bit output port with a port address of FF hex. Data… Read More
Let R(a,b,c) and S(d,e,f) be two relations in which d is the foreign key of S that refers to the primary key of R. Consider… Read More
Each Process Pi, i= 1…….9 is coded as follows repeat P(mutex) {Critical section} V(mutex) forever The code for P10 is identical except it uses V(mutex)… Read More
An operating system contains 3 user processes each requiring 2 units of resource R. The minimum number of units of R such that no deadlocks… Read More
Which of the following languages over {a,b,c} is accepted by a deterministic pushdown automata? a. {wcwR ∣ w∈ {a,b}* } b. {wwR ∣ w∈ {a,b,c}*… Read More
Which one of the following is not decidable? (A) Given a Turing machine M, a string s and an integer k, M accepts s within… Read More