• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE CS 2022

Question 1

Consider the following three relations in a relational database. Employee (eId, Name ), Brand (bId, bName), Own (eId, bId ) Which of the following relational algebra expressions return the set of eIds who own all the brands?

  • [Tex]\pi_{eid} (\frac{\pi_{eid, bid}(Own)}{\pi_{bid}(Brand)})[/Tex]

  • [Tex]\pi_{eid}(Own) - \pi_{eid}((\pi_{eid}(Own)\times \pi_{eid}(Brand))- \pi_{eid, bid}(Own))[/Tex]

  • [Tex]\pi_{eid} (\frac{\pi_{eid, bid}(Own)}{\pi_{bid}(Own)})[/Tex]

  • [Tex]\pi_{eid}\frac{((\pi_{eid}(Own)\times\pi_{bid}(Own))}{\pi_{bid}(Brand)}[/Tex]

Question 2

Which of the following statements is/are TRUE with respect to deadlocks

  • The circular wait is a necessary condition for the formation of deadlock

  • In a system where each resource has more than one instance, a cycle in its wait-for graph indicates the presence of a deadlock.

  • If the current allocation of resources to processes leads the system to an unsafe state, then deadlock will necessarily occur.

  • In the resource-allocation graph of a system, if every edge is an assignment edge, then the system is not in a deadlock state.

Question 3

Which of the following statements is/are TRUE for a group G ? 

  • If for all x, y ∈ G, (xy)2  = x2 y2 then G is commutative. 

  • If for all x ∈ G,  x2= 1, then G is commutative. Here, 1 is the identity element of G.

  • If the order of G is 2, then G is commutative

  • If G is commutative, then a subgroup of G need not be commutative

Question 4

Suppose a binary search tree with 1000 distinct elements is also a complete binary tree. The tree is stored using the array representation of binary heap trees. Assuming that the array indices start with 0, the 3rd largest element of the tree is stored at index_____________. 

  • 609

  • 509

  • 498

  • 598

Question 5

Consider the augmented grammar with { + , *, (, ), id } as the set of terminals.

S [Tex]\to[/Tex]  SS [Tex]\to[/Tex]  S + R | RR [Tex]\to[/Tex]  R* P| PP [Tex]\to[/Tex]  (S) | id

If I0 is the set of two LR(0) items {[S` ⇢ S.], [S ⇢ S. +R]}, then goto(closure(I0), +) contains exactly __________ items.

  • 3

  • 4

  • 5

  • 6

Question 6

Consider a simple undirected graph of 10 vertices. If the graph is disconnected, then the maximum number of edges it can have is ____________. 

  • 24

  • 48

  • 36

  • 64

Question 7

Consider a relation R(A, B, C, D, E,) with the following three functional dependencies. 

  • 8

  • 10

  • 6

  • 5

Question 8

The number of arrangements of six identical balls in three identical bins is______. 

  • 36

  • 21

  • 12

  • 7

Question 9

A cache memory that has a hit rate of 0.8 has an access latency 10 ns and miss penalty 100 ns. Optimization is done on the cache to reduce the miss rate. However, the optimization results in an increase of cache access latency to 15 ns, whereas the miss penalty is not affected. The minimum hit rate (rounded off to two decimal places) needed after the optimization such that it should not increase the average memory access time is _____________. 

  • 0.55

  • 0.67

  • 0.98

  • 0.85

Question 10

The value of the following limit is _____________. 

  • -0.3

  • -0.5

  • 0.4

  • 0.3

There are 65 questions to complete.

Last Updated :
Take a part in the ongoing discussion