CS GATE 2011



Tag: cs gate 2011
Q.1
Choose the word from the options given below that is most nearly opposite in meaning to the given word: Amalgamate
A. Merge
B. Split
C. Collect
D. Separate
Answer : Option B
Explaination / Solution:

Amalgamate means combine or unite to form one organization or structure. So the best option here is split. Separate on the other hand, although a close synonym, it is too general to be the best antonym in the given question while Merge is the synonym; Collect is not related.

Workspace
Report
Topic: Arithmetic Tag: CS GATE 2011
Q.2
A company needs to develop a strategy for software product development for which it has a choice of two programming languages L1 and L2. The number of lines of code (LOC) developed using L2 is estimated to be twice the LOC developed with L1. the product will have to be maintained for five years. Various parameters for the company are given in the table below.

Total cost of the project includes cost of development and maintenance. What is the LOC for L1 for which the cost of the project using L1 is equal to the cost of the project using L2? 
A. 4000
B. 5000
C. 4333
D. 4667
Answer : Option B
Explaination / Solution:



Workspace
Report
Topic: Databases Tag: CS GATE 2011
Q.3
Consider a relational table with a single record for each registered student with the following attributes. 1. Registration_Number: Unique registration number for each registered student 2. UID: Unique Identity number, unique at the national level for each citizen 3. BankAccount_Number: Unique account number at the bank. A student can have multiple accounts or joint accounts. This attributes stores the primary account number 4. Name: Name of the Student 5. Hostel_Room: Room number of the hostel Which of the following options is INCORRECT?
A. BankAccount_Number is a candidate key
B. Registration_Number can be a primary key
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
Answer : Option A
Explaination / Solution:

In case two students hold joint account then BankAccount_Num will not uniquely determine other attributes.

Workspace
Report
Q.4
 Let the page fault service time be 10ms in a computer with average memory access time being 20ns. If one page fault is generated for every 106 memory accesses, what is the effective access time for the memory?
A. 21ns
B. 30ns
C. 23ns
D. 35ns
Answer : Option B
Explaination / Solution:

 P = page fault rate 
EA = p × page fault service time 
+(1 - p) × Memory access time


Workspace
Report
Q.5
If the difference between the expectation of the square of random variable (E[X2]) and the square of the expectation of the random variable (E[X2]) is denoted by R then
A. R = 0
B. R<0
C. R ≥ 0
D. R>0
Answer : Option C
Explaination / Solution:
No Explaination.


Workspace
Report
Q.6
 Definition of a language L with alphabet {a} is given as following
L = {ank | k > 0, and n is a positive integer constant}
What is the minimum number of states needed in a DFA to recognize L?
A. k + 1
B. n + 1
C. 2n + 1
D. 2k + 1
Answer : Option B
Explaination / Solution:

 Let n = 3 and k=1 

(n + 1) states

Workspace
Report
Topic: Algorithms Tag: CS GATE 2011
Q.7
Consider the following recursive C function that takes two arguments 
unsigned int foo unsigned int n, unsigned int r {
if (n > 0) return (n%r) + foo (n / r, r ));
else return 0;
}
What is the return value of the function foo when it is called as foo (513, 2)? 
A. 8
B. 9
C. 5
D. 2
Answer : Option D
Explaination / Solution:



Workspace
Report
Q.8
The following is comment written for a C function
/* This function computes the roots of a quadratic equation
a.x^2+b.x+c=0. The function stores two real roots
in *root1 and *root2 and returns the status of validity of
roots. It handles four different kinds of cases.
(i) When coefficient a is zero irrespective of discriminant
(ii) When discriminant is positive
(iii) When discrimanant is zero
(iv) When discrimanant is negative
Only in cases (ii) and (iii), the stored roots are valid.
Otherwise 0 is stored in the roots. the function returns 0 when 
the roots are valid and -1 otherwise. 
The functin also ensures root1>=root2.
int get_QuadRoots (float a, float b, float c, float *root1, float *root2) ; 
*/
A software test engineer is assigned the job of doing black box testing. He comes up with the following test cases, many of which are redundant. 

Which one of the following options provide the set of non-redundant tests using equivalence class partitioning approach from input perspective for black box testing? 
A. T1,T2,T3,T6
B. T1,T3,T4,T5
C. T2,T4,T5,T6
D. T2,T3,T4,T5
Answer : Option C
Explaination / Solution:

T1 and T2 checking same condition a = 0 hence, any one of T1 and T2 is redundant.
T3T4: in both case discriminant (D)= b2 − 4ac = 0 . Hence any one of it is redundant.
T5 : D>0 
T6 : D<0 

Workspace
Report
Q.9
An undirected graph G(V,E) contains n ( n > 2 ) nodes named v1v2,....vn . Two nodes vivj are connected if and only if 0 < |i − j| ≤ 2. Each edge (vi ,vj ) is assigned a weight i + j. A sample graph with n = 4 is shown below 
The length of the path from v5 to v6 in the MST of previous question with n = 10 is
A. 11
B. 25
C. 31
D. 41
Answer : Option C
Explaination / Solution:


12 + 8 + 4 + 3 + 6 + 10 = 31

Workspace
Report
Q.10
Which of the following is NOT desired in a good Software Requirement Specifications (SRS) document?
A. Functional Requirements
B. Non Functional Requirements
C. Goals of Implementation
D. Algorithms for Software Implementation
Answer : Option D
Explaination / Solution:
No Explaination.


Workspace
Report