GATE 2018
65 questions
MCQ 41 · NAT 241-mark 30 · 2-mark 35
Questions 36–40 of 65
Consider a matrix P whose only eigenvectors are the multiples of .
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?
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?
Answer: (D)
A 2 2 matrix that has just one independent eigenvector must have a repeated eigenvalue (II). It does not have 2 independent eigenvectors, so it cannot be diagonalized (III). The repeated eigenvalue can be any number, even a non-zero one. In that case P is invertible, so statement I is not necessarily true.
Answer: Only II and III are necessarily true
Answer: Only II and III are necessarily true
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?
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?
Answer: (D)
Check each set:
- P (rationals): countable. True
- Q (functions {0, 1} N): these are pairs of natural numbers, N N countable. True
- R (functions N {0, 1}): infinite binary sequences, like subsets of N uncountable. False
- S (finite subsets of N): countable union of countable sets countable. True
Answer: P, Q and S only
- P (rationals): countable. True
- Q (functions {0, 1} N): these are pairs of natural numbers, N N countable. True
- R (functions N {0, 1}): infinite binary sequences, like subsets of N uncountable. False
- S (finite subsets of N): countable union of countable sets countable. True
Answer: P, Q and S only
Consider the first-order logic sentence
where is a quantifier-free first-order logic formula using only predicate symbols, and possibly equality, but no function symbols. Suppose has a model with a universe containing 7 elements. Which one of the following statements is necessarily true?
where is a quantifier-free first-order logic formula using only predicate symbols, and possibly equality, but no function symbols. Suppose has a model with a universe containing 7 elements. Which one of the following statements is necessarily true?
Answer: (A)
The sentence is with quantifier-free.
Take the given model with 7 elements. Let be the elements that make the three true (for ). Keep only these elements, so the new universe has at most 3 elements (fewer if some are the same). There are no function symbols, so nothing can map out of this smaller set, and keeping only some elements gives a proper structure. is true for all choices of in the big universe, so it is true for all choices from the small one as well, with still . So the small structure is a model of size at most 3.
(B) is the opposite of this, so it is false. (C) and (D) need not hold: for every universe, of any size, is a model.
Answer: (A)
Take the given model with 7 elements. Let be the elements that make the three true (for ). Keep only these elements, so the new universe has at most 3 elements (fewer if some are the same). There are no function symbols, so nothing can map out of this smaller set, and keeping only some elements gives a proper structure. is true for all choices of in the big universe, so it is true for all choices from the small one as well, with still . So the small structure is a model of size at most 3.
(B) is the opposite of this, so it is false. (C) and (D) need not hold: for every universe, of any size, is a model.
Answer: (A)
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 isAnswer: (A)
Going through each call:
- fun1 gets only copies of the pointers and swaps those copies. So str1 and str2 in main stay the same prints "Hi Bye".
- fun2 gets the addresses of str1 and str2. It swaps the pointers themselves prints "Bye Hi".
Answer: Hi Bye Bye Hi
- fun1 gets only copies of the pointers and swaps those copies. So str1 and str2 in main stay the same prints "Hi Bye".
- fun2 gets the addresses of str1 and str2. It swaps the pointers themselves prints "Bye Hi".
Answer: Hi Bye Bye Hi
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?
(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?
Answer: (A)
Check each statement in turn:
- (I): In a DFS tree of an undirected graph, every non-tree edge joins a vertex to one of its ancestors (a back edge). So cross edges cannot occur. True
- (II): In BFS, an edge can join two vertices at the same depth (for example, in a triangle). So |i j| can be 0. False
Answer: I only
- (I): In a DFS tree of an undirected graph, every non-tree edge joins a vertex to one of its ancestors (a back edge). So cross edges cannot occur. True
- (II): In BFS, an edge can join two vertices at the same depth (for example, in a triangle). So |i j| can be 0. False
Answer: I only