PREVIOUS YEAR SOLVED PAPERS - GATE 2018

41. Consider the following four relational schemas. For each schema, all non-trivial functional dependencies are listed. The underlined attributes are the respective primary keys.
Schema I : Registration (rollno, courses)
Field ‘courses’ is a set-valued attribute containing the set of courses a student has registered for.
rollno → courses
Schema II : Registration (rollno, courseid,
email)
Non-trivial functional dependencies:
rollno, courseid → email
email → rollno
Schema III : Registration (rollno, courseid,
marks, grade)
Non-trivial functional dependencies:
rollno, courseid → marks,
grade
marks → grade
Schema IV : Registration (rollno, courseid,
credit)
Non-trivial functional dependencies:
rollno, courseid → credit
courseid → credit
Which one of the relational schemas above is in 3NF but not in BCNF?

  • Option : B
  • Explanation :
    In Schema II : Registration (rollno, courseid,
    email)
    Non-trivial functional dependencies:
    { rollno, courseid → email
    email → rollno }
    candidate keys
    {rollno, courseid,}
    email courseid}
    Given relation is in 3NF but not in BCNF.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


42. Consider the following C program:

 int counter = 0;
 int calc(int a, int b) {
  int c;
  counter++;
  if (b == 3)
    return (a * a * a);
 &emp;else {
  c = calc(a, b / 3);
  return (c * c * c);
  }
 }
 int main() {
  calc(4, 81);
  printf("%d", counter);
 }
 The output of this program is ________ .

Note – Numerical Type question.

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


43. Consider a matrix A = UVT

The largest eigenvalue of A is ________.

Note – Numerical Type question

  • Option : D
  • Explanation :
    Gate2018 cs
    A = UVT
    Gate2018 cs
    (1 - λ)(2 - λ) - 2 = 0
    λ2 - 3λ = 0
    λ(λ - 3) = 0
    λ = 0
    or, λ = 3
    The largest eigen value is 3.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


44. Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of K instances. Resource instances can be requested and released only one at a time. The largest value of K that will always avoid deadlock is ___________.

Note – Numerical Type question

  • Option : A
  • Explanation :
    Given,
    Number of processes (P) = 3
    Number of resources (R) = 4

    Since deadlock-free condition is:

    R ≥ P(N − 1) + 1
    Where R is total number of resources,
    P is the number of processes, and
    N is the max need for each resource.

    4 ≥ 3(N − 1) + 1
    3 ≥ 3(N − 1)
    1 ≥ (N − 1)
    N ≤ 2
    Therefore, the largest value of K that will always avoid deadlock is 2.
    Option (A) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


45. Let G be a finite group on 84 elements. The size of a largest possible proper subgroup of G is _________.

Note – Numerical Type question

  • Option : B
  • Explanation :
    Given |G| = 84
    Solutions:
    By Lagrang’s theorem any subgroup size is a divisior of 84.
    But a proper subgroup cannot have same size as group.
    So largest divisor of 84, other than 84 is 42.
    So, largest proper subgroup can have in size of 42.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


Related Quiz.
GATE 2018