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

GATE 2018

65 questions

MCQ 41 · NAT 241-mark 30 · 2-mark 35

Questions 36–40 of 65

Q36Eigenvalues and Eigenvectors2 marksMCQ−0.67 if wrong
Consider a matrix P whose only eigenvectors are the multiples of [14]\begin{bmatrix} 1\\ 4 \end{bmatrix}.
Consider the following statements.
(I) P does not have an inverse
(II) P has a repeated eigenvalue
(III) P cannot be diagonalized
Which one of the following options is correct?

Q37Set Theory2 marksMCQ−0.67 if wrong
Let N be the set of natural numbers. Consider the following sets.
P: Set of Rational numbers (positive and negative)
Q: Set of functions from {0, 1} to N
R: Set of functions from N to {0, 1}
S: Set of finite subsets of N.
Which of the sets above are countable?

Q38Propositional Logic2 marksMCQ−0.67 if wrong
Consider the first-order logic sentence
φ≡∃s∃t∃u∀v∀w∀x∀yφ(s,t,u,v,w,x,y)\varphi \equiv \exists s\exists t\exists u\forall v\forall w\forall x\forall y\varphi (s,t,u,v,w,x,y)
where φ(s,t,u,v,w,x,y)\varphi (s,t,u,v,w,x,y) is a quantifier-free first-order logic formula using only predicate symbols, and possibly equality, but no function symbols. Suppose φ\varphi has a model with a universe containing 7 elements. Which one of the following statements is necessarily true?

Q39Array and Pointer2 marksMCQ−0.67 if wrong
Consider the following C program:

#include <stdio.h>
void fun1(char *s1, char *s2){
char *tmp;
tmp = s1;
s1 = s2;
s2 = tmp;
}
void fun2(char **s1, char **s2){
char *tmp;
tmp = *s1;
*s1 = *s2;
*s2 = tmp;
}
int main(){
char *str1 = "Hi", *str2 = "Bye";
fun1(str1, str2); 
printf("%s %s ", str1, str2); 
fun2(&str1, &str2); 
printf("%s %s", str1, str2);
return 0;
}
The output of the program above is

Q40Graph Theory2 marksMCQ−0.67 if wrong
Let G be a simple undirected graph. Let TD be a depth first search tree of G. Let TB be a breadth first search tree of G. Consider the following statements.

(I) No edge of G is a cross edge with respect to TD. (A cross edge in G is between two nodes neither of which is an ancestor of the other in TD.)
(II) For every edge (u,v) of G, if u is at depth i and v is at depth j in TB, then |i-j|=1.

Which of the statements above must necessarily be true?