Sei sulla pagina 1di 19

ACE

Engineering Academy
Hyderabad | Delhi | Bhopal |Pune | Bhubaneswar | Bengaluru | Lucknow | Patna | Chennai | Vijayawada | Visakhapatnam | Tirupati
H.O: 204, II Floor, Rahman Plaza, Opp. Methodist School, Abids, Hyderabad-500001.
Ph: 040-23234418, 040 -23234419 , 040-23234420, 040-24750437

Computer Science and Information Technology

GENERAL APTITUDE other: although most people think about the


terms "bug" and "insect" one way,
One Mark Questions(Q01–05) something else is actually true about the
terms. Choice (C) logically completes the
01. The cost of 7 pens, 8 pencils and 3 sentence, indicating that while most people
sharpeners is Rs 20. The cost of 3 pencils, think the terms are "interchangeable," the
4 sharpeners and 5 erasers is Rs 21. The term "bug" actually refers to a "particular"
cost of 4 pens, 4 sharpeners and 6 erasers is group of insects.
Rs 25. The cost of 1 pen, 1 pencil, 1
sharpener and 1 eraser is ________ (Rs) 03. Sentence improvement:
Underestimating its value, breakfast is a
Ans: 6 meal many people skip.
Sol: Let the costs of pens, pencil, eraser and (A) Underestimating its value, breakfast is
sharpener be pn, pp, e and s respectively a meal many people skip
Given (B) Breakfast is skipped by many people
7pn + 8pp + 3s = 20 because of their underestimating its
3pp + 4s + 5e = 21 value
4pn + 4s + 6e = 25 (C) Many people, underestimating the
Adding all three equations value of breakfast, and skipping it.
11pn + 11pp + 11s + 11e = 66 (D) Many people skip breakfast because
 1pn + 1 pp + 1s + 1e = 6 they underestimate its value.

02. Sentence Completion: Ans: (D)


Although some think the terms "bug" and Sol: The problem with this sentence is that the
"insect" are -------, the former term actually opening phrase "underestimating its value"
refers to ------- group of insects. modifies "breakfast," not "people." The
(A) parallel - an identical order of the words in the sentence in choice
(B) precise - an exact (D) does not have this problem of a
(C) interchangeable - particular misplaced modifying phrase. Choice (D)
(D) exclusive - a separate. also clarifies the causal relationship
between the two clauses in the sentence.
Ans: (C) None of the other choices convey the
Sol: The word "although" indicates that the two information presented in the sentence as
parts of the sentence contrast with each effectively and directly as choice (D).

ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
:2: CSIT

04. Spot the error, if any: Two Marks Questions(Q06–10)


If I were her / I would accept / his offer
(A) If I were her (B) I would accept 4 9 16 25
(C) his offer (D) No error 06. The infinite sum 1+ + + + +---
7 7 2 73 7 4
- - equals
Ans: (A) Ans: 1.8 to 2
Sol: Rule we should use Subjective case of Sol: We have to find the sum of the series
pronoun after BE forms…am, is, are was 4 9 16 25
were.,, has been, have been, had been. 1+ + 2 + 3 + 4 + - - - - -
7 7 7 7
Her is an objective case ---
1
If I were she. is correct Putting x = we get
7
05. Kishenkant walks 10 kilometres towards 1 + 22x + 32x2 + 42x3 + 52x4 + - - - - -
North. From there, he walks 6 kilometres s = 1 + 4x + 9x2 + 16x3 + 25x4
towards south. Then, he walks 3 kilometres s.x = x + 4x2 + 9x3 + 16x4 + - - - - -
towards east. How far and in which s – sx = 1 + 3x + 5x2 + 7x3 + 9x4 + - - - - -
direction is he with reference to his starting x(s – sx) = x + 3x2 + 5x3 + 7x4 + - - - - - -
point? (s – sx) –x(s – sx) = 1 + 2x + 2x2 + 2x3 + -
(A) 5 kilometres, West Direction - - - - - + to 
(B) 5 kilometres, North-East Direction 2x
(1 – x)2 s = 1+ ; since x  1
(C) 7 kilometres, East Direction 1 x
(D) 7 kilometres, West Direction 1 x
s=
(1  x ) 3
Ans: (B) We may use it as direct formula for solving
Sol: The movements of Kishenkant are as
this type of problem
shown in figure
B
1
Substituting x = we get
6 km 3 km 7
C D
1
10 km 1 8  343 49
s= 7 = 
4 km  1
3 7  216 27
1  
 7
A

A to B, B to C and C to D x y z
07. If    5 and a, b
AC = (AB – BC) = (10 – 6) km = 4 km 3a  2b 3b  2c 3c  2a
Clearly, D is to the North-East of A and c are in continued proportion and b, c,
 Kishenkant’s distance from starting point a are in continued proportion, then
A x y z
  is _______ ( a, b and c are
AD = AC2  CD 2 a 2b 3c
in continued proportion means b2 = ac)
 (4) 2  (3) 2  25 = 5 km
1 1 5
So, Kishenkant is 5 km to the North-East (A) 55 (B) 25 (C) 4 (D) 45
5 6 6
of his starting point
Ans: (D)
Sol: Given that a, b, c are in continued
proportion  b2 = ac -------- (1)
ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
:3: Pre GATE Question Paper

Also b, c, a are in continued proportion Foods. Which of the following, if true,


 c2 = ab ------- (2) would most weaken the contention of
From (1) and (2) Munchon Foods?
b2c2 = a2bc  a2 = bc ------- (3) (A) Some synthetic substances are not
Conditions (1), (2) and (3) can only be harmful
satisfied when a = b = c = k (say) (B) Some natural substances found in foods
x y z x y z can be harmful
    5     25 (C) Food without additives is unlikely to
5k 5k 5k k k k
taste good
 x y  z  x1 y1 z (D) Munchon Foods produces only
a 2b 3c k 2 k 3 k breakfast cereals
25 25 25  11 275 5
= 25   =   45 Ans: (B)
2 3 6 6 6 Sol: Munchon’s contention is that buying their
products safeguards health. To weaken that
08. Rasputin was born in 3233 B.C. The year argument we can show that, for some
of birth of Nicholas when successively reason, their foods might not be healthy.
divided by 25, 21 and 23 leaves remainder So think about an alternative cause
of 2, 3 and 6 respectively. If the ages of
Nicholas, Vladimir and Rasputin are in 10. To open a lock, a key is taken out of a
arithmetic progression, when was Vladimir collection of n keys at random. If the lock
born? is not opened with this key, it is put back
(A) 3227 B.C (B) 3229 B.C into the collection and another key is tried.
(C) 3230 B.C (D) 3231 B.C The process is repeated again and again. It
Ans: (C) is given that with only one key in the
Solution: The year of birth of Nicholas collection, the lock can be opened. The
25 21 23 probability that the lock will open in ‘n th’
   trail is _____.
2 3 6  3227 1
n
 n 1
n

The ages of Nicholas, Vladimir and (A)   (B)  


Rasputin are in A.P n  n 
 n 1
n n
The ages of Nicholas Vladimir Rasputin 1
(C) 1 –   (D) 1–  
3227 ? 3233  n  n
Nicholas  Rasputin
 Vladimir age = Ans: (C)
2 Sol: Probability that the lock is opened in a trail
3227  3233 1
= = 3230 B.C is (since there is exactly one key, which
2 n
opens the lock)
09. Recent studies have highlighted the  The chance that the lock is not opened in
harmful effects of additives in food (colors, 1
preservatives, flavor enhancers etc.). There a particular trail = 1 –
n
are no synthetic substances in the foods we P(lock is opened in nth trial) = 1– P(lock is
produce at Munchon Foods - we use only not opened in n trials)
natural ingredients. Hence you can be sure
 n  1
n n
you are safeguarding your family’s health  1
= 1 – 1    1  
when you buy our products, says Munchon  n  n 
ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
:4: CSIT

Techinical Questions 13. Consider the following E-R diagram

d1
One Mark Questions (Q11–35) a b
S d2
d

11. The result evaluating the postfix A S B

expression 8 2 4 * / 2 3 * + 5 1 * –
is __________. R X

Ans: 2 C

Sol:
e f g
4 3
2 8 2 Total number of attributes in each of the relation
8 8 1 1 schemes in relational model is ______

2*4=8 8/8=1 Ans: 13


Sol:
1 The relation schemes in relational model
6 5 5 AS (a c b) Fk
1 7 7 7 2 Fk
5*1=5 7– 5 = 2 T1 (e , f, X, a c)
2 * 3 = 6 6 +1 = 7
RC (e f g X a c)
T2 (e g)
12. For which value of  the following system B (c d1 d2)
of equations is inconsistent? Total number of attributes = 13
3x + 2y + z = 10
2x + 3y + 2z = 10
14. The Smallest Negative integer that can be
x + 2y + z = 10
represented in signed 2’s complement
notation with 10 bit is _______.
Ans: 1.4
Ans: –512
3 2 1 Sol: Range for n bit is –(2n–1) to +(2n–1–1)
Sol : 2 3 2  0 Given n = 10,
1 2   –(210–1) to + (210–1–1)
 –(29) to + (29–1)
 3(3 – 4) – 2(2–2) + (4–3) = 0
 –512 to 511
 5 – 7 = 0
The smallest negative integer is –512
7
= = 1.4
5

ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
:5: Pre GATE Question Paper

15. The maximum number of articulation 5, 3, 10, 20, 15, 10, 5, 1, 2, 4 is


points of any binary tree of 100 nodes is _______.

______.
Ans : 219
Sol:
Ans: 98 First arrange all files in the increasing
Sol: order of length and then in each iteration,
Maximum number of articulation points
select two files which are having least
are possible if the binary tree is left skewed number of records and merge them into
(or) right skewed. single file.
In left skewed (or) right skewed binary tree Continue this process until all files are
completed.
with ‘n’ nodes contains maximum (n–2)
I9
articulation points.
75
I8
Since we have 100 nodes, so we have 98
41
articulation points. I6
21
I4 I7

16. A group of N stations share a 64 Kbps 11 34


I2 I5
pure ALOHA channel. Each station 6 19
outputs a 2000 bits frame on an average of I1 I3
once every 100 sec, even if the previous 3 9
1 2 3 4 5 5 10 10 15 20
one has not yet been send. What is the
maximum value of N ?
Minimum cost of merging all files
Ans: 576 = 3 + 6 + 9 + 11 + 19 + 21 + 34 + 41 + 75
Sol: = 219
Pure ALOHA throughput = 18 %
18. int f(long int n)
Utilization bandwidth = 0.18  64 Kbps {
= 11.52 Kbps int sum;
This has to be shared by N station. if (n = = 9)
Transmission rate = 2000/100 = 20 bps return 1;
N = 11520/20 = 576 if (n < 9 )
return 0;
sum = 0;
17. Let F1, F2, .......... Fn be files with length L1, while (n > 0)
L2....... Ln we would like to merge all of the {
files together to make a single file. The sum + = n%10;
cost of merging files is m+n if the files n / = 10;
}
have length m and n. Find the minimum return f(sum);
cost of merging ten files whose length are }
ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
:6: CSIT

What is the return value of f(49698589) is 21. Assume intermediate router received a
________. IPV6 datagram. If the datagram is too large
Ans: 0 to be forwarded over the outgoing link, the
Sol: router is _______.
A number is divisible by 9 iff the sum of (A) Drops
(B) Fragments
the digits of the number is divisible by 9.
(C) Forward without fragmenting
f(49698589)  4 + 9 +6 + 9 + 8 + 5 + 8 +9 (D) None
= 58
f(58)  5 + 8 = 13 Ans: (A)
f(13)  1 + 3 = 4 Sol: Drops and sends “Packet Too Big” ICMP
f(4)  return ‘0’ error message

19. Minimum number of 6 × 64 Decoder 22. Consider the following enumerations &
needed to implement 8× 256 Decoder with choose the false answer:
enable inputs (without using extra
1: Effective enumeration of all cfls that is
Hardware) is ______.
countably infinite.
6 I/P’s 6 × 64
Ans: 5 64
2: A countably infinite effective
E
Sol: N
Mas enumeration of all pairs of real
ter 6 I/P’s 6 × 64 64
0
2 I/P’s E 256
numbers.
1 N O/P’s
4 I/P’s
6 × 64 2 6 I/P’s 6 × 64 64 3: A countably infinite effective
E
3 N enumeration of all TMs
EN 63 .. . 6 I/P’s 6 × 64 64
E 4: An effective enumeration of all
. N
1 Slaves
1 master + 4 slaves recursive sets that is countably infinite
Total 5 decoders are minimum needed. (A) 1 × 2 does not exist
(B) 2 × 3 does not exist
20. In which of the modes of operation the (C) 3 × 4 does not exist
transmission error does not affect the (D) 1 × 3 does not exist
future bits. Ans: (D)
(A) Cipher block chaining Sol: Since the descriptions of TMs are finite &
(B) Cipher feedback all cfls are finite we can enumerate
(C) Output feedback effectively all the descriptions in
(D) B and C increasing order of size. So 1 × 3 is
countably infinite by dovetailing.
Ans: (C)
Sol: Output is not linked to input of next block
but sub key is linked to next block.
ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
:7: Pre GATE Question Paper

23. What is the Time Complexity of the (A) Every key of R contains A
following piece of code? (B) No key of R contains A
(C) Some key of R contains A while some
void A( ) other key does not
{ (D) None of the above
int n  22 ;
K

for(i = 1; i < n; i++) Ans: (A)


{ Sol: Based on given dependencies candidate key
j = 2; is AD (or) A $.
while(j < = n) If $ is A or B or C then candidate key is A.
{ If $ is E then candidate key is AD and AE.
j = j 2;
printf(“ACE”); 25. Consider the minimum state dfa M for the
} set denoted by the complement of the
} intersection of the sets denoted by (rs + r)*s
} & r(sr + r)*
Choose the correct answer:
(A) O(n log n) (B) O(n log2 log n2 ) (A) M has one state
(B) M has two states
(C) O(n) (D) O(log n)
(C) M is not unique because of 
(D) M has more than two but a finite
Ans: (B)
number of states
Sol: For each value of i, the while loop will be
executed K + 1 Times.
Ans: (A)
So, the Total number of Times while loop
Sol: The given regular expressions have
executed = n (K + 1)
nothing in common. The complement of
but n  22
K

the intersection is the set (r + s)*. This


 2k = log n2 needs one state.
 k = log2 log n2
26. Consider the following
 Total Time complexity
(S1) ((~p  q)  ~q)  p
= n(log2 log n2 + 1)
(S2) {(p  q)  (q  r)  (~q  r)}  p
= O(n log2 log n2 ) (S3) ((p  q)  ~p)  ~q
(S4) (~(p  q)  p)  ~q
24. Consider the following relation R(A, B, C, Which of the following is true?
D, E) with the following (A) S1 and S2 are valid
(B) S2 and S3 are valid
FD’s: A  BC, CD  E, $  D.
(C) S3 and S4 are valid
We don’t know what $ is, it could be any (D) S1 and S4 are valid
non empty subset of R’s attributes. Which
of the following must be true regardless of Ans: (D)
Sol: S1  (p  q)  ~q
what is inside $? (Here key refer to  T (disjunctive syllogism)
candidate key)  S1 is valid

ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
:8: CSIT

S2: when p has truth value false, q has How much time can be saved using design
truth value false and r has truth value D2 over D1, for executing ‘100’
true, we have S2 is false. instructions?
(A) 99 ns (B) 2091 ns
 S2 is not valid (C) ‘0’ ns (D) 309 ns
S3 : when p is false and q is true; we have,
S3 is false. Ans: (D)
 S3 is not valid Sol: D1 D2
K=6 K = 8 ns
S4: (~(p q)  p)  ~q tp = 6 ns, n = 100 tp = 3 ns;
 ((p  ~q)  p)  ~q (K+n –1)× tp= 105 × 6 n = 100
 ((~q  p)  p) ~q = 630 ns  tp = 107 × 3
By commutativity = 321
Time
(~q  (p  p)) ~q By associativity
 saved = 630 – 321 = 309
 (~q  p)  ~q
By idempotent law 29. The Concatenation of two linked lists is to
T (Simplification) be performed on O(1) time. Which of the
following implementation should be used?
(A) Circular Linked List
27. The below diagram acts as 2 bit ________
(B) Singly Linked List
when mode switch is connected to ‘1’.
(C) Doubly Linked List
Mode switch (D) Circular doubly linked list
Ans: (D)
1 T Q 1 T Q Sol: The starting node holds the address of the
Clk
last node
Q
Q 30. An organization has a Class C network and
want to form subnets for four departments
with hosts as follows.
(A) 2 bit up counter
A–35, B – 20, C– 54, D–40
(B) 2 bit Down counter
What is the possible arrangements of
(C) Mod 3 up counter
subnet masks?
(D) Mod 3 Down counter
(A) 255.255.255.192 (B) 255.255.255.224
(C) 255.255.255.128 (D) 255.255.255.240
Ans: (B)
Sol: When mode switch is ‘1’, only upper AND
Ans: (A)
gate gives ‘1’ output so, it acts as positive
Sol: class C has 24 bits – NID
trigger, so it is 2 bit down counter with
sequence of 00, 11, 10, 01,00, 11..... 8 bits – HID

28. We have 2 designs D1 and D2 for a


synchronous pipelined processor. D1 has 6 2 bits SID 6 bits HID
stages with execution times of 2 ns, 6 ns, 5 255.255.255.11000000
ns, 4 ns, 2 ns and 5 ns. While the design D2
has 8 stages each with 3 ns execution time.
ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
:9: Pre GATE Question Paper

31. Consider a system with n – CPU’s (n > 1) 33. If the determinant of n × n matrix is zero,
and ‘z’ processes. (z < n). The maximum then
number of processes that can be in the (A) rank(A)  n – 2
running & block states are respectively. (B) trace of A is zero
(C) zero is an eigen value of A
(A) n & z – n (D) X = 0 is the only Solution of AX = 0
(B) z & z
(C) n & z Ans: (C)
(D) n & n - z
Sol: If det(An×n) = 0 then zero is an eigen value
of A. Since det(A) = product of eigen
Ans: (B)
values.
Sol: Since the number of processes are less than
the number of CPU’s hence all can be
running state. In a situation sometimes all 34. Let B = {2, 3, 6, 9, 12, 18, 24} and let
can be blocked. A = B × B. Define the following relation

32. Consider a System with n–processes on A: (a, b) R(c, d) if and only if


arriving at time zero. Scheduling overhead {a | c and b  d} Then R is _____.
is ‘s’ seconds. Using Round Robin CPU S1) reflexive and symmetric
Scheduling what must be the value of time S2) antisymmetric and transitive
quantum ‘q’ such that each process is S3) an equivalence relation
guaranteed to gets its turn on the CPU in S4) a partial order relation
its subsequent run exactly twice within ‘t’ Which of the following is true?
sec (inclusive)? (A) S1 and S3 are true
(B) S2 and S4 are true
t t  ns
(A) (B) (C) S1, S3 and S4 are true
2n n (D) Only S4 is true
t  ns t  ns
(C) (D)
n 1 2n  2 Ans: (B)
Sol:
Ans: (D) We have a | a and b  b
Sol: Within duration ‘t’ , if each process gets  (a, b) R(a, b)
exactly once, then the total C.S overhead is Let (a, b) R(c, d)  (c, d)℟(a, b)
ns.  R is not symmetric
t – ns time is shared between (n – 1)
Let (a, b) R(c, d) and (c, d)R(a, b)
 t  ns 
processes; hence 1 of   allow  a = c and b = d
2  n 1   (a, b) = (c, d)
each process to get the same.  R is antisymmetric
Let (a, b) R(c, d) and (c, d) R(e,f)
 {a | c and b  d} and {c | e and df}
 {a | e and b  f}

ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
: 10 : CSIT

 (a, b) R (e, f) Two Marks Question (Q36 – 65)


 R is transitive
Hence R is a partial order 36. A k-array heap is like a binary heap, but

35. Messages are transmitted over a instead of two children, nodes have
communication channel using two signals. k-children. A k-array heap can be
The transmission of one signal requires 1 represented in a one-dimensional array as
microsecond and the transmission of the follows. The root is kept in A[1], its ‘k’
other signal requires two microseconds.
children are kept inorder in A[2] through
The recurrence relation for the number of
A[k+1], their children are kept inorder in
different messages consisting of sequences
of these two signals (where each signal is A[k+2] through A[k2+k+1] and so on.
immediate followed by the next signal) In 4-array heap, to what index does the 2nd
that can be send in n microseconds (n2) is child of 3rd index node map _______.
_____.
(A) an = an–1 + an–2 Ans: 11
(B) an = an–1 + 2an–2 Sol:
1
(C) an = 2an–1 + an–2
(D) an = an–1 + an–3
2
Ans: (A) 3
4 5
Sol:
Let an = number of different messages that
6 7 8 9 10 11
can be sent in n microseconds. 12 13 14 15 16 17 18 19 20 21

Case(i): If the first signal required one From the above 4-array tree, we can see
microsecond, then the remaining part of index of 2nd child of 3rd index node is 11.
the message can be sent in an–1 ways.
37. Consider the following two transactions
Case(ii): If the first signal require 2
microseconds, then the remaining part of T1: R(A) W(A) R(B) W(B)
the message can be sent in an–2 ways. T2: R(A) W(A) R(B) W(B)
These two cases are mutually exclusive How many interleavings of these
and exhaustive. transactions are conflict serializable?
 By sum rule, the recurrence relation is
Ans: 12
an = an–1 + an–2.
Sol: For serial schedule T1  T2
R1(A) W1(A) R1(B) W1(B) R2(A) W2(A)
R2(B) W2(B)

ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
: 11 : Pre GATE Question Paper

The operation which are underlined (which n 1


are not conflict operations) can be j= ;
2
interleaved in for(num = 1; num < = n * n ; num++)
(2  2)! {
=6
2! 2! a[i][j] = num;
For serial schedule T2  T1 i++;
j– –;
R2 (A) W2 (A) R2 (B) W2 (B) R1 (A) if (num%n = = 0)
W1 (A) R1 (B) W1 (B) {
The operations which are underlined i – = 2;
(which are not conflict operations) can be j++;
interleaved in }
(2  2)! else if (i = = n)
=6 i = 0;
2! 2!
else if (j = = – 1)
Total 6 + 6 = 12 j = n – 1;
}
38. Consider a system using demand paging }
with a page size of 1000 words. Disk If the above program if we give input value
n = 3, then what is sum of elements of
access time for a page is 100 ms. Memory every row of matrix is _______.
cycle time is 10 s. It requires 1 s to
access current page and an additional 3 s Ans: 15
to access other than the current one of the Sol: If we give input n = 3 then we can fill the
matrix as follows
instructions accessed, 10% accessed other
than the current one of the instructions 2 9 4
accessed other than the current one 20% 7 5 3
6 1 8
were not in memory.The effective memory
access time (approximately) is Sum of elements of every row = 15
____________s.
2

Ans: 2000
40. 2
| 1  x 4 | dx  __________.

Sol: E.M.A.T= 0.9 × 1 s


+ 0.1 (0.8 × 4 s + 0.2 × 100 ms) Ans: 12
~ 2 ms = 2000 s 2 2
Sol:  2
| 1  x 4 | dx  2 | 1  x 4 | dx
0

39. # include<stdio.h> ( | 1  x 4 | is even function)


int main( )
{ 0
1
  2
= 2{ 1  x 4 dx   1  x 4 dx}
1
 
int a[3][3], i, j, n, num; = 12
printf(“Enter value of n(odd value):”);
scanf(“%d”, &n);
i = n –1;
ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
: 12 : CSIT

41. An 8 way set Associative cache memory How big would the window size (in
unit with a capacity of 32 kB is built using packets) have to be for the channel
a block size of 8 words. The word length is
16 bits. The size of the physical Address utilization to be greater than 80% is
space is 16 GB. The number of bits in tag _______.
field is _________.
Ans: 1706 – 1707
Ans: 22 Sol: Bandwidth-delay product
Sol: Associativity = 8 = 512  106  40  10–3 = 2048  104 bits.
Size of cache memory = 215 B 80% utilization,
Size of a Block = 8 × 2 B = 16 Bytes
= 24 Bytes it is 2048  104  0.8 = 16384  103.
Number of blocks in cache memory = 211
16384  10 3
Size of main memory = 234 B Number of packets   1707
Number of blocks in main memory = 230 1200  8
Number of sets in cache memory = 211/8
= 28
230 44. Certain CPU uses expanding Opcode. It
28 2 22 has 32 bit instructions with 8 bit
Number of Tag bits = log 2 = log 2 = 22
Addresses. It supports One Address and
42. If a simple graph G has 2 connected Two Address instructions only. If there are
components with 6 vertices and 8 vertices ‘n’ Two Address instructions; The
respectively, then maximum number of maximum number of one Address
edges possible in G is _______. instruction is:
(A) (28 – n) × 28 (B) (216 – n) × 216
16 8
Ans: 43 (C) (2 – n) × 2 (D) (224 – n) × 28
Sol: Maximum number of edges possible in a
connected component with 6 vertices Ans: (C)
= C(6, 2) = 15. Sol: Max number of 2 Address instructions is
Maximum number of edges possible in a 216.
connected component with 8 vertices
= C(8, 2) = 28 Opcode A1 A2

Maximum number of edges possible in 16 8 8


G = 15 +28 = 43 32

But is uses ‘n’ only; so, remaining free


43. Suppose host A is sending a large file to
combinations (216 – n) are left for one
host B over a TCP connection. The two
Address instructions.
end hosts are 20 msec apart connected by a
 Max number of Address instructions to
512 Mbps link. Assume that they are using
be formulated: (216 – n) × 28
a packet size of 1200 bytes to transmit the
file. Assume Ack packets are small and
ignored.

ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
: 13 : Pre GATE Question Paper

45. # include<stdio.h> 47. A fair coin is tossed until one of the two
int main( ) sides occurs twice in a row. The
{ probability that the number of tosses
char arr[15]; required is even is ________.
arr = “ACEHYDERABAD”; 2 1
printf(“%d”, arr); (A) (B)
3 3
return 0; 1
} (C) (D) None
2
What will be output of above program?
Ans: (A)
(A) ACEHYDERABAD
Sol: A = {HH, HTHH, HTHTHH, ..........}
(B) A
B = {TT, THTT, THTHTT, ............}
(C) NULL
1 1
(D) Compilation ERROR. P(A) = & P(B) =
3 3
2
Ans: (D) P(A or B) =
Sol: Compilation Error: L value Required 3
Array name is constant pointer and we can
not assign any value in constant datatype 48. The intermediate form of a + b * c is given
after declaration. below in triples, quadruples, postfix, trees
& DAGs choose the correct answer.
46. It is at present not known if a polynomial
(A) + (B) ab +c *
time complexity algorithm exists for
integer factorization. Let p represent this a *
statement being true if no algorithm exists.
b c
Consider the language
 a  b * if p is true
(C) 1. (*, b, c) (D) 1. (+, b, c, T1)

 
L   ww R | w  a  b  if p is false
*
2. (+, a, (1)) 2.(*, a, T1, T2)
 
 w  w R | w  a  b * if p is undecidable

(A) is a DAG & not a tree
Choose the correct answer:
(B) is an erroneous representation as * has
(A) L is recursive but not a cfl
a higher precedence than +
(B) L is r.e. but not recursive
(C) The triple representation (C) is useful
(C) L is undecidable
so for optimization of expressions
(D) L is always a cfl
(D) This quadruple representation is not
optimized
Ans: (D)
Sol: Regardless of p, L is always a cfl.
Ans: (C)
Sol: The triples representation makes it easy to
detect common sub expression.

ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
: 14 : CSIT

49. Consider two formal languages 51. The area bounded by the curve
y = x4 – 2x3 + x2 + 3, the x-axis and two
L & L1 = L  {}. It is given that L is  - ordinates corresponding to the points of
free. Let L2=L1  L2. Which of the minimum of this function is;
1 91
following statements is true? (A) (B)
30 30
(A) If L is regular then L2 is always  758 728
recursive (C) (D)
480 480
(B) If L is a cfl then L2 is always recursive
(C) L1, L2 can never be recursive but L Ans: (B)
may be recursive Sol: y = 0  4x3 – 6 x2 + 2x = 0
(D) L, L1 & L2 can possibly be all r.e. & 1
recursive  x = 0, , 1 are stationary points
2
2
Ans: (C) y = 12x – 12x + 2
Sol: A recursive set cannot contain .  y(x) has min at x = 0 & x = 1
 Required Area
50. Consider the following concurrent
processes ‘i’, ‘k’ and ‘l’.
1

=  x 4  2x 3  x 2  3 dx 
0
91
30

S,T and Z are Binary Semaphores
initialized as follows : 52. The Chained matrix product problem is
B Sem S = 1, T = 0, Z = 0
defined as follows:
Process i : Process k: Process l : Given ‘n’ matrices M1, M2, ....... Mn, the
{ { {
while (1) P (T); P (Z); dimensions of the matrices are given by a
{ V(Z); V(S); vector d[0....n] such that the matrix Mi,
P(S); } }
print (‘*’); 1  i  n is of dimension di–1×di. We build
V(T);
} the table mij diagonal by diagonal:
}
The Maximum & Minimum number of diagonal ‘s’ contains the elements m ij such
times ‘*’ gets printed is ____ & ______; that j–i = s. Where mij represents the

(A) 3 and 3 (B) 2 and 1 minimum number of scalar multiplications


(C) 2 and 2 (D) 3 and 1 required to compute matrix product
M1, M2 , ...... Mj.
Ans: (C)
Sol: Process i Can get blocked ; An incomplete recursive definition for the
Process k & Process l are completable; function mij is given below:
Process k gets woken up by Process i ;
mi,j = 0 , if s = 0 and i = 1, 2, 3, ......n
Process l by Process k .
mi , i+1 = di–1 × di ×di+1 , if s = 1 and

ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
: 15 : Pre GATE Question Paper

i = 1, 2, 3, .....n–1 Ans: (D)


Sol: only option(D) satisfies all conditions.
mi , i+s = expr , if 1 < s < n and
tr(A) = –1 – 2 + 3 = 0,
i = 1, 2, 3, .....n–s ; det(A) = (–1) (–2) (3) = 6
The eigen values of (A+I) are 4, –1, 0
Which one of the following options is
det(A + I) = 0
correct for expr?
1
(A) min (mik + mk+1, i + s + di–1 ×dk× di+s) 54. If the probability of hitting a target is
i  k i s 5
(B) min mik  m k 1, i  s  d i 1  d k 1  d i  s  and if 10 shots are fired, what is the
i k  is
conditional probability that the target being
(C) min mik  m k ,i  s  d i 1  d k  d i  s  hit atleast twice assuming that atleast one
(D) min mik  m k ,i  s  d i 1  d k  d i  s 
i k  is
hit is already scored?
i  k  is
(A) 0.6999 (B) 0.624
(C) 0.892 (D) 0.268
Ans : (A)
Sol: Ans: (A)
When s > 1, the diagonal ‘s’ contains the P x  2 
Sol: P(x  2| x  1) =
elements mi,i+s corresponding to the Px  1
1  q n  npq n 1
products of the form Mi , Mi+1....... Mi+s. =
1 qn
We can make the first cut in the product 10 9
4  1  4 
after any of the matrices Mi, Mi+1, ....... 1     10  
= 5  5  5 
Mi+s–1. If we make the cut after Mk 4
10

1  
i  k < i + s. We need mik scalar 5
= 0.6999
multiplications to calculate left hand term
mk+1, i+s to calculate the right hand term and 55. Let S be a non empty set and P(S) is power
set of S.
then di–1×dk ×di+s to multiply the two
A binary operation * on P(S) is defined by
resulting matrices to obtain final result. A*B=AB
 min mik  m k 1,i  s  d i 1  d k  d i  s 
= Symmetric difference of A and B
i  k i s Now, P(S) with respect to * is ______.
(A) a semi group but not a monoid
53. Let A be a 3 × 3 matrix with real entries
(B) a monoid but not a group
(C) a group
such that det(A) = 6 and tr(A) = 0. (D) not a semi group
If det(A+I) = 0, where I denotes the 3 × 3
matrix. The eigen values of A are______. Ans: (C)
(A) –1, 2, 3 (B) –1, 2, –3 Sol: A  B = (A–B)  (B–A)
(C) 1, 2, –3 (D) –1, –2, 3 we have A  B  P(S)  A, B  P(S)
 * is a closed operation

ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
: 16 : CSIT

We have (A  B)  C = A  (B  C) Transmission Time (x) = 1000/R


 * is associative on P(S) A → B: 3 frames transmission takes 50
we have, A   = A  A  P(S) msec,
  is identity element in P(S) w.r.t. *. B → C one frame takes 10 + x msec
We have, A  A =   A  P(S)
 30 + 3x = 50  3x = 20
 For each element of P(S), inverse
 x = 6.66 msec
exists, because inverse of A=A  A P(S).
R = 1000/6.66 = 150 kbps
 (P(S), *) is a group.
57. In a new number system; x and y are
56. In the following figure successive digits such that (xy)r = 2510 and
4000 km 1000 km (yx)r = 3110; x, y and r values respectively
A B C
are.
(A) 4, 3, 7 (B) 3, 4, 7
Frames are generated at node A and sent to (C) 7, 4, 3 (D) 7, 3, 4
node C through node B. Determine the
minimum transmission rate required Ans: (B)
Sol: xr + y = 25, yr + x = 31 and y = x + 1 from
between nodes B and C. So that buffers at
these expressions; x = 3, y = 4 and r = 7.
node B are not flooded based on the
following. 58. Let ‘G’ be an undirected connected graph
The data rate between A and B is 100 kbps with distinct edge weight. Let ‘C’ be any
and propagation delay is 5 sec/km for cycle and let ‘f’ be the max cost edge
both lines. All frames are 1000 bits long,
belonging to ‘C’. Let ‘S’ be any subset of
Ack’s negligible size. Between A and B, a
vertices and let ‘e’ be the min cost edge
Sliding window protocol is used with
with exactly one end point in ‘S’. Then
window size of 3 frames and between B
and C a stop-and wait is used. which of the following statements is/are
(A) 200 kbps (B) 50kbps TRUE : -
(C) 100 kbps (D) 120 kbps
I. MST of ‘G’ does not contain ‘f ’.
II. MST of ‘G’ contains ‘e’.
Ans: (B)
Sol: A → B: propagation time = 4000  5 sec (A) Only I
= 20 msec (B) Only II
Transmission time = 1000/100  103 (C) Both I and II
= 10 msec (D) Neither I nor II

B → C: Propagation Time = 1000  5 sec


= 5 msec

ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
: 17 : Pre GATE Question Paper

Ans: (C)
Product
Sol:
Pid Pname
S 98 Detol
A f G
99 Lux
B e F 100 Colgate
C E H

D
T*
Which of the following queries not returns
the customer names, who purchase all
products?
I. TRUE
 Suppose ‘f’ belongs to T* (A) Select Cname
 Deleting ‘f’ from T* disconnects T* and From customer
let ‘s’ be one side of cut. Where Cid = all (select Cid from
 Some other edge in cycle ‘C’ say ‘e’ has purchase
exactly one end point in S Where Pid = all (select Pid from
 T = T*  {e} – {f} is also a spanning product));
Tree. (B) Select Cname
Since Ce < Cf so cost(T) < cost(T*) From customer
Which is contradictory to minimality of Where not exists (select Pid from
T* product)
minus
II. TRUE (select Pid from product
Suppose ‘e’ does not belong to T* where customer.Cid = Purchase.Pid)
Adding ‘e’ to T* creates a(unique) cycle (C) Select Cname
‘C’ in T* From customer
Some other edge in cycle ‘C’, say ‘f’ has Where (select Pid from purchase where
exactly one end point in ‘s’ customer.Cid = purchase.Cid) contains
T = T* {e}–f is also spanning Tree and (select Pid from product)
since Ce < Cf (D) None
So,cost(T) < cost(T*)
Which is contridicts minimality of T*. Ans: (A)
Sol: Each inner query in option (A) returns
59. Consider following table of data more than one value and = all (many
values) returns false. The query results in
Customers
Purchase error.
Cid Cname
Cid Pid
1 Kumar
1 98 60. Which of the following statements is/are
2 Rahul true?
2 99
3 Sita S1) In a lattice L, if each element has
1 100
3 100 atmost one complement, then L is a
1 99 distributive lattice
3 98 S2) A sub lattice of a complemented lattice
is also complemented.
Which of the following is true?

ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
: 18 : CSIT

(A) S1 is true and S2 is false Sol: If f(x) is probability density function, then

 f x  dx  1
(B) S1 is false and S2 is true
(C) Both S1 and S2 are true 
 
(D) Both S1 and S2 are false
 f x  dx =  2 x e x dx  1
2

 0

Ans: (D)  f(x) is a probability density function


Sol:
S1 is false 62. A binary min heap consisting of integers is
Proof by counter example: implemented using array A[1....n] in which
For the lattice shown below root node is stored at A[1] and locations
A[1] through A[n] store the ‘n’ integer
values in the heap. The minimum number
of comparisons required to find maximum
element in a min heap of 99 elements .
Each element has atmost one complement, (A) 98 (B) 49
but the lattice is not distributive. (C) 48 (D) 99
 S1 is false.
Ans : (B)
For the lattice shown below. n 
Sol: It requires    1 comparisons to find
e e 2
d c maximum element of ‘n’ elements in
binary heap.
a
 99 
The lattice is complemented. But the sub So, it will take    1 = 49 comparisons.
lattice {a, c, e} is not complemented. 2
 S2 is false
63. A binary search tree contains the values
61. Which of the following is the probability 11, 12, 13, 14, 15, 16, 17, 18. The tree is
density function of a random variable X? traversed in pre-order and the values are
x 2  x , 0  x  2
printed out. Which of the following
(A) f x    sequence is valid out?
0 , else where (A) 15 13 11 12 14 17 18 16
2 xe  x ,  1  x  1 (B) 15 13 11 12 16 14 18 17
2

(B) f x    (C) 15 13 12 14 11 16 17 18
0 , else where (D) 15 13 11 12 14 17 16 18
x 1  x , 0  x  1
(C) f x    Ans: (D)
0 , else where
Sol: In the given list of outputs 15 is appearing
2 x e  x , x  0
2

(D) f x    as first one. It will be root. 11, 12, 13, 14


0 , else where should be left side of 15 and 16, 17 and 18
should be right side of 15.

Ans: (D)
ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati
: 19 : Pre GATE Question Paper

64. Consider a system with n–processes and a 65. Consider the following sets over a finite
single resource ‘R’ each process Pi is
alphabet
assigned ‘xi’ copies of ‘R’ and further
requests ‘yi’ copies of ‘R’ at time t, there S1: Descriptions of all LR(0) grammars
are two processes a & b whose requests is
S2: Descriptions of all LR(1) grammars
zero. Further, ‘K’ copies of ‘R’ are free
available at time ‘t’. System is said to be S3: Descriptions of all SLR(1) grammars
not approaching deadlock if the minimum
S4: Description of all LL(1) grammars
need of process request is satisfiable.
Which condition indicates that system is S5: Description of all operator grammars
not approaching deadlock?
S6: Description of all LALR(1) grammars

(A) x a  y b 
max
j  a, b
y  j
Choose the correct answers:

(A) S2 is properly included in S1


(B) x a  yb  K 
max
j  a, b
y j  (B) S3 and S2 are incomparable
(C) S6 is included in S3
min (D) S1, S4 & S5 are incomparable
(C) x a  y b  K  y i 
i  a, b
Ans: (D)
min
(D) x a  y b  K  y i  Sol: The operator grammar can be ambiguous
i  a, b where as LL & LR grammars are
incomparable. The LR(0) & LL(1)
Ans: (C) grammars are incomparable.
Sol: Completing a & b releases their resources
and hence total becomes (z + ya + yb) with
which we can satisfy the need of the
process having least request.

ACE Engineering Academy Hyderabad |Delhi |Bhopal |Pune |Bhubaneswar |Bengaluru |Lucknow |Patna |Chennai | Vijayawada |Visakhapatnam | Tirupati

Potrebbero piacerti anche