Gate Preparation Tips
Gate Preparation Tips
15 14
Signbit
8 7
'\
'\
0024
(c)
4807
Q.2
{d) 4030
0; if n = 0
T(n) =
1; if n = 1
T(n- 1) + T(n- 2) + 1;otherwise
What is time complexity of the above recurrence relation if dynamic programming and topdown approach is used to solve recurrence?
{a)
{b) O{nlogn)
0(2n)
{d) O(nn)
(c) O(n)
Q.3
(a)
(b)
(c)
(d)
Q.4
Given a recurrence
relation:
T(n) = 2T
(.Jn) + log2 n
1/15
https://www.goog ledrive.comlhosti083u-1
QNuWetzQl9EMmmdUFIZDAlpapers/1_que_basic_cs.html.html
5i2ill14
Q.5
{
int i;
if (n <= 1)
return;
for (i = 1; i < n; i++)
printf ("*");
function (0.8 n);
}
(a) O(n)
(b) O(n2)
(c)
O(n3)
Q.6
Q.7
Given
(d) O{nlogn)
(a) NP
(b) NPH
(c) NFC
A mealy machine has m states for n-length input alphabet. If k-length input string run on the
mealy machine, what is the output length produced by the machine?
(a) m
(b) n
(c) k
Q.8
Which of the following is the correct output for the 'C' program given below?
# include < stdio.h>
int main()
{
int arr [3]
char *p;
= {2, 3, 4};
p = (char*) arr;
printf ("%d", *p);
p = p+ 1;
pr intf ("%d \ n", *p);
return O;
}
(a) 2
3
(c) 1
O
(b) 2 0
{d) Garbage values
2/15
Q.9
The Probability of sucess in a Slotted aloha is 0.368 (exactly one frame ina slot) then the
probability of failure can be treated as
Q.10 A Network with three routers uses distance vector routing. The distance table for router A <0 1
4>. Router A receives from B the vec tor <1 0 2>. the updated distance table for router A is _
(<a, b, C> vec tor specifies a is distance to A, b is distance to B and c is distance to C)
(a) < O 3 2 >
(b) < O 2 2 >
(c) < 0 1 2 >
(d) None of these
Q.11 t-or a 8-bit processor, the maximum possible number of self dualfunctio ns equals
to (a) (16)8
(b) (16)16
(c) (16)32
(d) (16)64
Q.12 Process
No. 1
2
3
4
Q.13 Let f: A
S1 :
S2 :
B and g: B
(a) 81 only
(c) 81 and
82
(b) S2 only
(d) None of these
311
5
512@14
Q.15 If IP1 = 210.15.131.141and subnet mask = 255.255.255.224. Calculate the last host of last
Subnet? (a) 210.15.131.202
(b) 210.15.131.162
(c) 210.15.131.222
(d) None of these
Q.16 To avoid the RACE condition, the maximum number of processes that may be simultaneously
inside the critical section is
(b) Two
(d) None of the above
B+C
b
c e
(c) s
AB
(b) E
E+ F
Fle
Q.19 Consider a system with 2 level caches. Access times of level 1 cache, level 2 cache and
main memory are 1 ns, 1Ons and 500 ns respectively. The hit rates of level 1 and level 2
caches are 0.8 and 0.9 respectively. What is the average access time (in ns) of the system
ignoring the search time within the cache?
Q.20 The productivity for a project of 24 KLOC was found to be 12 LOC/prog-ammer-day. If there
were 10 programmers employed for the project and they worked 20 days in amonth, find
the number of months required to complete the project.
https:/liMMN.googIedrive.comlhostAlBBu1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
411
5
Q.21 A complete n-ary tree is a tree in which eachnode has n children or no children. LetIbe the
number of interrial nodes and L be the no. of leaf nodes in a complete tree.
If L = 61 and I= 20, what is the value of n?
Q.22 We have two designs 01 and 02 for a synchronous pipeline processor. 01 has 5 pipeline
stages with execution times of 3 nsec, 2 nsec, 4 nsec, 2 nsec and 3 nsec, while the design
02 has 8 pipeline stages each with 2 nsec execut ion time. How much time (in ns) can be
saved using design 02 over design 0 1 for executing 100 instructions?
Q.23 Number of state in a DFA to accept the language L = {w lna(w) mod 4 = 2 and nb(w) mod 5 = 4)
.
(n8(w) denotes the number of a's in string w)
Q.24 What is the output of the following
program? main( )
{
int i=-1, j=-1, k=O, /=2, m;
m=i++&&j++&&k++llJ++;
printf ("%d %d %d %d %d", i, j, k, /, m);
Q.25 Consider the three relations R 1(A.B.C).R2(.C,D.E) and R3(E,F). All candidate keys are singleton
and candidate keys for every relation is under lined. Given that R1 contains 200 rows. R 2
contains 300 rows and R3 contains 100 rows. Find the number of tuples in R 11><1 R2 1><1 R3.
Multiple Choice Questions :Q.26 to Q. 38 carry 2 marks
each
(a) oo
(c) 1
.
hm
cos x
X""'1t f 2 (
x-
1t)
2
(b) 0
(d}
00
Q.27 For what values of aand B. the following simultaneous equations have an infinite number of
solutions? x + y + z = 5
x + 3y + 3z = 9
x + 2y + az = B
(a) 2,
7
https:fliMMN.googIedrive.comlhostAlBBu-1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
511
5
(c) 8,
3
(b} 3, 8
(d) 7, 2
https:fliMMN.googIedrive.comlhostAlBBu-1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
511
5
Q.28
10
6
1
What is the throughp ut of the system using FCFS scheduling (approx imately).
(a) 0.285
(b) 0.385
(c) 0.185
(d) 0.085
Q.29 Consider the below program to synchronize the two processes P0 and P 1 .
'1'}// I
II for P0 it is U, for P1 it is
process
h int
d ot erp1 .d
= 1-rnyp1 ;
bl
f h
oca vana es o t e
1
Iturn = otherpid;I
Which of the following is
satisfied?
Q.31 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
(c) 1/2
(a)
1/3
https:/liMMN.googIedrive.comlhostAlBBu1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
611
5
512@14
(b) 3/7
(d) 4/7
https:/liMMN.googIedrive.comlhostAlBBu1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
611
5
(a) 0.8731
(c) 0.1034
(b) 0.7468
(d) 0.1561
[(3x)A(x) /\ 3x B(x)]
(Vy)(3x) O(x, y)
(b) A2 only
AaB IBbAIB
Bc ld
Q.35 How many permutations are there of the following string "VERYEASYEXAM "?
12!
(a) 3!
(b)
(C) 12 I
(d) 11 !
11!
2!
Q.36 Let R be a relation defined on Z where aRb means that a + b2 = 0 (mod 2). Then R is
(a) Equivalence relation
(c) Both (a) and (b)
https:/liMMN.googIedrive.comlhostAlBBu-1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
711
5
512@14
Q.37 If q is the initial state and is the final state then the following transitions of TM can accept the
0
q1
language:
{q1,x, R)
8(q0,a)
8(q1, a)
8(q1, b)
8(q1, y)
8(q2, a)
8(q2, y)
(q1 ,a, R)
(q ,y, L)
2
(q1,y, R)
(q ,a,L)
2
(q ,y, L)
2
{q 0,x, R)
8(q2, x)
8(qo, y)
8(q3, 8)
(q3,y, R)
(q1, B,
R)
3. (r1 + r2)*
= (r * r *)*
1
(r1r )* = r1* r *
2
2
(a) 1, 2 and
4.
(c) 1 arn..l 3
(b) 1 and 4
(d) 1, 2, 3 arid 4
#incluoe<stdio.h>
main( )
{
char s[]={'a', 'b', 'c', '\n', 'c',\O'};
char *p, *str, *str 1;
p=&s[3];
str=p;
str 1=s;
printf("%d", ++*p + ++ *str 1-32);
Q.40 Find the minimum no.of multiplication required to multiply following matrixes
https:/liMMN.googIedrive.comlhostAlBBu1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
811
5
Q.41 Assuming that the tests are representa1ion of the operational situation, calculate the reliability
of a software system that has 10 errors in 200 test cases.
Q.43 Consider a relation R (C, S, E, I,T) with the following set of functional dependenc ies .
{T
E, SI
T}
Q.44 If delays are recorded as 8-bit numbers in a 20-routers network, and delay vectors are
exchanged once in a second.how much bandwidth per line (full duplex) is taken by
distance vector routing?
https:/liMMN.googIedrive.comlhostAlBBu-1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
911
5
Q.45 Consider a clocked sequential circuit as shown in the figure below.Assuming initial state to
be
For an input sequence X
01 00 = oo
1010, the respective output sequence w ill be
,._..
-0,f-----'
y
Clock
Eccentricity of a vertex: It is the distance ("distance" is the shortest path length) from a
vertex to the farthest away vertex in the graph.
[:. Here the shortest distance from g to j is 4 (g-e-h-i-j) and it is called eccentricity of g,
because 'j' is the farthest compared to any other vertex from 'g']. Find the diameter of the
above graph?
g
Q.47 Consider a system,which is using single level paging with the TLB. The time taken to
access the physical page is 70 ns when there is a TLB hit The TLB hit ratio is 95% and the
TLB access time is 20 ns. Then what is effective memory access time (EMAT in nsec)?
https:/liMMN.googIedrive.comlhostAlBBu1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
10/1
5
Code Segment
Segment 1:
2:
for (int(int
j =i =
O;O;
j <i <100;
10;
10; j++)
i++)
i++)
Numerical Data Type Questions :Q.48 to Q. 51 carry 2 marks
fo r each
(int j = O ; j < 100; j ++)
for
for
(int
=O;
0;
<
<A
10;
10;
i++)
Data
A [ (int
j ] Common
=ii =(i
* j)i +
[ ji++)
];Q. 48 and 49
A [j ]A
= (ifully
* j) assoc
+ A [ iative
j ];
cache of 50 bytes with - a LRU replacement policy has block size of 10
bytes. Assume cache is write - back and array A initially contain O's. [Each element of array
occupies 1 byte]. Consider the following code segments
Q.48 How many reads are done from the main memory to the cache when code segment 1 is
executed?
Numerical Data Type Questions :Q.48 to Q. 51 carry 2 marks
each
A fully assoc iative cache of 50 bytes with - a LRU replacement policy has block size of 10
bytes. Assume cache is write - back and array A initially contain O's. [Each element of array
occupies 1 byte]. Consider the following code segments:
Q.49 How many reads are done from the main memory to the cache when code segment 2 is
executed?
https:/liMMN.googIedrive.comlhostAlBBu-1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
11/1
5
512/Xl14
GAT
EEXA
M
RESERVES
STUD
ENT
GATEID
BNAME
SID GATEID
SNAME
EXAM
AGE
DATE
SUB
Vinod
101
28/2/14
12
101
CSE
DBMSof tuples produced by the
Q.
SO
Find
the25
number
15
101
28/2/14
102 Ravi
CE 33
SOM
following
SOL
query. Select S.SID, R.GATEID
16
25
102ME 32
1/3/14
TD
103 Arun
From STUDENT S Natural Left Outer Join RESERVES R
25
16 Gautam
103
2/3/14
28
27
23
12 Rahul
104
1/3/14
Common Data a.so and a.S1
Consider the fol lowing relations
ST
UD
EN
T
GAT
EEX
AM
RESERVES
SID GATEID
SNAME
AGE
EXAM
DATE
GATEI
BNAME
SUB
101CSE25
28/2/14
D12
101
DBMS
a.51Vinod
How many tuples will be in the result of the following
15
SOM
101CE 33
28/2/14
102 Ravi
16
TDalgebra expression? (STUDENT C><l (AGE 225
25
102ME
1/3/14
32
103 Arun
relational
25
16 Gautam
103
2/3/14
28
RESERVES C><l GATEEXAM)
27
23
12 Rahul
104 A STUDENT.31D=RESERVES.SID)
1/3/14
1211
5
512@14
Q.52 The minimal SOP expression for the feedback signal (Fb) willbe
(a) Tslo + Ts o + TsFw
TsFw + Ts Lo +Fwl...o +
Ts Lo
(d)
(c)
Q.53 If we realise the same logic circuit by using a 4 : 1 MUX as shown below
Do
o,
4:1
D2 MUX
D:i
s,
Fw
So
Lo
Then input data lines D0, D1, D2 and D3 will be respect ively
(a) (T8,
1,Ts,Ts)
(c) (T8, 1, 0,
Ts)
(b)
(1,0,Ts. 1)
https:/liMMN.googIedrive.comlhostAlBBu-1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
1311
5
(a) R is NP-complete
(b) R is NP-hard
(d) Q is NP-hard
(c) Q is NP-complete
Q.55 If R is also polynomial reduc ible to S then which of the following is true?
(a) R s NP but not NP-complete
(b) R is NP-complete
(c) R is P
(a) functions
(b} attempts
(c) measures
(d) issues
Q.57 If first nine multiples of five are multiplied together, then the number of zeros at the end of
the product are
(a) 4
(c) 9
(b) 10
(d) 7
Q.58 Choose the most appropriate word from the options given below to complete the following
sentence: Reality is often stranger than
(a) dream
_
(b} fancy
(c) fiction
(d} imagination
https:/liMMN.googIedrive.comlhostAlBBu1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
1411
5
Q.60 Which of the following options is the CLOSEST in meaning to the word below?
WEIRD
(a) Strange
(b) Erotic
(c) Vivid
(d) Docile
General Aptitude: Q. No.61 to Q. No.65 carry 2 marks
each
Q.61 If N = 1! + 3! + 5! + 71 ...................... 99! then remainder obtained when N is divided by 24 is
(a) 7
(b) 6
(c) 3
(d) 5
Q.62 The question below consists of a pair of related words followed by four pairs of words. Select
the pair that expresses best the relation in the original pair.
MEEK : TRACTABLE
(a) Obstinate :
(b) Mellifluous : Harsh
Rigid
(d) Doleful : Alone
(c) Shrewd : Rapid
lfJ
https:/liMMN.googIedrive.comlhostAlBBu-1QNuWel.zQ19EMmmdUFIZ DAlpapers/1_que_basic_cs.
html.html
1511
5