GATE 2017 CS Set 11) The statement (¬ p) → (¬ q) is logically equivalent to which of the statements below? I. p → q
Answer: D Explanation: Given, (¬ p) → (¬ q) Now, => ¬ (¬ p) ∨ (¬ q) { we know, x → y = ¬ (x) ∨ y } Therefore, option (D) is the correct answer. 2) Consider the firstorder logic sentence F: ∀ x (∃ y R(x,y)). Assuming nonempty logical domains, which of the sentences below are implied by F? ∃y (∃x R(x,y))
Answer: B Explanation: Given, first order logic sentence > F: ∀x (∃y R(x, y)) Now, keeping the statement one by one and check that they are implied by F or not: (i) ∃y (∃x R(x, y)) (ii) ∃y (∀x R(x, y)) (iii) ∀y (∃x R(x, y)) (iv) ∼∃x (∀y ∼R(x, y)) Therefore option (B) is the correct answer. 3) Let c_{1}.......c_{n} be scalars, not all zero. Such that the following expression holds: c_{i} a_{i} = 0 where a_{i} is column vectors in R_{n}. Consider the set of linear equations.
Answer: C Explanation: ∑_{i}c_{i} a_{i} = 0 with ∃_{i} : c_{i} ≠ 0 indicates that column vectors of A [ a_{1}, a_{2}, ...., a_{n}] are linearly dependent. And Determinant of matrix A would be zero. Therefore, For the system Ax = b, Rank of coefficient matrix A = Rank of augmented matrix (A / B) = k (k< n) So, the system Ax = b has infinitely many solutions. Hence, the option (C) is the correct answer. 4) Consider the following functions from positives integers to real numbers 10, √n, n, log2n, 100/n. The CORRECT arrangement of the above functions in increasing order of asymptotic complexity is:
Answer: B Explanation: 10 is constant, so its growth rate is 0. Also, it is not affected by the value of n. √n grows faster than log but slower than linear. (Consider √n^{2} / √n = √n, where as log(n^{2})logn = 2) n: Its growth rate is linear. log_{2}n: Growth rate is logarithmic. Because in asymptotic growth, the base does not matter. 100 / n: Here growth rate decreases with n. Hence, 100/n < 10 < log2n < √n < n Therefore option (B) is the correct answer. 5) Consider the following table
Match the algorithm to design paradigms tey are based on:
Answer: C Explanation: Kruskal algorithm is used to find an edge of the most minimum weight (greediest) that connects any two trees in the forest. Hence, it is a greedy technique. QuickSort is a Divide and Conquer algorithm. In every iteration, it picks an element as pivot and partitions the given array around the selected pivot value. In this, we partition the problem into subproblems, solve them and then combine. Hence, it is Divide & Conquer. FloydWarshall uses Dynamic programming approach. It is used for solving the AllPairs Shortest Path problem using Dynamic Programming. Hence option (C) is the correct answer. 6) Let T be a binary search tree with 15 nodes. The minimum and maximum possible heights of T are:
Answer: B Explanation: Given node (n) = 15 We know that when the tree is fully skewed, then the height of the binary search tree will be maximum. So, Maximum height = n  1 And when the tree is a fully complete tree, then the height of the binary search tree will be minimum. So, Minimum height = log_{2}(n+1)  1 Therefore option (B) is the correct answer. 7) The nbit fixedpoint representation of an unsigned real number X uses f bits for the fraction part. Let i = n  f. The range of decimal values for X in this representation is
Answer: D Explanation:
Minimum no. = 0
Max no. Possible with i bits = 2^{i}  1 Max no. Possible with f bits = 1  2^{f} Now, range = 2^{i}  1 + 1  2^{f} Hence, maximum range = 0 to 2^{i}  2^{f} Therefore option(D) is the correct answer. 8) Consider the C code fragment given below. Assuming that m and n point to valid NULLterminated linked lists, invocation of join will
Answer: B Explanation: According to question, m and n are valid Lists but it is not explicitly specified that the lists are empty or not. So we have two cases: Case 1: If lists are not NULL Before join operation : After join operation : Case 2: If lists are NULL GATE 2017 CS Set 12 GATE 2017 CS Set 13 GATE 2017 CS Set 14 GATE 2017 CS Set 15 GATE 2017 CS Set 16 GATE 2017 CS Set 17 GATE 2017 CS Set 18
Next TopicGATE 2017 CS Set 12
