GATE 2003 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2003

107 questions

MCQ 1071-mark 107

Questions 21–25 of 107

Q21Probability Theory1 markMCQ−0.33 if wrong
Let P(E) denote the probability of the event E. Given P(A) = 1, P(B) = 1/2, the values of P(A|B) and P(B|A) respectively are

Q22Discrete Mathematics1 markMCQ−0.33 if wrong
The following resolution rule is used in logic programming:
Derive clause(P ∨\vee Q) from clauses (P ∨\vee R),(Q ∨¬\vee \neg R)
Which of the following statements related to this rule is FALSE?

Q23Discrete Mathematics1 markMCQ−0.33 if wrong
Consider the following logic program P
A(x)←B(x,y),C(y)A(x)\leftarrow B(x,y),C(y)
←B(x,x)\leftarrow B(x,x)
Which of the following first order sentences is equivalent to P?
(A) (x) [(y) [B(x,y) C(y)] A(x)] ¬(x)[B(x,x)] (B) (x) [(y) [B(x,y) C(y)] A(x)] ¬(x)[B(x,x)] (C) (x) [(y) [B(x,y) C(y)] A(x)] ¬(x)[B(x,x)] (D) (x) [(y) [B(x,y) C(y)] A(x)] (x)[B(x,x)]

Q24Discrete Mathematics1 markMCQ−0.33 if wrong
Let G = (V,E) be a directed graph with n vertices. A path from viv_{i} to vjv_{j} in G is a sequence of vertices (viv_{i},vi+1v_{i+1},....., vjv_{j}) such that (vkv_{k},vk+1v_{k+1})∈\inE for all k in i through j - 1. A simple path is a path in which no vertex appears more than once.
Let A be an n x n array initialized as follows.
A[j,k]={1if(j,k)∈E0otherwiseA[j,k]=\left\{\begin{matrix} 1 & if (j,k) \in E \\ 0& otherwise \end{matrix}\right.
Consider the following algorithm
 for i = 1 to n
   for j = 1 to n
      for k = 1 to n
         A [j , k] = max (A[j, k], A[j, i] + A [i, k]);
Which of the following statements is necessarily true for all j and k after termination of the above algorithm?

Q25Discrete Mathematics1 markMCQ−0.33 if wrong
In a permutation a1.....ana_1.....a_n of n distinct integers, an inversion is a pair (ai,aj)(a_i, a_j) such that i<ji \lt j and ai>aja_i \gt a_j.

If all permutation are equally likely, what is the expected number of inversions in a randomly chosen permutation of 1.....n?