GATE QUESTION BANK for
Computer Science & Information Technology By
GATE QUESTION BANK
Contents
Contents #1.
#2.
#3.
Subject Name Mathematics
Topic Name
Page No. 1-112
1 2 3 4
Linear Algebra Probability & Distribution Numerical Methods Calculus
1 – 28 29 – 57 58 – 73 74 – 112
Data Structure and Algorithm
113 – 177
5 6 7 8 9 10 11 12
113 – 136 137 – 140 141 – 148 149 – 150 151 – 156 157 – 160 161 – 174 175 – 177
#5.
178 – 210 Introduction to Operating System Process Management Threads CPU Scheduling Deadlocks Memory Management & Virtual Memory File System I/O System
178 179 – 186 187 188 – 193 194 – 199 200 – 206 207 – 208 209 – 210
Theory of Computation
211 – 235
21 22 23 24
211 – 216 217 – 223 224 – 229 230 – 235
Finite Automata Regular Expression Context Free grammar Turing Machines
Computer Organization & Architecture 25 26 27 28 29
#6.
)
Operating System 13 14 15 16 17 18 19 20
#4.
Data Structure and Algorithm Analysis Stacks and Queues Trees Height Balanced Trees (AVL Trees, B and Priority Queues (Heaps) Sorting Algorithms Graph Algorithms Hashing
236 – 263
Introduction to Computer Organization Memory Hierarchy Pipeline Instruction Types I/O Data Transfer
236 237 – 246 247 – 252 253 – 258 259 – 263
Digital Logic 30 31
264 – 289 Number Systems & Code Conversions Boolean Algebra & Karnaugh Maps th
th
264 – 268 269 – 275 th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com
Page I
GATE QUESTION BANK
32 33 34
#7.
#8.
Logic Gates Logic Gate Families Combinational and Sequential Digital Circuits
276 – 279 280 281 – 289
Discrete Mathematics & Graph Theory
290 – 322
35 36 37 38
290 – 297 298 - 300 301 – 313 314 – 322
Mathematical Logic Combinatorics Sets and Relations Graph Theory
Database Management System 39 40 41 42 43 44
#9.
Contents
323 – 361
ER Diagrams Functional Dependencies & Normalization Relational Algebra & Relational Calculus SQL Transactions and Concurrency Control File Structures (Sequential files, Indexing, B and trees)
323 – 324 325 – 330 331 – 337 338 – 351 352 – 357 358 – 361
Computer Networks
362 – 396
45 46
362 – 363 364 - 367
47 48 49 50 51
Introduction to Computer Networks Medium Access Sublayer (LAN Technologies: Ethernet, Token Ring) The Data Link Layer (Flow and Error Control Techniques) Routing & Congestion Control TCP/IP, UDP and Sockets, IP(V4) Application Layer Network Security
368 – 373 374 – 379 380 – 390 391 – 393 394 – 396
#10. Compiler Design 52 53 54 55
397 – 409 Introduction to Compilers Syntax Analysis Syntax Directed Translation Intermediate Code Generation
397 398 – 403 404 – 405 406 – 409
#11. Software Engineering and Web Technology
410 – 412
56
Introduction to Software and Software Engineering
410 – 411
57
Process Modeling
412 – 413
58 59 60 61
Project Management Validation and Verification HTML Structure XML and DTDs
414 – 415 416 – 418 419 – 420 421 – 422
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page II
GATE QUESTION BANK
Mathematics
Linear Algebra ME – 2005 1. Which one of the following is an Eigenvector of the matrix[
(A) [
]
(B) [ ]
2.
5.
]?
(C) [
]
(D) [
]
A is a 3 4 real matrix and Ax=B is an inconsistent system of equations. The highest possible rank of A is (A) 1 (C) 3 (B) 2 (D) 4
ME – 2006 3. Multiplication of matrices E and F is G. Matrices E and G are os sin E [ sin ] and os G
4.
[
sin os
sin (B) [ os
os sin
]
os (C) [ sin
sin os
]
sin (D) [ os
os sin
7.
Eigenvectors of 0
1 is
(A) 0 (B) 1
(C) 2 (D) Infinite
If a square matrix A is real and symmetric, then the Eigenvalues (A) are always real (B) are always real and positive (C) are always real and non-negative (D) occur in complex conjugate pairs
]
ME – 2008 8.
The Eigenvectors of the matrix 0
1 are
written in the form 0 1 and 0 1. What is a + b? (A) 0 (B) 1/2
]
Eigen values of a matrix 0
ME – 2007 6. The number of linearly independent
]. What is the matrix F?
os (A) [ sin
S
Match the items in columns I and II. Column I Column II P. Singular 1. Determinant is not matrix defined Q. Non-square 2. Determinant is matrix always one R. Real 3. Determinant is symmetric zero matrix S. Orthogonal 4. Eigen values are matrix always real 5. Eigen values are not defined (A) P - 3 Q - 1 R - 4 S - 2 (B) P - 2 Q - 3 R - 4 S - 1 (C) P - 3 Q - 2 R - 5 S - 4 (D) P - 3 Q - 4 R - 2 S - 1
9.
(C) 1 (D) 2
The matrix [
] has one Eigenvalue p equal to 3. The sum of the other two Eigenvalues is (A) p (C) p – 2 (B) p – 1 (D) p – 3
1are 5 and 1. What are the
Eigenvalues of the matrix = SS? (A) 1 and 25 (C) 5 and 1 (B) 6 and 4 (D) 2 and 10 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 1
GATE QUESTION BANK
10.
For what value of a, if any, will the following system of equations in x, y and z have a solution x y x y z x y z (A) Any real number (B) 0 (C) 1 (D) There is no such value
11.
ME – 2012 15.
For a matrix,M-
*
x
√
(B) (√ )
1 is
(A) 2 (B) 2 3
3
(C) 2 3 (D) 2
3
ME – 2011 13. Consider the following system equations: x x x x x x x The system has (A) A unique solution (B) No solution (C) Infinite number of solutions (D) Five solutions 14.
of
Eigen values of a real symmetric matrix are always (A) Positive (C) Negative (B) Real (D) Complex
(D) ( ) √
√
of the matrix is equal to the inverse of the ,M- . The value of x is matrix ,Mgiven by ) (A) ( (C) ⁄ ( ⁄ ) (B) (D) ⁄
0
1 , one of the
(C) (√ )
(A) (√ )
+, the transpose
ME – 2010 12. One of the Eigenvectors of the matrix
For the matrix A=0
normalized Eigenvectors is given as
16.
ME – 2009
Mathematics
x + 2y + z =4 2x + y + 2z =5 x–y+z=1 The system of algebraic equations given above has (A) a unique algebraic equation of x = 1, y = 1 and z = 1 (B) only the two solutions of ( x = 1, y = 1, z = 1) and ( x = 2, y = 1, z = 0) (C) infinite number of solutions. (D) No feasible solution.
ME – 2013 17. The Eigenvalues of a symmetric matrix are all (A) Complex with non –zero positive imaginary part. (B) Complex with non – zero negative imaginary part. (C) Real (D) Pure imaginary. 18.
Choose correct set of functions, which are linearly dependent. (A) sin x sin x n os x (B) os x sin x n t n x (C) os x sin x n os x (D) os x sin x n os x
ME – 2014 19. Given that the determinant of the matrix [
] is
12 , the determinant of
the matrix [ (A) th
] is (B)
th
(C) th
(D)
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 2
GATE QUESTION BANK
20.
One of the Eigenvectors of the matrix 0
21.
22.
2.
Consider a non-homogeneous system of linear equations representing mathematically an over-determined system. Such a system will be (A) consistent having a unique solution (B) consistent having many solutions (C) inconsistent having a unique solution (D) inconsistent having no solution
3.
Consider the matrices , - . The order of , (
1 is
(A) {– }
(C) 2
(B) {– }
(D) 2 3
3
Consider a 3×3 real symmetric matrix S such that two of its Eigenvalues are with respective Eigenvectors x y [x ] [y ] If then x y + x y +x y x y equals (A) a (C) ab (B) b (D) 0 Which one of the following equations is a correct identity for arbitrary 3×3 real matrices P, Q and R? (A) ( ) ) (B) ( ( ) (C) et et et ) (D) (
CE – 2005 1. Consider the system of equations ( ) is s l r Let ( ) ( ) where ( ) e n Eigen -pair of an Eigenvalue and its corresponding Eigenvector for real matrix A. Let I be a (n × n) unit matrix. Which one of the following statement is NOT correct? (A) For a homogeneous n × n system of linear equations,(A ) X = 0 having a nontrivial solution the rank of (A ) is less than n. (B) For matrix , m being a positive integer, ( ) will be the Eigen pair for all i. (C) If = then | | = 1 for all i. (D) If = A then is real for all i.
Mathematics
,
-
,
-
and
- will be ) (C) (4 × 3) (D) (3 × 4
(A) (2 × 2) (B) (3 × 3
CE – 2006 4. Solution for the system defined by the set of equations 4y + 3z = 8; 2x – z = 2 and 3x + 2y = 5 is (A) x = 0; y =1; z = ⁄ (B) x = 0; y = ⁄ ; z = 2 (C) x = 1; y = ⁄ ; z = 2 (D) non – existent
5.
For the given matrix A = [
],
one of the Eigen values is 3. The other two Eigen values are (A) (C) (B) (D) CE – 2007 6. The minimum and the maximum Eigenvalue of the matrix [
]are 2
and 6, respectively. What is the other Eigenvalue? (A) (C) (B) (D) 7.
For what values of and the following simultaneous equations have an infinite of solutions? X + Y + Z = 5; X + 3Y + 3Z = 9; X+2Y+ Z (A) 2, 7 (C) 8, 3 (B) 3, 8 (D) 7, 2 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 3
GATE QUESTION BANK
8.
The inverse of the (A)
0
(B)
0
1 1
m trix 0
(A) (B)
1
is
(D)
0
1
( )
0
( )
0
( )
0
( )
0
11.
is
15. (C) (D)
i
i
i
i i
i
i
i i
i
i
i i
i i
1
1
1
1
i
i
i i
i
1
CE – 2012
1 are and 8 and 5
The inverse of the matrix 0
0
The Eigenvalue of the matrix [P] = 0
14.
(C)
CE – 2008 9. The product of matrices ( ) (A) (C) (B) (D) PQ 10.
1 is
Mathematics
n n
The following simultaneous equation x+y+z=3 x + 2y + 3z = 4 x + 4y + kz = 6 will NOT have a unique solution for k equal to (A) 0 (C) 6 (B) 5 (D) 7
CE – 2009 12. A square matrix B is skew-symmetric if (C) (A) (D) (B) CE – 2011 13. [A] is square matrix which is neither symmetric nor skew-symmetric and , is its transpose. The sum and difference of these matrices are defined as [S] = [A] + , - and [D] = [A] , - , respectively. Which of the following statements is TRUE? (A) Both [S] and [D] are symmetric (B) Both [S] and [D] are skew-symmetric (C) [S] is skew-symmetric and [D] is symmetric (D) [S] is symmetric and [D] is skew symmetric
The Eigenvalues of matrix 0 (A) (B) (C) (D)
1 are
2.42 and 6.86 3.48 and 13.53 4.70 and 6.86 6.86 and 9.50
CE – 2013 16. There is no value of x that can simultaneously satisfy both the given equations. Therefore, find the ‘le st squares error’ solution to the two equations, i.e., find the value of x that minimizes the sum of squares of the errors in the two equations. 2x = 3 and 4x = 1 17.
What is the minimum number of multiplications involved in computing the matrix product PQR? Matrix P has 4 rows and 2 columns, matrix Q has 2 rows and 4 columns, and matrix R has 4 rows and 1 column. __________
CE – 2014 18.
Given the matrices J = [ K
19.
[
] n
], the product K JK is
The sum of Eigenvalues of the matrix, [M] is, where [M] = [
]
(A) 915 (B) 1355 th
th
(C) 1640 (D) 2180 th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 4
GATE QUESTION BANK
4. 20.
The determinant of matrix [
Let A be a 4x4 matrix with Eigenvalues –5, –2, 1, 4. Which of the following is an I Eigenvalue of 0 1, where I is the 4x4 I identity matrix? (A) (C) (B) (D)
]
is ____________ 21.
The
rank
[
of
the
matrix
] is ________________
CS – 2005 1. Consider the following system of equations in three real variables x x n x x x x x x x x x x This system of equation has (A) no solution (B) a unique solution (C) more than one but a finite number of solutions (D) an infinite number of solutions 2.
What are the Eigenvalues of the following 2 2 matrix? 0 (A) (B)
1 n n
(C) (D)
n n
CS – 2006 3. F is an n x n real matrix. b is an n real vector. Suppose there are two nx1 vectors, u and v such that u v , and Fu=b, Fv=b. Which one of the following statement is false? (A) Determinant of F is zero (B) There are infinite number of solutions to Fx=b (C) There is an x 0 such that Fx=0 (D) F must have two identical rows
Mathematics
CS – 2007 5. Consider the set of (column) vectors defined by X={xR3 x1+x2+x3=0, where XT =[x1, x2, x3]T }. Which of the following is TRUE? (A) {[1, 1, 0]T, [1, 0, 1]T} is a basis for the subspace X. (B) {[1, 1, 0]T, [1, 0, 1]T} is a linearly independent set, but it does not span X and therefore, is not a basis of X. (C) X is not the subspace for R3 (D) None of the above CS – 2008 6. The following system of x x x x x x x x x Has unique solution. The only possible value (s) for is/ are (A) 0 (B) either 0 or 1 (C) one of 0,1, 1 (D) any real number except 5 7.
How many of the following matrices have an Eigenvalue 1? 0
1 0
1 n 0
1 0
(A) One (B) two
1
(C) three (D) four
CS – 2010 8. Consider the following matrix A=[
] x y If the Eigen values of A are 4 and 8, then (A) x = 4, y = 10 (C) x = 3, y = 9 (B) x = 5, y = 8 (D) x = 4, y = 10 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 5
GATE QUESTION BANK
CS – 2011 9. Consider the matrix as given below [
13.
The value of the dot product of the Eigenvectors corresponding to any pair of different Eigenvalues of a 4-by-4 symmetric positive definite matrix is __________.
14.
If the matrix A is such that
]
Which one of the following options provides the CORRECT values of the Eigenvalues of the matrix? (A) 1, 4, 3 (C) 7, 3, 2 (B) 3, 7, 3 (D) 1, 2, 3
[
CS – 2013 11. Which one of x x equal [ y y z z x(x y(y (A) | z(z x (B) | y z x y (C) | y z z x y (D) | y z z
15.
-
The product of the non – zero Eigenvalues of the matrix
is __________. [ 16.
the following does NOT ] ) x ) y | ) z x | y z x y y z | z x y y z | z
],
Then the determinant of A is equal to __________.
CS – 2012 10. Let A be the 2
2 matrix with elements and . Then the Eigenvalues of the matrix are (A) 1024 and (B) 1024√ and √ (C) √ n √ (D) √ n √
Mathematics
]
Which one of the following statements is TRUE about every n n matrix with only real eigenvalues? (A) If the trace of the matrix is positive and the determinant of the matrix is negative, at least one of its eigenvalues is negative. (B) If the trace of the matrix is positive, all its eigenvalues are positive. (C) If the determinant of the matrix is positive, all its eigenvalues are positive. (D) If the product of the trace and determinant of the matrix is positive, all its eigenvalues are positive.
ECE – 2005 1. Given an orthogonal matrix
CS – 2014 12. Consider the following system of equations: x y x z x y z x y z The number of solutions for this system is __________.
A= [
]. ,
-
is
⁄ (A) [
⁄
]
⁄ ⁄
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 6
GATE QUESTION BANK
Mathematics
⁄ ⁄
(B) [
6.
]
⁄
The rank of the matrix [
⁄ (C) [
(A) 0 (B) 1
] ⁄ ⁄
(D) [
]
⁄ ⁄
2.
Let,
A=0
1 and
Then (a + b)= (A) ⁄ (B) ⁄ 3.
= 0
1.
⁄ ⁄
(C) (D)
Given the matrix 0
⁄
Eigenvector is (C) 0
1
(B) 0 1
(D) 0
1
ECE – 2006 4.
For the matrix 0 corresponding 0
the
ECE – 2007 7. It is given that X1 , X2 …… M are M nonzero, orthogonal vectors. The dimension of the vector space spanned by the 2M vector X1 , X2 … XM , X1 , X2 … XM is (A) 2M (B) M+1 (C) M (D) dependent on the choice of X1 , X2 … XM.
9.
All the four entries of the 2 x 2 matrix p p P = 0p p 1 are non-zero, and one of its Eigenvalues is zero. Which of the following statements is true? (A) p p p p (B) p p p p (C) p p p p (D) p p p p
Eigenvector
1 is
(A) 2 (B) 4 5.
1 , the Eigenvalue to
(C) 6 (D) 8
The Eigenvalues and the corresponding Eigenvectors of a 2 2 matrix are given by Eigenvalue Eigenvector =8
v =0 1
=4
(C) 2 (D) 3
ECE – 2008 8. The system of linear equations 4x + 2y = 7, 2x + y = 6 has (A) a unique solution (B) no solution (C) an infinite number of solutions (D) exactly two distinct solutions
1 the
(A) 0 1
]
v =0
1
ECE – 2009 10. The Eigen values of the following matrix are [
The matrix is (A) 0
1
(C) 0
1
(B) 0
1
(D) 0
1
]
(A) 3, 3 + 5j, 6 j (B) 6 + 5j, 3 + j, 3 j (C) 3 + j, 3 j, 5 + j (D) 3, 1 + 3j, 1 3j
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 7
GATE QUESTION BANK
ECE – 2010 11. The Eigenvalues of a skew-symmetric matrix are (A) Always zero (B) Always pure imaginary (C) Either zero or pure imaginary (D) Always real ECE – 2011 12. The system of equations x y z x y z x y z has NO solution for values of given by (A) (C) (B) (D)
Mathematics
ECE – 2014 16. For matrices of same dimension M, N and scalar c, which one of these properties DOES NOT ALWAYS hold? (A) (M ) M (M) (B) ( M ) (C) (M N) M N (D) MN NM 17.
A real (4 × 4) matrix A satisfies the equation I where 𝐼 is the (4 × 4) identity matrix. The positive Eigenvalue of A is _____.
18.
Consider the matrix
n
J ECE\EE\IN – 2012 13.
Given that A = 0
1 and I = 0
the value of A3 is (A) 15 A + 12 I (B) 19A + 30
(C) 17 A + 15 I (D) 17A +21
ECE – 2013 14. The minimum Eigenvalue of the following matrix is [
19.
The determinant of matrix A is 5 and the determinant of matrix B is 40. The determinant of matrix AB is ________.
20.
The system of linear equations
]
(A) 0 (B) 1 15.
[ ] Which is obtained by reversing the order of the columns of the identity matrix I . Let I J where is a nonnegative real number. The value of for which det(P) = 0 is _____.
1,
(C) 2 (D) 3
(
Let A be a m n matrix and B be a n m matrix. It is given that ) determinant Determinant(I (I ) where I is the k k identity matrix. Using the above property, the determinant of the matrix given below is
(A) 2 (B) 5
(
)h s
(A) a unique solution (B) infinitely many solutions (C) no solution (D) exactly two solutions 21.
[
)4 5
] (C) 8 (D) 16
th
Which one of the following statements is NOT true for a square matrix A? (A) If A is upper triangular, the Eigenvalues of A are the diagonal elements of it (B) If A is real symmetric, the Eigenvalues of A are always real and positive th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 8
GATE QUESTION BANK
(C) If A is real, the Eigenvalues of A and are always the same (D) If all the principal minors of A are positive, all the Eigenvalues of A are also positive 22.
The maximum value of the determinant among all 2×2 real symmetric matrices with trace 14 is ___.
EE – 2005 1.
5.
If R = [
] , then top row of
(A) , (B) ,
2.
-
(C) , (D) ,
(B) [
] [
] [
]
(C) [
] [
] [
]
(D) [
] [
] [
]
-
(A) [ ] (B) [
]
(C) [
(B) [
]
(D) [ ]
]
In the matrix equation Px = q, which of the following is necessary condition for the existence of at least one solution for the unknown vector x (A) Augmented matrix [P/Q] must have the same rank as matrix P (B) Vector q must have only non-zero elements (C) Matrix P must be singular (D) Matrix P must be square
] ,R=[
(C) [ ] ]
(D) [
]
EE – 2007 6. X = [x , x . . . . x - is an n-tuple non-zero vector. The n n matrix V = X (A) Has rank zero (C) Is orthogonal (B) Has rank 1 (D) Has rank n 7.
The linear operation L(x) is defined by the cross product L(x) = b x, where b =[0 1 0- and x =[x x x - are three dimensional vectors. The matrix M of this operation satisfies x L(x) = M [ x ] x Then the Eigenvalues of M are (A) 0, +1, 1 (C) i, i, 1 (B) 1, 1, 1 (D) i, i, 0
8.
Let x and y be two vectors in a 3 dimensional space and denote their dot product. Then the determinant xx xy det 0 y x yy 1 (A) is zero when x and y are linearly independent (B) is positive when x and y are linearly independent (C) is non-zero for all non-zero x and y (D) is zero only when either x or y is zero
EE – 2006 Statement for Linked Answer Questions 4 and 5.
4.
]
is
] , one of
(A) [
] ,Q=[
] [
-
For the matrix p = [
P=[
(A) [
The following vector is linearly dependent upon the solution to the previous problem
the Eigenvalues is equal to 2 . Which of the following is an Eigenvector?
3.
Mathematics
] are
three vectors An orthogonal set of vectors having a span that contains P,Q, R is th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 9
GATE QUESTION BANK
Statement for Linked Questions 9 and 10. Cayley-Hamilton Theorem states that a square matrix satisfies its own characteristic equation. Consider a matrix. A=0
A satisfies the relation (A) A + 3 + 2 =0 2 (B) A + 2A + 2 = 0 (C) (A+ ) (A 2) = 0 (D) exp (A) = 0
10.
equals (A) 511 A + 510 (B) 309 A + 104 (C) 154 A + 155 (D) exp (9A)
EE – 2008 11. If the rank of a ( ) matrix Q is 4, then which one of the following statements is correct? (A) Q will have four linearly independent rows and four linearly independent columns (B) Q will have four linearly independent rows and five linearly independent columns (C) Q will be invertible (D) Q will be invertible 12.
13.
(A) A A+ A = A (B) (AA+ ) = A A+ 14.
The characteristic equation of a ( ) matrix P is defined as () = | P| = =0 If I denotes identity matrix, then the inverse of matrix P will be (A) ( I) (B) ( I) (C) ( I) (D) ( I)
(C) A+ A = (D) A A+ A = A+
Let P be a real orthogonal matrix. x⃗ is a real vector [x x - with length ⃗x (x x ) . Then, which one of the following statements is correct? (A) x⃗ x⃗ where at least one vector satisfies x⃗ x⃗ (B) x⃗ x⃗ for all vectors x⃗ (C) x⃗ x⃗ where at least one vector satisfies x⃗ x⃗ (D) No relationship can be established between x⃗ and x⃗
1
9.
Mathematics
EE – 2009 15. The trace and determinant of a matrix are known to be –2 and –35 respe tively It’s Eigenv lues re (A) –30 and –5 (C) –7 and 5 (B) –37 and –1 (D) 17.5 and –2 EE – 2010 16. For the set of equations x x x x =2 x x x x =6 The following statement is true (A) Only the trivial solution x x x x = 0 exists (B) There are no solutions (C) A unique non-trivial solution exists (D) Multiple non-trivial solutions exist
17.
An Eigenvector of
[
(A) , (B) ,
(C) , (D) ,
-
] is -
EE – 2011 18.
The matrix[A] = 0
1 is decomposed
into a product of a lower triangular matrix [L] and an upper triangular matrix [U]. The properly decomposed [L] and [U] matrices respectively are
A is m n full rank matrix with m > n and is an identity matrix. Let matrix A+ = ( ) , then, which one of the following statements is FALSE?
(A) 0 th
th
1 and 0
1 th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 10
GATE QUESTION BANK
(B) 0 (C) 0 (D) 0
1 and 0 1 and 0 1 and 0
23.
1 1 1
EE – 2013 19.
The equation 0
x 1 0x 1
0 1 has
0 1.
Eigenvector of the matrix A = 0
(C) Non – zero unique solution (D) Multiple solution 20.
(A) [ 1 1]T (B) [3 1]T
A matrix has Eigenvalues – 1 and – 2. The corresponding Eigenvectors are 0 0
1 respectively. The matrix is
(A) 0
1
(C) 0
1
(B) 0
1
(D) 0
1
Which one of the following statements is true for all real symmetric matrices? (A) All the eigenvalues are real. (B) All the eigenvalues are positive. (C) All the eigenvalues are distinct. (D) Sum of all the eigenvalues is zero.
1?
(C) [1 1]T (D) [ 2 1]T
Let A be a 3 3 matrix with rank 2. Then AX = 0 has (A) only the trivial solution X = 0 (B) one independent solution (C) two independent solutions (D) three independent solutions
2.
1 and
EE – 2014 21. Given a system of equations: x y z x y z Which of the following is true regarding its solutions? (A) The system has a unique solution for any given and (B) The system will have infinitely many solutions for any given and (C) Whether or not a solution exists depends on the given and (D) The system would have no solution for any values of and 22.
Two matrices A and B are given below: p q pr qs p q [ ] 0 1 r s pr qs r s If the rank of matrix A is N, then the rank of matrix B is (A) N (C) N (B) N (D) N
IN – 2005 1. Identify which one of the following is an
(A) No solution x (B) Only one solution 0x 1
Mathematics
IN – 2006 Statement for Linked Answer Questions 3 and 4 A system of linear simultaneous equations is given as Ax=B where [
] n
[ ]
3.
The rank of matrix A is (A) 1 (C) 3 (B) 2 (D) 4
4.
Which of the following statements is true? (A) x is a null vector (B) x is unique (C) x does not exist (D) x has infinitely many values
5.
For a given that 0
1
matrix A, it is observed 0
1 n
0
1
0
1
Then matrix A is
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 11
GATE QUESTION BANK
2 1 1 0 1 1 1 1 0 2 1 2
10.
(A) A
1
1 1 0 2
1
1 1
1
(B) A 1 2 0 2 1 1 (C) A 1 2 0
02 1 2 1 1
0 2
(D) A 1 3 IN – 2007 6. Let A = [ ] i j n with n = i. j. Then the rank of A is (A) (C) n (B) (D) n 7.
n
Let A be an n×n real matrix such that = I and y be an n- dimensional vector. Then the linear system of equations Ax=Y has (A) no solution (B) a unique solution (C) more than one but finitely many independent solutions (D) Infinitely many independent solutions
The matrix P =[
12.
9.
The Eigenvalues of a (2 2) matrix X are 2 and 3. The Eigenvalues of matrix ( I) ( I) are (A) (C) (B) (D)
(
)(
)
(D) n IN – 2011 13.
The matrix M = [
] has
Eigenvalues . An Eigenvector corresponding to the Eigenvalue 5 is , - . One of the Eigenvectors of the matrix M is (A) , (C) , √ (B) , (D) ,
] rotates a vector
(C) (D)
A real n × n matrix A = [ ] is defined as i i j follows: { otherwise The summation of all n Eigenvalues of A is (A) n(n ) (B) n(n ) (C)
about the axis[ ] by an angle of (A) (B)
Let P 0 be a 3 3 real matrix. There exist linearly independent vectors x and y such that Px = 0 and Py = 0. The dimension of the range space of P is (A) 0 (C) 2 (B) 1 (D) 3
IN – 2010 11. X and Y are non-zero square matrices of size n n. If then (A) |X| = 0 and |Y| 0 (B) |X| 0 and |Y| = 0 (C) |X| = 0 and |Y| = 0 (D) |X| 0 and |Y| 0
IN – 2009 8.
Mathematics
IN – 2013 14. The dimension of the null space of the
15.
matrix [
] is
(A) 0 (B) 1
(C) 2 (D) 3
One of Eigenvectors corresponding to the two Eigenvalues of the matrix 0 (A) [
j
] 0
(B) 0 1 0 th
th
j
1 is
(C) [ ] 0 1 j j (D) [ ] 0 1 j
1 1 th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 12
GATE QUESTION BANK
Mathematics
IN – 2014 16. For the matrix A satisfying the equation given below, the eigenvalues are , -[
]
[
(A) ( 𝑗,𝑗) (B) (1,1,0)
] (C) ( ) (D) (1,0,0)
Answer Keys and Explanations ME 1.
and G = [
[Ans. A] [
Now E × F = G
]
h r teristi equ tions is | I| ( )( )( ) ∴ Real eigenvalues are 5, 5 other two are complex Eigenvector corresponding to is ( I) (or) →( ) Verify the options which satisfies relation (1) Option (A) satisfies. [Ans. B] Given
n
in onsistent
4.
5.
[Ans. A]
6.
[Ans. B] 1 Eigenv lues re 2, 2 I)
(
I)
No. of L.I Eigenvectors ( (no of v ri les)
( ⁄ )
7.
matrix be A = 0 sin os
.
/ I)
[Ans. A] ( I) . olving for , Let the symmetric and real
[Ans. C] os Given , E = [ sin
]
matrix, if Eigenvalues are … … … … … then for matrix, the Eigenvalues will be , , ……… For S matrix, if Eigenvalues are 1 and 5 then for matrix, the Eigenvalues are 1 and 25.
No (
3.
sin os
[Ans. A] For S
0
( ) n ( ⁄ ) ( ( ) minimum of m n) For inconsistence ( ) ( ⁄ ) ∴ he highest possi le r nk of is
os [ sin
,E-
∴
2.
]
]
th
1
Now |
|
Which gives ( ⟹
)
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 13
GATE QUESTION BANK
⟹ Hence real Eigen value. 8.
Mathematics
x [
][
]
0
1
x
[Ans. B] Let
0
eigenv lues re
1
12.
Eigen vector corresponding to is ( I) x . / .y/ . / By simplifying K . / . / y t king K
⁄
Equating the elements x
n
[Ans. A] 0
1 → Eigenv lues re
Eigenve tor is x 13.
Eigen vector corresponding to =2 is ( I) x . / .y/ . / K By simplifying ( ) 4 5 by ⁄ K
[Ans. C] [
]
[
→
[
]
→
taking K
x verify the options
( )
[
]
]
infinite m ny solutions
⁄ ⁄ 9.
10.
[Ans. C] Sum of the diagonal elements = Sum of the Eigenvalues ⟹ 1 + 0 + p = 3+S ⟹ S= p 2
[Ans. B] Eigenvalues of a real symmetric matrix are always real
15.
[Ans. B] 0
If
1 eigenv lues v lue
Eigen vector will be .
/
Norm lize ve tor
[Ans. B] ( ⁄ )
11.
14.
[
]
√( )
(
)
[
]
[√( )
(
) ]
→ →
[
→
[
*
]
]
16.
system will h ve solution
[Ans. A] iven M
M
→ MM
I
th
⁄ √ + ⁄ √
[Ans. C] The given system is x y z x y z x y z Use Gauss elimination method as follows Augmented matrix is
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 14
GATE QUESTION BANK
, | -
[
→
→
| ] [
So, |
|
[
|
|
[Ans. C] Suppose the Eigenvalue of matrix A is ( i )(s y) and the Eigenvector is ‘x’ where s the onjug te p ir of Eigenvalue and Eigenvector is ̅ n x̅. So Ax = x … ① and x̅ ̅x̅……② king tr nspose of equ tion ② x̅ x̅ ̅ … ③ [( ) n ̅ is s l r ] ̅ x̅ x x̅ x x̅ x x̅ ̅x … , x̅ x x̅ ̅ x ̅ (x̅ x) ( ̅ re s l r ) (x̅ x) ̅
20.
[Ans. C] We know that os x os x sin x ( ) os x sin x ( ) os x Hence 1, 1 and 1 are coefficients. They are linearly dependent.
1 eigen v lues
Eigenve tor is
verify for oth n
21.
[Ans. D] We know that the Eigenvectors corresponding to distinct Eigenvalues of real symmetric matrix are orthogonal. x y x y [ ][ ] x y x y x y y x
22.
[Ans. D] ( ) In case of matrix PQ
CE 1.
QP (generally)
[Ans. C] If = i.e. A is orthogonal, we can only s y th t if is n Eigenv lue of then
also will be an Eigenvalue of A,
which does not necessarily imply that | | = 1 for all i. 2.
[Ans. A] In an over determined system having more equations than variables, it is necessary to have consistent unique solution, by definition
3.
[Ans. A] With the given order we can say that order of matrices are as follows: 3×4 Y 4×3 3×3
[Ans. A] |
[Ans. D] 0
nnot e zero )
Hence Eigenvalue of a symmetric matrix are real
19.
|
(Taking 2 common from each row) ( )
]
( x x̅ re Eigenve tors they i i i 0
18.
|
]
nk ( ) nk ( | ) So, Rank (A) = Rank (A|B) = 2 < n (no. of variables) So, we have infinite number of solutions 17.
Mathematics
|
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 15
GATE QUESTION BANK
( ) 3×3 P 2×3 3×2 P( ) (2×3) (3×3) (3×2) 2×2 ( ( ) ) 2×2
Using Gauss elimination we reduce this to an upper triangular matrix to find its rank | ]→
[
→ 4.
[Ans. D] The augmented matrix for given system is [
| ]→
[
| ]→
| ]
[
8.
| ]
[
[
|
[
|
]
( ⁄ ) ( ) ( ) ( ⁄ ) ∴ olution is non – existent for above system. 5.
6.
7.
[Ans. B] ∑ = Trace (A) + + = Trace (A) = 2 + ( 1) + 0 = 1 Now = 3 ∴3+ + =1 Only choice (B) satisfies this condition. [Ans. B] ∑ = Trace (A) + + =1+5+1=7 Now = 2, = 6 ∴ 2+6+ =7 =3
0
1
∴0
]
1 is (
1
)
(
) 0
9.
10.
0
1
0
1 1
[Ans. B] ( ) P=( ( )( ) =( ) (I) =
)P
[Ans. B] A=0
1
Characteristic equation of A is |
|=0
(4 )( 5 ) 2 × 5 =0 + 30 = 0 6, 5 11.
[Ans. A] The augmented matrix for given system is [
]
[Ans. A] Inverse of 0
→
|
Now for infinite solution last row must be completely zero ie –2=0 n –7=0 n
Then by Gauss elimination procedure [
Mathematics
| ]
th
[Ans. D] The augmented matrix for given system is x [ | ] 6y7 [ ] z k Using Gauss elimination we reduce this to an upper triangular matrix to find its rank
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 16
GATE QUESTION BANK
| ]→
[
17.
[Ans. 16] , , M trix , The product of matrix PQR is , - , - , The minimum number of multiplications involves in computing the matrix product PQR is 16
18.
[Ans. 23]
k [
| ]
[
| ]
→
Now if k Rank (A) = rank (A|B) = 3 ∴ Unique solution If k = 7, rank (A) = rank (A|B) = 2 which is less than number of variables ∴ When K = 7, unique solution is not possible and only infinite solution is possible 12.
[Ans. A] A square matrix B is defined as skewsymmetric if and only if = B
13.
[Ans. D] By definition A + is always symmetric is symmetri is lw ys skew symmetri is skew symmetri
Mathematics
[
][
]
[
,
K JK
]
-[ ,
]
,
[
] -
-
19.
[Ans. A] Sum of Eigenvalues = Sum of trace/main diagonal elements = 215 + 150 + 550 = 915
20.
[Ans. 88] The determinant of matrix is [
]
→
14.
[Ans. B] 1 =(
0
i
∴ 0
15.
i
i
i
,( =
0
0
)
i)( i i
[
1
→
1 i -
i) i i
0
i i
i i
1
[
1
[
]
1 Interchanging Column 1& Column 2 and taking transpose
Sum of the Eigenvalues = 17 Product of the Eigenvalues = From options, 3.48 + 13.53 = 17 (3.48)(13.53) = 47 16.
]
→
[Ans. B] 0
]
[
[Ans. 0.5] 0.5
]
|
th
th
|
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 17
GATE QUESTION BANK * (
)
= ( 21.
(
(
)+
= 1, 6 ∴ The Eigenvalues of A are 1 and 6
[Ans. 2] ]
3.
[Ans. D] Given that Fu =b and Fv =b If F is non singular, then it has a unique inverse. Now, u = b and v= b Since is unique, u = v but it is given th t u v his is contradiction. So F must be singular. This means that (A) Determinant of F is zero is true. Also (B) There are infinite number of solution to Fx= b is true since |F| = 0 (C) here is n su h the is also true, since X has infinite number of solutions., including the X = 0 solution (D) F must have 2 identical rows is false, since a determinant may become zero, even if two identical columns are present. It is not necessary that 2 identical rows must be present for |F| to become zero.
4.
[Ans. C] It is given that Eigenvalues of A is 5, 2, 1, 4 I Let P = 0 1 I Eigenvalues of P : | I| I | | I ( ) I I I Eigenvalue of P is ( 5 +1 ), ( 2+ 1), (1+ 1), (4+1 ), ( 5 1 ), ( 2 1 ),(1 1), (4 1) = 4, 1, 2, 5, 6, 3,0,3
5.
[Ans. B] |x X= {x x x = ,x x x - then,
→ [ ( )
(
)
( ) ]
( )
( )
[
] ( )
no. of non zero rows = 2
[Ans. B] The augmented matrix for the given system is [
| ]
Using elementary transformation on above matrix we get, [
| ]
→
⁄ | ] ⁄ ⁄
[
→
[
|
]
Rank ([A B]) = 3 Rank ([A]) = 3 Since Rank ([A B]) = Rank ([A]) = number of variables, the system has unique solution. 2.
[Ans. B] 0
1
The characteristic equation of this matrix is given by | I| |
)
)
[
CS 1.
)(
Mathematics
+
| th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 18
GATE QUESTION BANK
{ [1, 1, 0]T , [1,0, 1 ]T } is a linearly independent set because one cannot be obtained from another by scalar multiplication. However (1, 1, 0) and (1,0, 1) do not span X, since all such combinations (x1, x2, x3) such that x1+ x2+ x3 =0 cannot be expressed as linear combination of (1, 1,0) and (1,0, 1) 6.
7.
Only one matrix has an Eigenvalue of 1 which is 0
| ] →
→
[
[
1
Correct choice is (A) 8.
[Ans. D] |
| x y ( )( y) When ( y) x y x When ( y) x y x x y Solving (1) & (2) x y
[Ans. D] The augmented matrix for above system is [
Mathematics
| ] | ]
x
( )
( )
Now as long as – 5 0, rank (A) =rank (A|B) =3 ∴ can be any real value except 5. Closest correct answer is (D).
9.
[Ans. A] The Eigenvalues of a upper triangular matrix are given by its diagonal entries. ∴ Eigenvalues are 1, 4, 3 only
[Ans. A]
10.
[Ans. D]
Eigenvalues of 0 |
1
0
| =0
Eigenvalues of 0 |
Eigenvalues of the matrix (A) are the roots of the characteristic polynomial given below.
=0,1 1
|
| =0 =0
1
|
(√ )
)( ) =0 = –1, 1
n
√
n ( √ ) n
1
n
| =0
( (
) )
√ Eigenvalues of A are √ respectively So Eigenvalues of
) =0 ) = i or 1 = 1 –i or 1 + i
Eigenvalues of 0
)( )(
(
|= 0
( (
|
(
= 0, 0
Eigenvalues of 0 |
1
√
) =0
th
th
n
√
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 19
GATE QUESTION BANK
11.
12.
[Ans. A] → p q nd Since 2 & 3rd columns have been swapped which introduces a –ve sign Hence (A) is not equal to the problem
[
]
→
[
] →
→
[
] →
16.
[
]
( ) ( ) no of v ri ∴ nique solution exists
14.
[ ] x x Let X = x e eigen ve tor x [x ] By the definition of eigenvector, AX = x x x x x x x x [ ] [x ] [x ] x x x x x x x x x x x x x x x x x x x x x x n x x x x x x (I) If s yx x x x x x x x x x (2) If Eigenv lue ∴ Three distinct eigenvalues are 0, 2, 3 Product of non zero eigenvalues = 2 × 3 = 6
]
→ →
les
[Ans. 0] The Eigenvectors corresponding to distinct Eigenvalues of real symmetric matrix are orthogonal
ECE 1.
2.
[Ans. A] If the trace or determinant of matrix is positive then it is not necessary that all eigenvalues are positive. So, option (B), (C), (D) are not correct
[Ans. C] Since, ,
] (
=I
16
0
[
-
[Ans. A] We know,
[Ans. 0]
| |
[Ans. 6] Let A =
[Ans. 1] x y x z x y z x y z ugmente m trix is [
13.
15.
Mathematics
0
7=0 1
0
1 1
1 b , a 60 10 1 1 21 7 a+b = 3 60 60 20
)
Or 2a 0.1b=0, 2a
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 20
GATE QUESTION BANK
3.
[Ans. C]
8.
0
[Ans. B] Approach 1: Given 4x + 2y =7 and 2x + y =6
1
(A I)=0 ( 4 ) (3 ) 2 4=0 2 + 20=0 = 5, 4
4 2 x 7 2 1y 6 0 0 x 5 2 1y 6
x1 x2
Putting = 5, 0
1 =0
x + 2x = 0 x = 2x
On comparing LHS and RHS 0= 5, which is irrelevant and so no solution. Approach 2: 4x + 2y =7
x x 1= 2 2 1 Hence, 0 4.
1 is Eigenvector.
[Ans. C]
Then Eigenvector is x Verify the options (C) 5.
or 2x y=
1 We know th t it is Eigenvalue
0
We know
0
1
|I A|=0
|
|
2 –I2 +32 =0 = 4, 8 (Eigenvalues) For
= 4, ( I
)=0
1
)=0
1
9.
[Ans. C] Matrix will be singular if any of the Eigenvalues are zero. | |= 0 For = 0, P = 0 p p |p p | =0 p p p p
10.
[Ans. D] Approach1: Eigenvalues exists as complex conjugate or real Approach 2: Eigenvalues are given by
v =0 1 For
= 8, ( I
v =0 6.
1
[Ans. C] [
] [
|
]
[Ans. C] There are M non-zero, orthogonal vectors, so there is required M dimension to represent them ’
| =0
(
( ) 7.
7 2
2x+y=6 Since both the linear equation represent parallel set of straight lines, therefore no solution exists. Approach 3: Rank (A)=1; rank (C)=2, As Rank (A) rank (C) therefore no solution exists.
x
[Ans. A] or m trix
Mathematics
11.
th
)(( ,
)=0
) j
j
[Ans. C] Eigenvalue of skew – symmetric matrix is either zero or pure imaginary. th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 21
GATE QUESTION BANK
12.
13.
[Ans. B] Given equations are x y z x y z and x y z If and , then x y z have Infinite solution If and , then x y z ( ) no solution x y z If n x y z will have solution x y z and will also give solution
et of , -
et of [
]
16.
[Ans. D] Matrix multiplication is not commutative in general.
17.
[Ans. *] Range 0.99 to 1.01 Let ‘ ’ e Eigenv lue of ‘ ’ hen ‘ e Eigenv lue of ‘ ’ A. =I= Using Cauchey Hamilton Theorem,
[Ans. B] 0
Mathematics
’ will
1
Characteristic Equations is 18. By Cayley Hamilton theorem I ∴ ( I) I 14.
I | | [
[Ans. A] [
]
→
(
[
[Ans. *] Range 199 to 201 From matrix properties we know that the determinant of the product is equal to the product of the determinants. That is if A and B are two matrix with determinant | | n | | respectively, then | | | | | | ∴| | | | | |
20.
[Ans. B]
) ]
]
19.
| |
| | Product of Eigenvalues = 0 ∴ Minimum Eigenv lue h s to e ‘ ’ 15.
[Ans. *] Range 0.99 to 1.01 I J I J
[Ans. B] ,
Let
-
[ ]
[
I
I
[
Then AB = [4]; BA Here m = 1, n = 4 ) And et(I
]
]
→
[
[
[
]
th
les
[Ans. B] onsi er
)
]
]
( ) ( | ) no of v r Infinitely many solutions 21.
et(I
→ →
th
0
1 th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 22
GATE QUESTION BANK
whi h is re l symmetri m trix h r teristi equ tion is | I| ( ) ∴ (not positive) ( ) is not true (A), (C), (D) are true using properties of Eigenvalues 22.
EE 1.
2.
[Ans. B] ] j( ) | |
=[
]
∴ Top row of
=,
-
[Ans. D] Since matrix is triangular, the Eigenvalues are the diagonal elements themselves namely = 3, 2 & 1. Corresponding to Eigenvalue = 2, let us find the Eigenvector [A - ] x̂ = 0 x [ ][x ] [ ] x Putting in above equation we get, x [ ][x ] [ ] x Which gives the equations, 5x x x =0 . . . . . (i) x =0 . . . . . (ii) 3x = 0 . . . . . (iii) Since eqa (ii) and (iii) are same we have 5x x x =0 . . . . . (i) x =0 . . . . . (ii) Putting x = k, we get x = 0, x = k and 5x k =0
[Ans. *] Range 48.9 to 49.1 Real symmetric matrices are diagnosable Let the matrix be x 0 1 s tr e is x So determinant is product of diagonal entries So | | x x ∴ M ximum v lue of etermin nt x x ∴| |
R= [
Mathematics
, of tor( )| |
x = k | |=|
|
∴ Eigenvectorss are of the form x k x [ ] * k + x
= 1(2 + 3) – 0(4 + 2) – 1 (6 – 2) = 1 Since we need only the top row of , we need to find only first column of (R) which after transpose will become first row adj(A). cof. (1, 1) = + |
|=2+3=5
cof. (2, 1) =
|= 3
|
cof. (2, 1) = + |
i.e. x x x = k : k : 0 = :1:0 =2:5:0 x x ∴ [ ]=[ ] is an Eigenvector of matrix p. x
|= +1 3.
∴ cof. (A) = [
[Ans. A] Rank [P|Q] = Rank [P] is necessary for existence of at least one solution to x q.
]
Adj (A) =, of ( )=[
]
Dividing by |R| = 1 gives th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 23
GATE QUESTION BANK
4.
(
[Ans. A] We need to find orthogonal vectors, verify the options. Option (A) is orthogonal vectors (
)(
[Ans. B] The vector ( ) is linearly dependent upon the solution obtained in - and , Q. No. 4 namely , We can easily verify the linearly dependence as |
6.
7.
i
[Ans. B] xy xx | yx
xy xx x n xy yx xy x xy y y | |y x y | (x y) x y = Positive when x and y are linearly independent.
Option (B), (C), (D) are not orthogonal 5.
) i
8.
)
Mathematics
9.
[Ans. A] A=0
1
|A – | = 0 |
|
[Ans. B] hen n n m trix xx x x x x x x x x x x x x * + x x x x x x Take x common from 1st row, x common from 2nd row …… x common from nth row. It h s r nk ‘ ’
| =0 A will satisfy this equation according to Cayley Hamilton theorem i.e. I=0 Multiplying by on oth si es we get I=0 I =0 10.
[Ans. A] To calculate Start from derived above
I = 0 which has I
[Ans. D] ⃗ k L(x) = |
(
| x
x
= (x )
I)(
x (
⃗( k
)
(
x )
I) I
x = x
⃗ =[ x k
(
x L(x) = M [x ] x Comparing both , we get,
(
|
)
I
I) (
I) I
| (
I)
I) I
(
Hence Eigenvalue of M : | M
I)( I
]
|
I
] x
M=[
I) I
(
) th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 24
GATE QUESTION BANK
11.
12.
13.
[Ans. A] If rank of (5 6 ) matrix is 4,then surely it must have exactly 4 linearly independent rows as well as 4 linearly independent columns.
= A is correct =A[( ) -A = A[( ) Put =P Then A [ ] = A. = A Choice (C) = is also correct since =( ) = I 14.
os
x in )
|| x⃗ || = √x
(x in
x
x
→
[Ans. C] Trace = Sum of Principle diagonal elements.
16.
[Ans. D] On writing the equation in the form of AX =B
+
, *
+
nk ( ) nk( ) Number of variables = 4 Since, Rank (A) = Rank(C) < Number of variables Hence, system of equations are consistent and there is multiple non-trivial solution exists. 17.
[Ans. B] Characteristic equation | |
I|
|
(1 ) ( )( ) Eigenve tors orrespon ing to ( I) x [ ] [x ] [ ] x 2x x x x At x x x x x x At x ,x
is
Eigenvectors = c[ ]{Here c is a constant}
os ) 18.
[Ans. D] , - ,L-, - ⟹ Options D is correct
19.
[Ans. D] x x … (i) } (i) n (ii) re s me x x … (ii) ∴x x So it has multiple solutions.
|| x⃗ || = || x̅|| for any vector x̅ 15.
* +
Argument matrix C =*
[Ans. B] Let orthogonal matrix be os in P=0 1 in os By Property of orthogonal matrix A I x os x in So, x⃗ = [ ] x in x os || x⃗ || = √(x
x x + *x + x
*
[Ans. D] If characteristic equation is =0 Then by Cayley – Hamilton theorem, I=0 = Multiplying by on both sides, = I = ( I) [Ans. D] Choice (A) Since
Mathematics
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 25
GATE QUESTION BANK
20.
[Ans. D] Eigen value
|A
Eigenvectors 0
1 n 0
Let matrix 0 x
1
x 10
1
0
1
0
10
1
0
1
I|= |
|
i.e., (1 ) (2 ) 2 Thus the Eigenvalue are 1, 2. If x, y, be the component of Eigenvectors corresponding to the Eigenv lues we have x [A- I- 0 1 0y1=0
1
0
Mathematics
For =1, we get the Eigenvector as 0 Hence, the answer will be ,
21.
22.
23.
IN 1.
1
0
[Ans. B] AX=0 and (A) = 2 n=3 No. of linearly independent solutions = n r = 3 =1
3.
[Ans. C] There are 3 non-zero rows and hence rank (A) = 3
4.
[Ans. C] Rank (A) = 3 (This is Co-efficient matrix) Rank (A:b) =4(This is Augmented matrix) s r nk( ) r nk ( ) olution oes not exist.
5.
[Ans. C] We know Hen e from the given problem, Eigenvalue & Eigenvector is known.
1
[Ans. B] Since there are 2 equations and 3 variables (unknowns), there will be infinitely many solutions. If if then x y z x y z x z y For any x and z, there will be a value of y. ∴ Infinitely many solutions [Ans. A] For all real symmetric matrices, the Eigenvalues are real (property), they may be either ve or ve and also may be same. The sum of Eigenvalues necessarily not be zero. [Ans. C] p q 0 1 r s ( pplying → p q →r s element ry tr nsform tions) p q pr qs [ ] pr qs r s ∴ hey h ve s me r nk N
1 X1 , X2 1
1 2 , 1 1, 2 2
We also know that
, where
1 1
P X1 X2 1 2
1 0 1 0 0 2 0 2
[Ans. B] Given:
-
2. Solving 0
1
& D= 0
1 Hence
Characteristic equation is,
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 26
GATE QUESTION BANK
1 1 1 0 2 1 A 1 2 0 2 1 1 6.
12.
[Ans. B] A= [
]=[
A=[
[Ans. B] Given I Hence rank (A) = n Hence AX= Y will have unique solution
8.
[Ans. C]
9.
[Ans. C] Approach 1:
13.
14.
Assume,
0
(
∴A
(
0
1
0
10
Now | I
0
[Ans. B] Dim of null space [A]= nullity of A.
0
[
]
1
| )(
]
Apply row operations 1
1
- is also vector
For given A = [
1
I) 0
[Ans. B] If AX = → From this result [1, 2, for M
|
| (
I
1
I)
]
n For diagonal matrix Eigenvalues are diagonal elements itself. n(n ) ∴ n
]
Hence, rank (A) =1 7.
[Ans. A] A=[ ] i if i j = 0 otherwise. For n n matrix
]
Using elementary transformation [
Mathematics
)=0
[Ans. D]
11.
[Ans. C] A null matrix can be obtained by multiplying either with one null matrix or two singular matrices.
[
→
[
] ]
∴ ( ) By rank – nullity theorem Rank [A]+ nullity [A]= no. of columns[A] Nullity [A]= 3 ∴ Nullity , -
Approach 2: Eigenvalues of ( I) is = 1, 1/2 Eigenvalues of (X+5I) is = 3, 2 Eigenvalues of ( I) (X+5I) is = , 10.
→
15.
[Ans. A] A=|
|
Characteristics equation | |
I|
| j j
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 27
GATE QUESTION BANK
j
[
j
x ] 0x 1
Mathematics
0 1
x x
j j
[
j j
x ] 0x 1
x
0 1
j
x 16.
[Ans. C]
A[
]=[
→| | |
|
] |
|
→| | (
|
|
|
| two rows ounter lose thus | |
| |) =Product of eigenvalues Verify options Options (C) correct answer
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 28
GATE QUESTION BANK
Mathematics
Probability and Distribution ME - 2005 1. A single die is thrown twice. What is the probability that the sum is neither 8 nor 9? (A) ⁄ (C) ⁄ ⁄ (B) ⁄ (D)
ME - 2008 6. A coin is tossed 4 times. What is the probability of getting heads exactly 3 times? (A) ⁄ (C) ⁄ (B) ⁄ (D) ⁄
2.
ME - 2009 7. The standard deviation of a uniformly distributed random variable between 0 and 1 is (A) (C) ⁄√ √ (B) (D) √ √
A lot has 10% defective items. Ten items are chosen randomly from this lot. The probability that exactly 2 of the chosen items are defective is (A) 0.0036 (C) 0.2234 (B) 0.1937 (D) 0.3874
ME - 2006 3. Consider a continuous random variable with probability density function f(t) = 1 + t for 1 t 0 = 1 t for 0 t 1 The standard deviation of the random variable is: (C) ⁄ (A) ⁄√ (D) ⁄ (B) ⁄√ 4.
A box contains 20 defective items and 80 non-defective items. If two items are selected at random without replacement, what will be the probability that both items are defective? ⁄ (A) ⁄ (C) ⁄ ⁄ (B) (D)
ME - 2007 5. Let X and Y be two independent random variables. Which one of the relations between expectation (E), variance (Var) and covariance (Cov) given below is FALSE? (A) E (XY) = E (X) E (Y) (B) Cov (X, Y) = 0 (C) Var (X + Y) = Var (X) + Var (Y) (D)
(X Y )
( (X)) ( (Y))
8.
If three coins are tossed simultaneously, the probability of getting at least one head is (A) 1/8 (C) 1/2 (B) 3/8 (D) 7/8
ME - 2010 9. A box contains 2 washers, 3 nuts and 4 bolts. Items are drawn from the box at random one at a time without replacement. The probability of drawing 2 washers first followed by 3 nuts and subsequently the 4 bolts is (A) 2/315 (C) 1/1260 (B) 1/630 (D) 1/2520 ME - 2011 10. An unbiased coin is tossed five times. The outcome of each toss is either a head or a tail. The probability of getting at least one head is________ ⁄ (A) ⁄ (C) ⁄ ⁄ (B) (D) ME - 2012 11. A box contains 4 red balls and 6 black balls. Three balls are selected randomly from the box one after another, without replacement. The probability that the selected set has one red ball and two black balls is (A) 1/20 (C) 3/10 (B) 1/12 (D) 1/2 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 29
GATE QUESTION BANK
ME - 2013 12. Let X be a normal random variable with mean 1 and variance 4. The probability (X ) is (A) 0.5 (B) Greater than zero and less than 0.5 (C) Greater than 0.5 and less than 1.0 (D) 1.0 13.
The probability that a student knows the correct answer to a multiple choice
the probability of obtaining red colour on top face of the dice at least twice is _______ 17.
A group consists of equal number of men and women. Of this group 20% of the men and 50% of the women are unemployed. If a person is selected at random from this group, the probability of the selected person being employed is _______
18.
A machine produces 0, 1 or 2 defective pieces in a day with associated probability of 1/6, 2/3 and 1/6, respectively. The mean value and the variance of the number of defective pieces produced by the machine in a day, respectively, are (A) 1 and 1/3 (C) 1 and 4/3 (B) 1/3 and 1 (D) 1/3 and 4/3
19.
A nationalized bank has found that the daily balance available in its savings accounts follows a normal distribution with a mean of Rs. 500 and a standard deviation of Rs. 50. The percentage of savings account holders, who maintain an average daily balance more than Rs. 500 is _______
20.
The number of accidents occurring in a plant in a month follows Poisson distribution with mean as 5.2. The probability of occurrence of less than 2 accidents in the plant during a randomly selected month is (A) 0.029 (C) 0.039 (B) 0.034 (D) 0.044
question is . If the student dose not know the answer, then the student guesses the answer. The probability of the guessed answer being correct is . Given that the student has answered the questions correctly, the conditional probability that the student knows the correct answer is (A) ⁄ (C) ⁄ (B) ⁄ (D) ⁄ ME - 2014 14. In the following table x is a discrete random variable and P(x) is the probability density. The standard deviation of x is x 1 2 3 P(x) 0.3 0.6 0.1 (A) 0.18 (C) 0.54 (B) 0.3 (D) 0.6 15.
16.
Box contains 25 parts of which 10 are defective. Two parts are being drawn simultaneously in a random manner from the box. The probability of both the parts being good is ( )
( )
( )
( )
Consider an unbiased cubic dice with opposite faces coloured identically and each face coloured red, blue or green such that each colour appears only two times on the dice. If the dice is thrown thrice,
Mathematics
CE - 2005 1. Which one of the following statements is NOT true? (A) The measure of skewness is dependent upon the amount of dispersion
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 30
GATE QUESTION BANK
(B) In a symmetric distribution the value of mean, mode and median are the same (C) In a positively skewed distribution mean > median > mode (D) In a negatively skewed distribution mode > mean > median CE - 2006 2. A class of first years B. Tech students is composed of four batches A, B, C and D each consisting of 30 students. It is found that the sessional marks of students in Engineering Drawing in batch C have a mean of 6.6 and standard deviation of 2.3. The mean and standard deviation of the marks for the entire class are 5.5 and 4.2 respectively. It is decided by the course instruction to normalize the marks of the students of all batches to have the same mean and standard deviation as that of the entire class. Due to this, the marks of a student in batch C are changed from 8.5 to (A) 6.0 (C) 8.0 (B) 7.0 (D) 9.0 3.
There are 25 calculators in a box. Two of them are defective. Suppose 5 calculators are randomly picked for inspection (i.e. each has the same chance of being selected). What is the probability that only one of the defective calculators will be included in the inspection? (A) ⁄ (C) ⁄ (B) ⁄ (D) ⁄
CE - 2007 4. If the standard deviation of the spot speed of vehicles in a highway is 8.8 kmph and the mean speed of the vehicles is 33 kmph, the coefficient of variation in speed is (A) 0.1517 (C) 0.2666 (B) 0.1867 (D) 0.3646
Mathematics
CE - 2008 5. If probability density function of a random variable x is x for x nd f(x) { for ny other v lue of x Then, the percentage probability P.
x
/ is
(A) 0.247 (B) 2.47 6.
(C) 24.7 (D) 247
A person on a trip has a choice between private car and public transport. The probability of using a private car is 0.45. While using the public transport, further choices available are bus and metro out of which the probability of commuting by a bus is 0.55. In such a situation, the probability, (rounded upto two decimals) of using a car, bus and metro, respectively would be (A) 0.45, 0.30 and 0.25 (B) 0.45, 0.25 and 0.30 (C) 0.45, 0.55 and 0.00 (D) 0.45, 0.35 and 0.20
CE - 2009 7. The standard normal probability function can be approximated as (x )
|x | ) exp( Where x = standard normal deviate. If mean and standard deviation of annual precipitation are 102 cm and 27 cm respectively, the probability that the annual precipitation will be between 90 cm and 102 cm is (A) 66.7% (C) 33.3% (B) 50.0% (D) 16.7% CE - 2010 8. Two coins are simultaneously tossed. The probability of two heads simultaneously appearing is (A) 1/8 (C) 1/4 (B) 1/6 (D) 1/2
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 31
GATE QUESTION BANK
CE - 2011 9. There are two containers with one containing 4 red and 3 green balls and the other containing 3 blue and 4 green balls. One ball is drawn at random from each container. The probability that one of the balls is red and the other is blue will be (A) 1/7 (C) 12/49 (B) 9/49 (D) 3/7 CE - 2012 10. The annual precipitation data of a city is normally distributed with mean and standard deviation as 1000mm and 200 mm, respectively. The probability that the annual precipitation will be more than 1200 mm is (A) < 50 % (C) 75 % (B) 50 % (D) 100 % 11.
14.
A traffic office imposes on an average 5 number of penalties daily on traffic violators. Assume that the number of penalties on different days is independent and follows a poisson distribution. The probability that there will be less than 4 penalties in a day is ____.
15.
A fair (unbiased) coin was tossed four times in succession and resulted in the following outcomes: (i) Head (iii) Head (ii) Head (iv) Head The prob bility of obt ining ‘T il’ when the coin is tossed again is (A) 0 (C) ⁄ (B) ⁄ (D) ⁄
16.
An observer counts 240 veh/h at a specific highway location. Assume that the vehicle arrival at the location is Poisson distributed, the probability of having one vehicle arriving over a 30-second time interval is ____________
In an experiment, positive and negative values are equally likely to occur. The probability of obtaining at most one negative value in five trials is (A)
(C)
(B)
(D)
CE - 2013 12. Find the value of such that the function f(x) is a valid probability density function ____________________ (x )( f(x) x) for x otherwise CE - 2014 13. The probability density function of evaporation E on any day during a year in a watershed is given by f( )
{
mm d y
Mathematics
CS - 2005 1. Box P has 2 red balls and 3 blue balls and box Q has 3 red balls and 1 blue ball. A ball is selected as follows: (i) select a box (ii) choose a ball from the selected box such that each ball in the box is equally likely to be chosen. The probabilities of selecting boxes P and Q are 1/3 and 2/3 respectively. Given that a ball selected in the above process is red, the probability that it comes from box P is (A) 4/19 (C) 2/9 (B) 5/19 (D) 19/30 2.
Let f(x) be the continuous probability density function of a random variable X. The probability that a X b , is (A) f(b a) (C) ∫ f(x)dx
otherwise The probability that E lies in between 2 and 4 mm/day in a day in the watershed is (in decimal) ______
(B) f(b)
th
th
f( )
(D) ∫ x f(x)dx
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 32
GATE QUESTION BANK
CS - 2006 3. For each element in a set of size 2n, an unbiased coin is tossed. The 2n coin tosses are independent. An element is chosen if the corresponding coin toss were head. The probability that exactly n elements are chosen is (A) ( n ⁄ ) (C) ( ⁄ n ) (D) ⁄ (B) ( n ⁄ ) CS - 2007 Linked Data for Q4 & Q5 are given below. Solve the problems and choose the correct answers. Suppose that robot is placed on the Cartesian plane. At each step it is easy to move either one unit up or one unit right, i.e if it is at (i,j) then it can move to either (i+1,j) or (i,j+1) 4. How many distinct paths are there for the robot to reach the point (10,10) starting from the initial position (0,0)? (C) 210 (A) 20 (D) None of these (B) 2 5.
Suppose that the robot is not allowed to traverse the line segment from (4,4) to (5,4). With this constraint, how many distinct paths are there for the robot to reach (10,10) starting from (0,0)? (A) 29 (B) 219 (C) . / . (D) .
6.
/
/ . / .
/
Suppose we uniformly and randomly select a permutation from the 20! ermut tions of ………… Wh t is the probability that 2 appears at an earlier position than any other even number in the selected permutation? (A) ⁄ (C) ⁄ (B) ⁄ (D) none of these
Mathematics
CS - 2008 7. Let X be a random variable following normal distribution with mean +1 and variance 4. Let Y be another normal variable with mean of 1 and variance unknown If (X ) (Y≥ ) the standard deviation of Y is (A) 3 (C) √ (B) 2 (D) 1 8.
Aishwarya studies either computer science or mathematics every day. If she studies computer science on a day, then the probability that she studies mathematics the next day is 0.6. If she studies mathematics on a day, then the probability that she studies computer science the next day is 0.4. Given that Aishwarya studies computer science on Monday, what is the probability that she studies computer science on Wednesday? (A) 0.24 (C) 0.4 (B) 0.36 (D) 0.6
CS - 2009 9. An unbalanced dice (with 6 faces, numbered from 1 to 6) is thrown. The probability that the face value is odd is 90% of the probability that the face value is even. The probability of getting any even numbered face is the same. If the probability that the face is even given that it is greater than 3 is 0.75, which one of the following options is closest to the probability that the face value exceeds 3? (A) 0.453 (C) 0.485 (B) 0.468 (D) 0.492 CS - 2010 10. Consider a company that assembles computers. The probability of a faulty assembly of any computer is p. The company therefore subjects each computer to a testing process. This testing process gives the correct result for any computer with a probability of q. What is the probability of a computer being declared faulty? th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 33
GATE QUESTION BANK
(A) (B) (C) (D) 11.
12.
pq+(1 – p)(1 – q) (1 – q)p (1 – p)q pq
What is the probability that a divisor of is a multiple of ? (A) 1/625 (C) 12/625 (B) 4/625 (D) 16/625 If the difference between the expectation of the square if a random variable ( ,x -) and the square if the exopectation of the random variable ( ,x-) is denoted by R, then (A) R = 0 (C) R≥ (B) R< 0 (D) R > 0
CS - 2011 13. A deck of 5 cards (each carrying a distinct number from 1 to 5) is shuffled thoroughly. Two cards are then removed one at a time from the deck. What is the probability that the two cards are selected with the number on the first card being one higher than the number on the second card? (A) ⁄ (C) ⁄ (B) ⁄ (D) ⁄ 14.
Consider a finite sequence of random values X = [x1, x2 … xn].Let be the me n nd σx be the standard deviation of X. Let another finite sequence Y of equal length be derived from this as yi, a*xi+b, where a and b are positive constants. Let μy be the me n nd σy be the standard deviation of this sequence. Which one of the following statements is INCORRECT? (A) Index position of mode of X in X is the same as the index position of mode of Y in Y. (B) Index position of median of X in X is the same as the index position of median of Y in Y. (C) μy μx + b (D) σy σx + b
15.
Mathematics
If two fair coins flipped and at least one of the outcomes is known to be a head, what is the probability that both outcomes are heads? (A) 1/3 (C) 1/4 (B) 1/2 (D) 2/3
CS - 2012 16. Suppose a fair six – sided die is rolled once. If the value on the die is 1,2, or 3 the die is rolled a second time. What is the probability that the some total of value that turn up is at least 6? (A) 10/21 (C) 2/3 (B) 5/12 (D) 1/6 17.
Consider a random variable X that takes values +1 and 1 with probability 0.5 each. The values of the cumulative distribution function F(x) at x = and +1 are (A) 0 and 0.5 (C) 0.5 and 1 (B) 0 and 1 (D) 0.25 and 0.75
CS - 2013 18. Suppose p is the number of cars per minute passing through a certain road junction between 5 PM and 6 PM, and p has a Poisson distribution with mean 3. What is the probability of observing fewer than 3 cars during any given minute in this interval? ⁄ e (A) ⁄ e (C) ⁄ e (B) ⁄ e (D) CS - 2014 19. Suppose you break a stick of unit length at a point chosen uniformly at random. Then the expected length of the shorter stick is ________ . 20.
th
Four fair six – sided dice are rolled. The probability that the sum of the results being 22 is x/1296. The value of x is ____________
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 34
GATE QUESTION BANK
21.
The security system at an IT office is composed of 10 computers of which exactly four are working. To check whether the system is functional, the officials inspect four of the computers picked at random (without replacement). The system is deemed functional if at least three of the four computers inspected are working. Let the probability that the system is deemed functional be denoted by p. Then 100p = _____________.
22.
Each of the nine words in the sentence “The quick brown fox jumps over the l zy dog” is written on sep r te piece of paper. These nine pieces of paper are kept in a box. One of the pieces is drawn at random from the box. The expected length of the word drawn is _____________. (The answer should be rounded to one decimal place.)
23.
The probability that a given positive integer lying between 1 and 100 (both inclusive) is NOT divisible by 2, 3 or 5 is __________.
24.
Let S be a sample space and two mutually exclusive events A and B be such that ∪ S If ( ) denotes the prob bility of the event, the maximum value of P(A) P(B) is _______
ECE - 2006 3. A probability density function is of the ). form (x) e || x ( The value of K is (A) 0.5 (C) 0.5a (B) 1 (D) A 4.
Three Companies X, Y and Z supply computers to a university. The percentage of computers supplied by them and the probability of those being defective are tabulated below Company % of Probability computers of being supplied defective X 60% 0.01 Y 30% 0.02 Z 10% 0.03 Given that a computer is defective, the probability that it was supplied by Y is (A) 0.1 (C) 0.3 (B) 0.2 (D) 0.4
ECE - 2007 5. If E denotes expectation, the variance of a random variable X is given by (A) E[X2] E2[X] (C) E[X2] (B) E[X2] + E2[X] (D) E2[X] 6.
An examination consists of two papers, Paper1 and Paper2. The probability of failing in Paper1 is 0.3 and that in Paper2 is 0.2.Given that a student has failed in Paper2, the probability of failing in paper1 is 0.6. The probability of a student failing in both the papers is (A) 0.5 (C) 0.12 (B) 0.18 (D) 0.06
ECE - 2005 1. A fair dice is rolled twice. The probability that an odd number will follow an even number is
2.
( )
( )
( )
( )
Mathematics
The value of the integral
I
x2 1 exp dx is 2 0 8
(A) 1 (B)
(C) 2 (D) th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 35
GATE QUESTION BANK
ECE - 2008 7. The probability density function (PDF) of a random variable X is as shown below.
(x) exp( |x|) exp( |x|) is the probability density function for the real random variable X, over the entire x axis. M and N are both positive real numbers. The equation relating M and N is
8.
PDF PDF
1
Mathematics
(A) 1
0
(B) 2M
x 11
The -1 corresponding cumulative 0 distribution function (CDF) has the form
(A)
1
(C) M + N = 1 (D) M + N = 3 ECE - 2009 9. Consider two independent random variables X and Y with identical distributions. The variables X and Y take value 0, 1 and 2 with probabilities
CDF
1
N=1
x
and respectively. What is the 1
1
0
(B)
x
conditional probability (x y ) |x y| (A) 0 (C) ⁄ ⁄ (B) (D) 1
CD F C
1
D F
1
10. 0
1 -1
(C)
x
1
2
(B)
11. 1
0
x
1
1 1 1
0 0 1
1 2
(C) 2
0
(D)
10
1 2
(A)
CDF 1
0
1
A fair coin is tossed 10 times. What is the probability that ONLY the first two tosses will yield heads?
CDF
1 1
x
th
10
10
1 C2 2
(D)
10
1 C2 2
A discrete random variable X takes values from 1 to 5 with probabilities as shown in the table. A student calculates the mean of X as 3.5 and her teacher calculates the variance of X as 1.5. Which of the following statements is true? k P(X=k) 1 0.1 2 0.2 3 0.4 4 0.2 5 0.1
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 36
GATE QUESTION BANK
(A) Both the student and the teacher are right (B) Both the student and the teacher are wrong (C) The student is wrong but the teacher is right (D) The student is right but the teacher is wrong ECE - 2010 12. A fair coin is tossed independently four times. The prob bility of the event “the number of times heads show up is more th n the number of times t ils show up” is (A) ⁄ (C) ⁄ (B) ⁄ (D) ⁄ ECE - 2011 13. A fair dice is tossed two times. The probability that the second toss results in a value that is higher than the first toss is (A) 2/36 (C) 5/12 (B) 2/6 (D) 1/2 ECE\EE\IN - 2012 14. A fair coin is tossed till a head appears for the first time probability that the number of required tosses is odd , is (A) 1/3 (C) 2/3 (B) 1/2 (D) 3/4 ECE - 2013 15. Let U and V be two independent zero mean Gaussian random variables of variances ⁄ and ⁄ respectively. The probability ( V ≥ U) is (A) 4/9 (C) 2/3 (B) 1/2 (D) 5/9 16.
Consider two identically distributed zeromean random variables U and V . Let the cumulative distribution functions of U and 2V be F(x) and G(x) respectively. Then, for all values of x (x)) (A) ( (x) (B) ( (x)
(C) ( (x) (D) ( (x)
Mathematics
(x)) x (x)) x ≥
ECE - 2014 17. In a housing society, half of the families have a single child per family, while the remaining half have two children per family. The probability that a child picked at random, has a sibling is _____ 18.
Let X X nd X , be independent and identically distributed random variables with the uniform distribution on [0, 1]. The probability P{X is the largest} is _____
19.
Let X be a random variable which is uniformly chosen from the set of positive odd numbers less than 100. The expectation, E[X], is __________.
20.
An unbiased coin is tossed an infinite number of times. The probability that the fourth head appears at the tenth toss is (A) 0.067 (C) 0.082 (B) 0.073 (D) 0.091
21.
A fair coin is tossed repeatedly till both head and tail appear at least once. The average number of tosses required is _______.
22.
Let X X and X be independent and identically distributed random variables with the uniform distribution on [0, 1]. The probability P{X X X } is ______.
23.
Let X be a zero mean unit variance Gaussian random variable. ,|x|- is equal to __________
24.
Parcels from sender S to receiver R pass sequentially through two post-offices. Each post-office has a probability
of
losing an incoming parcel, independently of all other parcels. Given that a parcel is lost, the probability that it was lost by the second post-office is ____________.
(x)) ≥ th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 37
GATE QUESTION BANK
EE - 2005 1. If P and Q are two random events, then the following is TRUE (A) Independence of P and Q implies that probability (P Q) = 0 (B) Probability (P ∪ Q)≥ Probability (P) +Probability (Q) (C) If P and Q are mutually exclusive, then they must be independent (D) Probability (P Q) Probability (P) 2.
A fair coin is tossed three times in succession. If the first toss produces a head, then the probability of getting exactly two heads in three tosses is (A) ⁄ (C) ⁄ (B) ⁄ (D) ⁄
EE - 2006 3. Two f ir dice re rolled nd the sum “ r ” of the numbers turned up is considered (A) Pr (r > 6) = (B) Pr (r/3 is an integer) = (C) Pr (r = 8|r/4 is an integer) = (D) Pr (r = 6|r/5 is an integer) = EE - 2007 4. A loaded dice has following probability distribution of occurrences Dice Value Probability ⁄ 1 2
⁄
3
⁄
4
⁄
5
⁄
⁄ 6 If three identical dice as the above are thrown, the probability of occurrence of values, 1, 5 and 6 on the three dice is (A) same as that of occurrence of 3, 4, 5 (B) same as that of occurrence of 1, 2, 5 (C) 1/128 (D) 5/8
Mathematics
EE - 2008 5. X is a uniformly distributed random variable that takes values between 0 and 1. The value of E{X } will be (A) 0 (C) 1/4 (B) 1/8 (D) 1/2 EE - 2009 6. Assume for simplicity that N people, all born in April (a month of 30 days), are collected in a room. Consider the event of atleast two people in the room being born on the same date of the month, even if in different years, e.g. 1980 and 1985. What is the smallest N so that the probability of this event exceeds 0.5? (A) 20 (C) 15 (B) 7 (D) 16 EE - 2010 7. A box contains 4 white balls and 3 red balls. In succession, two balls are randomly selected and removed from the box. Given that the first removed ball is white, the probability that the second removed ball is red is (A) 1/3 (C) 1/2 (B) 3/7 (D) 4/7 ECE\EE\IN - 2012 8. Two independent random variables X and Y are uniformly distributed in the interval , -. The probability that max , - is less than 1/2 is (A) 3/4 (C) 1/4 (B) 9/16 (D) 2/3 EE - 2013 9. A continuous random variable x has a probability density function + is f(x) e x . Then *x (A) 0.368 (C) 0.632 (B) 0.5 (D) 1.0
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 38
GATE QUESTION BANK
EE - 2014 10. A fair coin is tossed n times. The probability that the difference between the number of heads and tails is (n – 3) is (C) (A) (B) (D) 11.
12.
13.
14.
IN - 2005 1. The probability that there are 53 Sundays in a randomly chosen leap year is (A) ⁄ (C) ⁄ (B) ⁄ (D) ⁄ 2.
A mass of 10 kg is measured with an instrument and the readings are normally distributed with respect to the mean of 10 kg. Given that
Consider a dice with the property that the probability of a face with n dots showing up is proportional to n. The probability of the face with three dots showing up is _______________ Let x be a random variable with probability density function for |x| f(x) { |x| for otherwise The probability P(0.5 < x < 5) is_________ Lifetime of an electric bulb is a random variable with density f(x) kx , where x is measured in years. If the minimum and maximum lifetimes of bulb are 1 and 2 years respectively, then the value of k is__________ The mean thickness and variance of silicon steel laminations are 0.2 mm and 0.02 respectively. The varnish insulation is applied on both the sides of the laminations. The mean thickness of one side insulation and its variance are 0.1 mm and 0.01 respectively. If the transformer core is made using 100 such varnish coated laminations, the mean thickness and variance of the core respectively are (A) 30 mm and 0.22 (B) 30 mm and 2.44 (C) 40 mm and 2.44 (D) 40 mm and 0.24
Mathematics
exp .
∫
√
/ d =0.6
and that 60per cent of the readings are found to be within 0.05 kg from the mean, the standard deviation of the data is (A) 0.02 (C) 0.06 (B) 0.04 (D) 0.08 3.
The measurements of a source voltage are 5.9V, 5.7V and 6.1V. The sample standard deviation of the readings is (A) 0.013 (C) 0.115 (B) 0.04 (D) 0.2
IN - 2006 4. You have gone to a cyber-cafe with a friend. You found that the cyber-café has only three terminals. All terminals are unoccupied. You and your friend have to make a random choice of selecting a terminal. What is the probability that both of you will NOT select the same terminal? (A) ⁄ (C) ⁄ (B) ⁄ (D) 1 5.
Probability density function p(x) of a random variable x is as shown below. The value of is p(x) α
0
th
α
α b
α c
(A)
c
(C)
(B)
c
(D)
th
th
(
)
(
)
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 39
GATE QUESTION BANK
6.
Mathematics
Two dices are rolled simultaneously. The probability that the sum of digits on the top surface of the two dices is even is (A) 0.5 (C) 0.167 (B) 0.25 (D) 0.125
measurements, it can be expected that the number of measurement more than 10.15 mm will be (A) 230 (C) 15 (B) 115 (D) 2
IN - 2007 7. Assume that the duration in minutes of a telephone conversation follows the
IN - 2011 12. The box 1 contains chips numbered 3, 6, 9, 12 and 15. The box 2 contains chips numbered 6, 11, 16, 21 and 26. Two chips, one from each box, are drawn at random. The numbers written on these chips are multiplied. The probability for the product to be an even number is (A) ⁄ (C) ⁄ ⁄ (B) ⁄ (D)
exponential distribution f(x) =
e ,x≥
The probability that the conversation will exceed five minutes is (A) e (C) (B) e (D) e IN - 2008 8. Consider a Gaussian distributed random variable with zero mean and standard deviation . The value of its cummulative distribution function at the origin will be (A) 0 (C) 1 (B) 0.5 (D) σ 9.
A random variable is uniformly distributed over the interval 2 to 10. Its variance will be ⁄ ⁄ (A) (C) (B) 6 (D) 36
IN - 2013 13. A continuous random variable X has probability density f(x) = . Then P(X > 1) is (A) 0.368 (C) 0.632 (B) 0.5 (D) 1.0 IN - 2014 14. Given that x is a random variable in the r nge , - with prob bility density function
the value of the constant k is
___________________ IN - 2009 10. A screening test is carried out to detect a certain disease. It is found that 12% of the positive reports and 15% of the negative reports are incorrect. Assuming that the probability of a person getting a positive report is 0.01, the probability that a person tested gets an incorrect report is (A) 0.0027 (C) 0.1497 (B) 0.0173 (D) 0.2100
15.
IN - 2010 11. The diameters of 10000 ball bearings were measured. The mean diameter and standard deviation were found to be 10 mm and 0.05mm respectively. Assuming Gaussian distribution of
The figure shows the schematic of production process with machines A,B and C. An input job needs to be preprocessed either by A or by B before it is fed to C, from which the final finished product comes out. The probabilities of failure of the machines are given as:
Assuming independence of failures of the machines, the probability that a given job is successfully processed (up to third decimal place)is ______________
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 40
GATE QUESTION BANK
Mathematics
Answer Keys and Explanations ME 1.
4. [Ans. D] The number of ways coming 8 and 9 are (2,6),(3,5),(4,4),(5,3),(6,2),(3,6),(4,5), (5,4),(6,3) Total ways =9 So Probability of coming 8 and 9 are
[Ans. D]
5.
[Ans. D] X and Y are independent ∴ ( ) ( ) ( ) re true Only (D) is odd one
6.
[Ans. A] Number of favourable cases are given by HHHT HHTH HTHH THHH Total number of cases = 2C1 2C1 2C1 2C1 =16
So probability of not coming these
2.
[Ans. B] Probability of defective item = Probability of not defective item = 1 0.1 = 0.9 So, Probability that exactly 2 of the chosen items are defective = ( ) ( )
3.
[Ans. B]
∴ Probability = 7.
[Ans. A] A uniform function
Mean (t)̅ = ∫ t f(t) dt ∫ t( t 6
t)dt t
t 6
7
[
]
∫ t(
[
t
t)dt
t)dt
=∫ (t =0
t )dt 1
0
7
density
Density function
1 f(x) b a 0
∫ t (
t)dt
a,x b a x,x b
Mean E(x)=
t)dt
b
x(F(x)) x a
ab 2
Variance = F(x)2 f(x)
2
1
2
b x F(x) xF(x) x a x a b
= Standard deviation = √v ri nce =
and
0,x a x a f(x) f x dx , axb 0 b a xb 0,
]
∫ t (
distribution
x
Variance = ∫ t f(t)dt =∫ t (
( oth defective) S mple sp ce
( oth defective)
2
Put the value of F(x), we get √
2
1 1 b dx x. dx Variance x ba x a x a b a b
th
th
2
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 41
GATE QUESTION BANK b
x3 xL 3(b a) a 2 b a
Mathematics 3
2
1 7 (3 3 1) 2 8
b3 a3 (b2 a2 )2 3(b a) 4 b a 2
(b a)(b2 ab a2 ) (b a)2(b a)2 2 3(b a) 4 b a
4b2 4ab 4a2 3a2 3b2 6ab 12
b2 a2 2ab 12
9.
[Ans. C] Probability of drawing 2 washers, first followed by 3 nuts, and subsequently the 4 bolts
10.
[Ans. D] Required probability =
(b a)2 12
. / . /
Standard deviation = √v ri nce
(b a)2 12 (b a) 12
11.
[Ans. D] Given 4R and 6B , -
12.
[Ans. C]
Given: b=1, a=0
Standard deviation =
8.
10 1 12 12
[Ans. D] Let probability of getting atleast one head = P(H) then P (at least one head) = 1 P(no head) P(H)=1 P(all tails) But in all cases, 23=8
1 7 8 8
X=0
P (H) = 1
(X ) is Below X (X ) has to be less than 0.5 but greater than zero
Alternately Probability of getting at least one head ( ) ( )
13.
1 7 1 8 8 Alternately From Binomial theorem Probability of getting at least one head pq ( )
( )
X=1
[Ans. D] A event that he knows the correct answer B event that student answered correctly the question P(B) = ? ( )
(
)
( )
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 42
GATE QUESTION BANK
( )
he knows correct nswer
(
) (
( ⁄ )
14.
No. of employed men = 80% of men = 80 No. of employed women = 50% of women = 50 Probability if the selected one person being employed = probability of one employed women +probability of one employed man
⏟
⏟
e does not know correct nswer so he guesses
( ) ( ⁄ ) ) ⁄ ( ) ⁄
[Ans. D] x 1 2 P(x) 0.3 0.6 (x) (x) x
18.
V(x) x (
σ
(x )
[Ans. A]
3 0.1 So from figure Mean value = 1 V ri nce : μ me n x defective pieces (x μ) σ ) n(n ( ) ( ) ( ) ( )
(x) x (x) σ
Mathematics
, (x)-
(x) ( x (x)) ) ( )
√ ( )
15.
[Ans. A] 19.
16.
[Ans. *](Range 49 to 51)
[Ans. *] Range 0.25 to 0.27 p orm l distribution
q
Given that μ σ x μ x z σ ere x μ , s x gre ter th n z ) ence prob bility (z
Using Binomial distribution (x ≥ )
17.
( ) ( )
( ) ( )
-
∫ e dz σ√ ∴ of s ving ccount holder
[Ans. *] Range 0.64 to 0.66 Let number of men = 100 Number of women = 100 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 43
GATE QUESTION BANK
20.
[Ans. B] Mean m = np = 5.2 me (x ) e
25 Calculators
m
23 Non-defective
2 Defective
e
5 Calculators
e (x
Mathematics
) 4 Non-defective
1 Defective
CE 1.
2.
[Ans D] A, B, C are true (D) is not true. Since in a negatively skewed distribution mode > median > mean [Ans. D] Let the mean and standard deviation of the students of batch C be μ and σ respectively and the mean and standard deviation of entire class of first year students be μ and σ respectively Now given, μ σ and μ σ In order to normalise batch C to entire class, the normalize score must be equated since Z = Z =
=
Now Z =
p( defective in c lcul tors)
4.
[Ans. C] σ μ
5.
[Ans. B] Given f(x) = x for x = 0 else where (
)
∫ f(x)dx
∫ x dx
=0 1 The probability expressed in percentage P= = 2.469% = 2.47% 6.
[Ans. A] Given P(private car) = 0.45 P(bus 1 public transport) = 0.55 Since a person has a choice between private car and public transport P(public transport) = 1 – P(private car) = 1 – 0.45 =0.55 P(bus) = P(bus public transport) (bus public tr nsport) (public tr nsport) = 0.55 × 0.55 = 0.3025 ≃ 0.30 Now P(metro) = 1 [P(private car) + P(bus)] = 1 (0.45 + 0.30) = 0.25
=
Equation these two and solving, we get = x = 8.969 ≃ 9.0 3.
x
[Ans. B] Since population is finite, hypergeometric distribution is applicable
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 44
GATE QUESTION BANK
∴ P(private car) = 0.45 P(bus) = 0.30 and P(metro) = 0.25 7.
12.
[Ans. D] ere μ cm; σ ( x 102) =P.
[Ans. 6] ∫ f(x)dx ( x
f(x)
{
∴∫
( x
cm 6
x
Mathematics
)
x
)dx
x
x
x
(
)
x otherwise
x7
/ [
=P( x ) This area is shown below:
[
(
(
)]
]
[
-0.44
)
]
The shades area in above figure is given by F(0) –F ( 0.44) =
( )
(
(
)(
)
= 0.5 – 0.3345 = 1.1655 ≃ 16.55% Closest answer is 16.7% 8.
)
13.
[Ans. 0.4] (
)
∫ f( )d
[Ans. C] ( )|
P(2 heads) = 9.
[Ans. C] P(one ball is Red & another is blue) = P(first is Red and second is Blue)
14.
= 10.
[Ans. A] Given μ = 1000, σ = 200 We know that Z When X= 1200, Z Req. Prob = P (X (Z ) ( Z Less than 50%
11.
∫ d
[Ans. D] (X ) ( )
(X
)
(
[Ans. *] Range 0.26 to 0.27 Avg= 5 Let x denote penalty (x ) (x ) (x ) (x ) (x ) e ew (x n) x e e e ) p(x e
[
)
e
]
)
)
(X
15.
[Ans. B] S * T+ n( ) ( ) n(S)
16.
[Ans. *] Range 0.25 to 0.28 ( t) e (n t) n
)
( )
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 45
GATE QUESTION BANK
no of vehicles (
)
veh km
e
.
m ke ex ctly ‘ ’ moves nd ‘U’ moves in any order. Similarly to reach (10, 10) from (0,0) the robot h s to m ke ‘ ’ moves nd ‘U’ moves in any order. The number of ways this can be done is same as number of permutations of a word consisting of 10 ‘ ’ s nd ’U’s Applying formula of permutation with limited repetitions we get the answer as
/
= 2.e = 0.2707 CS 1.
[Ans. A] P: Event of selecting Box P, Q: Event of selecting Box P P(P)=1/3, P(Q)=2/3 P(R/P)=2/5, P(R/Q)=3/4
P(R/P).P(P) P(R/P).P(P) P(R/Q)P(Q) 2/51/3 4/19 2/51/3 3/ 4 2/3 P(P/R)=
2.
5.
[Ans. D] The robot can reach (4,4) from (0,0) in 8C ways as argued in previous problem. 4 Now after reaching (4,4) robot is not allowed to go to (5,4) Let us count how many paths are there from (0,0) to (10,10) if robot goes from (4,4) to (5,4) and then we can subtract this from total number of ways to get the answer. Now there are 8C4 ways for robot to reach (4,4) from (0,0) and then robot takes the ‘U’ move from ( ) to ( ) ow from (5,4) to (10,10) the robot has to make 5 ‘U’ moves nd ‘ ’ moves in ny order which can be done in 11! ways = 11C5 ways Therefore, the number of ways robot can move from (0,0) (10,10) via (4,4) – (5,4) move is
[Ans. C] If f (x) is the continuous probability density function of a random variable X then, ( x b) P( x b) b
= f x dx
a
3.
4.
[Ans. A] The probability that exactly n elements are chosen =The probability of getting n heads out of 2n tosses =
(
) . /
= =
(
) (
Mathematics
(Binomial formula) )
8C 4
[Ans. A] Consider the following diagram (3,3)
11C 5
8 11 4 5
=
No. of ways robot can move from (0,0) to (10,10) without using (4,4) to (5,4) move is
20 8 11 ways 10 4 5
(0,0) The robot can move only right or up as defined in problem. Let us denote right move by ‘ ’ nd up move by ‘U’ ow to reach (3, 3), from (0,0) , the robot has to
which is choice (D)
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 46
GATE QUESTION BANK
6.
[Ans. D] umber of permut tions with ‘ ’ in the first position =19! Number of permutations with ‘ ’ in the second position = 10 18! (Fill the first space with any of the 10 odd numbers and the 18 spaces after the 2 with 18 of the remaining numbers in 18! ways) umber of permut tions with ‘ ’ in rd position =10 9 17! (Fill the first 2 place with 2 of the 10 odd numbers and then the remaining 17 places with remaining 17 numbers) nd so on until ‘ ’ is in th place. After that it is not possible to satisfy the given condition, since there are only 10 odd numbers v il ble to fill before the ‘ ’ So the desired number of permutations which satisfies the given condition is
8.
[Ans. C] Let C denote computes science study and M denotes maths study. P(C on Monday and C on Wednesday) = P(C on Monday, M on Tuesday and C on Wednesday) + P(C on Monday, C on Tuesday and C on Wednesday) =1 0.6 0.4+ 1 0.4 0.4 = 0.24 + 0.16 = 0.40
9.
[Ans. B] It is given that P (odd) = 0.9 P (even) Now since 𝜮P(x) = 1 ∴ P (odd) + P (even) = 1 0.9 P (even) + P (even) = 1 P(even) =
…
∴ P(2) = P(4) = P(6) = P(even) )
=
Which are clearly not choices (A), (B) or (C) 7.
/ = P (z ≥
.z
/ = P (z ≥
(z
) = P (z ≥
(
)
)
10. _____(i)
)
(
)
(
)
P(f ce )
) (
) (
(0.5263)
= 0.1754 It is given that P(even | face > 3) = 0.75
[Ans. A] Given μ = 1, σ = 4 σ =2 and μ = 1, σ is unknown Given, P(X ) = P (Y ≥ 2 ) Converting into standard normal variates, .z
= 0.5263
Now, it is given that P(any even face) is same i.e. P(2) = P(4) = P(6) Now since, P(even) = P(2) or P(4) or P(6) = P(2) + P(4) + P(6)
… Now the probability of this happening is given by = (
Mathematics
= 0.75
= 0.75 ( )
)
( )
=1
decl red f ulty
f ulty
p
q p
σ =3
not f ulty
decl red not f ulty decl red f ulty
q
q
decl red not f ulty
From above tree (decl red f ulty) th
=0.468
[Ans. A] The tree diagram of probabilities is shown below q
Now since we know that in standard normal distribution P (z ) = P (z ≥ 1) _____(ii) Comparing (i) and (ii) we can say that
=
th
pq th
(
q)(
p)
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 47
GATE QUESTION BANK
11.
[Ans. A] If b c … Then, no. of divisors of (x )(y )(z )… iven ∴ o of ivisors of ( )( ( )( )
(
(
which are multiples
13.
14.
15.
[Ans. C] (x ) , (x)V(x) Where V(x) is the variance of x, Since variance is σ and hence never negative, ≥
( t le st one he d)
TT )
So required prob bility
)
∴ equired rob bility 12.
)
( ∪ )
16. No. of divisors of of o of divisors of ( )( )
Mathematics
[Ans. B] Required Probability = P (getting 6 in the first time) + P (getting 1 in the first time and getting 5 or 6 in the second time) + P (getting 2 in the first time and getting 4 or 5 or 6 in the second time) + P (getting 3 in the first time and getting 3 or 4 or 5 or 6 in the second time) ( )
( )
( )
17.
[Ans. C] The p.d.f of the random variable is x +1 P(x) 0.5 0.5 The cumulative distribution function F(x) is the probability upto x as given below x +1 F(x) 0.5 1.0 So correct option is (C)
18.
[Ans. C] e (k)
[Ans. A] + The five cards are * Sample space ordered pairs st nd P (1 card = 2 card + 1) )( )( )( )+ *(
k P is no. of cars per minute travelling.
[Ans. D] 𝛔y = a 𝛔x is the correct expression Since variance of constant is zero.
For no cars. (i.e. k = 0) For no cars. P(0) e So P can be either 0,1,2. (i.e. k = 0,1,2) For k = 1, p(1)=e
[Ans. A] Let A be the event of head in one coin. B be the event of head in second coin. The required probability is * ) ( ∪ )+ ( )| ∪ ) ( ∪ ) ( ) ( ∪ ) ( ) (both coin he ds)
For k = 2 , P(2)= Hence ( ) e e th
( )
( )
e 4
th
e 5
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 48
GATE QUESTION BANK
e (
(
20.
(
)
∴ equired prob bility is ( ∪ ( )
∪ )
⁄ )
(
( ) (
)
e
[Ans. *] Range 0.24 to 0.27 The smaller sticks, therefore, will range in length from almost 0 meters upto a maximum of 0.5 meters, with each length equally possible. Thus, the average length will be about 0.25 meters, or about a quarter of the stick.
24.
(
)
[Ans. 10] 22 occurs in following ways 6 6 6 4 w ys 6 6 5 5 w ys
[Ans. 0.25] ( ∪ ) P(S) = 1 ( ) ( ) ( ) utu lly exclusive ( ) ( ) ( ) et ( ) x; ( ) x P(A) P(B) = x( x) Maximum value of y = x ( x) dy ( x) x dx = 2x = 1 x
equired prob bility
(max)
x 21.
( )
) e
19.
( )
Mathematics
ximum v lue of y
[Ans. *] Range 11.85 to 11.95 For functioning 3 need to be working (function)
ECE 1.
(
)
[Ans. D]
3 1 6 2 3 1 P(even number ) 6 2 Since events are independent, therefore 1 1 1 P(odd/even) 2 2 4 P(Odd number)
p 22.
[Ans. *] Range 3.8 to 3.9 Expected length = Average length of all words
2.
[Ans. A] I
∫ e
(
√ omp ring with (
23.
σ√ ut μ
[Ans. *] Range 0.259 to 0.261 Let A = divisible by 2, B = divisible by 3 and C = divisible by 5, then n(A) = 50, n(B) = 33, n(C) = 20 n( ) n( ) n( ) n( ) P( ∪ ∪ )
∫
∫ rom x σ σ th
)
th
)
e
dx
σ
√
dx
e
dx
…
nd x
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 49
)
GATE QUESTION BANK
Put σ ∫
3.
in
Probability of failing in paper 2, P (B) = 0.2 Probability of failing in paper 1, when
equ tion
e
√
A 0.6 B A P A B We know that, P PB B
student has failed in paper 2, P
[Ans. C]
P x.dx 1
Ke
Mathematics
(
∴
.dx 1
ax
)
e dx
∫
e
dx
x x,for x 0 x for x 0 K K 1 a a
( )
= 0.6 0.2 = 0.12
or ∫
( )
7.
[Ans. A] CDF: F x
x
PDF
dx
For x0, F x F0
x
x 1
dx
0
[Ans. A] var[x]=σ =E[(x x)2] Where, x=E[x] x= expected or mean value of X defining
1 x2 x concave downwards 2 2 Hence the CDF is, shown in the figure (A).
E[X] =
xf xdx x
8.
[Ans. A]
Given: Px x Me2|x| Ne3|x|
x P xi x xi dx i
P xdx 1 x
xiP xi
i
Variance σ is a measure of the spread of the values of X from its mean x. Using relation , E[X+Y]= E[X]+E[Y] And E[CX]=CE[X] On var[x]= σ =E[(x x)2] σ = ,Xx2 = E[X2] [ ,X-] 6.
Me2|x| Ne3|x| dx 2 Me2|x| Ne3|x| dx 1 0
By simplifying
2 3
M N 1 9.
[Ans. B] x+y=2 x y=0 => x =1, y = 1 P(x=1,y=1) = ¼
[Ans. C] Probability of failing in paper 1, P (A) = 0.3 th
th
¼ = 1/16 th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 50
GATE QUESTION BANK
10.
[Ans. C]
14.
Probability of getting head in first toss = Probability of getting head in second toss =
[Ans. C] P(no. of tosses is odd) (no of tosses is
…)
P(no. of toss is 1) = P(Head in 1st toss)
and in all other 8 tosses there should
P(no. of toss is 3) = P(tail in first toss, tail in second toss and head in third toss)
be tail always. So probability of getting head in first two tosses ( )( )( )…………… ( ) = (1/2)10
P(no. of toss is 5) = P(T,T,T,TH) . /
11.
Mathematics
[Ans. B] Both the teacher and student are wrong Mean = ∑ k = 0.1 + 0.4 + 1.2 + 0.8 + 0.5 = 3.0 E(x2) = ∑ k
… etc
So, P(no. of tosses in odd)
⁄ ⁄ ⁄ ⁄
Variance(x)= E(x2) – * (x)+ =10.2 9=1.2 12.
[Ans. D] P(H, H, H, T) +P (H, H, H, H ) =
13.
. /
. /
15.
[Ans. B] ( V ≥ V) ( V V≥ ) *z v v+ Linear combination of Gaussian random variable is Gaussian ∴ (z ≥ ) and not mean till zero because both random variables has mean zero hence ( ) Hence Option B is correct
16.
[Ans. D] F(x) = P{X x} (x) * X x+ x 2X 3
. / =
[Ans. C] Total number of cases = 36 Favorable cases: (1, 1) (2, 1) (3, 1) (4, 1) (5, 1) (6, 1) (1, 2) (2, 2) (3, 2) (4, 2) (5, 2) (6, 2) (1, 3) (2, 3) (3, 3) (4, 3) (5, 3) (6, 3) (1, 4) (2, 4) (3, 4) (4, 4) (5, 4) (6, 4) (1, 5) (2, 5) (3, 5) (4, 5) (5, 5) (6, 5) (1, 6) (2, 6) (3, 6) (4, 6) (5, 6) (6, 6) Total number of favorable cases
For positive value of x, (x) (x) is always greater than zero For negative value of x (x) (x)is ve ut , (x) (x)- x ≥
Then probability th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 51
GATE QUESTION BANK
17.
18.
[Ans. *] Range 0.65 to 0.68 et ‘ ’ be different types of f milies nd ‘S’ be there siblings. S S S (siblings) Probability that child chosen at random having sibling is 2/3
(x)
et S
,
∑x f(x)
[Ans. C]
21.
[Ans. *] Range 2.9 to 3.1 Let the first toss be head. Let x denotes the number of tosses(after getting first head) to get first tail. We can summarize the even as Event(After x Probability getting first H) T 1 1/2 HT 2 1/2 1/2=1/4 HHT 3 1/8 nd so on…
II)gives
(
)S
……
(x) i.e. The expected number of tosses (after first head) to get first tail is 2 and same can be applicable if first toss results in tail. Hence the average number of tosses is
22.
-
20.
(I
(II)
S
∑x …
……
(I)
S
f(x) ∴ (x)
……
S
[Ans. *] Range 0.32 to 0.34 This is a tricky question, here, X X X independent and identically distributed random variables with the uniform distribution , -. So, they are equiprobable. So X X or X have chances being largest are equiprobable. So, [P {X is largest}] or [P {X is largest}] or [P {X is largest}] =1 and P {X is largest} = P {X is largest} = P {X is largest}
[Ans. *] Range 49.9 to 50.1 Set of positive odd number less than 100 is 50. As it is a uniform distribution
∑ x (x) …
∴ *X is l rgest + 19.
Mathematics
[Ans. *] Range 0.15 to 0.18 X X X X X X et z X X X (X ) X X (z ) Pdf of z we need to determine. It is the convolution of three pdf
(z
23.
th
)
∫
z
dz
z
|
[Ans. *] Range 0.79 to 0.81 |x| ,|x|- ∫ e dx √
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 52
GATE QUESTION BANK
√ √ √ √ √
∫ |x| exp 4
x x
∫ x exp 4
∴pr(P ∪ Q) pr(P) + pr(Q) (D) is true since P Q P n(P Q) n(P) pr(P Q) pr(P)
5 dx 5 dx
5 dx 2.
x
∫ x exp 4
x
∫ x exp 4
√ [ exp (
√ , 24.
x
∫ |x| exp 4
-
[Ans. B] P(A|B) =
5 dx 5 dx
x ) dx]
( he d in tosses nd first toss in he d) = P(HHT) + P(HTH)
4/5
Parcel is sent to R
∴ Required probability = R
3.
1/5
S
Parcel is lost Parcel is lost
parcel
is
=
[Ans. C] If two fair dices are rolles the probability distribution of r where r is the sum of the numbers on each die is given by r P(r)
4/5
that
) ( )
Also, P(first toss is head) =
√
Parcel is sent to
Probability
(
∴ P(2 heads in 3 tosses | first toss is head) ( he ds in tosses nd first toss in he d) (first toss is he d)
[Ans. *] Range 0.43 to 0.45 Pre flow diagram is
1/5
Mathematics
lost
2 Probability that parcel is lost by 3 Probability that parcel is lost by provided that the parcel is lost
4 5
EE 1.
6 [Ans. D] (A) is false since of P & Q are independent pr(P Q) = pr(P) pr(Q) which need not be zero. (B) is false since pr(P ∪ Q) = pr(P) + pr(Q) – pr(P Q) (C) is false since independence and mutually exclusion are unrelated properties.
7 8 9 10 11 12 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 53
GATE QUESTION BANK
The above table has been obtained by taking all different all different ways of obtaining a particular sum. For example, a sum of 5 can be obtained by (1, 4), (2, 3), (3, 2) and (4, 1). ∴ P(x = 5) = 4/36 Now let us consider choice (A) Pr(r > 6) = Pr(r ≥ 7)
P(1, 5, 6) =
=
P(3, 4, 5) =
=
P(1, 2, 5) =
=
∴ Choice (C) P(1, 5 and 6) = 5.
is correct.
[Ans. C] x is uniformly distributes in [0, 1] ∴ Probability density function
= =
Mathematics
=
f(x) =
∴ Choice (A) i.e. pr(r > 6) = 1/6 is wrong. Consider choice (B) pr(r/3 is an integer) = pr(r = 3) + pr (r = 6) + pr (r = 9) + pr (r = 1)
=
=1
∴ f(x) = 1 0 < x < 1 Now E(x ) = ∫ x f(x)dx ∫x
dx
= =
6.
=
[Ans. B] Let N people in room. So no. of events that at least two people in room born at same date
∴ Choice (B) i.e. pr (r/3) is an integer = 5/6 is wrong. Consider choice (C) Now, pr(r/4 is an integer) = pr(r = 4) + pr (r = 8) + pr (r = 12) = =
≥
N
Solving, we get N = 7
+
7.
[Ans. C] (II is red|I is white) (II is red nd I is white) (I is white) (I is white nd II is red) (I is white)
8.
[Ans. B]
=
pr(r = 8) = ∴ pr(r = 8 | r/4 is an integer) =
…
=
= ∴ Choice (C) is correct. 4.
[Ans. C] Dice value 1 2
Probability
and
is the entrie
3
rectangle The region in which maximum of {x, y} is
4
less than ⁄
is shown below as shaded
region inside this rectangle
5 6
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 54
GATE QUESTION BANK y (
)
(
12.
)
Mathematics
[Ans. *] Range 0.35 to 0.45 (
)
x ∫
dx
∫
x|
(
(
)
dx
∫
dx
x|
)
13. p .m x,x y-
∫ f(x)dx
[Ans. *] Range 0.4 to 0.5 ∫ f(x) dx
/
by property
∴ ∫ kx dx k 9.
14.
[Ans. A] (x
) ,e
10.
∫ e dx e -
, e -
e
[Ans. B] Let number of heads = x, ∴ Number of tails n x ∴ ifference x (n x)or (n x n or n x If x n n x n x
n
If n
x
n
IN 1.
x
x
|
[Ans. D]
=52 weeks and 2 days are extra. Out of x)
x
7, (SUN MON) (or) (SAT SUN) are favorable. So, Probability of this event= 2.
or x
[Ans. C] Since the reading taken by the instrument is normally distributed, hence P(x
x )
Where, [Ans. *] Range 0.13 to 0.15 Let proportionality constant = k ∴ ( dot) k ( dots) k ( dots) k ( dots) k ( dots) k ( dots) k ∴k k k k k k k ∴k ∴ rob bility of showing dots
∴k
[Ans. D] Since leap chosen will be random, so, we assume it being the case of uniform probability distribution function. Number of days in a leap year=366 days
As x and n are integers, this is not possible ∴ Probability 0 11.
k
Now
√
√
∫ e
(
)
.dx
μ e n of the distribution σ St nd rd devi tion of the distribution. ∫
exp(
)dx
where, n=x 10 (∴μ kg) and from the data given in question √
∫
e
dx
On equating, we get 0.05=0.84 σ k
σ
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 55
GATE QUESTION BANK
3.
[Ans. D] Mean=
8.
[Ans. B] By definition of Gaussian distribution, total area under the curve =1. Hence half of the area =0.5
9.
[Ans. A]
=5.9 V. (
√
S
̅)
(
̅)
(
̅)
V (closest answer is 0.2)
P(x)= 4.
[Ans. C] ( )
=
Mean = μ ( )
∫ x (x)dx = ∫
Var(x)= ∫ (x
1 2 3 3 5.
Mathematics
=∫
[Ans. A] ]
(x
(x)dx
μ)
) dx =
10.
[Ans. C] Probability of incorrect report
11.
[Ans. C] σ mm μ mm Then probability
P(x)dx 1
x dx = 6
Area under triangle =
c 1 2
α 6.
[Ans. A] Probability that the sum of digits of two dices is even is same either both dices shows even numbers or odd numbers on the top of the surface ( ) ∴ ( ) ( ) Where ( ) Probability of occurring even number of both the dices ( ) Probability of occurring odd number of both the dices (
(X where x
(
X
μ
σ mm
(
)
)
( )
e
√ e
√
So, number of measurement more than 10.15mm P Total number of measurement
)
nd (
)
) ≃
∴ ( ) 12. 7.
[Ans. A] ∫ f(x) dx=P or ∫
e
or e
|
.dx =P
[Ans. D] For the product to be even, the numbers from both the boxes should not turn out to be odd simultaneously. ∴ ( )
( )( )
or P = .
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 56
GATE QUESTION BANK
13.
[Ans. A] ∫ f(x)dx e |
14.
15.
∫ e dx
e
[Ans. 2] For valid pdf ∫ ∫
Mathematics
dx
pdf dx
;
;k
[Ans. *] Range 0.890 to 0.899 Probability that job is successfully processed = ( )( )
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 57
GATE QUESTION BANK
Mathematics
Numerical Methods ME – 2005 1. Starting from x = 1, one step of Newton – Raphson method in solving the equation x³ +3x 7=0 gives the next value (x₁) as (A) x₁=0.5 (C) x₁ = .5 (B) x₁= . 0 (D) x₁=2 2.
With a 1 unit change in b, what is the change in x in the solution of the system of equation = 2 .0 0. = (A) Zero (C) 50 units (B) 2 units (D) 100 units
ME – 2006 3. Match the items in columns I and II. Column I Column II (P) Gauss-Seidel (1) Interpolation method (Q) Forward (2) Non-linear Newton-Gauss differential method equations (R) Runge-Kutta (3) Numerical method integration (S) Trapezoidal (4) Linear algebraic Rule equation (A) 2 (B) 2 (C) 2 (D) 2 4.
Equation of the line normal to function ) f(x) = (x (A) y = x 5 (B) y = x 5
at (0 5) is (C) y = x (D) y = x
5 5
ME – 2007 5. A calculator has accuracy up to 8 digits 2
after decimal place. The value of
sinxdx 0
when evaluated using this calculator by trapezoidal method with 8 equal intervals, to 5 significant digits is (A) 0.00000 (C) 0.00500 (B) 1.0000 (D) 0.00025
ME – 2010 6. Torque exerted on a flywheel over a cycle is listed in the table. Flywheel energy (in J per unit cycle) using impson’s rule is Angle (degree) Torque (N-m) 0 0 60 1066 120 323 180 0 240 323 300 55 360 0 (A) 542 (C) 1444 (B) 992.7 (D) 1986 ME – 2011 7.
The integral ∫
dx, when evaluated by
using impson’s / rule on two equal subintervals each of length 1, equals (A) 1.000 (C) 1.111 (B) 1.098 (D) 1.120 ME – 2013 8. Match the correct pairs. Numerical Order of Fitting Integration Scheme Polynomial . impson’s / 1. First Rule Q. Trapezoidal Rule 2. Second . impson’s / 3. Third Rule (A) P – 2 , Q – 1, R – 3 (B) P – 3, Q – 2 , R – 1 (C) P – 1, Q – 2 , R – 3 (D) P – 3, Q – 1 , R – 2 ME – 2014 9. Using the trapezoidal rule, and dividing the interval of integration into three equal sub intervals, the definite integral ∫ |x|dx is ____________
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 58
GATE QUESTION BANK
10.
The value of ∫ .
( )
“value approximate estimate?
calculated using
the Trapezoidal rule with five sub intervals is _______ 11.
The definite integral ∫
12.
The real root of the equation 5x 2cosx = 0 (up to two decimal accuracy) is _______
13.
Consider
an
equation
= t
.If x =x at t = 0 , the
CE – 2005 Linked Answer Question 1 and 2 Give a>0, we wish to calculate its reciprocal value 1/a by using Newton Raphson Method for f(x) = 0.
2.
The Newton Raphson algorithm for the function will be (A) x
= (x
)
(B) x
= (x
x )
(C) x
= 2x
ax
(D) x
=x
x
in
the
(C) – (D)
CE – 2007 4. The following equation needs to be numerically solved using the NewtonRaphson method x3 + 4x – 9 = 0 the iterative equation for the purpose is (k indicates the iteration level)
differential
increment in x calculated using RungeKutta fourth order multi-step method with a step size of Δt = 0.2 is (A) 0.22 (C) 0.66 (B) 0.44 (D) 0.88
1.
(A) – (B) 0
value”)
is evaluated
using Trapezoidal rule with a step size of 1. The correct answer is _______
ordinary
Mathematics
For a = 7 and starting with x = 0.2 the first two iteration will be (A) 0.11, 0.1299 (C) 0.12, 0.1416 (B) 0.12, 0.1392 (D) 0.13, 0.1428
CE – 2006 3. A 2nd degree polynomial f(x) has values of 1, 4 and 15 at x = 0, 1 and 2 respectively.
5.
(A) x
=
(B) x
=
(C) x
=x
(D) x
=
x
Given that one root of the equation x 10x + 31x – 30 = 0 is 5, the other two roots are (A) 2 and (C) and (B) 2 and (D) 2 and
CE – 2008 6. Three values of x and y are to be fitted in a straight line in the form y = a + bx by the method of least squares. Given ∑x = 6, ∑y = 2 ∑x = and ∑xy = the values of a and b are respectively (A) 2 and 3 (C) 2 and 1 (B) 1 and 2 (D) 3 and 2 CE – 2009 7. In the solution of the following set of linear equation by Gauss elimination using partial pivoting 5x + y + 2z = 34; 4y – 3z = 12; and 10x – 2y + z = 4; the pivots for elimination of x and y are (A) 10 and 4 (C) 5 and 4 (B) 10 and 2 (D) 5 and 4
The integral ∫ f(x) dx is to be estimated by applying the trapezoidal rule to this data. What is the error (define as true th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 59
GATE QUESTION BANK
CE – 2010 8. The table below given values of a function F(x) obtained for values of x at intervals of 0.25. x 0 0.25 0.5 0.75 1.0 F(x) 1 0.9412 0.8 0.64 0.50 The value of the integral of the function between the limits 0 to using impson’s rule is (A) 0.7854 (C) 3.1416 (B) 2.3562 (D) 7.5000 CE 9.
2011 The square root of a number N is to be obtained by applying the Newton Raphson iterations to the equation x = 0. If i denotes the iteration index, the correct iteration scheme will be (A) x (B) x
= (x
)
= (x
CE – 2013 12. Find the magnitude of the error (correct to two decimal places) in the estimation of following integral using impson’s ⁄ Rule. Take the step length as 1.___________ ∫ (x
1.
Consider
)
(D) x
= (x
)
he error in
xe dx
=
)
(
)
is 2
1 R xn1 xn can be used to compute 2 xn
.
the (A) square of R (B) reciprocal of R (C) square root of R (D) logarithm of R
0 .
CE – 2012 The estimate of ∫ .
1 3
to an accuracy of at least 106
The Newton-Raphson iteration
for a continuous
The values of and ( ) are 19.78 and 500.01, respectively. The corresponding error in the central difference estimate for h = 0.02 is approximately (A) . 0 (C) .5 0 (B) .0 0 (D) .0 0
11.
x
1
function estimated with h=0.03 using the central difference formula f(x)|
=
using the trapezoidal rule is (A) 1000e (C) 100e (B) 1000 (D) 100
f(x)|
(
series
CS – 2008 2. The minimum number of equal length subintervals needed to approximate
3. 10.
the
= 0.5 obtained from the NewtonRaphson method. The series converges to (A) 1.5 (C) 1.6 (D) 1.4 (B) √2
)
= (x
0) dx
CS – 2007
2
(C) x
Mathematics
obtained using
impson’s rule with three – point function evaluation exceeds the exact value by (A) 0.235 (C) 0.024 (B) 0.068 (D) 0.012
CS – 2010 4. Newton-Raphson method is used to compute a root of the equation x 13 = 0 with 3.5 as the initial value. The approximation after one iteration is (A) 3.575 (C) 3.667 (B) 3.677 (D) 3.607
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 60
GATE QUESTION BANK
CS – 2012 5. The bisection method is applied to compute a zero of the function f(x) = x x x in the interval [1,9]. The method converges to a solution after ___________ iterations. (A) 1 (C) 5 (B) 3 (D) 7 CS – 2013 6. Function f is known at the following points: x f(x) 0 0 0.3 0.09 0.6 0.36 0.9 0.81 1.2 1.44 1.5 2.25 1.8 3.24 2.1 4.41 2.4 5.76 2.7 7.29 3.0 9.00 he value of ∫ f(x)dx computed using the trapezpidal rule is (A) 8.983 (C) 9.017 (B) 9.003 (D) 9.045 CS – 2014 7. The function f(x) = x sin x satisfied the following equation: ( ) + f(x) + t cos x = 0. The value of t is _________. 8.
In the Newton-Raphson method, an initial guess of = 2 made and the sequence x x x .. is obtained for the function 0.75x 2x 2x =0 Consider the statements (I) x = 0. (II) The method converges to a solution in a finite number of iterations. Which of the following is TRUE? (A) Only I
Mathematics
(B) Only II (C) Both I and II (D) Neither I nor II 9.
With respect to the numerical evaluation of the definite integral,
= ∫ x dx where a and b are given, which of the following statements is/are TRUE? (I) The value of K obtained using the trapezoidal rule is always greater then or equal to the exact value of the defined integral (II) The value of K obtained using the impson’s rule is always equal to the exact value of the definite integral (A) I only (B) II only (C) Both I and II (D) Neither I nor II ECE– 2005 1. Match the following and choose the correct combination Group I Group II (A) Newton1. Solving nonRaphson linear equations method (B) Runge-Kutta 2. Solving linear method simultaneous equations (C) impson’s 3. Solving ordinary Rule differential equations (D) Gauss 4. Numerical elimination integration method 5. Interpolation 6. Calculation of Eigen values (A) A-6, B-1, C-5, D-3 (B) A-1, B-6, C-4, D-3 (C) A-1, B-3, C-4, D-2 (D) A-5, B-3, C-4, D-1
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 61
GATE QUESTION BANK
ECE– 2007 2. The equation x3 x2+4x 4=0 is to be solved using the Newton-Raphson method. If x=2 is taken as the initial approximation of the solution, then the next approximation using this method will be (A) 2/3 (C) 1 (B) 4/3 (D) 3/2
(A) 2
x
x
.
sin x ..
2 cos x
x
.
..
(C) 2
x
x
.
..
(D) 2
x
x
.
..
8.
The series ∑
eXn 1 eXn X2 eXn 1 Xn 1 (D) Xn1 n Xn -eXn
ECE– 2014 6. The Taylor expansion of is
x
Match the application to appropriate numerical method. Application Numerical Method P1:Numerical M1:Newtonintegration Raphson Method P2:Solution to a M2:Runge-Kutta transcendental Method equation P3:Solution to a M : impson’s system of linear 1/3-rule equations P4:Solution to a M4:Gauss differential equation Elimination Method (A) P1—M3, P2—M2, P3—M4, P4—M1 (B) P1—M3, P2—M1, P3—M4, P4—M2 (C) P1—M4, P2—M1, P3—M3, P4—M2 (D) P1—M2, P2—M1, P3—M3, P4—M4
(C) Xn1 1 Xn
ECE– 2013 5. A polynomial f(x) = a x a x a x a x a with all coefficients positive has (A) No real root (B) No negative real root (C) Odd number of real roots (D) At least one positive and one negative real root
(B) 2
7.
ECE– 2008 3. The recursion relation to solve x= using Newton-Raphson method is (A) =e (B) = e
ECE– 2011 4. A numerical solution of the equation f(x) = x √x = 0 can be obtained using Newton – Raphson method. If the starting value is x = 2 for the iteration, the value of x that is to be used in the next step is (A) 0.306 (C) 1.694 (B) 0.739 (D) 2.306
Mathematics
converges to
(A) 2 ln 2 (B) √2
(C) 2 (D) e
EE– 2007 1.
The differential equation
=
is
discretised using Euler’s numerical integration method with a time step T > 0. What is the maximum permissible value of T to ensure stability of the solution of the corresponding discrete time equation? (A) 1 (C) (B) /2 (D) 2 EE– 2008 2. Equation e = 0 is required to be solved using ewton’s method with an initial guess x = . Then, after one
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 62
GATE QUESTION BANK
step of ewton’s method estimate x of the solution will be given by (A) 0.71828 (C) 0.20587 (B) 0.36784 (D) 0.00000 3.
A differential equation dx/dt = e u(t) has to be solved using trapezoidal rule of integration with a step size h = 0.01 sec. Function u(t) indicates a unit step function. If x(0)= 0, then value of x at t = 0.01 s will be given by (A) 0.00099 (C) 0.0099 (B) 0.00495 (D) 0.0198
EE– 2009 4. Let x 7 = 0. The iterative steps for the solution using Newton – aphson’s method is given by (A) x
= (x
(B) x
=x
(C) x
=x
(D) x
=x
)
EE– 2013 7. When the Newton – Raphson method is applied to solve the equation f(x) = x 2x = 0 the solution at the end of the first iteration with the initial guess value as x = .2 is (A) 0.82 (C) 0.705 (B) 0.49 (D) 1.69 EE– 2014 8. The function ( ) = is to be solved using Newton-Raphson method. If the initial value of is taken as 1.0, then the absolute error observed at 2nd iteration is ___________ IN– 2006 1. For k = 0 2 . the steps of Newton-Raphson method for solving a non-linear equation is given as
2 5 xk 1 xk xK2 . 3 3 (x
Starting from a suitable initial choice as k tends to , the iterate tends to (A) 1.7099 (C) 3.1251 (B) 2.2361 (D) 5.0000
)
EE– 2011 5. Solution of the variables and for the following equations is to be obtained by employing the Newton-Raphson iterative method equation(i) 0x inx 0. = 0 equation(ii) 0x 0x cosx 0. = 0 Assuming the initial values = 0.0 and = .0 the jacobian matrix is 0 0. 0 0. (A) * (C) * + + 0 0. 0 0. 0 0 0 0 (B) * (D) * + + 0 0 0 0 6.
Mathematics
IN– 2007 2. Identify the Newton-Raphson iteration scheme for finding the square root of 2.
3.
(A) x
=
(x
)
(B) x
= (x
)
(C) x
=
(D) x
= √2
x
The polynomial p(x) = x + x + 2 has (A) all real roots (B) 3 real and 2 complex roots (C) 1 real and 4 complex roots (D) all complex roots
Roots of the algebraic equation x x x = 0 are ) (A) ( (C) (0 0 0) (B) ( j j) (D) ( j j)
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 63
GATE QUESTION BANK
IN– 2008 4. It is known that two roots of the nonlinear equation x3 – 6x2 +11x 6 = 0 are 1 and 3. The third root will be (A) j (C) 2 (B) j (D) 4
IN– 2013 8. While numerically solving the differential equation
The differential equation
=
with
x(0) = 0 and the constant 0 is to be numerically integrated using the forward Euler method with a constant integration time step T. The maximum value of T such that the numerical solution of x converges is (C) (A) (B)
2xy = 0 y(0) =
using
Euler’s predictor – corrector (improved Euler – Cauchy )method with a step size of 0.2, the value of y after the first step is (A) 1.00 (C) 0.97 (B) 1.03 (D) 0.96
IN – 2009 5.
Mathematics
IN– 2014 9. The iteration step in order to solve for the cube roots of a given number N using the Newton- aphson’s method is
(D) 2
(A) x
=x
(B) x
= (2x
(C) x
=x
(D) x
= (2x
(
x ) )
(
x ) )
IN– 2010 6. The velocity v (in m/s) of a moving mass, starting from rest, is given as
=v
t.
Using Euler’s forward difference method (also known as Cauchy-Euler method) with a step size of 0.1s, the velocity at 0.2s evaluates to (A) 0.01 m/s (C) 0.2 m/s (B) 0.1 m/s (D) 1 m/s IN– 2011 7. The extremum (minimum or maximum) point of a function f(x) is to be determined by solving
( )
= 0 using the
Newton-Raphson method. Let f(x) = x x and x = 1 be the initial guess of x. The value of x after two iterations (x ) is (A) 0.0141 (C) 1.4167 (B) 1.4142 (D) 1.5000
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 64
GATE QUESTION BANK
Mathematics
Answer Keys and Explanations ME 1.
y = sin ( ) = 2
[Ans. C] By N-R method ,
=x –
f(x) = x f( ) =
x
x =x
(
)
(
)
( ) ( )
y = sin (
x =
y = sin( ) = 0 5 y = sin ( ) =
7
y = sin (
f (x) = x f ( )= ,
=1
(
)
) = 0.70 0
)=
7 y = sin ( ) =
[Ans. C] Given x y = 2 (i) .0 x 0.0 y = b (ii) Multiply 0.99 is equation (i) and subtract from equation (ii); we get ( .0 0. )x = b (2 0. ) 0.02x = b . 0.02Δx = Δb Δx =
0.02
[Ans. D]
4.
[Ans. B] Given f(x) = (x 2 ) f (x) = (x
f(x)dx = [(y
∫ y ∫
0.70 0
6.
y )
[(0
0)
0.70 0
0.70 0
[(0
y )]
7.
[Ans. C] x y= ∫
( 0
0)
2( 2.7 /unit cycle.
=
Slope of normal = 3 (∵ roduct of slopes = 1) Slope of normal at point (0, 5) y 5 = (x 0) y= x 5 [Ans. A] b a 2 0 h= = = n y = sin(0) = 0
0=0
[Ans. B] ower = ω = Area under the curve. h (y = [(y y ) y y )
/
Slope of tangent at point (0, 5) 2 ) / = m = (0
y
2(0.70 0
2(y
)
2(y
)]
sinx dx =
=
5.
)=0
Trapezoidal rule
= 50 units
3.
0.70 0
(0.5) = .5
=
y = sin ( 2.
0.70 0
1 1
x dx = (y
= (
55)
2 )]
3
2 h
x
2
2
0
y 2
y )
)
= . 8.
[Ans. D] By the definition only
y = sin ( ) = 0.70 0
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 65
GATE QUESTION BANK
9.
[Ans. *] Range 1.10 to 1.12
By intermediate value theorem roots lie be between 0 and 1. et x = rad = 57. 2 By Newton Raphson method f(x ) x =x f (x ) 2x sin x 2 cos x x = 5 2 sin x x = 0.5 2 x = 0.5 25 x = 0.5 2
∫ |x|dx is h ∫ ydx = [y 2
2(y
y
y
x
1
y
1
0.33
2
y ]
y
0.33
2
∫ |x|dx =
.)
y
[
y
0.33
1
0.333
1
2(0.
0.
)]
13.
= . 0 10.
[Ans. *] Range 1.74 to 1.76 2.5 h= = 0. 5 y 2y 2y ∫ . ln (x)dx = [ 2y y =
.
[ln(2.5)
2ln( . ) = .75 11.
2(ln2. )
.
2y
]
2 ln( . )
CE 1.
[Ans. *]Range 1.1 to 1.2
t|
Δx = 0.0
0. = 0.
= 2t
t|
Set up the equation as x = i.e. = a
∫ f(x)dx = [y
y
2(y
iven in question 0 1 1 2 1 0.5
∫ dx = [y x 2
.
.
t Δx = 2
To calculate using N-R method
rapezoidal rule
x y
)dt
[Ans. C]
∫ dx by trapezoidal rule x
h=
[Ans. D] The variation in options are much, so it can be solved by integrating directly dx = t dt ∫ dx = ∫ ( t
ln( )]
2ln( .7)
Mathematics
y
y
..y
)]
a=0 i.e. f(x) =
2 3 0.33
a=0
Now f (x) = f(x ) =
a
f (x ) =
2(y )]
For N-R method = [ 2 = .
0.
2
0.5]
x
=x x
12.
[Ans. *] Range 0.53 to 0.56 Let f(x) = 5x 2 cos x f (x) = 5 2 sin x f(0) = f( ) = 2.
=x
(
)
(
) (
)
Simplifying which we get x = 2x ax
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 66
GATE QUESTION BANK
2.
[Ans. B] For a = 7 iteration equation Becomes x = 2x 7x with x = 0.2 x = 2x 7x = 2× 0.2 – 7(0.2) = 0.12 and x = 2x 7x = 2× 0.12 7(0. 2) = 0.1392
x
[Ans. A] f(x) = 1, 4, 15 at x = 0, 1 and 2 respectively ∫ f(x)dx = (f
2f
=x x
=
5.
f )
∫ f(x)dx = (1 + 2(4) + 15) = 12
and α β
4.
αβ
(
βγ =
)
= 30
βγ
γα = 5β
βγ
5γ =
=
5 (β γ) βγ = ince βγ = from (i) 5 (β γ) = β γ=5 βγ = olving for β and γ β (5 β) = β 5β =0 β = 2 and γ = Alternative method 5 1 0 31 0 0 5 25 30 1 5 6 0 (x 5)(x )=0 5x (x 5)(x 2)(x )=0 x=2 5
x )dx + =
2=
[Ans. A ] Given f(x) = x x =0 f (x) = x Newton – Raphson formula is
γα =
βγ = (i) Also
Error = exact – Approximate value =
βγ
α βγ = 5
Now exact value ∫ f(x)dx
= *x
2x x
αβγ=
Approximate value by rapezoidal ule = 12 Since f(x) is second degree polynomial, let f(x) = a0 + a x + a x f(0) = 1 a 0 0= a = f(1) = 4 a a a = 1+ a a = a a = f(2) = 15 a 2a a = 5 2a a = 5 2a a = Solving (i) and (ii) a = and a = f(x) = 1 – x + 4 x x
=
[Ans. A] Given x – 10 x + 31x 30 = 0 One root = 5 Let the roots be α β and γ of equation ax + bx + cx + d = 0
(3 points Trapezoidal Rule) Here h = 1
=∫ (
f(x ) f (x ) (x x ) ( x ) x x x ( x )
=x
x 3.
Mathematics
6.
[Ans. D] Y = a + bx Given n= ∑x = and ∑xy = th
th
∑y = 2 ∑x = 14
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 67
GATE QUESTION BANK
Normal equations are ∑y = na b∑x ∑xy = a∑x b∑x Substitute the values and simply a= b=2 7.
9.
5 [0 0
2
(
)
| 2] → 2
0 [0 5
2
=
f(x ) f(x )
=x
=x
(
x
)
2x
x
=
2x
2
[x
x
]
10.
[Ans. D] Error in central difference formula is (h) This means, error If error for h = 0.03 is 2 0 then Error for h = 0.02 is approximately (0.02) 2 0 0 (0.0 )
11.
[Ans. D] Exact value of ∫ .
| 2] 2
So the pivot for eliminating x is a = 10 Now we eliminate x using this pivot as follows : 0 2 [0 | 2] 5 2 5 0 2 0 2] → [0 0 2 /2 Now to eliminate y, we need to compare the elements in second column at and below the diagonal element Since a = 4 is already larger in absolute value compares to a = 2 The pivot element for eliminating y is a = 4 itself. The pivots for eliminating x and y are respectively 10 and 4 8.
[Ans. A] x
[Ans. A] The equation is 5x + y + 2z = 34 0x + 4y – 3z = 12 and 10x – 2y + z = The augmented matrix for gauss elimination is 5 2 [0 | 2] 0 2 Since in the first column maximum element in absolute value is 10 we need to exchange row 1 with row 3
Mathematics
.
dx = .0
Using impson’s rule in three – point form, b a .5 0.5 h= = = 0.5 n 2 So, x 0.5 1 1.5 y 2 1 0.67 ∫
= =
[
0.5
] [2
0. 7
]
= . So, the estimate exceeds the exact value by Approximate value – Exact value = 1.1116 1.0986 =0.012(approximately)
12.
[Ans. *](Range 0.52 to 0.55) Using impson’s ule X 0 1 2 3 Y 10 11 26 91
4 266
[Ans. A] I = h(f = 0. = 0.7 5
f
2f
f
0.25(
0.
0.
0.5)
∫ (x
f ) 2
= [( 0
2
0)dx 2
)
2(2 )
(
)]
= 2 5. The value of integral th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 68
GATE QUESTION BANK
∫ (x
0) dx = *
=
0
=2
x 5
=
0x+ 3.
.
x
=
[Ans. A] +
, x = 0.5
)
(α
)
2α =
=x =α
2α = α + R α =R α=√ So this iteration will compute the square root of R
α= + α= 8α = 4α +9 α = 4.
α = = 1.5 [Ans. A] Here, the function being integrated is f(x) = xe f (x) = xe + e = e (x + 1) f’ (x) = xe + e + e = e (x + 2) Since, both are increasing functions of x, maximum value of f ( ) in interval 1 2, occurs at = 2 so ( )| (2 max |f =e 2) = e Truncation Error for trapezoidal rule = TE (bound)
[Ans. D] y=x dy = 2x dx f(x)= x x
= .5
5.
=
(b – a) max |f ( )| 1
=
(2 – 1) [e (2 + 2)]
=
e
Now putting
(
)
=
= 57 7
)=5 f(x ) 2 oot lies between and
x =(
0
0
)=2 f(x ) 0 2 After ' ' interations we get the root
x =(
= max |f ( )|
.
[Ans. B] f( ) = 5 f( ) = 5 72 ) ) f( 0 f( 0
is number of subintervals
=
.
= . 07
max |f ( )|
Where
(x
2α=α+ =
when the series converges x
=
= 1000 e
At convergence x =x =α α=
Given x
2.
)/
[Ans. C]
5 Magnitude of error = 2 5. 2 . = 0.5 CS 1.
(
Mathematics
2
6.
[Ans. D] h ∫ f(x)dx = [f(0) 2 =
0
=
=
0 [
. .
[
0.
f( )
2(0.0 0. . . 7.2 )
2(∑f )] ]
5 . ]
= 9.045
h= Now, No. of intervals,
= th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 69
GATE QUESTION BANK
7.
8.
9.
ECE 1.
2.
[Ans. – ] Given (x) + f(x) + t cos x = 0 and f(x) = x sin x f (x) = x cos x + sin x f (x) = x ( sin x) + cos x + cos x = 2 cos x – x sin x = 2 cos x – f (x) 2 cos x – f (x) + f(x) +t cos x = 0 2 cos x = tcos x t = 2 [Ans. A] f(x) = 0.75x 2x 2x f (x) = 2.25x x 2 x =2 f = 2 f = f x =x =0 f f = f = 2 f x =x =2 f f = 2 f = f x =x =0 f Also, root does not lies between 0 and 1 So, the method diverges if x = 2 nly ( )is true.
x1 2 3.
1 x n 4.
x1 x0
e e
e xn 1 exn
[Ans. C] x
f(x ) f (x )
=x
f(2) = (2
x
) = √2
√2
f (2) =
√
=2
and
√
=
√ )
(√ √
= .
√
5.
[Ans. D] f(x) = a x a x a x a x a If the above equation have complex roots, then they must be in complex conjugate pair, because it’s given all co-efficients are positive ( they are real ) So if complex roots are even no. (in pair) then real roots will also be even. ption ( )is wrong From the equation ( 0) roduct of roots = As no. of roots = 4, Product of roots < 1 either one root 0 (or) Product of three roots < 0 ption ( )is rong. Now, take option (A), Let us take it is correct . Roots are in complex conjugate pairs = Product of roots 0 | | | | 0 which is not possible ption (A) is wrong orrect answer is option ( )
[Ans. C] By definition (& the application) of various methods
4=0
Next approximation x1 x0
8 4 12 3
[Ans. C] Given : f(x)= x e By Newton Raphson method, f(x ) x x =x =x f (x )
[Ans. C] For value of K if trapezoidal rule is used then the value is either greater than actual value of definite integral and if impson’s rule is used then value is exact Hence both statements are TRUE
[Ans. B] y(t) =x3 x2 + 4x x0 = 2
Mathematics
f x0 f ' x0
x03 x02 4x0 4 3x02 2x0 4 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 70
GATE QUESTION BANK
6.
[Ans. A] sin x 2 cos x x = (x – )
7.
[Ans. B]
8.
[Ans. D] ∑
n
2( –
x 2
.
x
)
Put x = as given, x = [e ( 2) ]/e = 0.71828
)
[Ans. C]
=e
.. = e
u(t)
x
x 2
.
. . x in t
[Ans. D] Here,
x = ∫ e u(t) dt = ∫ f(t) dt At t = 0.01, x = Area of trapezoidal
= x
f(x y) =
x
h
=(
)x h
4.
x
5.
=[
=*
( )
f(x ) = e f’(x ) = e
6.
(
]
)
(
)
+
0x cos x 0x sinx
20x
0sinx ] 0cosx
0 0
is
0 + 0
[Ans. D] x x x =0 (x )(x )=0 x =0 x =0 x= x= j
=x –(
(
The matrix at x = 0 x =
( )
=
.
[Ans. B] u(x x ) = 0x sin x 0. = 0 v(x x ) = 0x 0x cosx 0. = 0 The Jacobian matrix is u u x x v v [ x x ]
[Ans. A] Here f(x) = e f (x) = e The Newton Raphson iterative equation is
=
=x
= *x
|
Δ 2 o maximum permissible value of Δ is 2 .
i.e. x
e
[Ans. A]
since h = Δ here Δ
x
[
= x
h
=x
.
= 0.0099
h
or stability |
x
f(0.0 )] =
= [f(0)
Euler’s method equation is x = x h. f(x y ) x x = x h( )
2.
i=0
(
x =
2
as e = EE 1.
Now put
3.
=
Mathematics
)
)
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 71
GATE QUESTION BANK
7.
[Ans. C] x =x =
.2
Hence, it will have atleast 5 (0+1)= 4 complex roots.
f(x ) f (x ) ( .2) 2( .2) ( .2) 2
4.
[Ans. C] Approach- 1 Given, x3 – 6x2 + 11x – 6 = 0 Or (x – 1)(x – 3)(x – 2) = 0 x= 1, 2, 3.
= 0.705 8.
[Ans. *] Range 0.05 to 0.07 Clearly, x = 0 is root of the equation f(x) = e =0 f (x) = e and x = .0 Using ewton raphson method (e . ) f(x ) x =x = = f (x ) e. e and x = x
f(x ) = f (x ) e =
(e
Approach- 2 For ax3 +bx2 + cx +d = 0 If the three roots are p,q,r then Sum of the roots= p+q+r= b/a Product of the roots= pqr= d/a pq+qr+rp=c/a
) e
5.
[Ans. D] dx x = dt f(x, y) =
e
e = 0. 7 0. = 0.0 Absolute error at 2nd itteration is |0 0.0 | = 0.0 IN 1.
x
=x h
=( [Ans. A] As k ∞ xk+1 ≈xk xk = x
h (x y ) = x )x
2.
3.
h
h(
x
)
)
h
|
h
x
/
(
or stability |
Δ
x = x x =5 x =5
Mathematics
Δ
= 1.70
[Ans. A] Assume x = √ f(x) = x =0 f(x ) x =x = [x f (x ) 2
6.
[Ans. A] dv =v t dt t v dv =v t dt 0 0 0 0+0 0. = 0 0.1 0 0+0.1 0. = 0.0
7.
[Ans. C] f(x) = x x f (x) = x = g(x) x = initial guess g (x) = x g (x ) x =x g (x )
2 ] x
[Ans. C] Given p(x) = x + x + 2 There is no sign change, hence at most 0 positive root ( rom escarte’s rule of signs) p( x) = x x+2 There is one sign change, hence at most 1 negative root ( rom escarte’s rule of signs)
2
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 72
GATE QUESTION BANK
(
= x =x = .5 = .
)
= .5
g(x ) g (x ) 0.75 7
8.
[Ans. D] dy = 2xy x = 0 y = h = 0.2 dx y =y h. f(x y ) (0.2)f(0 ) = = and y = y [f(x y ) f(x y )] (0. )[f(0 ) f(0.2 )] = = 0. is the value of y after first step, using Euler’s predictor – corrector method
9.
[Ans. B] For convergence x
Mathematics
= x =x x=
x =
(2x
x
)
x= √
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 73
GATE QUESTION BANK
Mathematics
Calculus ME – 2005 1.
ME – 2006
The line integral ∫ ⃗ ⃗⃗⃗⃗ of the vector function ⃗ ( ) 2xyz ̂+ x²z + ̂ k²y ̂ from the origin to the point P (1,1,1) (A) is 1 (B) is Zero (C) is 1 (D) cannot be determined without specifying the path
2.
be (A) (B) 8.
(A)
(C)
(B)
(D)
Changing the order of the integration in the double integral I = ∫ ∫
(
∫ (
What is q?
(A)
(C) X (D) 8 )
(A)
√
(C)
√
(B)
√
(D)
.
(
10.
/
)
(A) 0 (B) ⁄
is equal to 11.
∫
(C) (D) 1
The area of a triangle formed by the tips of vectors a , b and c is (A)
(
)(
(D) Zero
(B)
|(
)
Stoke’ theorem connects (A) A line integral and a surface integral (B) Surface integral and a volume integral (C) A line integral and a volume integral (D) Gradient of function and its surface integral
(C)
|
(D)
(
(C) 2∫ (
√
ME – 2007
(B) 2∫
6.
1 and t is a real number,
Let x denote a real number. Find out the INCORRECT statement + represents the set if all (A) S * real numbers greater then 3 + represents the empty (B) S * set + represents the (C) S * union of set A and set B + represents the set (D) S * of all real umbers between a and b, where and b are real number
)
leads to (A) 4y (B) 16y²
(C) 0 (D) ⁄
dt is:
∫
9.
4.
)
⁄ ⁄
√
By a change of variables x(u,v) = uv, y(u,v) = v/u is double integral, the integral f(x,y) changes to f(uv, u/v) ( ). Then, ( ) (A) 2 v/u (C) v² (B) 2 u v (D) 1
I =∫ ∫ (
2x2 7x 3 , then limf(x) will x 3 5x2 12x 9
Assuming i =
The right circular cone of largest volume that can be enclosed by a sphere of 1 m radius has a height of
3.
5.
If f( x ) =
7.
)
th
th
) (
)|
| )
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 74
GATE QUESTION BANK
12.
√
If
√
y (2) = (A) 4 or 1 (B) 4 only 13.
, then
√
14.
20.
The divergence of the vector field )̂ ( ) ̂ is (x y) ̂ ( (A) 0 (C) 2 (B) 1 (D) 3
21.
Let
(C) 1 (D) 1/ln2
y2 4x and x2 4y is ⁄ (A) (B) 8 23.
⁄ (C) (D) 16
The distance between the origin and the point nearest to it on the surface
The directional derivative of the scalar
z2 1 xy is
function f(x, y, z) = x2 2y2 z at the
(A) 1
point P = (1, 1, 2) in the direction of the vector ⃗ ̂ ̂ is (A) 4 (C) 1 (B) 2 (D) 1
at x=2, y=1?
ME – 2009 22. The area enclosed between the curves
Which of the following integrals is unbounded? (C) ∫ (A) ∫ (D) ∫
What is
(A) 0 (B) ln2
The length of the curve
(B) ∫ 16.
In the Taylor series expansion of ex about x = 2, the coefficient of (x 2)4 is ⁄ (A) ⁄ (C) ⁄ (B) (D) ⁄
The minimum value of function y = x2 in the interval [1, 5] is (A) 0 (C) 25 (B) 1 (D) Undefined
between x = 0 and x = 1 is (A) 0.27 (C) 1 (B) 0.67 (D) 1.22 15.
19.
(C) 1 only (D) Undefined
ME – 2008
Mathematics
(C) √ (D) 2
(B) √ ⁄ 24.
A path AB in the form of one quarter of a circle of unit radius is shown in the figure. Integration of x y on path AB 2
17.
Consider the shaded triangular region P shown in the figure. What is∬ xydxdy? y
P
18.
B
X
x
A
2
⁄ ⁄
The value of (A) (B)
Y
x+2y=2
1
0 (A) (B)
traversed in a counter-clockwise sense is
⁄ ⁄
(C) ⁄ (D) 1
(
)
(C) (D)
25.
is ⁄ ⁄
th
(A)
(C)
(B)
(D) 1
The divergence of the vector field ̂ at a point (1,1,1) is ̂ ̂ equal to (A) 7 (C) 3 (B) 4 (D) 0 th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 75
GATE QUESTION BANK
ME – 2010 26. Velocity vector of a flow field is given as ⃗ ̂ .̂ The vorticity vector at (1, 1, 1) is (A) 4 ̂ ̂ (B) 4 ̂ ̂ 27.
The function (A) o o
(C) ̂ (D) ̂
∀ ∀ (B) o o ∀ ∀ except at x = 3/2 (C) o o ∀ ∀ except at x = 2/3 (D) o o ∀
28.
29.
ME – 2012 33. Consider the function ( ) in the interval . At the point x = 0, f(x) is (A) Continuous and differentiable. (B) Non – continuous and differentiable. (C) Continuous and non – differentiable. (D) Neither continuous nor differentiable.
̂ ̂
R R R R
34.
R R
ME – 2011 30. If f(x) is an even function and is a positive real number, then ∫ ( )dx equals
31.
What is (A) (B)
32.
36.
For the spherical surface the unit outward normal vector at the point
is
(C) π (D) π
(C)
(B) (C)
is
√
(A) (B)
has
/
√
̂
√
̂
√
̂
√
̂
√
(C) ̂ (D) 37.
equal to?
A series expansion for the function (A)
.
∫ ( )
(C) 0 (D) 1
(C) 1 (D) 2
At x = 0, the function f(x) = (A) A maximum value (B) A minimum value (C) A singularity (D) A point of inflection
R except at x = 3 ∀ R
(D)
/ is
35.
The parabolic arc is √ revolved around the x-axis. The volume of the solid of revolution is (A) π (C) π (B) π (D) π
(A) 0 (B)
. (A) 1/4 (B) 1/2
The value of the integral ∫ (A) –π (B) –π
Mathematics
√
̂
√
̂
√
̂
The area enclosed between the straight line y = x and the parabola y = in the x – y plane is (A) 1/6 (C) 1/3 (B) 1/4 (D) 1/2
ME – 2013 38. The following surface integral is to be evaluated over a sphere for the given steady velocity vector field defined with respect to a cartesian coordinate system having i, j and k as unit base vectors. ∫∫ (
(D) th
th
) th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 76
GATE QUESTION BANK
Where S is the sphere, and n is the outward unit normal vector to the sphere. The value of the surface integral is (A) π (C) π⁄ (B) π (D) π 39.
45.
If a function is continuous at a point, (A) the limit of the function may not exist at the point (B) the function must be derivable at the point (C) the limit of the function at the point tends to infinity (D) the limit must exist at the point and the value of limit should be same as the value of the function at that point
The value of the definite integral ( )
∫ √
is
(A)
√
(C)
√
(B)
√
(D)
√
46.
Divergence of the vector field ̂ ( ̂ ̂ ) is (A) 0 (C) 5 (B) 3 (D) 6
(C) 3 (D)Not defined
47.
The value of the integral
ME – 2014 40.
is (A) 0 (B) 1
∫ 41.
Which one of the following describes the relationship among the three vectors ̂ ̂ ̂ ̂ + ̂ + ̂ ̂ ̂ ̂ (A) The vectors are mutually perpendicular (B) The vectors are linearly dependent (C) The vectors are linearly independent (D) The vectors are unit vectors
42.
.
(
)
/ is equal to
(A) 0 (B) 0.5 43.
̂
̂
)̂ )̂ ̂ ̂
̂ ̂ ̂ ̂
)
(
)
) (
)
(A) 3 (B) 0 48.
(C) 1 (D) 2
The value of the integral ∫ ∫ is (
)
(C) (
(B) (
)
(D) .
(A)
) /
).
Where, c is the square cut from the first quadrant by the lines x = 1 and y = 1 will ( G ’ h o o h h line integral into double integral) (A) ⁄ (C) ⁄ (B) 1 (D) ⁄
̂ ̂
( (
CE – 2005 1. Value of the integral ∮ (
(C) 1 (D) 2
Curl of vector ⃗ ̂ (A) ( (B) ( (C) (D)
44.
Mathematics
̂ ̂ 2.
A rail engine accelerates from its stationary position for 8 seconds and travels a distance of 280 m. According to the Mean Value theorem, the speedometer at a certain time during acceleration must read exactly. (A) 0 kmph (C) 75 kmph (B) 8 kmph (D) 126 kmph
The best approximation of the minimum value attained by (100x) for ≥ is _______
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 77
GATE QUESTION BANK
CE – 2006 3. What is the area common to the circles o 2 (A) 0.524 a (C) 1.014 a2 (B) 0.614 a2 (D) 1.228 a2 4.
The directional derivative of f(x, y, z) = 2 + 3 + at the point P (2, 1, 3) in the direction of the vector a= k is (A) (C) (B) (D)
CE – 2007 5. Potential function is given as = . When will be the stream function () with the condition = 0 at x = y = 0? (A) 2xy (C) (B) + (D) 2 6.
Evaluate ∫ (C) π⁄ (D) π⁄
(A) π (B) π⁄ 7.
10.
12.
transformed to (A) (B)
9.
(C) √ (D) 18
parabola is y = 4h
(A) ∫ √ √
√
(D)
√
√
(C) ∫
= 0 by substituting (C)
where x is the
horizontal coordinate and y is the vertical coordinate with the origin at the centre of the cable. The expression for the total length of the cable is
= 0 can be
(D)
14.
√
∫
.
The
/
is
(A) 2/3 (B) 1
The inner (dot) product of two vectors ⃗ and ⃗ is zero. The angle (degrees) between in two vectors is (A) 0 (C) 90 (B) 30 (D) 120
(C) 40.5 (D) 54.0
√
(B) 2∫
+
is
CE – 2010 13. A parabolic cable is held between two supports at the same level. The horizontal span between the supports is L. The sag at the mid-span is h. The equation of the
CE – 2008 +
)
For a scalar function f(x, y, z) = the directional derivative at the point P(1, 2, 1) in the ⃗ is direction of a vector (A) (B)
A velocity is given as ̅ = 5xy + 2 y2 + 3yz2⃗ . The divergence
The equation
The value of ∫ ∫ ( (A) 13.5 (B) 27.0
CE – 2009 11. For a scalar function f(x, y, z) = + 3 + 2 the gradient at the point P (1, 2, 1) is (A) 2 + 6 + 4⃗ (C) 2 + 12 + 4⃗ (D) √ (B) 2 + 12 – 4⃗
of this velocity vector at (1 1 1) is (A) 9 (C) 14 (B) 10 (D) 15
8.
Mathematics
15.
th
(C) 3/2 (D)
Given a function ( ) The optimal value of f(x, y) th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 78
GATE QUESTION BANK
(A) Is a minimum equal to 10/3 (B) Is a maximum equal to 10/3 (C) Is a minimum equal to 8/3 (D) Is a maximum equal to 8/3
CE – 2013 21.
CE – 2011 16.
∫
√ √
√
?
22.
(C) a (D) 2a
/
o
magnitudes a and b respectively. |⃗ ⃗ | will be equal to (A) – (⃗ ⃗ ) (C) + (⃗ ⃗ ) (B) ab ⃗ ⃗ (D) ab + ⃗ ⃗ CE – 2012 19. For the parallelogram OPQR shown in the sketch, ̅̅̅̅ ̂ ̂ and ̅̅̅̅ R ̂ .̂ The area of the parallelogram is Q
(C) 1 (D)
24.
A particle moves along a curve whose parametric equation are : and z = 2 sin (5t), where x, y and z show variations of the distance covered by the particle (in cm) with time t (in s). The magnitude of the acceleration of the particle (in cm ) at t = 0 is ___________
25.
If {x} is a continuous, real valued random variable defined over the interval ( ) and its occurrence is defined by the density function given as:
(C) 1 (D) π
If ⃗ and ⃗ are two arbitrary vectors with
R P
.
( )
/
√
wh
‘ ’
‘ ’
the statistical attributes of the random variable {x}. The value of the integral
O
(A) ad –bc (B) ac+bd
.
With reference to the conventional Cartesian (x, y) coordinate system, the vertices of a triangle have the following coordinates: ( ) ( ) ( ) ( ) ( ) ( ). The area of the triangle is equal to (A) ⁄ (C) ⁄ (B) ⁄ (D) ⁄
π
(A) 0 (B) π
(C) ad + bc (D) ab – cd
∫
o
o
. √
/
dx is
(A) 1 (B) 0.5
The infinity series
(A) sec (B)
(C) 1 (D) 8/3
23.
π
20.
o
(A) (B)
Wh ho h o λ such that the function defined below is continuous π ? f(x)={
18.
The value of ∫ (A) 0 (B) 1/15
CE – 2014
(A) 0 (B) a/2 17.
Mathematics
o
26.
(C) o (D)
(C) π (D) π⁄
The expression
o
(A) log x (B) 0 th
th
(C) x log x (D) th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 79
GATE QUESTION BANK
CS – 2005 1.
Let G(x)
CS – 2010
1 g(i)xi where |x| 0 is equal to (C) (D)
is equal to (A) 0 (B) 4
(B) .
∫ ∫
(C) (D)
is.
IN – 2008 12. Consider the function y = x2 6x + 9. The maximum value of y obtained when x varies over the interval 2 to 5 is (A) 1 (C) 4 (B) 3 (D) 9
The solution of the integral equation ()
(C)
For real x, the maximum value of (A) 1 (B) e 1
1
8.
Mathematics
√
√
√
/
(D) .
√
√
√
√
√
√
/
IN – 2010 17. The electric charge density in the region R: is given as σ( ) , where x and y are in meters. The total charge (in coulomb) contained in the region R is (A) π (C) π⁄ (B) π (D) 0 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 87
GATE QUESTION BANK
18.
The integral ∫
.
evaluates to (A) 6 (B) 3 19.
/ sin(t) dt
23.
A scalar valued function is defined as ( ) , where A is a symmetric positive definite matrix with dimension n× n ; b and x are vectors of dimension n×1. The minimum value of ( ) will occur when x equals ) (A) ( (C) . / ) (B) – ( (D)
24.
Given ()
(
()
o .
(C) 1.5 (D) 0
The infinite series ( )
…………
converges to (A) cos (x) (B) sin(x)
(C) sinh(x) (D)
IN – 2011 20.
The series ∑ for (A) (B)
(
)
Mathematics
π) π
π /
The o w (A) A circle (B) A multi-loop closed curve (C) Hyperbola (D) An ellipse
converges
(C) (D)
IN – 2013 21. For a vector E, which one the following statement is NOT TRUE? (A) E E o o (B) If E E is called conservative (C) If E E is called irrotational (D) E E -rotational IN – 2014 22. A vector is defined as ̂ ̂ ̂ ̂ are unit vectors in Where ̂ ̂ Cartesian ( ) coordinate system. The surface integral ∯ f.ds over the closed surface S of a cube with vertices having the following coordinates: (0,0,0),(1,0,0),(1,1,0),(0,1,0),(0,0,1), (1,0,1),(1,1,1),(0,1,1) is________
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 88
GATE QUESTION BANK
Mathematics
Answer Keys and Explanations ME 1.
= =
Since, potential function of ⃗ is x²yz ( ) ( ) ( ) 2.
0 o
1
[Ans. A]
[Ans. D] o
h
π h
π o
(
√
0
9.
[Ans. B]
10.
[Ans. B] (
)
For V to be max
)
This is of the form . /
Hence, h
Applying L hospital rule (
3.
√
1
)
[Ans. A]
. /
= (
)
|
|
|
|
= = 11.
4.
[Ans. A] (
After changing order ∫ ∫ 5.
[Ans. A] I= ∫ (
)
=2∫
[ ∫
[Ans. B] Let the vectors be
) ( )(⃗ )(⃗ )
]
= 2∫ 6.
[Ans. A] A Line integral and a surface integral is connected by stokes theorem
7.
[Ans. B]
Now Area vector will be perpendicular to plane of i.e. will be the required unit vector. And option (A), (D) cannot give a vector product )| |(⃗ ⃗ ) (⃗ 12.
[Ans. B]
Applying ’ Hospital rule, we get I= 8.
[Ans. A] ∫
√
Given:
I=
(
)
(
)
√
√
√
For 0 1
[
] th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 89
GATE QUESTION BANK
13.
14.
But y is always greater than x. Hence y= 4 only.
= ∫
[Ans. B] Since interval given is bounded, so minimum value of functions is 1.
= 0
(
)
)
)
Now by partial fractions, (a3 8) = (a 2)(a2+2a+4)
) |
⇒L=
[Ans. D] To see whether the integrals are bounded or unbounded, we need to see that the o ’ h h interval of integration. Let us write down the range of the integrands in the 4 options, Thus, (D) , i.e., ∫ [Ans. B] h
19.
o
o
o Φ (
Φ)
̂
̂ ). (
̂
( ̂
( )
(
( )
)
( )
( )
Coefficient of (x- )⁴ Now f(x)= ex ⇒ (x)= ex ⇒ (a)= ea ( )
Hence for a=2, 20.
⃗⃗
[Ans. D] div {( (
Hence directional derivative is (grad (x2+2y2+z)).
=
[Ans. C] Taylor series expansion of f(x) about a is given by ( )
dx is unbounded.
along a vector ⃗
(2x ̂
( (
A (0,1); B (0,1); C (0, ); D (0, )
16.
[Ans. B]
Let x= a3 ⇒ a=2
=1.22 15.
1
).dx
= (
)
L=
∫√
L =∫ (√
)
= 18.
h
(
= ∫ (
[Ans. D] h
Mathematics
)̂
(
)
)̂ (
)̂}
( )
(
)
=3
̂)
√ ̂)
21.
[Ans. C]
= Hence at (1,1,2), ⇒
Directional derivative = 17.
[Ans. A] I = ∬ .dx dy The limit of y is form 0 to
and limit
of x from 0 to 2 I =∫ ∫
⇒
( )
⇒
( (
∫
.
)(
) )
/ th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 90
GATE QUESTION BANK
22.
[Ans. A] Given:
23.
y2 4x x2 4y
Mathematics
[Ans. A] Short method: Take a point on the curve z = 1, x = 0, y=0 Length between origin and this point ) ( ) ( ) =1 √( This is minimum length because all options have length greater than 1.
(4,4) (0,0)
24.
x4 4x 16
[Ans. B] Y
or x4 64x
B
or x(x 64) 0 3
or x3 64 or x 4
x = cos y=sin
y 4 Required area = ∫ .√
Path is x2 y2 1
/
R e (x y)2 1 2sin cos
4
2 x3 2 x3 2 3 120 4 64 (4)3 2 3 12 32 16 16 3 3 3
2
2
cos2 (1 sin2)d 2 0 0 =
Alternately For point where both parabolas cut each other
1 1 1 2 2 2 2
Alternately Given: x2 y2 1 Put x=cos , and y=sin
y2 4x, x2 4y
x y 2 cos2 sin2 2sincos
x 4 4x 2
= 1 sin2
or x2 8 x or x4 64x
∫ (
or x3 64
x 4,0 ,(4,0)
2
4
x2 dx 0 4
1 2
4x 0
)
cos2 1 1 2 0 2 2 2
Required area 4
X
A
4
2 x3 16 2 x3 2 3 120 3
25.
[Ans. C]
F 3xzi 2xyj yz2k ⃗ ⃗
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 91
GATE QUESTION BANK
(
)
(
)
(
√
)
3z 2x 2yz
π ∫
At point (1, 1, 1), divergence =3+2 2=3 26.
⃗
o
30.
⃗ ̂
̂
||
31. ( ̂
27.
)̂
(
∫ ( )
[Ans. D] Standard limit formulae
) ̂
32.
[Ans. B]
33.
[Ans. C] The function is continuous in [ 1, 1] It is also differentiable in [ 1, 1] except at x = 0. Since Left derivative = 1 and Right derivative = 1 at x = 0
34.
[Ans. B]
[Ans. C]
1
1
2
y is continuous for all x differentiable for all x since at
o
o
R, and R, except at
o
,
Using this standard limit, here a = 1 then = ( ) /2 =1/2
’ h
value towards the left and right side of
35.
[Ans. D] ( ) ( ) ( ) ( ) f(x) has a point of inflection at x =0.
36.
[Ans. A]
[Ans. D] ,
∫
29.
( )
̂
⇒
28.
π
)
[Ans. D] If f(x) even function ∫
||
o
π* +
π(
[Ans. D] ⃗ ̂
Mathematics
-
[Ans. D]
π
∫ π
(
) ̂
Volume from x = 1 to x = 2,
̂
∫π ( √ th
th
√
̂ ̂ ̂
̂
) th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 92
GATE QUESTION BANK
̂
√ √ ̂
√ ̂
̂ ̂
√ ̂
38.
(√ √
37.
̂
̂ √
[Ans. A] By Gauss Divergence theorem, ∬( ̅ ̅)
√ √ The unit outward normal vector at point P is (
Mathematics
)
∭(
(Surface Integral is transformed to volume Integral)
)
( )
( )
( )
)̂
√ ̂
)
∭(
∭
[Ans. A] The area enclosed is shown below as shaded
π π
(
∬( ̅ ̂)
)
)
∭(
( π) (
)
The coordinates of point P and Q is obtained by solving y = x and y = simultaneously, i.e. x = ) ⇒ ( ⇒ Now, x = 0 ⇒ which is point Q(0,0) and x = 1 ⇒ which is point P(1,1) So required area is
π 39.
[Ans. C] ∫(√ ) ( ) Using Integration by parts ∫
∫
Here, f=ln(x) and dg=√ and g=
∫
* +
∫
o ∫(√ ) ( )
* + [
]
∫
[
]
[
(
th
th
( ) ] )
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 93
GATE QUESTION BANK
40.
π
[Ans. A] o
0
1
So the minimum value is
[Differentiating both o o Hospital method]
o w
.
=
’
. /
45.
o
41.
Mathematics
/
[Ans. D] o o o ( ) ( )
o
( )
o
o
otherwise it is said to be discontinuous. So the most appropriate option is D.
[Ans. B] G
o 46.
|
|
[Ans. C] ̂ ̂ Div
̂
(
)
Vectors are linearly dependent 42.
[Ans. B] (
) ) ( ) , o ( )( ) ( ) o ( )( ) 43.
(
47. -
ho
[Ans. B] Let ∫
(
)
(
( o (
)
[Ans. A] ̂
(
⃗ [ ̂[
(
] )
(
) ∫
̂ ̂
)
48.
)]
)
()
o
̂[ ,̂ ( 44.
(
) (
( ) )̂
∫
|
,
-
)] (
,̂ (
o
[Ans. B] ∫ ∫
̂[
o
∫
)] ̂,
)̂
(
-
∫ (
)
|
)̂ [
[Ans. *] Range 1.00 to 0.94 h o π
,
th
th
] -
,
th
-
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 94
GATE QUESTION BANK
CE 1.
a =2a cos i.e, cos [Ans C] G ’ theorem is
∮(
)
∬(
∮ ((
(
( )
)
= y and
=∫
∫
=∫
,
(
)-
=
×
( )
π . /
|
π . /
π (
π *
[Ans. D] Since the position of rail engine S(t) is continuous and differentiable function according to Lagrange’s mean value theorem more )
(
o ) o
∫(
w
∫
(t) = v(t) =
(
π * (
( )
π
π π
√
| π
√
√
)
√
)
)+
+
)
m/sec kmph
4.
[Ans. C] f = 2 +3
= 126 kmph Where v(t) is the velocity of the rail engine. 3.
∫
∫
(
-
= 2y
=∫
=
∫
)
’ h o I= ∫
)
, ∫
= xy
)
(
)
)
⇒
R
Here I = ∮ (
2.
Mathematics
[Ans. D] h ’ o h r=2acos (i) r = a represents a circle with centre ( ) ‘ ’ (ii) r = 2acos represents a circle symmetric about OX with centre at ( ) ‘ ’ The circles are shown in figure below. At h o o o ‘ ’ P y Q π 3
O
A
(
)⃗
= 4xi + 6yj + 2zk At P (2, 1, 3) Directional derivation ̂ ( ) ( ) ( ) √ ( ) ( ) ( ) √ √ 5.
[Ans. A] Potential function,
x
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 95
GATE QUESTION BANK
8. Integrating ∫
[Ans. D] Put
∫
wh
Mathematics
o
⇒
√
=√
=√
…… ( )
Now given equation is ……….. (ii) 6.
[Ans. B] Let I(α) =∫ (
h ∫ )
.
/
h
(
dx …( ) =
(
)
(
h
)
√ ) [ from eqn(i)]
=
∫ Then Integrating by parts we get, =
0
=
.
( α
√
h
(
)
o )1
/
√
(
√
(
(
h
)
h
)
= dI = Integrating, I = ( )
α o
h
√
)
h
() ( )
+C=0 C= (α) ( )
α
π
Now substitute in eqn (ii) we get h h
π
I(0) = But from equation (i), I(0) = ∫ ∫
h
⇒ dx
h
⇒
dx =
h h
Which is the desired form 7.
[Ans. D] ̅=5 +2
√
+ 3y ⃗
(⃗ )
9.
[Ans. C] ̅ ̅=0 ̅ ̅ If ̅ ̅ = 0
= 5y + 4y + 6yz At(1, 1, 1) div ( ) = 5.1 + 4.1 + 6.1.1 = 15
is the correct transformation.
o
o Since P and Q are non-zero vectors o 0 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 96
GATE QUESTION BANK
10.
[Ans. A] Since the limit is a function of x. We first integrate w.r.t. y and then w.r.t. x )
∫ ∫(
∫
√ √
√
)
[Ans. D] Length of curve f(x) between x = a and x = b is given by ∫√
∫
*
√
√ 13.
∫(
Mathematics
(
)
+ Here,
∫ (
4h … … ( )
= 8h
)
Since ∫ (
and y = h at x =
)
* ( ) *
(As can be seen from equation (i), by substituting x = 0 and x = L/2)
( )+
(Length of cable)
+
√
=∫
.
/ ∫ √
ho 11.
[Ans. B] f = + 3 +2 f = grad f = i
+j
[Ans. A]
15.
[Ans. A] ( )
+k
= i(2x) + j(6y) + k(4z) The gradient at P(1, 2, 1) is = i(2×1) + j(6×2) + k(4 ( )) = 2i + 12j – 4k 12.
14.
[Ans. B] (
)
⃗
⃗ ⃗
̂
⃗
h
Putting,
√ o (
Given,
̂ )
.
/ is the only stationary point.
√ *
+ .
√
th
th
/
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 97
GATE QUESTION BANK
*
Since the limit is in form of
+ .
*
’ ho and get λ
/
+ .
Since, We have either a maxima or minima at
o ()
⇒λ 18.
/
Also since, r=0 )
o
1
.
/
[Ans. A]
= 8 > 0, the point
(
o
)
,
)
19.
o -
[Ans. A] Area = |̅ ̅ | ̅̅̅̅ ̅̅̅̅ R (
So the optimal value of f(x, y) is a
|
) o
o
(
The minimum value is (
o
π
⇒λ
(
o
, we can use
/
Since,
.
Mathematics
)
(
)
|
minimum equal to 16.
̅̅̅̅ ̅̅̅̅ R ̅̅̅̅ ̅̅̅̅ R
[Ans. B] Let I = ∫
√ √
Since ∫ ( ) I=∫
√ √
…( )
√
√
∫ (
20.
[Ans. B]
21.
[Ans. B]
( )
( )
̅(
)
)
…( )
(i) + (ii) 2I = ∫
√
√
√
√
2I = ∫
∫
2I = |
o ∫
o
o
I = a/2 17.
⇒
[Ans. C] For a function f(x) to be continuous, at x=a ( ) ( )
o ∫ (
⇒
)
∫ (
)
If f(x) is continuous at x= π . /
*
λ o
+
[
th
th
]
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 98
GATE QUESTION BANK
[
]
|
(
Mathematics
)
(
)
(
)
|
Substituting the values we get ( ) ( ) ( ) | | 24. π
π
∫
o
∫
o
∫
o
(
[Ans. 12]
o ) ( )
o
o ( ) ∫
o
( )
[ 22.
⇒ Magnitude of acceleration
]
=√
[Ans. C] ( ⇒
) (
25.
(
)
[Ans. B] We have
) ∫ ( )
⇒ , ow
-
∫ ( )
=1+0=1 Hence correct option is (C) 23.
∫ ( )
∫ ( )
[Ans. A] (4, 3) a (2, 2) b
c
x
( )μ
0.5
(1, 0)
0.5
o ∆ wh o –ordinate points are given is given by
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 99
GATE QUESTION BANK
26.
[Ans. A]
=
α Use L – hospital Rule
= 4.
α
=1
[Ans. A] P=∑
o
…
‘ ’
= log x
1 n 1 r Cr xr n 1 x r0
r 0
r 0
‘ ’
r 0
i 0
5.
= 12
g(i) =i+1
– 24 48
)
+ 37
– 48 x = 0
√
x= =2
[Ans. A] f(x)= |x| Continuity: In other words, f(x) = x o ≥ x for x< 0 Since, = =0 , f (x) is continuous for all real values of x Differentiability:
=
√
96x
48
=
√
√ = 36
Now at x = 0 =
48
0
At 2 ± √ also
0 (using
calculator) There are 3 extrema in this function
( )
)
6.
( )
[Ans. D] Since ∫ ( )
R h So |x| is continuous but not differentiable at x=0 3.
(
x (12 – 48x 48 ) = 0 x = 0 or 12 – 48x – 48 = 0 4x – 4 = 0
∑ ()
(
k
)
[Ans. D] y = 3 – 16
(since r is a dummy variable, r can be replaced by i)
)
k
⇒
r 1 xr i 1 xi
(
–1)
)
w h (
r1 Cr xr r1 C1xr
( …
1 21 r Cr xr 1 x 2 r0
Putting n=2,
2.
)
= Q=∑
[Ans. B]
(
w h a =1, l=2k 1
P= ( CS 1.
Mathematics
I =∫ =∫
=∫ (
)
(
) (
)
Since tan (A B) =
[Ans. A] =
⁄ ⁄
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 100
GATE QUESTION BANK
[
]
[
]
Mathematics
∫
∫
0
1
0
1
9.
[Ans. B] f(x) = sin x ⇒ ( ) o ( ) ⇒ o π π π [
( (
∫
) )
( (
) )
π ]
( )
∫
∫
At
. /
gives maximum
value =,
)-
(
At
= ln ( sec ) – ln (sec 0) = ln (√ ) = ln (
. /
value
( ) 10.
)–0=
[Ans. A] For x =
7.
[Ans. B] (
8.
)
*
(
(
) [
*(
) +
) + .
/
]
11.
[Ans. C] By Mean value theorem
12.
[Ans. A] Define g(x) = f(x) – f(x + 1) in [0, 1]. g(0) is negative and g(1) is positive. By intermediate value theorem there is €( ) h h g(y) = 0 That is f(y) = f(y + 1) Thus Answer is (A)
13.
[Ans. 2] * w + * w + For min maximum non – common elements must be there ⇒ * + must be common to any 2 elements of V1 ( )minimum value = 2
o o ∫
∫
*
+ [
]
,
-(
o π
, f(x) =
For x = , f(x) = 3 – 1 = 2 For x = 3, f(x) = 2 ( ) ( ) = f(3)
[Ans. D] ∫
gives minimum
π
)
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 101
GATE QUESTION BANK
14.
Mathematics
[Ans. 4] ∫ ∫
|
∫∫
π ( ) o π o (π) π Hence option (A) is correct
oπ π o π
∫
∫(
) ECE 1.
[Ans. C]
∫ ∫ (∫
∫ o
)
dy 0 for x< 0 dx dy 0 for x> 0 dx
∫ o
o Substituting the limits π o (π) o ( ) π
2.
[Ans. A] Given,
f x
∫
f ' x
1 e .e e 1 e
|
∫∫
3.
= x cos
∫(
x 2
2x
ex
1 ex
2
0
o
)
Let cos = t ⇒ At o π o π o
o
∫ o
x
∫
[Ans. A] ∫
x
[Ans. C]
= π o ( π) π o π = π LHS = I + II = π π π⇒ 15.
ex 1 ex
∫
|
∫
∫ o
∫(
)
∫(
∫
∫
th
th
th
)
|
|
(
)
(
)
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 102
GATE QUESTION BANK
8.
Mathematics
[Ans. A]
Given, f x x2 x 2
df x 0 dx 4.
2x 1=0
[Ans. A] o ’ h o )
∬(
x
∮
1 2
d2f x = 2 ve dx2 So it shows only minima for interval [ 4, 4], it contains a maximum value that will be at x= 4 or x=4 f( 4)=18 and f(+4)=10
5.
6.
[Ans. D] From vector triple product ( ) ( ) ( ) Here, ( ) ( ) ⇒ ( ) ( ) ( )
[Ans. D]
y f x ; x 0,
[Ans. A] ( )
f x0
For strictly bounded, 0 limy
2 x x0 f' x0 x x0 f'' x0 ......
1
e (x 2)(e 2
x0
or 0 lim y
2
x 2 )
2
2
2
x 2
So, y e x is strictly bounded
e ...... 2
x 22 ...... e2 3 x 2 (Neglecting higher power of x)
7.
9.
10.
lim 0
=
ex e x ex ex
x x2 x3 e 1 .......... 1 2 3
11.
x
ex 1
[Ans. B] Two points on line are ( 1, 0) and (0, 1) Hence line equation is,
y y y 2 1 x c x2 x1 y x c y x 1 … ( )
x x2 x3 .......... 1 2 3
x2 x4 .......... ex ex 2 4 x x e e x3 x5 x .......... 3 5 1
or cot h (x)=
sin /2 1 sin /2 lim 0 2 /2
1 sin /2 1 = lim 2 0 /2 2
[Ans. C] coth (x)=
[Ans. A]
2 2 5 I ydx x 1dx 2.5 2 1 1
1 x
(Since at x=1,y=2)
(Neglecting x2 and higher order)
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 103
GATE QUESTION BANK
12.
[Ans. B] Taking f(x, y)= xy, we can show that, xdx+ydy, is exact. So, the value of the integral is independent of path
15.
Mathematics
[Ans. A]
Given : g x,y 4x3 10y 4 The straight line can be expressed as y=2x Then g(x,y)=4x3+ 10 (2x)4
(0, 1)
1
1
4 I 4x3 10 2x dx 4x3 160x4 dx 0 0 1
4x4 160 5 = x 33 5 0 4
(1, 0)
)
∫(
∫
[Ans. A] f(x)= + (x)= =0 x=0 (x)= + >0 x R. Hence minimum at x=0 f(0)=1+1=2 Alternatively: For any even function the maxima & minima can be found by A.M. >= GM => exp(x) + exp( x) ≥ 2 Hence minimum value = 2
17.
[Ans. B]
∫
[ |
13.
16.
| ]
[Ans. B] Let f(x) ex sinx o ’ 2 x a f x f a x a f'a f''a 2!
Q
where, a= 2 x f x f x f' f'' 2!
Coefficient of (x )2 is
f '' 2
P
f'' ex sinx |at x e
Coefficient of (x )2=0.5 exp () 14.
∫(
)
[Ans. A]
o Thus, ( ( )w o ( )w o ( )w
)w h h h
h
∫
∫
[ |
| ]
o ow ow ow ow th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 104
GATE QUESTION BANK
18.
21.
[Ans. D] sinx = x = (x – π ) –
y=
(
or
19.
(
)
(
)
sin x = (x – π ) –
or
)
(
)
=1 –
(
) (
= 1
(
) (
)
o
.... ( )
)
...
o
....
(
)
( )
....
=
Therefore, at
22.
∬⃗ ⃗
̂
̂
̂
̂
∯
⃗
∭ ( )∭ and is the position vector)
(
23.
⃗⃗⃗ ⃗⃗⃗
has a maximum.
[Ans. D] Apply the divergence theorem
[Ans. C]
[Ans. A] ̂
Y
S
3
R
1
̅
Q
P
⇒
√
√
⇒
∮ ⃗ ⃗⃗⃗ ∫ ⃗ ⃗⃗⃗
∫ ⃗ ⃗⃗⃗ √
∫ ⃗ ⃗⃗⃗
∫
√
∫ ⃗ ⃗⃗⃗
∫ .√ /
∫ ⃗ ⃗⃗⃗
∫√ √
[ ∫ ⃗ ⃗⃗⃗
√
* +
[
) )
⇒
25.
[Ans. B]
, √ √
( )
)]
( (
)]
[Ans. C] ( ) , ( ) ( ) ( ) ⇒ are the stationary points ( ) ( ) ( ) and f(2) = 25 and f(4)=21 M o ( ) , f(6)=41
√
. /
(
(
24. ]
] ∫ .√ /
[
[
̂
⇒
∫ ⃗ ⃗⃗⃗
along PQ y =1 dy =0]
∫ ⃗ ⃗⃗⃗
⇒
⇒
X
= [
o
Since
[Ans. D] o ’ h o ⃗ ⃗ = ∮
⃗⃗⃗
o
o
According Stokes Theorem ⃗⃗⃗ ⃗ ∮ ⃗ ⃗ =∮
20.
[Ans. A]
....
sin (x –π )
or
Mathematics
∮ ⃗ ⃗⃗⃗ ⇒ th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 105
GATE QUESTION BANK
o
30.
[Ans. C]
E o
(
E o
31.
o
[Ans. *] Range ( ) ( )
̂
̂
⇒ ⇒ ( )
=1+1+1 =3 [Ans. D] o ’ h o “ h integral of a ⃗ vector around a closed path L is equal to the integral of curl of ⃗ over the open ∮⃗
h
⃗
∬(
o
∫
∫
∫
∫
(
∫
*
32.
h ”
33.
)
) ) ) )
[Ans. C] Let x (opposite side), y (adjacent side) and z (hypotenuse side) of a right angled triangle
+
∫
29.
[Ans. *] Range 5.9 to 6.1 Maximum value is 6 ( ) ( ) ( ( ( (
⃗ )⃗
[Ans. *] Range 862 to 866 Volume under the surface ∫
( ) ( ) h
o
o
28.
to 0.01
( )
[Ans. D] ̅ ̂
=
27.
)
π
⇒
26.
Mathematics
Given
o
… )(
(
[Ans. A] o ( ) ̇( )
o
⇒ o
⇒ ( ) Since ( ) is negative, maximum value of f(x) will be where ( )
⇒
o 0(
⇒ ⇒
)
o ⇒ ( )
⇒
o
( )
( )
o
oh
(
)
)
1
( ( (
th
th
)(
))
) th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 106
GATE QUESTION BANK
By trial and error method using options π
34.
Now at x = 2 (2) = ( ) = ( ) = 2 0, minima at x = ( 2) =12( ) = 32 > 0; minima at x = There is only one maxima and only two minima for this function.
-
=√ 2.
,
4.
̂ )
So, directional derivative ⇒ ⃗ ̂ (̂ ̂ ) (̂
EE 1.
1
[Ans. C]
=
(
0
̂
At (1, 1, 1) ⃗ |⃗ | √
35.
Mathematics
[Ans. A] f(x) = (x) = ( ) = ( ) Putting ( (x) = 0 ( )=0 ( )=0 x = 0 or x = 2 are the stationary points. Now, ( ) ( (x) = )( ) = ( ( )) = ( ) ( )=2 At x = 0, (0) = Since (x) = 2 is > 0 at x = 0 we have a minima. th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 107
GATE QUESTION BANK
8.
Mathematics
= , =, ( = (
[Ans. A]
))
(
) =1
1
14.
[Ans. B] Dot product of two vectors =1+a+ =0 So orthogonal
15.
[Ans. C] f(x) = ( ) ( ) So the equation f(x) having only maxima at x = 1
16.
[Ans. B]
0
√
∫
9.
10.
(
∫
)
[Ans. C] ( ) ( ) ( ) ( ) ( )
̂
[Ans. D] ̅=( )̂ ( ( ) = (0, 2) ( ) = (2, 0) Equation of starting line
̂ ̂ ∫
11.
) y = 2 – x and dy = – dx
17.
C
)
o ( )
o
.(
)̂
̂
(
)̂
̂
̂ ||
( ̂ ( =0
⃗ ̂
̂
||
̂ ̂
)̂ /
̂
is undefined
[Ans. A] ̂ Div ( ) =.
‘ ’
(
Discontinuous
/(
̂
̂
̂)
18.
= 1+1+1= 3 13.
[Ans. D]
)
But at
12.
∫
[Ans. B] (
̂
Along x axis ,y=0,z=0 The integral reduces to zero.
=
∫ (
̂ ̂
̂
)̂
⇒ y = 2 – x , dy = – dx ̅ ̅ =( ( ) Putting ∫̅ ̅ ∫
̇̂
[Ans. B] P=∫ th
[Ans. A] ( ) o ⇒ M th
) ( ) ̂ (
( ( )
th
) ( ) ̂ (
)
(
) (
)
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 108
) )
GATE QUESTION BANK
19.
Mathematics
[Ans. B]
.
0
π
/1
∫⃗ ∫
[
(
o
o π
)( )(
∫ ( ∫
⇒
o
23.
[Ans. A] ( ⃗) ⃗ ⃗ ( ) ( ) ⃗
24.
[Ans. B] ( ) ( ) ⇒ ⇒ )( ⇒( ⇒ ( ) ( ) ( )
) )
[
]
π 20.
]
[Ans. C] ( )
(
)
( )
( ) For number of values of ) o ( ) ( ( ) ( ( )
( ) ⁄
,
w
-
) ( ) ( )
M 21.
)
[Ans. B]
IN 1.
G o
h
[Ans. A]
o
o
⇒ o
⇒
(
o
)
Unit vector along y = x is G
∫ (∫ ∫ (∫
22.
[Ans. 2] ( ∫
)
̂
)
̂
π
√ o
√ ̂
.
) ∫
π
o
o .
π
/
.
π
/.
√
/
√
/
√
√
√ √
2.
[Ans. D] Using L Hospital Rule., numerator becomes =
From the graph, distance at
th
th
()
= ( )
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 109
GATE QUESTION BANK
3.
[Ans. B]
Mathematics
When
Given integral is, I=∫
( )
Let f(x) = so curve of 1/
will be
(
)
(
)
And when
f(x)
( )
The possible expression for f(x) is 1
. 7.
-1
0
1
/
[Ans. B]
x
Error,
This curve will be discontinuous at x=0 o ’ w o
For error to be minimum (
4.
[Ans. A] ̅ (t) =x (t) ̂+y (t) + Let R ̂ z (t) ̂ ̅( ) =K (constant) |R i.e., (t) + (t) + (t) = constant. On analyzing the given (A) option, we find ̅(t) that R
̅( )
⇒ ⇒
[Ans. C] Given : f= + where,
(
)
⇒
√
will give constant magnitude, √
1
G …… + (i=0 to n) are constant.
=
+(n 1)
o
…… ⇒
+ and
)
o
so first differentiation of the integration will be zero. 5.
o
=0+
+
(n 1)
√
…… ⇒
+n
√
+ = , = nf 6.
+
+
⇒
-
(
)
⇒ ⇒
[Ans. B] ( )
(
)
8.
[Ans. B] ()
When ( )
(
)
(
)
( )
∫
…( )
Differentiating the above equation
When ( )
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 110
GATE QUESTION BANK
()
,
14.
() ∫
Mathematics
[Ans. B] Given y = x2 + 2x + 10 = 2x + 2
( ) -
| From equation (i) () ()
⇒
()
()
This is Leibnitz linear equation Integrating factor I.F = ∫ the solution is ()
15.
[Ans. C] By definition
16.
[Ans. A]
()
Unit vector=
=xi+yj+zk
and 17.
∫
[Ans. C] R: Y
( ) 1 1
, [Ans. D]
10.
[Ans. A] This is a standard question of differentiability & continuity
Area =
[Ans. C] y= =(
X
- o
9.
11.
+1
( )
Total charge = σ = = 18.
).(cos x + sin x) = 0
⇒ tan x = 1 Or x =
coulomb.
[Ans. B] We know that ∫
() (
∫
.
) π
( )wh π . /
/
y will be maximum at x = y=
19.
= 12.
13.
[Ans. C] y(2) = y(5) =
=
√
[Ans. B] Expansion of sin x ........
( ) ( )
20.
[Ans. B] In a G.P
(
)
For a G.P to converge
[Ans. C] y= y=
(
⇒
)
⇒
(
)
⇒ th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 111
GATE QUESTION BANK
21.
[Ans. D] .E=0 is not irrational (it is solenoidal)
22.
[Ans. 1] From Gauss divergence theorem, we have ∫ ̅ ̅
̅
∫
/dxdydz
∫ [ ⇒
̅
∫
∫.
Mathematics
∫ ̅
[Ans. C]
24.
[Ans. D]
̂
) ̂
̂
]
o .
π
π /
23.
(
∫
(
π )
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 112
GATE QUESTION BANK
DSA
Data Structure and Algorithm Analysis CS- 2005 1. Suppose T (n) = 2T (n/2) + n, T(0) = T(1)=1. Which one of the following is FALSE? (A) T(n) = O(n2) (B) T(n) = (n log n) (C) T(n) = Ω(n2) (D) T(n) = O(n log n) Linked Data Questions 2 and 3. Consider the following C- function: double foo(int n) { int i; double sum; if (n = = 0) return 1.0; else { sum = 0.0; for( i=0; i < n; i++) sum += foo(i); return sum; }} 2.
3.
4.
The space complexity of the above function is (A) O(1) (C) O(n!) (B) O(n) (D) Suppose we modify the above function foo( ) and store the values of foo(i), 0 < = I < n, as and when they are computed. With this modification, the time complexity for function foo( ) is significantly reduced. The space complexity of the modified function would be: (A) O(1) (C) O(n2) (B) O(n) (D) O(n!)
5.
What does the following C-statement declare? int(*f) (int *); (A) A function that takes an integer pointer as argument and returns an integer (B) A function that takes an integer pointer as argument and returns an integer pointer (C) A pointer to a function that takes an integer pointer as argument and returns an integer (D) A function that takes an integer pointer as argument returns a function pointer
6.
An Abstract Data Type (ADT) is (A) Same as an abstract class (B) A data type that cannot be instantiated (C) A data type for which only the operations defined on it can be used, but none else (D) All of the above
7.
A common property of logic programming languages and functional languages is (A) both are procedural language (B) both are based on - l ulus (C) both are declarative (D) both use Horn-clauses
8.
Which of the following are essential features of an object-oriented programming language? 1. Abstraction and encapsulation 2. Strictly-typedness 3. Types-safe property coupled with sub-type rule 4. Polymorphism in the presence of inheritance (A) 1 and 2 only (C) 1, 2 and 4 only (B) 1 and 4 only (D) 1, 3 and 4 only
The time complexity of computing the transitive closure of a binary relation on a set of n elements is known to be (A) O(n) (C) O(n3/2) (B) O(n log n) (D) O(n3)
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 113
GATE QUESTION BANK
9.
10.
11.
Consider the following C-program double foo (double);/* Line 1 */ int main () { double da, db; // input da db = foo(da);} double foo(double a){ return a; } The above code complied without any error or warning. If Line 1 is deleted, the above code will show (A) no compile warning or error (B) some complier-warnings not leading to unintended results (C) Some complier-warnings due to type-mismatch eventually leading to unintended results (D) Complier errors Consider the following C-program void foo (int n,int sum 0) { int k = 0, j = 0; if (n = = 0) return; k = n % 10; j = n / 10; sum = sum + k; foo (j, sum); print “% d”, k ; } int main () { int a = 2048, sum = 0; foo(a, sum); printf “%d\n” sum ; } What does the above program print? (A) 8, 4, 0, 2, 14 (B) 8, 4, 0, 2, 0 (C) 2, 0, 4, 8, 14 (D) 2, 0, 4, 8, 0 A program P reads in 500 integers in the range [0, 100] representing the scores of 500 students. It then prints the frequency of each score above 50. What would be
DSA
the best way for P to score the frequencies? (A) An array of 50 numbers (B) An array of 100 numbers (C) An array of 500 numbers (D) A dynamically allocated array of 550 numbers Linked data Questions Q 12 & Q 13 We are given 9 tasks are , , , . The execution of each task requires one unit of time. We can execute one task at a time. has a profit and a deadline profit is earned if the task is completed before the end of the unit of time. Task Profit Deadline 15 7 20 2 30 5 18 3 18 4 10 5 23 2 16 7 25 3 12.
Are all tasks completed in the schedule that gives maximum profit? (A) All tasks are completed (B) nd are left out (C) nd are left out (D) nd are left out
13.
What is maximum profit earned? (A) 147 (C) 167 (B) 165 (D) 175
CS- 2006 14. Consider the polynomial p(x) = a0 + a1x + a2x2 + a3x3,where ai 0, i. The minimum number of multiplications needed to evaluate p on an input x is (A) 3 (C) 6 (B) 4 (D) 9 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 114
GATE QUESTION BANK
15.
An element in an array X is called a leader if it is greater than all elements to the right of it in X. The best algorithm to find all leaders in an array. (A) Solves it in linear time using a left to right pass of the array (B) Solves in linear time using a right to left pass of the array (C) Solves it is using divide and conquer in time n log n (D) Solves it in time n2)
16.
Consider the following C program fragment in which i, j and n are integer variables. for (i = n, j = 0; i > 0; i / = 2, j +=i); Let Val (j) denotes the value stored in the variable j after termination of the for loop. Which one of the following is true? (A) Val (j) = (log n) (B) Val (j) = (√n) (C) Val (j) = (n) (D) Val (j) = (n log n)
17.
A set X can be represented by an array x[n] as follows ; if i X x [i] = { ; , otherwise Consider the following algorithm in which x, y and z are boolean arrays of size n: algorithm zzz (x[], y[], z[]) { int i; for ( i =0; i < n; ++i) z[i] =( x[i] ~ y[i]) (~x[i] y[i])
(A) n = (B) n = (C) n = (D) T (n) =
(log log n) (log n) (√n) (n)
19.
Consider the following code written in a pass-by-reference language like FORTAN and these statements about the code. Subroutine swap (ix,iy) it = ix L1 : ix = iy L2 : iy = it end ia = 3 ib = 8 call swap (ia, ib + 5) print *, ia, ib end S1: The compiler will generate code to allocate a temporary nameless cell, initialize it to 13, and pass the address of the cell to swap S2: On execution the code will generate a runtime error on line L1 S3: On execution the code will generate a runtime error on line L2 S4: The program will print 13 and 8 S5: The program will print 13 and 2 Exactly the following set of statement (s) is correct: (A) S1 and S2 (C) S3 (B) S1 and S4 (D) S1 and S5
20.
Consider the following C-function in which a[n] and b[m] are two sorted integer arrays and c [n + m] be another integer array. void xyz (int a[ ], int b[ ], int c[ ]) { int i, j, k; i = j = k = 0; while ((i 2. (D) Y is [ 2 4 6 8 10 12 14 16 18 20] and 2 < x < 20 and x is even.
35.
The correction needed in the program to make it work properly is (A) change line 6 to : if (Y[k])0) elements, sorted in ascending order. int ProcessArray(int *listA, int x, int n) { int i, j, k; i = 0; j = n 1; do { k = (i+j)/2; if (x 3, there will be two edges say e1, e2 “ n” “ n” So V(e1), V(e2) will not be adjacent in L(Kn). Hence L(Kn) is not always a clique (Q) is False 23.
[Ans. B] Take an example for Graph G . . A B Then option A and D will be eliminated. Let G is below graph A B Then is a graph with below structure
= 26.
25.
( 1, 1, 1, 1, 1, 1)
( ( ( [
) ) )
( ( (
) ) ) ( ) ( ) ( ) ( ) ( )
( ( (
) ) )
( ( (
) ) )
( ( (
( 1, 1) ( 0, 0)
(1, 1)
Got all zeros so graphic Option (B) ( 2, 2, 2, 2, 2, 2)
( 1, 1, 2, 2, 2) ( 1, 1, 1, 1)
( 2, 2, 2, 1, 1) ( 1, 1, 1, 1)
( 1, 1,) ( 0, 0)
(1, 1)
[Ans. 506] Given vertex set is V = {(i, j)|1 } Imagine vertex set as a matrix as follows ) ) )
( 1, 1, 1, 1)
( 1, 1, 1, 1)
[Ans. C] PQRS is not a topological ordering because no edge is there from Q to R PSRQ and SPRQ are topological ordering because S Q and Q exits b y y
( ( (
[Ans. C] Apply Havel – Hakimi algorithm to the four options Option (A)
A B In G the number of strongly connected components are 2 ,where as in it is only one.
24.
DMGT
Got all zeros so graphic Option (C) 2 2 0 (3, 3, 3, 1, 0, 0)
) ) )
( ( (
) ) )
) ) )
( ( (
) ) )
1 (2, 2, 0, 0, 0)
(2, 2, 0, 0, 0) (1,
0, 0)
( ) ( ( (
) ) )
( ( (
) ) )
( ( ( (4)
Got negative number. So it is not graphic Option (C) is correct
]
All the vertices (except in 1st row, 1st column, last row, last column) has 8 edges to the neighboring vertices as shown in th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 321
GATE QUESTION BANK
27.
[Ans. 36] Max no.of edges in bipartite graph on n
group is not equal to given group. Thus the order cannot be 3 or 5. Hence it is 5.
vertices is given by ⌊ ⌋ . 28.
⌊
31.
[Ans. C] If G is a tree with n vertices then no.of edges = n – 1 If G is forest (collection of trees) with k connected components then the edges = n – k. ∴Option (C) is correct
32.
[Ans. A] By Euler formula
⌋
4
[Ans. 5] Result 1: In a cycle graph no.of vertices = n, edges = n Result 2: If a graph G is isomorphic to its complement then E(G) = (
S
(
)
)
.( ) By Hand shaking theorem.
4=n–1 n=5 29.
DMGT
( )
∑
[Ans. 6] In graph portion
δ δ δ
1
2
. ,
2
Two
2
2
2
1
2
And in subgraph 2 1
-
From (1) we have f=2+e–v =2+e–n
ST are possible 2
δ
∴ So no. of faces is atleast Option (A)is answer
1
2 2
Three ST 2 1
possible 1
1
2
1
1
2
1
So these two sub graphs are divided by only single edge So total no. of ST 30.
[Ans. 5] L ’ subgroup divides order of group. 3, 5, 15 can be the order of subgroup in this problem since there are 4 elements and the
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 322
GATE QUESTION BANK
DBMS
ER Diagrams CS – 2005 1. Let and be two entities in an ER diagram with simple single-valued attributes. R1 and R2 are two relationships between and , where R1 is one-to-many and R2 is many-to-many. R1 and R2 do not have any attributes of their own. What is the minimum number of tables required to represent this situation in the relational model? (A) 2 (C) 4 (B) 3 (D) 5 2.
3.
The following table has two attributes A and C where A is the primary key and C is the foreign key referencing A with on-delete cascade. A C 2 4 3 4 4 3 5 2 7 2 9 5 6 4 The set of all tuples that must be additionally deleted to preserve referential integrity when the tuple (2, 4) is deleted is: (A) (3,4) and (6,4) (B) (5,2) and (7,2) (C) (5, 2) (7, 2) and (9, 5) (D) (3, 4) (4, 3) and (6, 4) Consider the entities ‘hotel room’, and ‘person’ with a many to many relationship ‘lodging’ as shown below: HotelRoom
Lodging
Person
(A) (B) (C) (D)
Person Hotel Room Lodging None of these
CS - 2008 Linked Answer Questions 4 & 5 Consider the following ER diagram
4.
The minimum number of tables needed to represent M, N, P, R1, R2 is (A) 2 (C) 4 (B) 3 (D) 5
5.
Which of the following is a correct attribute set for one of the tables for the correct answer to the above question? (A) {M1, M2, M3, P1} (B) {M1, P1, N1, N2} (C) {M1, P1, N1} (D) {M1, P1}
CS - 2012 6. Given the basic ER and relational models, which of the following is INCORRECT? (A) An attributes of an entity can have more than one value (B) An attribute of an entity can be composite (C) In a row of a relational table, an attribute can have more than one value (D) In a row of a relational table, an attribute can have exactly one value or a NULL value
If we wish to store information about the rent payment to be made by person(s) occupying different hotel rooms, then this information should appear as an attribute of
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 323
GATE QUESTION BANK
DBMS
Answer Keys and Explanations 1.
[Ans. B]
4.
[Ans. B] M, P ⟶ Entity sets, will become tables N ⟶ Weak Entity set, will become a table R1 ⟶ Relationship set with cardinality N:1, will not be a table R2 ⟶ Identifying Relationship set, will not be a table Total No of tables = 3 1) M=(M1, M2, M3, P1) 2) P =(P1, P2) 3) N =(N1, P1, N2)
5.
[Ans. A] The correct attribute set is {M1, M2, M3, P1}
6.
[Ans. C] ⟶ An attribute of an Entity can be atomic, Multi-valued, and composite. ⟶ An attribute (or) column of a table must take exactly one value (or) a NULL value. Option A ⟶Correct, Multivalued Attribute Option B ⟶Correct, Composite Attribute Option C ⟶Incorrect, since column cannot take multiple values Option D ⟶ Correct, column in a table takes single value (or) NULL.
1: N
E1
E2
N: N
E1, E2 are entities will become tables Relationship with cardinality 1:N will not be a table [Primary key of 1- side [E1] will be included as foreign key of N – side [E2]] Relationship with cardinality N:N will become a table. Total No of tables = 3 = {E1, E2, } 2.
[Ans. C] A rimary key Parent column C Foreign key Child column “C” refers to “A” O -DELETE CASCADE, when parent gets deleted, all corresponding child rows will be deleted automatically. (2, 4) is deleted [Parent =2] (5, 2) and (7, 2) will get deleted (5, 2) is deleted [Parent = 5] (9, 5) will get deleted (9, 5) is deleted [Parent = 9] no child rows for parent = 9 (7, 2) is deleted [Parent = 7] no child rows for parent = 7 Total no. of parents deleted = {2, 5, 9, 7} Total no. of rows deleted = {(5, 2), (7, 2), (9, 5)}
3.
[Ans. C] “rent payment” is a descriptive attribute, because it is related to the Lodging Relationship. “rent ayment” neither belongs to Hotel Room nor to a Person Entity Sets.
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 324
GATE QUESTION BANK
DBMS
Functional Dependencies & Normalization CS – 2005 1. Which-one of the following statements about normal forms is FALSE? (A) BCNF is stricter than 3NF (B) Lossless, dependency-preserving decomposition into 3NF is always possible (C) Lossless, dependency-preserving decomposition into BCNF is always possible (D) Any relation with two attributes is in BCNF
CS - 2006 5. The following functional dependencies are given: AB→ CD, AF →D, DE→ F, C →G, F→ E, G→ A Which one of the following options is false? (A) {CF}+ = {ACDEFG} (B) {BG}+ = {ABCDG} (C) {AF}+ = {ACDEFG} (D) {AB}+ = {ABCDG} 6.
2.
Consider a relation scheme R= (A, B, C, D, E, H) on which the following functional dependencies hold: *A→ B, BC →D, E →C, D →A+. What are the candidate keys of R? (A) AE, BE (B) AE, BE, DE (C) AEH, BEH, BCH (D) AEH, BEH, DEH
3.
A table has fields F1, F2, F3, F4, F5 with the following functional dependencies F1 → F3; F2 → F4; (F1. F2) → F5 In terms of Normalization, this table is in (A) 1 NF (C) 3 NF (B) 2 NF (D) None of these
4.
In a schema with attributes A, B, C, D and E following set of functional dependencies are given A B A C CD E B D E A Which of the following functional dependencies is NOT implied by the above set? (A) CD AC (C) BC CD (B) BD CD (D) AC BC
Consider a relation R with five attributes V, W, X, Y and Z. The following functional dependencies hold: VY → W, WX → Z, and ZY → V. which of the following is a candidate key for R? (A) VXZ (C) VWXY (B) VXY (D) VWXYZ
CS - 2007 7. Which one of the following statements is FALSE? (A) Any relation with two attributes is in BCNF. (B) A relation in which every key has only one attribute is in 2NF. (C) A prime attribute can be transitively dependent on a key in a 3NF relation. (D) A prime attribute can be transitively dependent on a key in a BCNF relation. 8.
Consider the following implications relating to functional and multivalued dependencies given below, which may or may not be correct. i) If A B and A C then A → BC ii) If A→B and A→C then A BC iii) If A BC and A →B and A → C iv) If A →BC and A B and A C Exactly how many of the above implications are valid? (A) 0 (C) 2 (B) 1 (D) 3 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 325
GATE QUESTION BANK
CS - 2008 9. Consider the following relational schemes for a library database: Book (Title, Author, Catalog_no, Publisher, Year, Price) Collection (Title, Author, Catalog_no) With the following functional dependencies: i) Title Author→ Catalog_no ii) Catalog_no →Title, Author, Publisher, Year iii) Publisher, Title, Year → Price Assume {Author, Title} is the key for both schemes. Which of the following statements is true? (A) Both Book and Collection are in BCNF (B) Both Book and Collection are in 3NF only (C) Book is in 2NF and Collection is in 3NF (D) Both Book and Collection are in 2NF only CS - 2011 10. Consider a relational table with a single record from each registered student with the following attributes. 1. Registration_Num: Unique registration number of each registered student 2. UID: Unique identity number, unique at the national level for each citizen 3. BankAccount_Num: Unique account number at the bank. A student can have multiple accounts or joint accounts. This attribute stores the primary account number 4. Name: Name of student 5. Hostel_Room: Room number of the hostel Which of the following options is INCORRECT? (A) BankAccount_Num is a candidate key (B) Registration_Num can be a primary key
DBMS
(C) UID is a candidate key if all students are from the same country (D) If S is a superkey such that S∩UID is NULL then S UID is also a superkey CS - 2012 11. Which of the following is TRUE? (A) Every relation in 3NF is also in BCNF (B) A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every key of R (C) Every relation in BCNF is also in 3NF (D) No relation can be in both BCNF and 3NF CS - 2013 Statement for Linked Answer Questions 12 and 13 Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F={CH →G, A →BC, B → CFH, E →A, F→EG+ is a set of functional dependencies (FDs) so that F is exactly the set of FDs that hold for R. 12. How many candidate keys does the relation R have? (A) 3 (C) 5 (B) 4 (D) 6 13.
The relation R is (A) In 1NF, but not in 2NF (B) In 2 NF, but not in 3 NF (C) In 3NF, but not in BCNF (D) In BCNF
CS - 2014 14. Consider the relation scheme R = (E, F, G, H, I, J, K, L, M, N) and the set of functional dependencies {*E, F+ → *G+, *F+ → *I, J+, *E, H+ → *K, L+, *K+ → *M+, *L+ → *N+} on R. What is the key for R? (A) {E, F} (C) {E, F, H, K, L} (B) {E, F, H} (D) {E}
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 326
GATE QUESTION BANK
15.
Given the following statements: S1: A foreign key declaration can always be replaced by an equivalent check assertion in SQL. S2: Given the table R(a, b, c) where a and b together form the primary key, the following is a valid table definition. CREATE TABLE S ( a INTEGER, d INTEGER, e INTEGER, PRIMARY KEY (d), FOREIGN KEY (a) references R) Which one of the following statements is CORRECT? (A) S1 is TRUE and S2 is FALSE. (B) Both S1 and S2 are TRUE. (C) S1 is FALSE and S2 is TRUE. (D) Both S1 and S2 are FALSE.
16.
Given the following two statements: S1: Every table with two single-valued attributes is in 1NF, 2NF, 3NF and BCNF. S2: AB → C, D → E, E → C is a minimal cover for the set of functional dependencies AB → C, D → E, AB → E, E → C. Which one of the following is CORRECT? (A) S1 is TRUE and S2 is FALSE. (B) Both S1 and S2 are TRUE. (C) S1 is FALSE and S2 is TRUE. (D) Both S1 and S2 are FALSE.
17.
The maximum number of superkeys for the relation schema R(E,F,G,H) with E as the key is _____________.
18.
A prime attribute of a relation scheme R is an attribute that appears (A) in all candidate keys of R. (B) in some candidate key of R. (C) in a foreign key of R. (D) only in the primary key of R.
th
th
DBMS
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 327
GATE QUESTION BANK
DBMS
Answer Keys and Explanations 1.
2.
[Ans. C] 2NF, 3NF decomposition ⟶ guarantees both dependency preservation and loss less join. BCNF decomposition ⟶ Only guarantees loss less join. BCNF decomposition, at times satisfies dependency preservation and at times not. BCNF wont guarantee the dependency preservation property.
Highest normal form of Relation = Least normal form among all FD’s NF 4.
[Ans. B] Relation = R(A, B, C, D) F Set of FD’s *( ) A → B ( )A→C ( ) CD → E ( )B→D ( ) E → A+ Option (A):- CD → AC→ Correct ( )CD → E ] By transitivity ( )E → A CD → A CD → C ] ] CD → AC ( )A → C CD → A (By union rule) Option (B):- BD →CD Cannot be derived from given set of FD’s Option (C):- BC→CD can be derived (4)B→D, By Augmentation rule BC→CD Option (D):- AC→BC Can be derived ( )A→B+→By augmentation rule AC → BC
5.
[Ans. C] Relation=R(ABCDEFG) Set of FD’s F are
[Ans. D] Relation = R(A, B, C, D, E, H) Set of FD’s are 1) 2) 3) 4)
A⟶B BC⟶D E⟶C D⟶A A B C D E H AEH BEH DEH Candidate key = {AEH, BEH, DEH}
3.
[Ans. A] Table has fields Simple attributes = F1, F2, F3, F4, F5 F=set of FD’s ( )F → F ( )F → F ] ( )F , F → F
1) 2) 3) 4) 5) 6)
AB → CD AF → D DE → F C→G F→E G→A A B C D E F G →ACDEFG CF →ABCDG BG AF →ADEF →ABCDG AB As closure of AF = AF = {ADEF} Option (C) is incorrect.
Candidate key =(F1, F2)[F1+F2] Prime Attribute = {F1, F2}
Now we will assign the highest normal form to each FD 1) FD : F → F is in 1NF, since it violated NF. “F is part of key. 2) FD : F → F also violated NF, since “F ” is part of key. 3) FD : F , F , → F is in BCNF, since (F1, F2) is key
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 328
GATE QUESTION BANK
6.
7.
8.
9.
[Ans. B] Relation = R(V, W, X, Y, Z) F Set of FD’s *VY → W, WX → Z, ZY→ V+ V W X Y Z VXZ VXY Candidate key VXY [Ans. D] Statement (D) is false because in BCNF relation a prime attribute can’t be transitively dependent on a key.
10.
[Ans. A] Since students can have joint accounts, two students can have same bank account number. So, BankAccount_Num can not be candidate key.
11.
[Ans. C] A table is said to be in BCNF if it is already in 3 NF and all determinants are keys
12.
[Ans. B] Relation = R(ABCDEFGH) F Set of FD’s are
[Ans. C] In DBMS, we can see that If A ⟶⟶ B and A ⟶⟶ C then A ⟶ BC and A ⟶⟶ BC then A ⟶ B and A ⟶ C Hence answer is (C). [Ans. C] 1) Book (Title, Author, Catalog-NO, Publisher, Year, Price) FD’s on book are I. Title, Author → Catalog-NO II. Catalog-NO → Title, Author, Publisher, Year III. Publisher, Title, Year → Price Key = {Author, Title} Prime Attributes = {Author, Title} FD1: Title, Author → Catalog-NO is in BCNF. FD2: Catalog-NO → Title, Author, Publisher, Year has to be decomposed → FD . : Catalog-NO→ Title is in NF → FD . : Catalog-NO → Author is in 2NF → FD . : Catalog-NO → Publisher is in NF → FD . : Catalog-NO → Year is in 2NF FD3: Publisher, title, year→ Price is in 2NF Book is in 2NF 2) Collection (Title, Author, Catalog-NO) FD’s on collection are ( ) Title, Author → Catalog-NO Key = {Author, Title} Prime Attributes = {Author, Title} FD : Title, Author → Catalog-NO is in BCNF Collection is in BCNF [In 3NF, 2NF, 1NF also]
DBMS
1) 2) 3) 4) 5)
CH→G A→BC B→CFH E→A F→EG A B
C D E F G CH A B E F Candidate keys are *AD, BD, ED, FD+ 13.
th
H
[Ans. A] Candidate keys = {AD, BD, ED, FD} Prime attributes = {A, B, D, E, F} Let’s assign highest Normal form to each FD 1) CH → G is in NF 2) A → BC can be treated as A → B is in NF A → C is in NF,A is part of key3) B → CFH can be written as B → C is in NF B → F is in NF B → H is in NF 4) E → A is in NF, Since “A” is prime 5) F → EG can be written as F → E is in NF F → G is in NF Relation is in 1NF only.
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 329
GATE QUESTION BANK
14.
[Ans. B] Relation = R (EFGHIJKLMN) F Set of FD’s are 1) 2) 3) 4) 5)
E EF EFH Key 15.
EF → G F → IJ EH → KL K→M L→N
DBMS
which is a single valued attribute and it is referencing the primary key (ab) of relation R (a, b, c), which is a composite key. A single value attribute cannot refer a composite key. S is false 16.
[Ans. A] S1 is true because if R(a, b) is relation and a → b is dependency then this relation is in 1NF, 2NF, 3NF and BCNF S2 is false because AB → E cannot be removed from minimal cover.
17.
[Ans. 8] Given Relation = R (E, F, G, H) Key = E Maximum no. of Super Keys = ? SNo SUPER KEYS 1 {E} 2 {E, F} 3 {E, G} 4 {E, H} 5 {E, F, G} 6 {E, G, H} 7 {E, F, H} 8 {E, F, G, H}
18.
[Ans. B] Prime Attribute = Part of some candidate key. Relation = R (ABCDEF) Candidate keys are {AB, CD} Total No of prime Attributer = 4 = {A, B, C, D}
E F G H I J K L M N EFH
[Ans. D] S1: Manager (Name, DeptID) Department (Dept Name, Deptid) In a given relation Manager DeptID is a foreign key referencing Deptid (P.K) of relation Department. Let’s declare the foreign key by an equivalent check assertion as follows:CREATE TABLE Manager (Name Varchar (10), DeptID INT (6), check (DeptID IN (select Deptid from Department)), PRIMARY KEY (Name)); The above use of check assertion is good to declare the foreign key as far as insertion is considered for relation manager (will not insert any tuple in Manager containing such DeptID value which is not present in any tuple of Department). But the above declaration will fail to implement changes done in Department relation in terms of deletion & updation. For an instance if a deptid present in Department gets deleted, then respective reference in Manager should also be deleted. S is false S : The given table definition is not valid due to invalid foreign key declaration. Attribute a is declared as foreign key
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 330
GATE QUESTION BANK
DBMS
Relational Algebra & Relational Calculus CS - 2005 1. Let r be a relation instance with schema R= (A, B, C, D). We define r1=∏A,B,C(R) and r2= ∏ r Let S =r1 * r2 where * denotes natural join. Given that the decomposition of r into r1 and r2 is lossy, which one of the following is TRUE? (A) s ⊂ r (C) r ⊂ s (D) r*s=s (B) r ∪ s=r
(B) Courses in which a proper subset of female students are enrolled (C) Courses in which only male students are enrolled (D) None of the above. 5.
Consider the relation employee (name, sex, supervisorName) with name as the key. supervisorName-gives the name of the supervisor of the employee under consideration. What does the following Tuple Relational Calculus query produce? {e name|employee e ∧ ∀x [¬ employee x ∨ x. supervisorName≠e name ∨ x sex=”male”]} (A) Names of employees with a male supervisor (B) Names of employees with no immediate male subordinates (C) Names of employees with no immediate female subordinates (D) Names of employees with a female supervisor
6.
Consider a selection of the form A≤100(r), where r is a relation with 1000 tuples. Assume that the attribute values for A among the tuples are uniformly distributed in the interval [0,500]. Which one of the following options is the best estimate of the number of tuples returned by the given selection query? (A) 50 (C) 150 (B) 100 (D) 200
7.
Consider the following relation schemas: -Schema = ( -name, -city, assets) a-Schema = (a-num, -name, bal) -Schema = ( -name, a-number) Let branch, account and depositor be respective instances of the above schemas. Assume that account and
CS - 2006 2. Consider the relations r1 (P, Q, R) and r2 (R, S, T) with primary keys P and R respectively. The relation n contains 2000 tuples and r2 contains 2500 tuples. The maximum size of the join r1 r2 is (A) 2000 (C) 4500 (B) 2500 (D) 5000 3.
Which of the following relational query languages have the same expressive power? (I) Relational algebra (II) Tuple relational calculus restricted to safe expressions (III) Domain relational calculus restricted to safe expressions (A) II and III only (C) I and III only (B) I and II only (D) I, II and III
CS - 2007 4. Information about a collection of students is given by the relation studInfo (studId, name, sex). The relation enroll (studId, CourseId) gives which student has enrolled for (or taken) what course (s). Assume that every course is taken by at least one male and at least one female student. What does the following relational algebra expression represent? courseld(( studld( sex=“female”(studInfo)) courseld(enroll)) enroll) (A) Courses in which all the female students are enrolled
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 331
GATE QUESTION BANK
depositor relations are much bigger than the branch relation. Consider the following query: ∏c-name b-city= “Agra” ∧ al90 (II) ∧ Registration Stu ent (III) {T|∃S stu ents ∃R Regitration S rollno = R rollno ∧ R.courseno =107∧R per ent>90∧T sname =S.sname)} (IV) {< S > |∃S ∃R < S S > Stu ents ∧< S 107 R > Registration ∧ R > 90 } (A) I, II, III and IV (B) I, II and III only (C) I, II and IV only (D) II, III and IV only
DBMS
size(r(R)) 90 and attending course no. 107 and DISTINCT S.sname will give distinct student names TRUE 2. Relational algebra gives projection of all students meeting the on ition an ‘ ’ gives DISTINCT value TRUE 3. Tuple calculus gives DISTINCT student name having score > 90 and course no is 107 TRUE 4. Domain calculus Domain calculus is equivalent to relational algebra and provide distinct value for the query TRUE
14.
DBMS
Let r(A,B,C) = 30,000 rows 25 rows fit in 1-block Total Blocks required for “r” = 1200 lo ks S(C,D,E) = 60,000 rows 30 rows fit in 1block Total Blocks reqd for “s” =2000 lo ks If' “r” is use as the outer relation:“r” requires 30000/25 = 1200 lo ks of storage and s requires (60000/30) = 2000 blocks of storage. The formula for number of block accesses is (nr bs + br) i.e. 30000 2000+1200 = 60,001,200 disk accesses are required for a nested loop join. If “s” is use as the outer relation:The formula for number of block accesses is (ns br + bs) i.e. 60000 × 1200+2000 = 72,002,000. So the numbers of block accesses are less if “r” is use outsi e 15.
[Ans. A] π
(π
(
=π π
∧
(π
=π 16.
(
(
r )))
r (
( ∧
r )))
r )
[Ans. D] Every employee has at least one dependent. EMPLOYEE empId empName empAge 1 A 50 2 B 60 3 C 70 DEPENDENT depId eId depName depAge D1 1 X 30 D2 1 Y 40 D3 2 Z 50 D4 2 U 80 D5 3 V 90 D6 3 W 100 Empi =1 An employee having 2 younger dependents [empAge > depAge]
[Ans. A] As Size(r(R)) < Size (s(S)), let us consider the following illustration Consider these relations with the following properties: th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com
Page 336
GATE QUESTION BANK
DBMS
Empi = 2 An employee having 1 younger & 1 older dependent [empAge < depAge] Empi = 3 An employee having 2 ol er dependents [empAge < depAge] employee employee employee
employee
∧
epen ent
returns {1 2 3} employee i ’s ∧
epen ent
returns {2 3} Final Answer –{1, 2, 3} –{2 3} = {1} Employee whose age is greater than all his dependents.
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com
Page 337
GATE QUESTION BANK
DBMS
SQL CS - 2005 1. The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list? select title from book as B where (select count (*) from book as T where T.price>B. Price) < 5 (A) Titles of the four most expensive books (B) Title of the fifth most inexpensive book (C) Title of the fifth most expensive book (D) Titles of the five most expensive books 2.
(A) (B) (C) (D) 3.
Do not supply any item Supply exactly one item Supply one or more items Supply two or more items
A table ‘student’ with schema (roll, name, hostel, marks) and another table ‘hobby‘ with schema (roll, hobbyname) contains records as shown below. Table student Roll Name Hostel Marks 1798 Manoj Rathod 7 95 2154 Soumic Banerjee 5 68 2369 Gumma Reddy 7 86 2581 Pradeep Pendse 6 92 2643 Suhas Kulkarni 5 78 2711 Nitin Kadam 8 72 2872 Kiran Vora 5 92 2926 Manoj Kunkalikar 5 94 2959 Hemant Karkhanis 7 88 3125 Rajesh Doshi 5 82
In an inventory management system implemented at a trading corporation, there are several tables designed to hold all the information. Amongst these, the following two tables hold information on which items are supplied by which suppliers, and which warehouse keeps which items along with the stock-level of these items. Supply = (supplierid, itemcode) Inventory = (itemcode, warehouse, stocklevel) For a specific information required by the management, following SQL query has been written. Select distinct STMP supplierid From supply as STMP Where not unique (Select ITMP. supplierid From Inventory, Supply as ITMP Where STMP.supplierid= ITMP. supplierid and ITMP.itemcode= Inventory. itemcode and Inventory. warehouse = ‘Nagpur‘); For the warehouse at Nagpur, this query will find all suppliers who
Table hobby Roll Hobby name 1798 chess 1798 music 2154 music 2369 swimming 2581 cricket 2643 chess 2643 hockey 2711 volleyball 2872 football 2926 cricket 2959 photography 3125 music 3125 chess The following SQL query is executed on the above tables: select hostel from student natural join hobby where marks > = 75 and roll between 2000 and 3000;
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 338
GATE QUESTION BANK
Relations S and H with the same schema as those of these two tables respectively contain the same information as tuples. A new relation S is obtained by the following relational algebra operation: S = ( . . (S)) (H)) ( The difference between the number of rows output by the SQL statement and the number of tuples in S is (A) 6 (C) 2 (B) 4 (D) 0
DBMS
in decreasing balance order and assigning ranks using ODBC Which two of the above statements are correct? (A) 2 and 5 (C) 1 and 4 (B) 1 and 3 (D) 3 and 5 5.
Consider the relation enrolled (student, course) in which (student, course) is the primary key, and the relation paid (student, amount) where student is the primary key. Assume no null values and no foreign keys or integrity constraints. Given the following four queries: Query 1: Select student from enrolled where student in (Select student from paid) Query 2: Select student from paid where student in (Select student from enrolled) Query 3: Select E. student from enrolled E, paid P where E. student = P. student Query 4: Select student from paid where exists (select * from enrolled where enrolled. student = paid. student) Which one of the following statements is correct? (A) All queries return identical row sets for any database (B) Query 2 and Query 4 return identical row sets for all databases but there exist databases for which Query 1 and Query 2 return different row sets (C) There exist databases for which Query 3 returns strictly fewer rows than Query 2 (D) There exist databases for which Query 4 will encounter an integrity violation at runtime.
CS - 2006 4. Consider the relation account (customer, balance) where customer is a primary key and there are no null values. We would like to rank customers according to decreasing balance. The customer with the largest balance gets rank 1. Ties are not broken but ranks are skipped: if exactly two customers have the largest balance they each get rank 1 and rank 2 is not assigned. Query 1: Select A. customer, count (B. customer) from account A, account B where A. balance < = B. balance group by A. customer Query 2: Select A. customer, 1+ count (B. customer) from account A, account B where A. balance< B. balance group by A. customer Consider these statements about Query 1 and Query 2. 1. Query 1 will produce the same row set as Query 2 for some but not all databases. 2. Both Query 1 and Query 2 are correct implementations of the specification 3. Query 1 is a correct implementation of the specification but Query 2 is not 4. Neither Query 1 nor Query 2 is a correct implementation of the specification 5. Assigning rank with a pure relational query takes less time than scanning
Statement for Linked Answer Questions 6 and 7 Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relations are did and cid respectively and the records are stored in ascending order of these th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 339
GATE QUESTION BANK
primary keys as given in the tables. No indexing is available in the database. D: Drivers relation did dname rating age 22 Karthikeyan 7 25 29 Salman 1 33 31 Boris 8 55 32 Amoldt 8 25 58 Schumacher 10 35 64 Sachin 7 35 71 Senna 10 16 74 Sachin 9 35 85 Rahul 3 25 95 Ralph 3 53 R : Reserves relation did cid day 22 101 10/10/06 22 102 10/10/06 22 103 08/10/06 22 104 07/10/06 31 102 10/11/06 31 103 06/11/06 31 104 12/11/06 64 101 05/09/06 64 102 08/09/06 74 103 08/09/06 C : Cars relation cid cname colour 101 Renault blue 102 Renault red 103 Ferrari green 104 Jaguar red 6.
What is the output of the following SQL query? Select D.dname from Drivers D where D.did in (select R. did from Cars C, Reserves R where R. cid = C.cid and C. color = ‘red’ intersect select R. did from Cars C, Reserves R where R. cid = C.cid and
DBMS
C.color = ‘green’) (A) Karthikeyan, Boris (B) Sachin, Salman (C) Karthikeyan, Boris, Sachin (D) Schumacher, Senna 7.
Let n be the number of comparisons performed when the above SQL query is optimally executed. If linear search is used to locate a tuple in a relation using primary key, then n lies in the range (A) 36 40 (C) 60 64 (B) 44 48 (D) 100 – 104
CS - 2007 8. Consider the table employee (empId, name, department, salary) and the two queries Q1, Q2 below. Assuming that department 5 has more than one employee, and we want to find the employees who get higher salary than anyone in the department 5, which one of the statements is TRUE for any arbitrary employee table? Q1: Select e.empId From employee e Where not exists (Select * From employee s Where s.department = “5” and s.salary>=e.salary) Q2: Select e. empId From employee e Where e. salary > Any (Select distinct salary From employee s Where s.department = “5”) (A) Q1 is the correct query. (B) Q2 is the correct query. (C) Both Q1 and Q2 produce the same answer (D) Neither Q1 nor Q2 is the correct query CS - 2008 Common Data for Questions 9 &10 Consider the following relational schema: Student (school-id, sch-roll-no, sname, saddress) th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 340
GATE QUESTION BANK
School (school-id, sch-name, sch-address, sch-phone) Enrolment (school-id, sch-roll-no, erollno, exam name) Exam Result (erollno, exam name, marks) 9.
10.
What does the following SQL query output? SELECT sch - name, COUNT (*) FROM School C, Enrolment E, Exam Result R WHERE E. school – id = C.school-id AND E. exam name = R. exam name AND E. Erollno = R.erollno AND R.marks = 100 AND S.school-id IN (SELECT school-id FROM student GROUP BY school-id HAVING COUNT (*) > 200) GROUP BY school-id (A) For each school with more than 200 students appearing in exams, the name of the school and the number of 100s scored by its students (B) For each school with more than 200 students in it, the name of the school and the number of 100s scored by its students (C) For each school with more than 200 students in it, the name of the school and the number of its students scoring 100 in at least one exam (D) Nothing; the query has a syntax error Consider the following tuple relational calculus query. {t | E Enrolment t= E. school – id | {x x Enrolment x. school – id = t ( B ExamResult . erollno = x. erollno B. exam name = x. exam name . marks 35)+ | {x | x Enrolment x. school-id = t+ 100> 35}
DBMS
If a student needs to score more than 35 marks to pass an exam, what does the query return? (A) The empty set (B) Schools with more than 35% of its students enrolled in some exam or the other (C) Schools with a pass percentage above 35% over all exams taken together (D) Schools with a pass percentage above 35% over each exam CS - 2009 Common data for Questions 11 and 12 Consider the following relational schema: Suppliers (sid: integer, sname: string, city:string, street: string) Parts (pid:integer, pname: string, color:string) Catalog (sid:integer, pid:integer, cost: real) 11. Consider the following relational query on the above database: SELECT S.sname FROM Suppliers S WHERE S.sid NOT IN (SELECT C. sid FROM Catalog C WHERE C.pid NOT IN (SELECT P.pid FROM Parts P WHERE P.color ‘blue’)) Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query? (A) Find the names of all suppliers who have supplied a non-blue part (B) Find the names of all suppliers who have not supplied a non-blue part (C) Find the names of all suppliers who have supplied only blue parts (D) Find the names of all suppliers who have not supplied only blue part 12.
th
Assume that, in the suppliers relation above, each supplier and each street within a city has a unique name, and th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 341
GATE QUESTION BANK
(sname, city) forms a candidate key. No other functional dependencies are implied other than those implied by primary and candidate keys. Which one of the following is TRUE about the above schema? (A) The schema is in BCNF (B) The schema is in 3NF but not in BCNF (C) The schema is in 2NF but not in 3 NF (D) The schema is not in 2NF CS - 2010 13. A relational schema for a train reservation database is given below. Passenger (pid, pname, age) Reservation (pid, class, tid) Table: Passenger pid pname Age 0 ‘Sachin’ 65 1 ‘Rahul’ 66 2 ‘Sourav’ 67 3 ‘Anil’ 69 Table: Reservation pid class tid 0 ‘AC’ 8200 1 AC’ 8201 2 ‘SC’ 8201 5 ‘AC’ 8203 1 ‘SC’ 8204 3 ‘AC’ 8202 What pids are returned by the following SQL query for the above instance of the tables? SELECT pid FROM Reservation WHERE class = ‘AC’ AND EXISTS (SELECT * FROM Passenger WHERE age > 65 AND Passenger.pid = Reservation.pid) (A) 1, 0 (C) 1, 3 (B) 1, 2 (D) 1, 5
DBMS
CS - 2011 14. Database table by name Loan_Records is given below. Borrower Bank_ Loan_ Manager Amount Ramesh Sunderajan 10000.00 Suresh Ramgopal 5000.00 Mahesh Sunderajan 7000.00 What is the output of the following SQL query? SELECT count(*) FROM (SELECT Borrower, Bank_Manager FROM Loan_Records) AS S NATURAL JOIN (SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T); (A) 3 (C) 5 (B) 9 (D) 6 15.
Consider a database table T containing two columns X and Y each of type integer. After the creation of the table, one record (X = 1, Y = l) is inserted in the table. Let MX and MY denote the respective maximum values of X and Y among all records in the table at any point in time. Using MX and MY, new records are inserted in the table 128 times with X and Y values being MX +1, 2*MY + 1 respectively. It may be noted that each time after the insertion, values of MX and MY change. What will be the output of the following SQL query after the steps mentioned above are carried out? SELECT Y FROM T WHERE X=7; (A) 127 (C) 129 (B) 255 (D) 257
CS - 2012 16. Which of the following statements are TRUE about an SQL query? P: An SQL query can contain a HAVING clause even if it does not a GROUP BY clause
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 342
GATE QUESTION BANK
Q: An SQL query can contain a HAVING clause only if it has a GROUP BY clause R: All attributes used in the GROUP BY clause must appear in the SELECT clause S: Not all attributes used in the GROUP BY clause need to apper in the SELECT clause (A) P and R (C) Q and R (B) P and S (D) Q and S
departments(dept-id, dept-name, manager-id, location-id) You want to display the last names and hire dates of all latest hires in their respective departments in the location ID 1700. You issue the following query: SQL>SELECT last-name, hire-date FROM employees WHERE (dept-id, hire-date) IN (SELECT dept-id, MAX(hire-date) FROM employees JOIN departments USING(dept-id) WHERE location-id = 1700 GROUP BY dept-id); What is the outcome? (A) It executes but does not give the correct result. (B) It executes and gives the correct result. (C) It generates an error because of pairwise comparison. (D) It generates an error because the GROUP BY clause cannot be used with table joins in a sub- query.
Common Data for Questions 17 and 18 Consider the following relation A, B & C. A. Id Name Age 12 Arun 60 15 Shreya 24 99 Rohit 11 B.
Id 15 25 98 99
Name Shreya Hari Rohit Rohit
Age 24 40 20 11
C.
Id 10 99
Phone 2200 2100
Area 02 01
17.
How many tuples does the result of the following relational algebra expression contain? Assume that the schema of A∪ is the same as that of A. (A∪ ) . C . (A) 7 (C) 5 (B) 4 (D) 9
18.
How many tuples does the result of the following SQL query contains? SELECT A.Id FROM A WHERE A.Age>All (SELECT B.Age FROM B WHERE . name = ‘Arun’) (A) 4 (C) 0 (B) 3 (D) 1
DBMS
20.
SQL allows duplicate tuples in relations, and correspondingly defines the multiplicity of tuples in the result of joins. Which one of the following queries always gives the same answer as the nested query shown below: select * from R where a in (select S.a from S) (A) Select R.* from R, S where R.a=S.a (B) Select distinct R.* from R,S where R.a=S.a (C) Select R.* from R,(select distinct a from S) as S1 where R.a=S1.a (D) Select R.* from R,S where R.a=S.a and is unique R
21.
Consider the following relational schema: employee(empId,empName,empDept) customer(custId,custName,salesRepId, rating) salesRepId is a foreign key referring to empId of the employee relation. Assume
CS - 2014 19. Given the following schema: employees (emp-id, first-name, last-name, hire-date, dept-id, salary)
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 343
GATE QUESTION BANK
8.7 19 Ganesh 8765
ganesh@civil
9.3 18 Swati 9876
swati@mech
9.4 19 Shankar 7853
shankar@cse
9.5 19 Swati 1287
swati@ee
X Shankar 2345
shankar@math
Student Age Student Name
Student Email
9.4
Given an instance of the STUDENTS relation as shown below: CPI
22.
Student ID
that each employee makes a sale to at least one customer. What does the following query return? SELECT empName FROM employee E WHERE NOT EXISTS (SELECT custId FROM customer C WHERE C.salesRepId = E.empId AND C.rating< ’GOOD’); (A) Names of all the employees with at least one of their customers having a ‘GOOD’ rating. (B) Names of all the employees with at most one of their customers having a ‘GOOD’ rating. (C) Names of all the employees with none of their customers having a ‘GOOD’ rating. (D) Names of all the employees with all their customers having a ‘GOOD’ rating.
DBMS
For (StudentName, StudentAge) to be a key for this instance, the value X should NOT be equal to ________
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 344
GATE QUESTION BANK
DBMS
Answer Keys and Explanations 1.
[Ans. D] No two books will have same price. Let us consider the table as follows:TITLE PRICE T1 100 T2 200 T3 300 T4 400 T5 500 T6 600 As the given Query is a “Correlated Sub Query, Outer Query executes first and Inner Query executes second and executes once for each row written by the outer query. SELECT title From book as B
Final Result → Rows from the Outer Query where Condition is Satisfied. TITLE T1 T2 T3 Query returns the titles T4 Of 5 most expensive books T5 T6 2.
[Ans. D] SUPPLY Supplierid Item code S1 I1 S1 I2 S1 I3 S2 I4 S2 I5 S3 I6
TITLE T1 T2 T3 T4 T5 T6 WHERE (SELECT count(*) FROM book as T WHERE T.price > B.price) 100;=5 SELECT count (*) FROM book as T WHERE T.price > 200;=4 SELECT count (*) FROM book as T WHERE T.price > 300;=3 SELECT count (*) FROM book as T WHERE T.price > 400;=2 SELECT count (*) FROM book as T WHERE T.price > 500;=1 SELECT count (*) FROM book as T WHERE T.price > 600;=0
=1500; SELECT * FROM 2 rows Not employee s Qualified WHERE s. department=5 and s.salary >=500;
2
3
4
5
Q2:-
Sid S1 S1 S2 S2 S3 S3
10.
SELECT FROM WHERE
[Ans. D] If SELECT clause consists aggregate and non – aggregate. All non-aggregate columns in the SELECT list must appear in Group by clause. But in this query Group by consists school_id instead of sch_name [Ans. C] Here, we used division operator. Numerator produces all who scores more than 35 marks, denominator checks all exams. Hence it produces pass percentage above 35% over all exams taken together.
PARTS Pname Color Blue Blue Blue Green Green Green
Pid P1 P2 P3 P4 P5 P6
e. empId employee E e.salary > ANY (SELECT distinct salary FROM employee s WHERE s.department=5); → returns *2, 3, 4+ employees Final Answer = Only Q2 is giving the correct result
9.
DBMS
CATALOG Pid Cost P1 P2 P3 P4 P5 P6
S1 → Supplier supplying only lue parts, [P1, P2] S2 → Supplier supplying both Blue & Green parts. [P3, P4] S3 → Supplier supplying only Green parts, [P5, P6] Initial Query SELECT S.sname FROM Suppliers S WHERE S.sid NOT IN (SELECT C.sid FROM Catalog C WHERE C.pid NOT IN (SELECT P.pid FROM Parts P WHERE P.colour< ‘blue’)); After execution of second inner query:SELECT S.sname FROM Suppliers S WHERE S.sid NOT IN (SELECT C.sid FROM Catalog C WHERE C.pid NOT IN (P4, P5, P6); →Main Query returns output as {S3}
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 348
GATE QUESTION BANK
After execution of first inner query:SELECT S.sname FROM Suppliers S WHERE S.sid NOT IN(S1, S1, S2); Final Answer = Names of Suppliers who supplies Only non-blue parts 12.
[Ans. B] pid is a primary key, sname and city are candidate keys. Hence all are prime attributes and there is a relationship between prime attributes hence it is not in BCNF but in 3 NF
13.
[Ans. C] In the given SQL query, we have to select the pid in which the value of class filed is ‘AC’. In the reservation table and age> 65 and the value of passenger.pid= reservation.pid So according to SQL Query In this WHERE class = ‘AC’ So it select the pid = 0, 1, 5, 3 and for SELECT *FROM passenger where age>65 and Passenger.pid = reservation.pid from passenger table we get the Pid Pname Age 1 Rahul 66 2 Sourav 67 3 Anil 69
S Natural Join T Borrower Bank Manager Loan Amount Ramesh Sunderajan 10000.00 Ramesh Sunderajan 7000.00 Suresh Ramgopal 5000.00 Ramesh Sunderajan 10000.00 Ramesh Sunderajan 7000.00 Query :SELECT Count(*) FROM ((SELECT Borrower, Bank_Manager FROM Loan_Records ) AS S NATURAL JOIN (SELECT Bank_Manger Loan_Amount FROM Loan_Records) AS T); → Returns count =5 15.
16.
[Ans. C] Borrower Ramesh Suresh Mahesh
S Bank_Manager Sunderajan Ramgopal Sunderajan T
Bank_Manager Sunderajan Ramgopal Sunderajan
[Ans. A] The entries inserted in order are X 1 2 3 4 5 6 7 Y 1 3 7 15 31 63 127 One can also solve the recursion and find out that Y = 2X— 1
1 AC 3 AC So the pid return from given query is(1, 3) 14.
DBMS
Loan_Amount 10000.00 5000.00 7000.00 th
[Ans. C] P: An SQL query can contain a HAVING clause even if it does not have a GROUT BY clause SELECT avg(salary) FROM emp HAVING avg(salary) 1000; → Valid SQL Statement, “P” is TRUE Q: An SQL query can contain a HAVING clause only if it has a GROUP BY clause → FALSE R: All attributes used in the GROUP BY clause must appear in the SELECT clause SELECT avg(salary), min(salary), max(salary) FROM emp GROUP BY deptno,gender; → VALID SQL Statement, “R” is FALSE. S: Not all attributes used in the GROUP BY clause need to appear in SELECT clause → TRUE
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 349
GATE QUESTION BANK
17.
[Ans. A] A∪ =
(A∪ ) ID 12 15 99 25 98 99 98 18.
ID 12 15 99 25 98
.
.
Name Arun Shreya Rohit Hari Rohit Rohit Rohit
Age 60 24 11 40 20 11 20
Name Arun Shreya Rohit Hari Rohit C ID 10 10 10 10 10 99 99
Option: (B) SELECT DISTINCT R.* FROM R, S WHERE R.a = S.a Option: (C) SELECT R.* FROM R,(SELECT DISTINCT a FROM S) AS S1 WHERE R.a = S1.a Option: (D) SELECT R.* FROM R,S WHERE R.a = S.a AND UNIQUE R Given Option Option Option Query (A) (B) (C) A a a a 1 1 1 1 1 1 2 1 2 1 2 2 1 2 2 2 2 2 Option (D) Error: ORA – 00936: missing expression Only option (C) is given the same output as the given Query
Age 60 24 11 40 20
Phone 2200 2200 2200 2200 2200 2100 2100
Area 02 02 02 02 02 01 01
[Ans. B] In this (Select B. Age from B where B. Name = ‘Arun’) ⇓ Φ So all A.Age will be selected, so Ans 3.
19.
[Ans. B] Inner query will have a join between employee and departments and will return dept – id and hire – date of employees who are having location 1700 and latest line – date (in sorted order)
20.
[Ans. C] Will prove by taking the following illustration with relation “R” and “S” as follows: R S a a 1 1 1 1 2 2 2 2 Given Query:-SELECT * FROM R WHERE a IN (SELECT S.a FROM S) Option: (A) SELECT R.* FROM R,S WHERE R.a = S.a
DBMS
21.
[Ans. D] SalesRepId is a foreign key referring to empId of the employee relation. Assume that each employee makes a sale to at least one customer. EMPLOYEE empId empName empDept 1 A 2 B 3 C CUSTOMER custId custName salesRepId rating C1 1 GOOD C2 1 GOOD C3 2 GOOD C4 2 BAD C5 3 BAD C6 3 BAD empId = 1 → Employee with all their customers [C1, C2] having GOOD rating empId = 2 → Employee with one customer having GOOD [C3] and other having BAD [C4]
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 350
GATE QUESTION BANK
DBMS
empId = 3 → Employee with all their customer [C5, C6] having BAD rating Query:SELET empName FROM employee E WHERE NOT EXISTS (SELECT FROM WHERE AND e.emp Id 1
2
3
custId customer C C.salesRepId= E.empID C.rating < ‘GOOD’);
INNER QUERY SELECT custId FROM customer C WHERE C.salesRepId = 1 AND C.rating < ’GOOD’; SELECT custId FROM customer C WHERE C.salesRepId =2 AND C.rating < ’GOOD” SELECT custId FROM customer C WHERE C.salesRepId =3 AND C.rating< ‘GOOD’;
OUT NOT PUT EXISTS No Qualified rows
1 Not row Qualified
2 Not rows Qualified
Final Result =*1+ → employee with all their customers having a “GOOD” rating. 22.
[Ans. 19] Key = (StudentName, StudentAge) → Composite Key Composite Key → Combination of 2 columns must be Unique As 2 rows having same StudentName “Shankar”. Obviously StudentAge should not be fulfill the key. So X! = 19 [X can take any value other than 19]
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 351
GATE QUESTION BANK
DBMS
Transactions and Concurrency Control CS – 2005 1. A company maintains records of sales made by its salespersons and pays them commission based on each individual’s total sales made in a year. This data is maintained in a table with following schema: salesinfo = (salespersonid, totalsales, commission) In a certain year, due to better business results, the company decides to further reward its salespersons by enhancing the commission paid to them as per the following formula. If commission < = 50000, enhance it by 2% If 50000 < commission < = 100000, enhance it by 4% If commission > 100000, enhance it by 6% The IT staff has written three different SQL scripts to calculate enhancement for each slab, each of these scripts is to run as a separate transaction as follows: T1 Update salesinfo Set commission = commission * 1.02 Where commission < = 50000; T2 Update salesinfo Set commission = commission * 1.04 Where commission > 50000 and commission is < =100000; T3 Update salesinfo Set commission = commission * 1.06 Where commission > 100000; Which of the following options of running these transactions will update the commission of all salespersons correctly? (A) Execute T1, followed by T2 followed by T3 (B) Execute T2, followed by T3; T1 running concurrently throughout (C) Execute T3, followed by T2; T1 running concurrently throughout (D) Execute T3, followed by T2 followed by T1 2.
Amongst the ACID properties of a transaction, the ‘Durability‘ property requires that the changes made to the database by a successful transaction persist
(A) Except in case of an Operating System crash (B) Except in case of Disk crash (C) Except in case of a power failure (D) Always, even if there is a failure of any kind CS - 2006 3. Consider the following log sequence of two transactions on a bank account, with initial balance 12000, that transfer 2000 to a mortgage payment and, then apply a 5% interest. 1. T1: start 2. T1: B old= 12000, new=10000 3. T1: M old = 0, new = 2000 4. T1: commit 5. T2: start 6. T2: B old=10000, new = 10500 7. T2: commit Suppose the database system crashed just before log record 7 is written. When the system is restarted, which one statement is true of the recovery procedure? (A) We must redo log record 6 to set B to 10500 (B) We must undo log record 6 to set B to 10000 and then redo log records 2 and 3 (C) We need not redo log records 2 and 3 because transaction T1 has committed (D) We can apply redo and undo operations in arbitrary order because they are idempotent CS - 2007 4. Consider the following schedules involving two transactions. Which one of the following statements is TRUE? S1:r1(X); r1 (Y); r2(X); r2(Y); w2 (Y); w1(X) S2:r1(X); r2 (X); r2(Y); w2(Y); r1 (Y); w1(X) (A) Both S1 and S2 are conflict serializable (B) S1 is conflict serializable and S2 is not conflict serializable (C) S1 is not conflict serializable and S2 is conflict serializable
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 352
GATE QUESTION BANK
(D) Both S1 and S2 are not conflict serializable 5.
Consider the following two transactions T1 and T2. T1: read(A); read(B); if A = 0 then B ⟵ B+1; write(B); T2: read (B); read (A); if B ≠ 0 then A⟵A 1; write(A); Which of the following schemes, using shared and exclusive locks, satisfy the requirements for strict two phase locking for the above transactions? S2: lock S(B); (A) S1: lock S(A); read (A); read(B); lock S(B); lock S(A) read(B); read(A); if A = 0 if B≠0 then then B←B+1; A ← A – 1; write (B); write(A); commit; commit; unlock (A); unlock (B); unlock (B); unlock (A); (B)
S1: lock X(A); S2: lock X(B); read (A); read (B); lock X(B); lock X(A); read(B); read(A); if A = 0 if B≠ 0 then B←B+1; then write (B); A→A 1; unlock (A); write (A); commit; unlock (A); unlock (B); commit; unlock (B);
(C)
(D)
DBMS
S1: lock S(A); read (A); lock X(B); read(B); if A = 0 then B←B+1; write (B); unlock (A); commit; unlock (B); S1: lock S(A); read (A); lock X(B); read(B); if A = 0 then B←B+1; write (B); unlock (A); unlock (B); commit;
S2: lock S(B); read (B); lock X(A); read(A); if B≠ 0 then A→A 1; write (A); unlock (A); commit; unlock (B); S2: lock S(B); read (B); lock X(A); read(A); if B≠ 0 then A→A 1; write (A); unlock (A); unlock (B); commit;
CS – 2009 6. Consider two transactions T1 and T2, and four schedules S1, S2, S3, S4 of T1 and T2 as given below: T1: R1[x] W1 [x] W1 [y] T2: R2 [x] R2 [y] W2 [y] S1: R1[x] R2 [x] R2[y] W1 [x] W1 [y] W2 [y] S2: R1[x] R2 [x] R2[y] W1 [x] W2 [y] W1 [y] S3: R1[x] W1 [x] R2[x] W1 [y] R2 [y] W2 [y] S4: R2[x] R2 [y] R1[x] W1 [x] W1 [y] W2 [y] Which of the above schedules are conflictserializable? (A) S1 and S2 (C) S3 only (B) S2 and S3 (D) S4 only CS - 2010 7. Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock? I. 2-phase locking II. Time-stamp ordering (A) I only (B) II only (C) Both I and II (D) Neither I nor II th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 353
GATE QUESTION BANK
8.
Consider the following schedule for transactions T1, T2 and T3 T1 T2 T3 Read(X) Read(Y) Read(Y) Write(Y) Write(X) Write(X) Read(X) Write(X) Which one of the schedules below is the correct serialization of the above? (A) T1 → T3 → T2 (B) T2 → T1 → T3 (C) T2 → T3 → T1 (D) T3 → T1 → T2
CS - 2012 9. Consider the following transactions with data items P and Q initialized to zero: T1: read (P); read(Q); if P = 0 then Q: = Q + 1 ; write (Q). T2: read(Q); read (P); if Q = 0 then P: = P + 1 ; write (P). Any non-serial interleaving of T1 and T2 for concurrent execution leads to (A) A serializable schedule (B) A schedule that is not conflict serializable (C) A conflict serializable schedule (D) A schedule for which a precedence graph cannot be drawn
11.
DBMS
Consider the following schedule S of transactions T1, T2, T3, T4: T1
T2
T3
T4
Reads (X) Writes(X) Commit Writes (X) Commit Writes (Y) Reads(Z) Commit Reads (X) Reads (Y) commit
Which one of the following statements is CORRECT? (A) S is conflict – serializable but not recoverable (B) S is not conflict – serializable but is recoverable (C) S is both conflict – serializable and recoverable (D) S is neither conflict – serializable nor is it recoverable 12.
CS - 2014 10. Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item x, denoted by r(x) and w(x) respectively. Which one of them is conflict serializable? (A) r (x); r (x); w (x); r (x); w (x) (B) r (x); r (x); w (x); r (x); w (x) (C) r (x); r (x); r (x); w (x); w (x) (D) r (x); w (x); r (x); r (x); w (x)
th
Consider the transactions T1, T2, and T3 and the schedules S1 and S2 given below. T1: r1(X); r1(Z); w1(X); w1(Z) T2: r2(Y); r2(Z); w2(Z) T3: r3(Y); r3(X); w3(Y) S1: r1(X); r3(Y); r3(X); r2(Y); r2(Z); w3(Y); w2(Z); r1(Z); w1(X); w1(Z) S2: r1(X); r3(Y); r2(Y); r3(X); r1(Z); r2(Z); w3(Y); w1(X); w2(Z); w1(Z) Which one of the following statements about the schedules is TRUE? (A) Only S1 is conflict-serializable. (B) Only S2 is conflict-serializable. (C) Both S1 and S2 are conflictserializable. (D) Neither S1 nor S2 is conflictserializable.
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 354
GATE QUESTION BANK
DBMS
Answer Keys and Explanations 1.
[Ans. D] Transactions must execute in order T3 → T2 → T1. Because if sales person “XYZ” Commission = 49,999, then If “T1” executes first then its new commission would be 49,999 × 1.02 = 50,998 [which is greater than 50,000] Now if “T2” executes second, then sales person “XYZ” will get hike again, because his commission is greater than 50,000 This is absolutely wrong. So the perfect order of execution is T3 → T2 →T1.
2.
[Ans. D] Always, even if there is a failure of any kind.
3.
[Ans. C] In data base transaction system if transaction is commit then it becomes permanent there is no effect of any failure so we need not redo log records 2 and 3 because transaction T1 has committed.
4.
[Ans. C] Schedule S1 → Not Conflict Serializable, Since Cycle is formed. Schedule S2 → Confilict Serializable, Since there is no cycle = Serial Schedule T2→ T1 Schedule : S1 Schedule : S2 T1 T2 T1 T2 r1(x) r1(x) r1(y) r2(x) r2(x) r2(y) r2(y) w2(y) w2(y) r1(y) w1(x) w1(x)
Before relasing exclusive lock, commit operation is necessary. 6.
[Ans. B] Schedule S2 T R x R R
5.
T2
T1
x y
x y y Dependency graph T cycles. Schedule S3 T R x x
T S2 has no T
R
x
R
y y
y
T S Salso Dependency graph T has no cycles. So, S and S are conflict – serizlizable. 7.
[Ans. B] In 2 – phase locking concurrency control protocol it ensures the conflict serilizable schedule but it may not free from deadlock Ex. T
T
l(A)
l(A) (A) (B)
u(A) Deny T in waiting
T1
T
T2
l(A) l(B) (B)
(A)
T for unlock
In time stamp ordering protocol it ensure conflict serializablity and free from dead lock
[Ans. C] T1: A required shared lock because it reads only. B requires exclusive lock because it perform read and write operation. T2 : similarly it performs shared lock on B and exclusive lock on A.
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 355
GATE QUESTION BANK
8.
[Ans. A] Given Schedule → Serializable, Since no cycle is formed → Serial Order =T1→ T3 →T2 T1 T2 T3 Read(X) Read(Y) Read(Y) Write(Y) Write(X) Write(X) Read(X) Write(X) T
T1
DBMS
T2 Reads(X)
T3
T4
Writes(X) Commit Writes(X) Commit Writes(Y) Reads (Z) Commit Reads (X) Reads (Y) Commit
T1
T2
T4
T3
T
T T 12.
9.
[Ans. B] T r (P) r (Q) w (Q)
T
T r (Q) r (P) w (P)
T
Cycle present so not conflict serializable 10.
[Ans. D] Schedule in option D T T T r(x) w(x) r(x) r(x) w(x) Dependency graph (T ) → (T ) → (T ) Conflict serializable.
11.
[Ans. C] Given Schedule is Recoverable → since all transactions read the committed data only. Given Schedule is Serializable→Since there is no cycle in the graph Equivalent Serializable Schedule = T2 → T3 → T1 → T4 th
[Ans. A] Test for Conflict Serializability→ Precedence Graph Graph without Cycle → Schedule is Conflict Serializable Graph with Cycle → Schedule is NOT Conflict Serializable Schedule S1→ No Cycle → Conflict Serializable Whereas Schedule S2→ Cycle → Not Conflict Serializable Schedule: S1 S1 T1 T2 T3 r1(X) r3(Y) r3(X) r2(Y) r2(Z) w3(Y) w2(Z) r1(Z) w1(X) w1(Z) No cycle → schedule is conflict serializable Equivalent serializable order = T2 → T3 → T1
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 356
GATE QUESTION BANK
DBMS
r2(Z),w1(Z) T1
T2
r2(Y),w3(Y)
r3(X),w1(X) T3 Schedule: S2 S2 T2
T1 r1(X)
T3 r3(Y)
r2(Y) r3(X) r1(Z) r2(Z) w3(Y) w1(X) w2(Z) w1(Z) Cycle is formed→Schedule is NOT conflict serializable Equivalent serializable order = T2 → T3 → T1 r1(Z),w2(Z) T1
T2 r2(Z),w1(Z) r2(Y),w3(Y)
r3(X),w1(X) T3
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 357
GATE QUESTION BANK
DBMS
File Structures (Sequential files, Indexing, B and CS - 2005 1. Which one of the following is a key factor for preferring B+ -trees to binary search trees for indexing database relations? (A) Database relations have a large number of records (B) Database relations are sorted on the primary key (C) B+ -trees require less memory than binary search trees (D) Data transfer from disks is in blocks 2.
4.
Consider the relation enrolled (student, course) in which (student, course) is the primary key, and the relation paid (student, amount) where student is the primary key. Assume no null values and no foreign keys or integrity constraints. Assume that amounts 6000, 7000, 8000, 9000 and 10000 were each paid by 20% of the students. Consider these query plans (Plan 1 on left, Plan 2 on right) to “list all courses taken by students who have paid more than x.”
enrolled
paid
enrolled
Probe index on student
Sequential scan, select amount > x
Probe index on student
Indexed nested loop join
paid Sequential scan
Indexed nested loop join
Select on amount > x
Project on course
A B-tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then the maximum number of nodes that could be newly created in the process are (A) 5 (C) 3 (B) 4 (D) 2
CS - 2006 3. In a database file structure, the search key field is 9 bytes long, the block size is 512 bytes, a record pointer is 7 bytes and a block pointer is 6 bytes. The largest possible order of a non-leaf node in a B+ tree implementing this file structure is (A) 23 (C) 34 (B) 24 (D) 44
trees)
Project on course
A disk seek takes 4ms, disk data transfer bandwidth is 300 MB/s and checking a tuple if amount is greater than x takes 10 µs. Which of the following statement is correct? (A) Plan 1 and Plan 2 will not output identical row sets for all databases (B) A course may be listed more than once in the output of Plan 1 for some databases (C) For x = 5000, Plan 1 executes faster than Plan 2 for all databases (D) For x = 9000, Plan 1 executes slower than Plan 2 for all databases CS - 2007 5. The order of a leaf node in a B+-tree is the maximum number of (value, data record pointer) pairs it can hold. Given that the block size is 1K bytes, data record pointer is 7 bytes long, the value field is 9 bytes long and a block pointer is 6 bytes long, what is the order of the leaf node? (A) 63 (C) 67 (B) 64 (D) 68
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 358
GATE QUESTION BANK
Statement for Linked Answer Questions 6 and 7 Consider the tree in the adjoining figure, where each node has at most two keys and three links.
6.
Keys K15 then K25 are inserted into this tree in that order. Exactly how many of the following nodes (disregarding the links) will be present in the tree after the two insertions?
(A) 1 (B) 2 7.
(C) 3 (D) 4
Now the key K50 is deleted from the B+ tree resulting after the two insertions made earlier. Consider the following statements about the tree resulting after this deletion. (i) The height of the tree remains the same. (ii) The node K20 (disregarding the links) is present in the tree. (ii) The root node remains unchanged (disregarding the links). Which one of the following options is true? (A) Statements (i) and (ii) are true (B) Statements (ii) and (iii) are true (C) Statements (iii) and (i) are true (D) All the statements are false
CS - 2008 8. Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a
DBMS
non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multi-level index scheme is used to store the secondary index, the number of first-level and second-level blocks in the multi-level index are respectively (C) 256 and 4 (A) 8 and 0 (B) 128 and 6 (D) 512 and 5 9.
A clustering index is defined on the fields which are of type (A) Non-key and ordering (B) Non-key and non-ordering (C) Key and ordering (D) Key and non-ordering
CS - 2009 10. The following key values are inserted into a B+-tree in which order of the internal nodes is 3, and that of the leaf nodes is 2, in the sequence given below. The order of internal nodes is the maximum number of tree pointers in each node, and the order of leaf nodes is the maximum number of data items that can be stored in it. The B+-tree is initially empty. 10, 3, 6, 8, 4, 2, 1. The maximum number of times leaf nodes would get split up as a result of these insertions is (A) 2 (C) 4 (B) 3 (D) 5 CS - 2013 11. An index is clustered , if (A) It is on a set of fields that form a candidate key. (B) It is on a set of fields that include the primary key (C) The data records of the file are organized in the same order as the data entries of the index (D) The data records of the file are organized not in the same order as the data entries of the index th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 359
GATE QUESTION BANK
DBMS
Answer keys and Explanations 1.
2.
[Ans. D] The transfer of data from disk to primary memory is in the form of data blocks if a data block is larger than indexing is easy due to this tree is better than binary search tree data structure if large amount of data can be access.
Size of Key = K = 9 Bytes Size of Block Pointer = BP = 6 Bytes (n × K) + (n × RP) + BP = B (n × 9) + (n × 7) + 6 = 1024 n = CEIL (1018/16) = CEIL (63.62) = 63 6.
[Ans. A] Final tree is
[Ans. A]
20
40
root (first level)
15
second level
third level
3.
4.
5.
7.
50
30
15
[Ans. A] After deletion of K – 50, we get following - tree 20
[Ans. C] Size of Key = K=9 Bytes Size of Block = B = 512 Bytes Size of Record Pointer = RP = 7 Bytes Size of Block Pointer = BP = 6 Bytes Order (non-leaf node) of B + Tree = n =? (n × BP) + (n ) K=B (n × 6) + (n ) 9 =512 n=CEIL (521/15) = CEIL (34.73) = 34 [Ans. C] The seek time of disk is 4ms and data transfer node is 300 MB/s. So if x = 5000 then plan 1 execute faster than plan 2 for all database.
40
20 25
10
fourth level
If insertion takes place then new node can be inserted at each level shown by dashed box and in this process the new root can be created. Hence 5 is the answer
50
30
30
15
10
15
20
25
40
30
40
So (i) is true (ii) is also true (iii) is false because root not remain unchanged 8.
[Ans. C] DATA FILE File → Ordered on Non – Key field Total no. of Records = 16384 records Size of the Record = 32 Bytes INDEX FILE Type of Index = Secondary Index ( ey) → DENSE INDEX Size of Key = 6 Bytes Size of block pointer =10 Bytes
[Ans. A] Order (leaf node) = max (value, record pointers) = n =? Size of Block = B = 1K bytes = 1024 Bytes Size of Record Pointer = RP = 7 Bytes th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 360
GATE QUESTION BANK
Size of the Block =1024 Bytes Size of the Index Record = 10 + 6 = 16 Bytes No. of Index Records that can fit in a single block = 1024/16 = 64 Total No. of Index Records = DENSE = 16384 index records Total No. of Blocks for First Level Index = 16384/64 = 256 blocks Total No. of Blocks for Second Level Index = 256/64=4 blocks 9.
10.
DBMS
Insert: 4 4 3*
4*
2
6
8* 10*
6*
Insert: 2 4
3
3
[Ans. A] A clustering index is defined on the fields which are of type non-key and ordering.
2* 3*
6
4*
6*
8* 10*
Insert: 1 4
[Ans. C] Insert into B+ Tree in the order 10, 3, 6, 8, 4, 2, 1 & Calculate the No. of leaf Splits 2
4
3
6
Order of Non Leaf Node = 3 K1
Max Pointers = 3 Min Pointers = CEIL (3/2) =2 Min Pointers for ROOT = 2
K1
Order of Leaf Node = 2 I1
I2
1* 2*
3*
4*
6*
8* 10*
Total no. of Leaf Splits in B+ Tree=4 11.
Max Keys = 2 Min Keys = 1
[Ans. C] Clustered if the data is ordered in same order as the index order
Insert : 10 10* Insert: 3 3* 10* Insert: 6 6
3*
6*
1 10*
Insert: 8 6
3*
6*
8* 10*
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 361
GATE QUESTION BANK
Computer Networks
Introduction to Computer Networks CS – 2005 1. In a network of LANs connected by bridges, packets are sent from one LAN to another through intermediate bridges. Since more than one path may exist between two LANs, packets may have to be routed through multiple bridges. Why is the spanning tree algorithm used for bridge-routing? (A) For shortest path routing between LANs (B) For avoiding loops in the routing paths (C) For fault tolerance (D) For minimizing collisions 2.
In a packet switching network, packets are routed from source to destination along a single path having two intermediate nodes. If the message size is 24 bytes and each packet contains a header of 3 bytes, then the optimum packet size is: (A) 4 (B) 6 (C) 7 (D) 9
CS – 2007 3. Match the following : P. SMTP 1. Application layer Q. BGP 2. Transport layer R. TCP 3. Data link layer S. PPP 4. Network layer 5. physical layer (A) P 2, Q 1, R 3, S 5 (B) P 1, Q 4, R 2, S 3 (C) P 1, Q 4, R 2, S 5 (D) P 2, Q 4, R 1, S 3 4.
Let us consider a statistical time division multiplexing of packets. The number of sources is 10. In a time unit, a source transmits a packet of 1000 bits. The number of sources sending data for the first 20 time units is 6, 9, 3, 7, 2, 2, 2, 3, 4, 6, 1, 10, 7, 5, 8, 3, 6, 2, 9, 5 respectively.
The output capacity of multiplexer is 5000 bits per time unit. Then the average number of backlogged of packets per time unit during the given period is (A) 5 (B) 4.45 (C) 3.45 (D) 0 5.
A group of 15 routers are interconnected in a centralized complete binary tree with a router at each tree node. Router i communicates with router j by sending a message to the root of the tree. The root then sends the message back down to router j. The mean number of hops per message, assuming all possible router pairs are equally likely is (A) 3 (B) 4.53 (C) 4.26 (D) 5.26
CS – 2008 6. How many bytes of data can be sent in 15 seconds over a serial link with baud rate of 9600 in asynchronous mode with odd parity and two stop bits in the frame? (A) 10,000 bytes (C) 15,000 bytes (B) 12,000 bytes (D) 27,000 bytes CS – 2014 7. In the following pairs of OSI protocol layer/sub-layer and its functionality. The INCORRECT pair is (A) Network layer and Routing (B) Data Link Layer and Bit synchronization (C) Transport layer and End-to-end process communication (D) Medium Access Control sub-layer and Channel sharing 8.
A bit-stuffing based framing protocol uses an 8-bit delimiter pattern of 01111110. If the output bit-string after stuffing is 01111100101, then the input bit-string is (A) 0111110100 (C) 0111111101 (B) 0111110101 (D) 0111111111
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 362
GATE QUESTION BANK
Computer Networks
Answer keys & Explanations 1.
[Ans. B] Spanning Tree Algorithm is used for bridges for avoiding loops in the routing paths. Spanning Tree algorithm will make sure that there will be only one path between every 2 LAN’s
2.
[Ans. D] Consider choices (A) Packet size = 4 then message size = 4 3 = 1 byte (required 24 packets) (B) Packet size = 6 then message size = 6 3 = 3 bytes (required 8 packets) (C) Packet size = 7 then message size = 7 3 = 4 bytes (required 6 packets) (D) Packet size = 9 then message size = 9 3 = 6 bytes (required 4 packets) So 4 packets is optimum message size & 9 is optimum packet size.
3.
[Ans. B] SMTP ---------- Application layer BGP ------------ Network layer TCP ------------ Transport layer PPP ------------- Data link layer
4.
[Ans. C] Total no. of source = 10 Packet size = 1000 bits Output capacity of multiplexer= 5000 bits ∴ Average number of backlogged of packet = 3.45
5.
[Ans. D] Mean Number of hop = 5.26
6.
[Ans. B] How many bytes of data can be sent in 15 seconds? Baud Rate = 9600 [9600 signals can be transmitted per second]
Mode = Asynchronous Mode To send ever 8-bits, we have to send 1start bit, 2 stop bits, and 1 parity bit. Total bits required to send 8-bit character = 8 + 1 + 2 + 1 = 12 bits [over head = 4 bits/byte] Each signal can transmit 1-bit of data. To send 8-bits we have to send 12 bits 12 signals to be used for 8-bit data. Thus total no of 8-bit characters sent per second = 9600/12 = 800 characters [Bytes/second] Total Bytes transmitted in 15 seconds = 800 × 15 = 12,000 Bytes. 7.
[Ans. B] Since Bit Synchronization Physical Layer Responsibility, It’s not Data Link Layer’s Responsibility
8.
[Ans. B] 8-bit delimeter = 01111110 We will stuff with “0” after every 5 consecutive 1’s Output String = 011111 00101 [Stuffed bit has been highlighted] Then, Input String = 0111110101 [After destuffing the stuffed “0”]
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 363
GATE QUESTION BANK
Computer Networks
Medium Access Sublayer (LAN Technologies: Ethernet, Token Ring) CS – 2005 1. Which of the following statements is TRUE about CSMA/CD (A) IEEE 802.11 wireless LAN runs CSMA/CD protocol (B) Ethernet is not based on CSMA/CD protocol (C) CSMA/CD is not suitable for a high propagation delay network like statellite network. (D) There is no contention in a CSMA/CD network 2.
3.
4.
A network with CSMA/CD protocol in the MAC layer is running at 1 Gbps over a 1 km cable with no repeaters. The signal speed in the cable is 2 ×108 m/sec. The minimum frame size for this network should be (A) 10000 bits (C) 5000 bits (B) 10000 bytes (D) 5000 bytes A channel has a bit rate of 4 kbps and oneway propagation delay of 20 ms. The channel uses stop and wait protocol. The transmission time of the acknowledgement frame is negligible. To get a channel efficiency of at least 50%, the minimum frame size should be (A) 80 bytes (C) 160 bytes (B) 80 bits (D) 160 bits In a TDM medium access control bus LAN, each station is assigned one time slot per cycle for transmission. Assume that the length of each time slot is the time to transmit 100 bits plus the end-to-end propagation delay. Assume a propagation speed of 2 × 108 m/sec. The length of the LAN is 1 km with a bandwidth of 10 Mbps. The maximum number of stations that can be allowed in the LAN so that the throughput of each station can be 2/3 Mbps is: (A) 3 (B) 5 (C) 10 (D) 20
5.
Suppose the round trip propagation delay for a 10 Mbps Ethernet having 48-bit jamming signal is 46.4 µs. The minimum frame size is: (A) 94 (B) 416 (C) 464 (D) 512
CS – 2006 6. Station A needs to send a message consisting of 9 packets to Station B using a siding window (window size 3) and go-back-n error control strategy. All packets are ready and immediately available for transmission. If every 5th packet that A transmits gets lost (but no acks from B ever get lost), then what is the number of packets that A will transmit for sending the message to B? (A) 12 (C) 16 (B) 14 (D) 18 CS – 2007 7. In Ethernet when Manchester encoding is used the bit rate is (A) Half the baud rate (B) Twice the baud rate (C) Same as the baud rate (D) None of these 8.
There are n stations in a slotted LAN. Each station attempts to transmit with a probability p in each time slot. What is the probability that ONLY one station transmits in a given time slot? (A) np(1 – p)n – 1 (C) p(1 – p)n – 1 n – 1 (B) (1 – p) (D) 1 (1 – p)n – 1
9.
In a token ring network the transmission speed is 10 bps and the propagation speed is 200 meters/ s. The 1-bit delay in this network is equivalent to : (A) 500 meters of cable (B) 200 meters of cable (C) 20 meters of cable (D) 50 meters of cable th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 364
GATE QUESTION BANK
10.
11.
12.
A broadcast channel has 10 nodes and total capacity of 10 Mbps. It uses polling for medium access. Once a node finishes transmission, there is a polling delay of 80 s to poll the next node. Whenever a node is polled, it is allowed to transmit a maximum of 1000 bytes. The maximum throughput of the broadcast channel is (A) 1 Mbps (C) 10 Mbps (B) 100/ 11 Mbps (D) 100 Mbps Common Data for Questions 11 & 12: Consider a token ring topology with N stations (numbered 1 to N) running token ring protocol where the stations are equally spaced. When a station gets the token it is allowed to send one frame of fixed size. Ring latency is tp, while the transmission time of a frame is tt. All other latencies can be neglected. The maximum utilization of the token ring when tt = 3 , tp = 5 ms, N =10 is (A) 0.545 (C) 0.857 (B) 0.6 (D) 0.961
14.
Computer Networks
The minimum frame size required for CSMA/CD based computer network running at 1 Gbps on a 200m cable with a link speed of 2 10 m/s is (A) 125 bytes (B) 250 bytes (C) 500 bytes (D) None of the above
CS – 2013 15. Determine the maximum length of the cable (in km) for transmitting data at a rate of 500 Mbps in an Ethernet LAN with frames of size 10,000 bits. Assume the signal speed in the cable to be 2,00,000 km/s. (A) 1 (C) 2.5 (B) 2 (D) 5
The maximum utilization of the token ring when tt = 5ms , tp = 3 ms, N =15 is (A) 0.545 (C) 0.9375 (B) 0.655 (D) 0.961
CS – 2008 13. A computer on a 10Mbps network is regulated by a token bucket. The token bucket is filled at a rate of 2Mbps. It is initially filled to capacity with 16 Megabits. What is the maximum duration for which the computer can transmit at the full 10Mbps? (A) 1.6 seconds (C) 5 seconds (B) 2 seconds (D) 8 seconds
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 365
GATE QUESTION BANK
Computer Networks
Answer Keys & Explanations 1.
[Ans. C] CSMA/CD is not suitable for a high propagation delay network like satellite network.
2.
[Ans. A] Access Method = CSMA/CD Bandwidth = B = 1Gbps = 109 bits/sec Distance = d = 1km = 103 mts Speed of Signal = s = 2 × 108 mts/sec Minimum Frame Size = =? = 2 × d/s × B bits = 2×
3.
4.
5.
[Ans. C]
×109=10,000 bits
[Ans. D] Bandwidth = B = 4 Kbps = 4 × 103 bits/sec Propagation Delay = Tp = 20 ms = 20 × 10 sec Protocol = Stop-and-Wait Transmission Time for Ack = Negligible = 0 sec Channel Efficiency = 50% = 1/2 [Utilization] Minimum Frame Size = F = ? T fficiency T 2T 1 2 2 20 10 4 10 160 bits [Ans. C] 2 n 10 3
6.
Number of packets = 16 7.
[Ans. A] Manchester ncoding 2 signals will be used for sending 1-bit. For sending 10 bits, we have to send 20 signals. Hence baud rate is twice the bandwidth. Bandwidth = Baud rate/2 [Half the baud rate]
8.
[Ans. A] p(1) = n p 1 =
n 1 n 1
= np 1 100 15 10
n
10
9.
p
p 1
p
p
[Ans. C] LAN = Token Ring Bandwidth = B = 10 bits/sec Propagation Speed = 200 mts/micro seconds [signal travels 200 meters in 10 seconds] 1 bit delay in this network = ? As B= 10 bits/sec, To place 1-bit in the channel it takes 10 sec As signal travels 200 meters in 10-6 seconds, then how much distance 1-bit travels in 10 sec ? 10 seconds 200 meters 10 seconds ? meters = 20 meters
[Ans. C] Round trip propagation delay (2 T ) 46.4 sec 46.4 10 Frame size 2 T andwidth 46.4 10 10 10 464 bits
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 366
GATE QUESTION BANK
10.
[Ans. B] Polling delay 80 s Max t 8000 bits, 800 s at 10 Mbps Max throughput = 10
DR 10 Mbps
11.
[Ans. C] LAN = Token Ring Total no. of Stations = N = 10 Ring Latency = t = 5 ms Transmission Time = t = 3 ms Max Utilization U = (N ×t ) / ((N × t +t ) = (10×3) / ((10×3) + 5) = 30/35 = 0.857
12.
[Ans. D] LAN = Token Ring Total no. of Stations = N = 15 Ring Latency = t = 3 ms Transmission Time = t = 5 ms Max Utilization U= (N × t ) / ((N × t )+ t ) = (15×5) / ((15×5 )+ 3) = 75/78 = 0.961
13.
[Ans. B] Bandwidth = B =10 Mbps Token Bucket filled at the rate = r = 2 Mbps Capacity of Token Bucket = C = 16 Mega bits Max Duration at which computer can transmit at fully 10 Mbps rate = S = ? S = C/(B r) = 16/(10 2) = 2 seconds.
14.
[Ans. B] Min frame size
15.
2 2
Computer Networks
[Ans. B] Distance of the Cable = d = ? [in kms] Bandwidth = B = 500 Mbps = 500 × 106 bits/sec LAN = Ethernet Access Control Protocol = 1 Persistent CSMA/CD Size of Frame = F = 10,000 bits Speed of Signal = S = 2,00,000 km/sec d 2 bits s 10,000 = 2 × (d/ 2, 00,000) × 500 × 106 d = 2 kms
data rate 10
2 10 10 2 10 2000 bits = 250 bytes
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 367
GATE QUESTION BANK
Computer Networks
The Data Link Layer (Flow and Error Control Techniques) CS – 2005 1. The maximum window size for data transmission using the selective reject protocol with n bit frame sequence numbers is: (A) 2 (C) 2 – 1 – (B) 2 (D) 2 – 2.
Consider the following message M = 1010001101. The cyclic redundancy check (CRC) for this message using the divisor polynomial x x x 1 is: (A) 01110 (C) 10101 (B) 01011 (D) 10110
CS – 2006 3. Station A uses 32 byte packets to transmit messages to station B using a sliding window protocol. The round trip delay between A and B is 80 milliseconds and the bottleneck bandwidth on the path between A and B is 128 kbps. What is the optimal window size that A should use? (A) 20 (C) 160 (B) 40 (D) 320 4.
5.
Which of the following statements is TRUE? (A) Both Ethernet frame and IP packet include checksum fields (B) Ethernet frame includes a checksum field and IP packet includes a CRC field (C) Ethernet frame includes a CRC field and IP packet includes a checksum field (D) Both Ethernet frame and IP packet include CRC fields Suppose that it takes 1 unit of time to transmit a packet (of fixed size) on a communication link. The link layer uses a window flow control protocol with a
window size of N packets. Each packet causes an ack or a nak to be generated by the receiver and ack/nak transmission times are negligible. Further, the round trip time on the link is equal to N units. Consider time i > N. if only acks have been received till time i(no naks), then the goodput evaluated at the transmitter at time i(in packets per unit time) is (A) 1 – N/ i (C) 1 (B) i/ (N + i) (D) 1 – e CS – 2007 6. The message 11001001 is to be transmitted using the CRC Polynomial x 1 to protect it from errors. The message that Should be transmitted is: (A) 11001001000 (C) 11001010 (B) 11001001011 (D) 110010010011 7.
The distance between two stations M & N is L kilometers. All frames are K-bits long. The propagation delay per kilometer is t seconds. Let R bits/sec be the channel capacity. Assuming that processing delay is negligible, the minimum number of bits for the sequence number field in a frame for maximum utilization, when the sliding window protocol is used, is: (A) [log (B) [log
] ]
(C) [log
]
(D) [log
]
CS – 2008 8. Data transmitted on a link uses the following 2D parity scheme for error detection : Each sequence of 28 bits is arranged in a 4 7 matrix ( rows r through r , and columns d thorugh d ) and is padded with a column d an row r of parity bits computed using the Even parity scheme . Each bit of column d th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 368
GATE QUESTION BANK
(respectively , row r ) gives the parity of the corresponding row (respectively , column). These 40 bits are transmitted over the data link . 0
1
0
1
0
0
1
1
1
1
0
0
1
1
1
0
0
0
0
1
0
1
0
0
0
1
1
0
1
0
1
0
1
1
0
0
0
1
1
0
The table shows data received by a receiver and has n corrupted bits. What is the minimum possible value of n ? (A) 1 (C) 3 (B) 2 (D) 4 CS – 2009 9. Let G(x) be the generator polynomial used for CRC checking. What is the condition that should be satisfied by G(x) to detect odd number of bits in error? (A) G(x) contains more than two terms (B) G(x) does not divide 1 + x , for any k not exceeding the frame length (C) 1 + x is a factor of G(x) (D) G(x) has an odd number of terms
10.
11.
Statement for Linked Answer Questions 10 and 11: Frames of 1000 bits are sent over a 10 bps duplex link between two hosts. The propagation time is 25 ms. Frames are to be transmitted into this link to maximally pack them in transit (with in the link) What is the minimum number of bits ( ) that will be required to represent the sequence numbers distinctly? Assume that no time gap needs to be given between transmission of two frames. (A) l 2 (C) l 4 (B) l 3 (D) l 5
Computer Networks
always piggy backed. After sending 2 frames, what is the minimum time the sender will have to wait before starting transmission of the next frame? (Identify the closest choice ignoring the frame processing time) (A) 16 ms (C) 20 ms (B) 18 ms (D) 22 ms CS – 2012 12. Consider a source computer (S) transmitting a file size 106 bits to a destination computer (D) over a network of two routers (R1 and R2) and three (L1, L2, and L3). L1 connects S to R1;L2 connects R1 to R2; and L3 connects R2 to D. Let each link be of length 100 km. Assume signals travel over each link at a speed of 108 meters per second. Assume that the link bandwidth on each link is 1Mbps. Let the file be broken down into 1000 packets each of size 1000bits. Find the total sum of transmission and propagation delays in transmitting the file from S to D? (A) 1005 ms (C) 3000 ms (B) 1010 ms (D) 3003 ms CS – 2014 13. Consider a token ring network with a length of 2 km having 10 stations including a monitoring station. The propagation speed of the signal is 2 10 m/s and the token transmission time is ignored. If each station is allowed to hold the token for 2 sec, the minimum time for which the monitoring station should wait (in sec) before assuming that the token is lost is _______. 14.
Suppose that the sliding window protocol is used with the sender window size of 2 , where is the number of bits identified in the earlier part and acknowledgments are th
Consider a selective repeat sliding window protocol that uses a frame size of 1 KB to send data on a 1.5 Mbps link with a one-way latency of 50 msec. To achieve a link utilization of 60%, the minimum number of bits required to represent the sequence number field is ________.
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 369
GATE QUESTION BANK
15.
Consider the store and forward packet switched network given below. Assume that the bandwidth of each link is 10 bytes / sec. A user on host A sends a file of size 10 bytes to host B through routers R1 and R2 in three different ways. In the first case a single packet containing the complete file is transmitted from A to B. In the second case, the file is split into 10 equal parts, and these packets are transmitted from A to B. In the third case, the file is split into 20 equal parts and these packets are sent from A to B. Each packet contains 100 bytes of header information along with the user data.
Computer Networks
Consider only transmission time and ignore processing, queuing and propagation delays. Also assume that there are no errors during transmission. Let T1, T2 and T3 be the times taken to transmit the file in the first, second and third case respectively. Which one of the following is CORRECT? A
(A) (B) (C) (D)
R2
R1
B
T1 T2 T3 T1 T2 T3 T2 = T3 , T3 < T1 T1 = T3, T3 > T2
Answer Keys & Explanations 1.
[Ans. B] In the case of selective reject protocol; the maximum window size =
2.
3.
[Ans. B] Given round trip delay t = 80 ms = 80 10 R = 128 Kbps = 128 × 10 bps L = Rt = 128 × 10 × 80 × 10 So, optimal window size
2
[Ans. A] Message = data word=1010001101 Divisor x x x 1 110101 6 bits] CRC = ? [Remainder] Augmented data word = data word + 5 bits[zeros] = 101000110100000 110101 101000 ① ① ⓪ ① ⓪ ⓪ ⓪ ⓪ ⓪ 1101010110 110101 111011 110101 011101 000000 111010 110101 011111 000000 111110 110101
n 4.
[Ans. C] Ethernet frame include a CRC field and IP packet include a checksum field.
5.
[Ans. C] The link later uses a window from control protocol with a window size of N packets and round trip time is equal to N units. Goodput = Packets/unit time = N packets/N units = 1.
6.
[Ans. B] Message = data word =11001001 Divisor x 1 1. x 0. x 0. x 1. x 1001 4 bits] Code word = data word +3 – redundant bits =? Augmented dataword = 11001001 000
010110 000000 101100 110101 110010 110101 001110 000000 01110
R
40
01110 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 370
GATE QUESTION BANK 1001) 1100 ①⓪⓪ ① ⓪ ⓪ ⓪ 11010011 1001 1011 1001 0100 0000 1000 1001 0011 0000 0110 0000 1100 1001 1010 1001 011
9.
[Ans. C] The polynomial generator used for CRC checking must satisfy at least two conditions to detect odd numbers of errors: 1. It should be not divisible by x 2. It should be divisible by 1 + x Therefore 1 x is a factor of G(x)
10.
[Ans. D] The link is a duplex hence we need not to wait for twice the propagation time for sending the frame belonging to next window. If the sender window is of size N. Transmitting 10 bits require = 1 sec 1 N 1000 bits require N 10 10 N 10 sec Nm sec Nm sec = 25 m sec, N = 25 2 ∴Minimum number of bits required is 5 to represent sequence numbers distinctly
11.
[Ans. B] Time taken to send 10 bits 1 sec ∴ Time taken to send 2 frames = 32 m sec (1 frame = 1000 bits) Time taken for the first frame to be acknowledged 25 2 50 m sec Then waiting time 50 32 18 m sec
12.
[Ans. A] Size of files = 10 Total Routes = 2{ , } Total links = 3 { , , } Length of each Link = d= 100 km = 100 10 Speed of signal of each link = s= 10 mts Sec
Remainder 011 Code word = Data word + Remainder 11001001 011 7.
[Ans. C] Frame Size = K bit Propagation delay = t sec/km Channel capacity = Rbits/sec Distance = L km Round trip delay = 2Lt sec. Window size w =
1 1
# of bits = ⌈log 8.
⌉
[Ans. C] The receiver will calculate all the row and column parities and found that there is an error in 1-row and 2- columns. No. of errors detected in rows = 1 [r1] No. of errors detected in columns = 3 [d5, d2, d0] Minimum possible errors = max (errors in rows, errors in columns) = max (1, 3) = 3 errors. 0
1
0
1
0
0
1
Computer Networks
L1 S
1
0
1
1
0
0
1
1
1
0
1
0
0
0
1
0
1
0
0
0
0
1
1
0
1
0
1
0
0
1 0
1 0
0 1
0 0
0 0
1 1
1 0
0 1
0
L2 R
d= 100 kms s = 10 mts sec
L3 R
d= 100 kms s = 10 mts sec
D d= 100 kms s = 10 mts sec
Band width = B = 1 MBPS = 10 bits sec File is broken in to 1000 packets n 1000 Packets Size of Packet = F = 1000 bits [10 bits 1000 packet 1000]
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 371
GATE QUESTION BANK
Find the sum of [T T ] in transmitting a file from S to D? 1000 bits T 10 sec 1ms 10 bits sec d 100 10 T 10 sec 1 ms s 10 T 1ms T 1ms T ] for I frame from S to D 3 T 3 T 3 1ms 3 1ms 6 ms T T ] for I frame 6 ms T T ] for II frame 1ms 7 ms 7ms 6ms 1ms] Receiver will reactive I frame after 6 ms and the successive frames in 1ms only. Total T T ] for 1000 packet = 6 ms for I packet 999 ms for 999 packet 1005 ms
Ring latency of token to be considered. [Time for token to traverse the entire ring] Ring Latency = Distance/Speed 10 2 10 seconds 2 10 10 10 seconds Minimum Time Monitor Station should wait = (n 1) token holding time + ring latency 10 1 2 10 seconds 10 10 seconds 18 10 seconds 10 10 seconds 28 10 seconds 28 micro seconds.
T
P4 S
L1
P3
P2
R
R
L2
14.
P1=6 ms L3
D
All packets are ready & reach to destination in 1 ms gap 13.
Computer Networks
[Ans. *] Range 28 to 30 Total number of Stations in the Ring = n = 10 stations [including monitor station] Length (or) distance of Ring = 2 km = 2 10 mts Propagation Speed = 2 10 m/s Token Holding time of each station = 2 micro seconds = 2 10 seconds Ignore token transmission time Minimum time monitor station should wait before assuming that token is lost is = ? [in Micro Seconds] Minimum time monitor station should get the token = (n 1) token holding time + ring latency (n 1) Excluding Monitor station (n 1) stations token holding time to be considered
th
[Ans. 5] Size of Frame = F = 1KB = 1024 Bytes = 1024 × 8 bits Bandwidth 1.5 Mbps 1.5 10 bits/sec One Way Latency= Propagation Time = T = 50 msec 50 10 sec Utilization = 60% = 60/100 Minimum number of bits required to represent the sequence number= ? Let window size = number of frames in sender window = n Utilization = n × F bits / (F + 2 × × B) bits 60 n 1024 8 bits 1024 8 100 2 2 50 10 1.5 10 bits n 60 1024 8 2 50 10 2 1.5 10 1024 8 100 n 949152 11.58 12 approx 2 81920 n = 24 Total number of Frames in Sender Window = Sender Window Size = 24 frames.
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 372
GATE QUESTION BANK
Computer Networks
Minimum number of bits required to represent the sequence number in sender window = log 24 4.58 5 bits 15.
[Ans. D] Given Bandwidth = 10 bytes/sec L 10 bytes Case: 1 L = 1000 bytes Header size = 100 bytes Total Frame size = 1000+100=1100 bytes 1100 8 ∴T 1100 s 10 8 So, T 3300 s Case: 2 L 100 bytes Header size = 100 bytes Total Frames size = 100 + 100 = 200 bytes ∴T
200 s for 1 packet
or 10 packets T 2000 s So, T 2000 200 200 2400 s Case: 3 L = 50 bytes Header size = 100 bytes Total frame size = 50 + 100 = 150 bytes ∴T
150 s for 1 packet
or 20 packets T So, T 3000 150 ∴T T T T
3000 s 150 3300 s
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 373
GATE QUESTION BANK
Computer Networks
Routing & Congestion Control CS – 2005 1. Count to infinity is a problem associated with (A) link state routing protocol (B) distance vector routing protocol (C) DNS while resolving host name (D) TCP for congestion control Statement for Linked Answer Questions 2 and 3: Consider a simple graph with unit edge costs. Each node in the graph represents a router. Each node maintains a routing table indicating the next hop router to be used to relay a packet to its destination and the cost of the path to the destination through that router. Initially, the routing table is empty. The routing table is synchronously updated as follows. In each updated interval, three tasks are performed. (i) A node determines whether its neighbours in the graph are accessible. If so, it sets the tentative cost to each accessible neighbour as 1. Otherwise, the cost is set to ∞. (ii) From each accessible neighbor, it gets the costs to relay to other nodes via that neighbor (as the next hop) (iii) Each node updates its routing table based on the information received in the previous two steps by choosing the minimum cost. B
A
C
D
F
E
2.
For the graph given above, possible routing tables for various nodes after they have stabilized, are shown in the following options. Identify the correct table?
3.
(A)
Table for node A A B B 1 C C 1 D B 3 E C 3 F C 4
(C)
Table for node B A A 1 B C C 1 D D 1 E C 2 F D 2
(B)
Table for node C A A 1 B B 1 C D D 1 E E 1 F E 3
(D)
Table for node D A B B B C C D E E F F
3 1 1 1 1
Continuing from the earlier problem, suppose at some time t, when the costs have stabilized, node A goes down. The cost from node F to node A at time ( t + 100) is: (A) > 100 but finite (B) ∞ (C) 3 (D) 3 and ≤ 100
CS – 2008 4. Two popular routing algorithms are Distance vector (DV) and Link state (LS) routing . Which of the following are true? S1: Count to infinity is a problem only with DV and not LS routing S2: In LS, the shortest path algorithm is run only at one node S3: In DV, the shortest path algorithm is run only at one mode S4: DV requires lesser number of network messages than LS (A) S1, S2 and S4 ONLY (B) S1, S3 and S4 ONLY (C) S2 and S3 ONLY (D) S1 and S4 ONLY th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 374
GATE QUESTION BANK
CS – 2010 Statement for Linked Answer Questions 5 and 6: Consider a network with 6 routers R1 to R6 connected with links having weights as shown in the following diagram. 7
R2 AS
6 R1
8
4 R3
6.
R6
1
3
5.
R5
9
All the routers use the distance vector based routing algorithm to update their routing tables. Each router starts with its routing table initialized to contain an entry for each neighbor with the weight of the respective connecting link. After all the routing tables stabilize, how many links in the network will never be used for carrying any data? (A) 4 (C) 2 (B) 3 (D) 1 Suppose the weights of all unused links in the previous question are changed to 2 and the distance vector algorithm is used again until all routing tables stabilize. How many links will now remain unused? (A) 0 (C) 2 (B) 1 (D) 3
CS – 2011 Statement for Linked Answer Questions 7 and 8: Consider a network with five nodes, N1 to N5 as shown below N1 1 N5
3
4
N2
6
N4
The network uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following: N1: (0, 1, 7, 8, 4) N2: (1, 0, 6, 7, 3) N3: (7, 6, 0, 2, 6) N4: (8, 7, 2, 0, 4) B5: (4, 3, 6, 4, 0) Each distance vector is the distance of the best known path at the instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors. The cost of link N2 N3 reduces to 2(in both directions). After the next round of updates, what will be the new distance vector at node, N3 (A) (3, 2, 0, 2, 5) (C) (7, 2, 0, 2, 5) (B) (3, 2, 0, 2, 6) (D) (7, 2, 0, 2, 6)
R4
2
2
N3
Computer Networks
7.
8.
After the update in the previous question, the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector as cost, ∞. After the NEXT ROUND of update, what will be the cost to N1 in the distance vector of N3? (A) 3 (C) 10 (B) 9 (D) ∞
CS – 2012 9. An Internet Service Provider (ISP) has the following chunk of CIDR-based IP address available with it: 245.248.128.0/20. The ISP wants to give half of this chunk of addresses of Organization A, and a quarter of Organization B, while retaining the remaining with itself. Which of the following of a valid allocation of addresses to A and B? th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 375
GATE QUESTION BANK
(A) 245.248.136.0/21 and 245.248.128.0/22 (B) 245.248.128.0/21 and 245.248.128.0/22 (C) 245.248.132.0/22 and 245.248.132.0/21 (D) 245.248.136.0/24 and 245.248.132.0/21 CS – 2013 10. Assume that source S and destination D are connected through two intermediate routers labeled R. Determine how many times each packet has to visit the network layer and the data link layer during a transmission from S to D.
S
R
R
Computer Networks
12.
An IP router implementing Classless Inter-domain Routing (CIDR) receives a packet with address 131.23.151.76. The router’s routing table has the following entries: Prefix Output Interface Identifier 131.16.0.0/12 3 131.28.0.0/14 5 131.19.0.0/16 2 131.22.0.0/15 1 The identifier of the output interface on which this packet will be forwarded is ___________
13.
Which one of the following is TRUE about the interior gateway routing protocols – Routing Information Protocol (RIP) and Open Shortest Path First (OSPF)? (A) RIP uses distance vector routing and OSPF uses link state routing (B) OSPF uses vector routing and RIP uses link state routing (C) Both RIP and OSPF use link state routing (D) Both RIP and OSPF uses distance vector routing
D
(A) Network layer – 4 times and Data link layer – 4 times (B) Network layer – 4 times and Data link layer – 3 times (C) Network layer – 4 times and Data link layer – 6 times (D) Network layer – 2 times and Data link layer – 6 times CS – 2014 11. Consider the following three statements about link state and distance vector routing protocols, for a large network with 500 network nodes and 4000 links. [S1] The computational overhead in link state protocols is higher than in distance vector protocols. [S2] A distance vector protocol (with split horizon) avoids persistent routing loops, but not a link state protocol. [S3] After a topology change, a link state protocol will converge faster than a distance vector protocol. Which one of the following is correct about S1, S2, and S3 ? (A) S1, S2, and S3 are all true (B) S1, S2, and S3 are all false (C) S1 and S2 are true, but S3 is false (D) S1 and S3 are true, but S2 is false.
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 376
GATE QUESTION BANK
Computer Networks
Answer Keys & Explanations 1.
2.
3.
4.
5.
[Ans. B] Associated with distance vector routing algorithm [Ans. C] Table for node B A A B C C D D E C F D
Routing table For R1 R2 R3 R4 R5 R6
1 1 1 2 2
R1 R2 R3 R4 R5
R2 R3 R4 R5 R6
12 7 9 1 5
Next hop R2 R2 R2 R5 R5
12 8 9 1 4
Next hop R3 R4 R3 R4 R6
For R4 R1 R2 R3 R5 R6
[Ans. C]
For R5
R4 8
6 R1
3 2 9 9 13
Next hop R1 R2 R4 R5 R5
For R3
[Ans. D] S1 True, Since ount To Infinity is only a problem with DV but not LS S2 alse, since in LS, the shortest path algorithm is run at all nodes S3 alse, since in DV, we don’t use any shortest path algorithm S4 True, since in DV, each node shares its routing table only with its neighbors, where as inLS each node broadcast its routing table to all nodes in the network.
7
5 2 7 8 12
Next hop R3 R3 R4 R4 R4
For R2
[Ans. A] Node “A” goes down at time “t”. At time t 100 the cost from Node “ ” to node “A” will definitely be > 100 and finite, because Node “ ” will receive cost from neighbor “D” where as “D” will have 3 neighbors {B, C, E} and at least one neighbor will give finite cost.
R2
5 3 12 12 16
Next hop R3 R3 R3 R3 R3
2
1
R3
R5
3
R1 R2 R3 R4 R6
R6 4
9
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 377
GATE QUESTION BANK
For R6
9.
[Ans. A] Network ID = 245.248.128.0/20 alf of this IP addresses to “A” ISP wants VLSM Quarter to Organization “ ” to give Retaining the remaining with itself [Quarter] Total subnets 2 2 level subnetting osts Subnet 2 2
Next hop R1 16 R5 R2 12 R5 R3 13 R5 R4 5 R5 R5 4 R5 So it is clear visualize from the all routing table construction that we never use the direct path between 6
R1
R2
and
R4
8
Computer Networks
R6
So two links never be used for carrying data. 6.
[Ans. B] After changing the weights of unused link R1 R2 & R4 R6 to 2. Then the no. of unused links are only one [R5 R6] R2
2
7
R4
6 R1
8 2
R6
1
3
2
4 R3
9
R5 Link R5-R6 will be unused
7.
8.
[Ans. A] In the next round, every node will send and receive distance vectors to and from neighbours, and update its distance vector. N3 will receive (1, 0, 2, 7, 3) from N2 and it will update distance to N1 and N5 as 3 and 5 respectively
Total soultions 2 S. No Organization Network ID/ Subnet mast A 50 245.248.128.0 21 1 25 245.248.136.0 22, 245.248.140.0/22 A 50 245.248.136.0 21 2 25 245.248.128.0 22, 245.248.140.0/22
[Ans. C] In the next ground, N3 will receive distance from N2 to N1 as infinite. It will receive distance from N4 to N1 as 8. So it will update distance to N1 as 8+2 =10
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 378
GATE QUESTION BANK
10.
Computer Networks
[Ans. C] Network Layer = 4 times & Data link layer = 6 times S
R
R
D
Network
Network
Data link
Data link
Physical
Physical
11.
[Ans. D] S1 True, since in Link State Routing every node has to execute the shortest path algorithm. S2 False, since looping problem is not eliminated completely by Split Horizon. S3 True, since in Link State each node broadcast the topology changes to all other nodes in the network, where as Distance Vector informs only to its neighbors.
12.
[Ans. 1] IP Address = 131.23.151.76 Binary Value of given IP Address = 10000011. 00010111. 10010111. 0100110 We always compare the IP with the Highest Mask. 131.19.0.0/16 10000011.00010011.00000000. 00000000 Match Failed 131.22.0.0/15 10000011.00010110.00000000. 00000000 Match Success As the first 15 network bits of 131.22.0.0/15 and 131.23.151.76 are same. So the outgoing interface will be “1”.
13.
[Ans. A] RIP Routing Information Protocol uses “Distance Vector Routing Algorithm” OSPF Open Shortest Path First Protocol uses “Link State Routing Algorithm”
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 379
GATE QUESTION BANK
Computer Networks
TCP/IP, UDP and Sockets, IP(V4) CS – 2005 1. Packets of the same session may be routed through different paths in: (A) TCP, but not UDP (B) TCP and UDP (C) UDP, but not TCP (D) Neither TCP nor UDP 2.
The address resolution protocol (ARP) is used for: (A) Finding the IP address from the DNS (B) Finding the IP address of the default gateway (C) Finding the IP address that corresponds to a MAC Address (D) Finding the MAC address that corresponds to an IP Address
3.
An organization has a class B network and wishes to for m subnets for 64 departments. The subnet mask would be: (A) 255.255.0.0 (C) 255.255.128.0 (B) 255.255.64.0 (D) 255.255.252.0
4.
Trace-route reports a possible route that is taken by packets moving from some host A to some other host B. Which of the following options represents the technique used by trace-route to identify these hosts? (A) By progressively querying routers about the next router on the path to B using ICMP packets, starting with the first router. (B) By requiring each router to append the address to the ICMP packet as it is forwarded to B. The list of all routers en-route to B is returned by B in an ICMP reply packet. (C) By ensuring that an ICMP reply packet is returned to A by each router en-route to B, in the ascending order of their hop distance from A (D) By locally computing the shortest path from A to B
5.
On a TCP connection, current congestion window size is Congestion Window = 4 KB. The window size advertised by the receiver is Advertise Window = 6 KB. The last byte sent by the sender is Last Byte Sent= 10240 and the last byte acknowledged by the receiver is last byte acked = 8192. The current window size at the sender is: (A) 2048 bytes (C) 6144 bytes (B) 4096 bytes (D) 8192 bytes
6.
In a communication network, a packet of length L bits takes link L1 with a probability of p1 or link L2 with a probability of p2 . Link L1 and L2 have bit error probability of b1 and b2 respectively. The probability that the packet will be received without error via either L1 or L2 is: (A) (1 b1)Lp1 + (1 b2)Lp2 (B) [1 (b1+b2)L]p1 p2 (C) (1 b1)L (1 b2)L p1 p2 (D) 1 (b1Lp1 + b2Lp2)
7.
A company has a class C network address of 204.204.204.0. It wishes to have three subnets, one with 100 hosts and two with 50 hosts each. Which one of the following options represents a feasible set of subnet address/subnet mask pairs? (A) 204.204.204.128/255.255.255.192 204.204.204.0/255.255.255.128 204.204.204.64/255.255.255.128 (B) 204.204.204.0/255.255.255.192 204.204.204.192/255.255.255.128 204.204.204.64/255.255.255.128 (C) 204.204.204.128/255.255.255.128 204.204.204.192/255.255.255.192 204.204.204.224/255.255.255.192 (D) 204.204.204.128/255.255.255.128 204.204.204.64/255.255.255.192 204.204.204.0/255.255.255.192 th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 380
GATE QUESTION BANK
CS – 2006 8. For which of the following reason does Internet Protocol (IP) use the time-to-live (TTL) field in the IP datagram header? (A) Ensure packets reach destination within that time (B) Discard packet that reach later than that time (C) Prevent packets from looping indefinitely (D) Limit the time for which a packet gets queued in intermediate routers 9.
10.
Computer Networks
11.
A program on machine X attempts to open a UDP connection to port 5376 on a machine Y and a TCP connection to port 8632 on machine Z. However, there are no applications listening at the ports y and Z. An ICMP port Unreachable error will be generated by (A) Y but not Z (B) Z but not Y (C) Neither Y nor Z (D) Both Y and Z
12.
A subnetted Class B network has the following broadcast address: 144.16.95.255. Its subnet mask (A) is necessarily 255.255.224.0 (B) is necessarily 255.255.240.0 (C) is necessarily 255.255.248.0 (D) could be any one of 255.255.224.0, 255.255.240.0, 255.255.248.0
Two computers C1 and C2 are configured as follows. C1 has IP address 203.197.2.53 and netmask 255.255. 128.0. C2 has IP address 203.197.75.201 and netmask 255.255.192.0. Which one of the following statements is true? (A) C1 and C2 both assume they are on the same network (B) C2 assumes C1 is on same network, but C1 assumes C2 is on a different network (C) C1 assumes C2 is on same network, but C2 assumes C1 is on a different network (D) C1 and C2 both assume they are on different network
Statement for Linked Answer Questions 13 and 14: Consider the diagram shown below where a number of LANs are connected by (transparent) bridges. In order to avoid packets looping through circuit in the graph, the bridges organize themselves in a spanning tree. First, the root bridge is identified as the sends with the least serial number. Next, the root sends out (one or more) data unit to enable the setting up of the spanning tree of shortest paths from the root bridge to each bridge. Each bridge identifies a port (the root port) through which it will forward frames to the root bridge. Port conflicts are always resolved in favour of the port with the lower index value. When there is a possibility of a multiple bridge forwarding to the same LAN(but not through the root port), ties are broken as follows: bridge closest to the root get preference and between such bridges, the one with lowest serial number is preferred.
A router uses the following routing table: Destination Mask Interface 144.16.0.0 255.255.0.0 Eth0 144.16.64.0 255.255.224.0 Eth1 144.16.68.0 255.255.255.0 Eth2 144.16.68.64 255.255.255.224 Eth3 A packet bearing a destination address 144.16.68.117 arrives at the router. On which interface will it be forwarded? (A) Eth0 (C) Eth2 (B) Eth1 (D) Eth3
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 381
GATE QUESTION BANK
(C)
B1 H2
H1
1
3
4
1
B3
3
4
1
H6
H5
2
2
1 B4 3 H9
13.
14.
H4
H3
2
2 B5
Computer Networks
H10
H8
B2
H12
H11
Port 3 1 4
CS – 2007 15. The address of a class B host is to be split into subnets with a 6 – bit subnet number. What is the maximum no. of subnets and the maximum no. of hosts in each subnet? (A) 62 subnets and 262142 hosts (B) 64 subnets and 262142 hosts (C) 62 subnets and 1022 hosts (D) 64 subnets and 1024 hosts 16.
Consider the following statements about the timeout value used in TCP. (i) The timeout value is set to the RTT (Round Trip Time) measured during TCP connection establishment for the entire duration of the connection. (ii) Appropriate RTT estimation algorithm is used to set the timeout value of a TCP connection. (iii) Timeout value is set to twice the propagation delay from the sender to the receiver Which of the following choices hold? (A) (i) is false, but (ii) and (iii) are true (B) (i) and (iii) are false, but (ii) is true (C) (i) and (ii) are false, but (iii) is true (D) (i), (ii) and (iii) are false
17.
Consider a TCP connection in a state where there are no outstanding ACKs. The sender sends two segments back to back. The sequence numbers of the first and second segments are 230 and 290 respectively. The first segment was lost,
Consider the correct spanning tree for the previous question. Let host H1 send out a broadcast ping packet Which of the following options represents the correct forwarding table on B3? (A) Port 3 1 2
(B) Hosts H1, H2 H3, H4 H5, H6 H7, H8, H9, H10 H11, H12
Hosts H1, H2, H3, H4 H5, H7, H9, H10 H7, H8, H11, H12
3
For the given connection of LANs by bridges, which one of the following choices represents the depth first traversal of the a spanning tree of bridges? (A) B1, B5, B3, B4, B2 (B) B1, B3, B5, B2, B4 (C) B1, B5, B2, B3, B4 (D) B1, B3, B4, B5, B2
Hosts H1, H2, H3, H4 H5, H6, H9, H10 H7, H8, H11, H12
Port 3 1 4 2
(D)
2
H7
1
Hosts H3, H4 H5, H6, H9, H10 H1, H2 H7, H8, H11, H12
Port 4 3 1 2
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 382
GATE QUESTION BANK
but the second segment was received correctly by the receiver. Let X is the amount of data carried in the first segment (in bytes) and Y is the ACK number sent by the receiver. The values of X and Y (in that order) are (A) 60 and 290 (C) 60 and 231 (B) 230 and 291 (D) 60 and 230 18.
Which one of the following uses UDP as the transport Protocol? (A) HTTP (C) DNS (B) Telnet (D) SMTP
CS – 2008 19. What is the maximum size of data that the application layer can pass on to the TCP layer below? (A) Any Size (B) 216 bytes – size of TCP header (C) 216 bytes (D) 1500 bytes 20.
If a class B network on the internet has a subnet mask 255.255.248.0, what is the max no. of hosts per subnet? (C) 2046 (A) 1022 (B) 1023 (D) 2047
21.
A client process P needs to make a TCP connection to a server process S. Consider the following situation: the server process S executes a socket(), a bind() & a listen() system call in that order, following which it is preempted. Subsequently, the client process P executes a socket() system call followed by connect( ) system call to connect to the server process S. The server process has not executed any accept() system call. Which one following events could take place? (A) connect() system call returns successfully (B) connect () system call blocks (C) connect() system call returns an error
Computer Networks
(D) connect() system call returns in a core dump 22.
In the slow start phase of the TCP congesting control algorithm the size of the congestion window (A) Does not increase (B) Increases linearly (C) Increases quadratic ally (D) Increases exponentially
23.
Which of the following system calls results in the sending of SYN packets? (A) socket (C) listen (B) blind (D) connect
CS – 2009 24. While operating a TCP connection, the initial sequence no. is to be derived using a time of day (TOD) clock that keeps running even when the host is down. The low order 32 bit of the counter of the TOD clock is to be used for the initial sequence numbers. The clock counter increments once per milli second. The maximum packet lifetime is given to be 64s. Which one of the choices given below is closest to the minimum permissible rate at which sequence numbers used for packets of a connection can increase? (A) 0.015/s (C) 0.135/s (B) 0.064/s (D) 0.327/s CS – 2010 25. One of the header fields in an IP datagram is the Time-to-Live (TTL) field. Which of the following statements best explains the need for this field? (A) It can be used to prioritize packets. (B) It can be used to reduce delays. (C) It can be used to optimize throughput. (D) It can be used to prevent packet looping.
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 383
GATE QUESTION BANK
26.
Suppose computers A and B have IP addresses 10.105.1.113 and 10.105.1.91 respectively and they both use the same netmask N. Which of the values of N given below should not be used if A and B should belong to the same network? (A) 255.255.255.0 (B) 255.255.255.128 (C) 255.255.255.192 (D) 255.255.255.224
CS – 2012 27. In the IPV4 addressing format, the number of networks allowed under Class C address is (A) 2 (C) 2 (B) 2 (D) 2 28.
29.
Which of the following transport layer protocol is used to support electronic mail? (A) SMTP (C) TCP (B) IP (D) UDP Consider an instance of TCP’s Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is 2 MSS and the threshold at the start of the first transmission is 8 MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission. (A) 8 MSS (C) 7 MSS (B) 14 MSS (D) 12 MSS
CS – 2013 30. The transport layer protocols used for real time multimedia, file transfer, DNS and email, respectively are (A) TCP, UDP, UDP and TCP (B) UDP, TCP, TCP and UDP (C) UDP, TCP, UDP and TCP (D) TCP, UDP, TCP and UDP
31.
Computer Networks
In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is 300. The position of the datagram, the sequence numbers of the first and the last bytes of the payload, respectively are (A) Last fragment, 2400 and 2789 (B) First fragment, 240 and 2759 (C) Last fragment, 2400 and 2759 (D) Middle fragment, 300 and 689
CS – 2014 32. Let the size of congestion window of a TCP connection be 32 KB when a timeout occurs. The round trip time of the connection is 100 msec and the maximum segment size used is 2 KB. The time taken (in msec) by the TCP connection to get back to 32 KB congestion window is _____. 33.
Which one of the following socket API function converts an unconnected active TCP socket into a passive socket? (A) Connect (C) Listen (B) Bind (D) Accept
34.
In the diagram shown below, L1 is an Ethernet LAN and L2 is a Token – Ring LAN. An IP packet originates from S and traverses to R, as shown. The links within each ISP and across the two ISPs, are all point – to – point optical links. The initial value of the TTL field is 32. The maximum possible value of the TTL field when R receives the datagram is ______. ISP1
ISP2 LAN L2
R
S LAN L1
35.
th
Host A (on TCP/IPV4 network A) sends an IP datagram D to host B (also on TCP/IPV4 network B). Assume that no error occurred during the transmission of D. When D reaches B, which of the following IP header field(s) may be th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 384
GATE QUESTION BANK
different from that of the original datagram D? (i) TTL (ii) Checksum (iii) Fragment Offset (A) (i) only (B) (i) and (ii) only (C) (ii)and (iii) only (D) (i), (ii) and (iii) 36.
37.
Every host in an IPv4 network has a 1 second resolution real time clock with battery backup. Each host needs to generate up to 1000 unique identifiers per second. Assume that each host has a globally unique IPv4 address. Design a 50-bit globally unique ID for this purpose. After what period (in seconds) will the identifiers generated by a host wrap around?
Computer Networks
An IP router with a Maximum Transmission Unit (MTU) of 1500 bytes has received an IP packet of size 4404 bytes with an IP header of length 20 bytes. The values of the relevant fields in the header of the third IP fragment generated by the router for this packet are (A) MF bit: 0, Datagram Length: 1444; Offset: 370 (B) MF bit: 1, Datagram Length: 1424; Offset: 185 (C) MF bit: 1, Datagram Length: 1500; Offset: 370 (D) MF bit: 0, Datagram Length: 1424; Offset: 2960
Answer Keys & Explanations 1.
2.
3.
[Ans. B] In both TCP & UDP, packets of same session will be routed in different paths, because they are using IP protocol in the Network Layer which is purely a connection less protocol. Theoretically we say that TCP is connection oriented protocol, it doesn’t mean that packets of same session will travel in the same path, we are simulating the connection by using buffers at both sender and receiver. Finally TCP is using a Virtual connection. [Ans. D] ARP: Finding the MAC address that corresponds to an IP address [Ans. D] In a class B network initial two octets are all 1’s but third octet specifies the physical network for subnet of 64 department or 2 so initial 6 bits of third octets are 1’s 11111111 . 11111111 .11111100 . 00000000 255 . 255 . 252 . 0
4.
[Ans. C] ICMP reply packet is returned to A by each router en-router to B.
5.
[Ans. B] Congestion window = cwnd = 4KB Receiver window = rwnd = 6KB Current Window Size = min(cwnd, rwnd) = min(4KB, 6KB) = 4KB Just to confuse us they provided the additional information like Last Byte Sent and Last Byte Acknowledged, which are totally not required in finalizing the window size.
6.
[Ans. A] Probability (p via L = 1 b Probability (p via L = 1 b ∴ Probability p) via L or L = p
7.
p p p
[Ans. D] Class of network = class-C network [n=24, h=8] [25h hosts/Network] Network Address = 204.204.204.0 Requirement = 3 subnets
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 385
GATE QUESTION BANK
Subnet No of Hosts/Subnet 1 100 2 50 3 50 Types of subnetting = VLSM No of subnets = 2 No of hosts/subnet =2 2 2 – levels subnetting required. Initially Total Subnets = 2 2 2 n 1 1 bit to be taken from host n 25 h 8
9.
[Ans. C] The two computers configured as follows: IP address and
1
2
8.
1 2 3 1 2 3
Network ID/ Mask 204.204.204.0/255.255.255.128 204.204.204.128/255.255.255.192 204.204.204.192/255.255.255.192 204.204.204.128/255.255.255.128 204.204.204.0/255.255.255.192 204.204.204.64/255.255.255.192
are
203.197.75.201
AND 255.255.128.0 255.255.192.0 203.197.0.0 203.197.64.0 Network address Network address 203.197.2.53 203.197.00000010.00111001 255.255.192.0 255.255.11000000.00000000 203.197.0.0 203.197.0.0 203.197.75.201 255.255.128.0 203.192.0.0
assumes is on same network but assume is on different network
10.
[Ans. C] Boolean And (Destination Address, Mask) Must give the Network ID Given Destination Address = 144.16.68.117 = 144.16.68.01110101 Router always considers the Highest Mask first, then second highest, and so on… First Highest Mask:Destination Network ID =144.16.68.64 and Mask = 255.255.255.224 Boolean And (144.16.68.117, 255.255.255.224)=144.16.68.96 Not matching with NetworkID Second Highest Mask:Destination Network ID =144.16.68.0 and Mask = 255.255.255.0 Boolean And (144.16.68.117, 255.255.255.0)=144.16.68.0 Matched with Network ID Hence, the outgoing interface = Eth2
11.
[Ans. A] Because UDP generate the error that machine you are trying to reach is not responding unlike TCP.
12.
[Ans. D] Broadcast Address with in a network All host bits will be 1’s. ontinuous 1’s] We cannot confidently say the exact no. of network bits in a subnetted network. As all options are appropriate for the given question.
Total solution = 2 Hosts/ subnet 100 50 50 100 50 50
203.197.2.53
and
Netmask
∴
S. No Subnet
Computer Networks
[Ans. C] TTL field in IP Datagram To prevent packets from looping indefinitely.
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.comPage 386
GATE QUESTION BANK
Broadcast Address = 144. 16.95.255 =144. 16. 01011111.11111111 Option A = 255. 255.224.0 =255.255.11100000.00000000 Option B = 255. 255.240.0 = 255.255.11110000.00000000 Option C = 255. 255.248.0 = 255.255.11111000.00000000 13.
2
2
1024
2
[Ans. B] TCP is using an appropriate RTT estimation algorithm to set the timeout value of a TCP connection. It is dynamic and will change with every segment. Initial value of RTT is greater than that of twice the propagation delay.
17.
[Ans. D] Difference between two consecutive packets is amount of data carried in first packet. Here, 290 – 230 = 60 X = 60 Y = 230
18.
[Ans. A] Application layer can pass data of Any Size to Transport Layer. The Transport Layer can send data of any size in multiple segments. Segmentation & Reassembly is the responsibility of Transport Layer to send data of any size given by the application layer.
19.
[Ans. B] The maximum size of data that the application layer can pass on to the TCP layer is 2 bytes – size of TCP header.
[Ans. A] By looking at the above diagram Bridge “ 3” will broadcast to all the hosts as follows:Hosts Port H1, H2, H3, H4 3 H5, H6, H9, H10 1 H7, H8, H11, H12 2
20.
[Ans. C] 11111111 . 11111111 . 11111000 . 00000000 ∴ No. of hosts per subnet =2 2 2048 2= 2046
21.
[Ans. C] Connect ( ) system call returns an error.
[Ans. C] The class B is defined as follows
22.
[Ans. D] In the slow start phase, the size of the congestion window increases exponentially.
23.
[Ans. D] Connect system call is responsible for synchronize the packets
[Ans. A] Spanning tree for the given diagram is as follows:B1
2
H1 H2
H3 H4 3
2 1
B5
B3 2
H5 H6
H7 H8
1
1
B4
B2
3
3
H9 H10
H11 H12
Three Possible Depth First Traversals are 1. 1 5 3 4 2 2. 1 3 4 2 5 3. 1 3 2 4 5 Possibility: 1 is matching with Option A. So obviously Answer = A
15.
2
16.
1
14.
2 1022
Computer Networks
0 1
16 0
net id
31
host id
Maximum number of subnet = 2 2 = 62 Maximum number of host in each subnet th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.comPage 387
GATE QUESTION BANK
24.
[Ans. B] 0.064 is closest to the minimum permissible rate at which sequence number used for packet of a connection can increase.
25.
[Ans. D] Whenever Time to live field reaches ‘0’ we discard the packet. So, it can be used to prevent packet looping
26.
27.
[Ans. C] Numbers of networks in class ‘ ’ are 2 as in class ‘ ’ there ⏟ ⏟ Out of 24 bits 3-bits are used for representation class ‘ ’ i.e. 110 ∴ 21 bits. With 21 bits we can make 2 networks
28. [Ans. D] IP address of A = 10.105.1.113 10.105.1.01110001 IP address of B = 10.105.1.91 10.105.1.0101011011 29. For finding network address we take AND of IP address with the netmask N. So we check one by one. (A) (i) 255.255.255.0 = N 10.105.1.01110001 Taking AND 10.105.1.00000000 IP address of A
[Ans. C] UDP and TCP are transport layer protocol. TCP supports electronic mail. ∴Option ‘ ’ correct [Ans. C] 1st 2 MSS } Slow Start 2nd 4 MSS 3rd 8 MSS 4th 9 MSS } additive increase 5 10 Time out threshold 8 4 6th 7th 8th 9th 10th
(ii) By taking and with B 255.255.255.00000000 10.105.1.01011011 10.105.1.00000000 So both belong to same network (B) (i) 255.255.255.128 255.255.255.10000000 10.105.1.01110001 IP of A 10.105.1.00000000 (ii) 255.255.255.10000000 10.105.1.01011011 IP of B 10.105.1.0000000 So both belong to same network
Computer Networks
5MSS} multiplicative decrease 4 MSS 5 MSS 6 MSS 7MSS
30.
[Ans. C] Real time multimedia – UDP File transfer - TCP DNS – UDP Email – TCP
31.
[Ans. C] M = 0: Means to more fragmentation so it represent the last fragment. HLEN = 10: Header length 10 4 40 bytes Payload: 400 40 360 bytes [0 to 359] Fragment offset : 300 means 300 8 2400 bytes Sequence number of first fragment = 2400 Sequence number of last fragment = 2400 + 359 = 2759 Option (C) is correct
(D) (i) 255.255.255.11100000 10.105.1.01110001 IP of A 10.105.1.01100000 (ii) 255.255.255.11100000 10.105.1.010111011 IP of B 10.105.1.01100000 Both are not same so it not belong to same network
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.comPage 388
GATE QUESTION BANK
32.
[Ans. *] Range 1100 to 1300 Size of Congestion Window = cw = 32KB Round Trip Time = 100 msec Maximum Segment Size = 2KB Initial Congestion Window Size= initial cw = 1MSS = 2KB [Default Value] Time Out occurs at cw = 32KB , then Phase = Slow-Start Phase with the following changes:Threshold = cw/2 =16KB Current cw = 2KB [initial cw] Phase = Slow Start Phase
Round
Threshold
1
Current Congestion Window 2KB
2
4KB
16KB
3
8KB
16KB
4
16KB
16KB
5
18KB
6
16KB
Phase
incoming connection requested to this socket. 34.
100msec
Slow-Start Phase Slow-Start Phase
100msec
16KB
Congestion Avoidance Phase
100msec
20KB
16KB
100msec
7
22KB
16KB
Congestion Avoidance Phase Congestion Avoidance Phase
S
24KB
16KB
100msec
9
26KB
16KB
10
28KB
16KB
11
30KB
16KB
12
32KB
16KB
Congestion Avoidance Phase Congestion Avoidance Phase Congestion Avoidance Phase Congestion Avoidance Phase Congestion Avoidance Phase
100msec
ISP1 30
ISP2 27
26 LAN L2
R
35.
[Ans. D] Host A sends a datagram D to Host B and it has been delivered successfully. All the 3 given options can change while datagram “D” reaches ost “ ”. 1) TTL It decrements at every router. [Initial Value will be different from the final value] 2) Checksum As IPV4 header will be reconstructed at every router; obviously checksum also will be calculated at every router. So the initial value of checksum will be different from the final value. 3) Fragment Offset Any intermediate router can fragment the packet if packet size is greater than maximum transmission unit [MTU] of the next network. So obviously the initial value of fragment offset will be different from the final value.
36.
[Ans. 256] Given that each host has a globally unique IPV4 address and we have to design 50 – bit unique Id. So, 50 – bit in the sense (32 + 18). So, it is showing that IP Address (32 bit) followed by 18 bits. 1000 unique Ids 1 sec 2 unique ids 2 1000 2 256
100msec
100msec
100msec
100msec
1200 msec
33.
31
29 28
S LAN L1
100msec
100msec
[Ans. 26] Initial TTL Value = 32 TTL value will be decremented by 1 at each Router on the way to the Destination. TTL value will be 26 when packet reaches “R” 32
Round Trip Time
Slow-Start Phase Slow-Start Phase
Computer Networks
[Ans. C] The listen function converts an unconnected socket into a passive socket, indicating that the kernel should accept
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.comPage 389
GATE QUESTION BANK
37.
Computer Networks
[Ans. A] Size of received IP Datagram = 4404 bytes = 20 byte IP Header + 4384 payload Maximum Transmission unit [MTU] = 1500 bytes Obviously, Router will fragment the 4384 Payload as follows: S.No 1 2 3 Size of 1500 1500 1444 Datagram IP Header 200 20 20 Payload 1480 1480 1424 MF bit 1 1 0 Value Starting 0 1480 2960 Payload Byte No Ending 1479 2959 4383 Payload Byte No Fragment 0/8 = 1480/8 2960/8 Offset 0 = 185 = 370 Thus for 3 IP fragment values are as follows: Size of Datagram = 1444 bytes MF bit Value = 0 [Since this is the last fragment] Fragment Offset = 370
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.comPage 390
GATE QUESTION BANK
Computer Networks
Application Layer CS –2005 1. A HTML form is to be designed to enable purchase of office stationery. Required items are to be selected (checked). Credit card details are to be entered and then the submit button is to be pressed. Which one of the following options would be appropriate for sending the data to the server? Assume that security is handled in a way that is transparent to the form design. (A) only GET (B) only POST (C) either of GET or POST (D) neither GET nor POST CS – 2006 2. HELO and PORT, respectively commands from the protocols (A) FTP and HTTP (B) TELNET and POP3 (C) HTTP and TELNET (D) SMTP and FTP
are
CS –2008 3. Provide the best matching between the entries in the two columns given in the table below: I Proxy Server a. Firewall II aZaA, D b. Caching III SLIP c. P2P IV DNS d. PPP (A) I a, II d, III c, IV b (B) I b, II d, III c, IV a (C) I a, II c, III d, IV b (D) I b, II c, III d, IV a CS –2010 4. Which one of the following is not a clientserver application? (A) Internet chat (C) E-mail (B) Web browsing (D) Ping
CS –2011 5. Consider different activities related to email m1: Send an email from a mail client to a mail server m2: Download an email form mailbox server to mail client m3: Checking email in a web browser Which is the application level protocol used in each activity? (A) m1: HTTP m2: SMTP m3: POP (B) m1: SMTP m2: FTP m3: HTTP (C) m1: SMTP m2: POP m3: HTTP (D) m1: POP m2: SMTP m3: IMAP CS –2012 6. The protocol data unit (PDU) for the application layer in the Internet stack is (A) Segment (C) Message (B) Datagram (D) Frame CS –2014 7. Identify the correct order in which the following actions take place in an interaction between a web browser and a web server. 1. The web browser requests a webpage using HTTP. 2. The web browser establishes a TCP connection with the web server. 3. The web server sends the requested webpage using HTTP. 4. The web browser resolves the domain name using DNS. (A) 4,2,1,3 (C) 4,1,2,3 (B) 1,2,3,4 (D) 2,4,1,3 8.
A graphical HTML browser resident at a network client machine Q accesses a static HTML webpage from a HTTP server S. The static HTML page has exactly one static embedded image which is also at S. Assuming no caching, which one of the following is correct about the HTML
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 391
GATE QUESTION BANK
webpage loading (including the embedded image)? (A) Q needs to send at least 2 HTTP requests to S, each necessarily in a separate TCP connection to server S (B) Q needs to send at least 2 HTTP requests to S, but a single TCP connection to server S is sufficient (C) A single HTTP request from Q to S is sufficient, and a single TCP connection between Q and S is necessary for this (D) A single HTTP request from Q to S is sufficient, and this is possible without any TCP connection between Q and S
9.
Computer Networks
An IP machine Q has a path to another IP machine H via three IP routers R1, R2, and R3. Q—R1—R2—R3—H H acts as an HTTP server, and Q connects to H via HTTP and downloads a file. Session layer encryption is used, with DES as the shared key encryption protocol. Consider the following four pieces of information: [I1] The URL of the file downloaded by Q [I2] The TCP port numbers at Q and H [I3] The IP addresses of Q and H [I4] The link layer addresses of Q and H Which of I1, I2, I3, and I4 can an intruder learn through sniffing at R2 alone? (A) Only I1 and I2 (C) Only I2 and I3 (B) Only I1 (D) Only I3 and I4
Answers Keys & Explanations 1.
2.
[Ans. D] HELO and PORT commands are from the protocol SMTP and FTP.
3.
[Ans. D] Proxy server KaZaA, DC++ SLIP DNS
4.
5.
m3 Checking email in a web browser HTTP
[Ans. C] GET or POST can be used sending the data to the server.
aching P2P PPP irewall
[Ans. D] Ping is utility to check connectivity either between client-client or client-server
6.
[Ans. C] PDU is called a message in application layer, segment in transport layer, datagram in network layer and frame in data link layer
7.
[Ans. A] Firstly DNS will translate the URL into IP address, then TCP connection will be established. After that browser will request for webpage and at the end server will respond for request
8.
[Ans. B] Q: Client Accessing a Static HTML web page from HTTP Server S: Server Static HTML page has exactly one Static mbedded Image located in “S” only No Caching How HTML Web Page Loads? HTTP Uses TCP Protocol 1-TCP Connection must be established first
[Ans. C] m1 Send an email from a mail client to a mail server SMTP m2 Download an email from a mail client to a mail server POP
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.comPage 392
GATE QUESTION BANK
Computer Networks
[HTTP 1.1 uses Persistent Connection, One TCP connection can serve multiple requests] Q must send 2 HTTP requests One for Web Page and the other for the Image.
9.
[Ans. C] 1) Station “Q” will be downloading a file from TTP server “ ” and 3 routers R1, R2, and R3 between Q and H. 2) Sniffing at R2 alone what information will be disclosed? Only IP addresses & Port Numbers 3) As IP addresses & Port Numbers remains same for the entire journey to the destination, so sniffing will get both IP addresses and Port Numbers of “Q and ”. 4) URL Station “Q” alone knows the URL and requests the DNS server for destination IP. As URL won’t be included in the packet, so the routers in the middle are totally unaware of URL’s. 5) Link Layer Addresses of Q and H Ethernet Address (or) MAC address (or) Physical Address. As the physical addresses changes from Hop to Hop, Sniffing at R2 will know only the physical addresses of R1 and R2 but not Q and H.
th
th
th
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30 Cross, 10 Main, Jayanagar 4 Block, Bangalore-11 : 080-65700750,
[email protected] © Copyright reserved. Web: www.thegateacademy.com Page 393
GATE QUESTION BANK
Computer Networks
Network Security CS -2005 1. Suppose that two parties A and B wish to setup a common secret key (D-H key) between themselves using the DiffieHellman key exchange technique. They agree on 7 as the modulus and 3 as the primitive root. Party A chooses 2 and party B chooses 5 as their respective secrets. Their D-H key is: (A) 3 (C) 5 (B) 4 (D) 6
CS -2008 4. The total number of keys required for a set of n individuals to be able to communicate with each other using secret key and public key cryptosystems, respectively are : (A) n (n 1) and 2n
CS -2007 2. Exponentiation is a heavily used operation in public key cryptography. Which of the following options is the tightest upper bound on the no. of multiplications required to compute b modulo m, 0≤b, n≤m? (A) O (log n) (C) O (n/log n) (D) O (n) (B) O (√n )
CS -2009 5. In the RSA public key cryptosystem, the private & public keys are (e, n) & (d, n) respectively, where n=p * q and p and q are large primes. Besides, n is public & p & q are private . Let M be an integer such that 0