CS 2009 - WordPress.com

advertisement
CS – 2009
Q.1
(A)
For group to be hold:
(1) * Should be closed.
(2) * Should be associative
(3) Existence of identity
(4) Existence of inverse for every element
And for cumulative Group:
(1) * should be commutative so commutative is not necessarily for only Group.
Q.2
(A)
A graph is bipartite graph if and only if does not contain any odd length cycle. The chromatic
number of any bipartite graph is 2.
Q.3
(B)
Since the graph is connected it can not have a vertex of degree ‘0’ and since the graph is simple
(no self loops, parallel edges) it can not have degree more than n – 1. Since every vertex can have a degree
between 1 and n – 1 which forces at least 2 vertices to have same degree apply ( pigon hole principle)
For ex:-
Q.4
(D)
A = { x, y, z}
R = {( x, y) (x, z) (z, x) (z, y)}
R is not symmetric as it violates the definition of symmetric. A relation is said to be symmetric if (x, y)  R if
and only if (y, x)  R for all (x , y)  R
Here (x, y)  R but (y, x ) does not belong to R
Similarly it is not ant symmetric it violate the definition of anti symmetric. one symmetric pair belong to
Relation.
Here (x, z)  R and (z, x)  R
Q.5
(B)
(1217)8
Take option first
(A)
(1217)16
=
(1  83 + 2 × 82 + 1 × 81 + 7)10
(655)10
=
So (1217)8  (4631)10
Take second option
(B)
(028F)16
=
So (1217)8 = (028F)16
(1  163 + 2 × 162 + 1 × 161 + 7)10
(4631)10
(0  163 + 2 × 162 + 8 × 16 + 15)10
(655)10
Q.6
(B)
(A B + C) =(A + C) (B + C)
Q.7
Memory capacity = 256 K byte
= 256  8 K bits
Using Ram capacity = 32 K  1 K bits
So number of chips =
Q.8
256×8×1024
32×1×1024
= 64
So Ans. Should be 64.
(C)
By checking the interrupt register after finishing the execution of the current instruction.
Q.9
(A)
Be lady’s anomaly may occur in FIFO replacement policy for allocating the N frame or N + 1
frame for the same reference string, Number of page fault increase in allocating N + 1 frames.
Q.10 (B)
Page table is a linear array indexed by virtual page number that gives the physical page frame that
contains the page.
Q.11 (A)
Number of swap required to sort(n) element using selection sort is 0(n), in each pass there can be one
swap at most so for n element n swap in the worst case.
Q.12 (B)
All the production of S starts and ends with the same symbol. So it generates all palindromes and
terminal productions of S contain a single terminal, so all the string generated by s are of odd length so it
generates of all odd length palindrome.
Ex: S  asa  absba  ababa
S  bsb basab  babab
L = {aba, bab, a, b, aaaaa, babab…….}
Q.13 (B)
The algorithm identifies a negative weights cycle if it is reachable from source vertex. Only Q is correct,
P is wrong.
Q.14 (C)
A  NP – Class
if A  NP – Hard
So then it is in NP – complete
Q.15 (C)
Q.16 (D)
The set of all the string contains at least two 0’s
Minimum length string generator by expression is  00
a, b, c are true option
Q.17 (B)
False option is d
Power of NPDA is more than DPDA so we can not convert NPDA to DPDA.
P – Regular expression – Lexical Analysis
Q – Push down Automata – Syntax Analysis
R – Data flow Analysis – Code optimization
S – Register Allocation – Code generation.
Q.18 (B)
Q.19 (A)
Content Coupling
Common Coupling
Control Coupling
Stamp Coupling
Data Coupling
So I – II – III – IV – V
Q.20 (C)
Q.21 (B)
P(odd) = 0.9  P(Even)
P(Even) = 1 – P(Odd)
= 1 - 0.99  P(Even)
1.9P(Even) = 1
P(Even) = 1/1.9
= 0.5263
Probability that the face is even greater than 3 is
4,6
P(4,5,6) = 0.75
P(4, 6) = 0.5263  2/3
= 0.351
So
𝑃(4,6)
0.75
0.351
0.75
= P( 4, 5, 6)
= P(4, 5, 6)
= P(4, 5, 6) = 0.468
Where P(4, 5, 6) is the probability that the face value exceeds 3.
Q.22 (C)
From a given table
a  a = a (Identity)
b  b = a (Identity)
c  c = c2 = b
c3 = c  c2 = c  b = d
c4 = c  c3 = c  d = a (Identity)
d  d = d2 = b
d3 = d  d2 = d  b = c
d4 = d  d3 = d  c = a (identity)
So c and d are the generator of the group, because it can generate or all the element of the group.
Q.23 (D)
x((G(x) v S(x))  P(X)
Q.24 (B)
K – Map for Binary operation
Take option one by one
First option
 P  Q =  P V (Q)
=  PVQ
Not equivalent to PVQ
Second option
P Q = P V  (Q)
=PVQ
Equivalent so correct option (B)
Q.25 (D)
1−𝑡𝑎𝑛𝑥
1+𝑡𝑎𝑛𝑥
𝑐𝑜𝑠𝑥−𝑠𝑖𝑛𝑥
𝑑𝑥 = 𝑐𝑜𝑠𝑥+𝑠𝑖𝑛𝑥 𝑑𝑥
Cos x + Sinx = t
(–Sinx + Cosx )dx =dt

⁄4 1
So ∫0
𝑑𝑡 = [𝑙𝑛𝑡]40
𝑡

4
=[𝑙𝑛(𝑠𝑖𝑛𝑥 + 𝑐𝑜𝑠𝑥)]0


= ln (sin4 + cos4 ) = ln (
Q.26 (B)
1
√2
1
1
√2
2
+ )=
x(Px)
(II)
x(Px)
x(Px)
x(Px)
So clearly I and IV are equivalent.
(I)
ln2
(III)
x(Px)
x(Px)
(IV)
x(P(x))
Q.27 (A)
If I take the input string 101 then (0, 0) state on ‘1’ goes to (0, 1) and state (0,1) on ‘0’ goes to (1, 0) and (1, 0) on
1 goes to (0,1) with output ‘1’ so minimum length is 3.
Q.28 (D)
Loop will execute 2 time so number of cycle.
For the first itration it takes 15 cycle here it is not defined when new instruction I1 will be fetch after the
computation of I4, so we will check by both either fetch I1 at clock cycle 9th or after computation of I4 clock
cycle 16th.
Fetching in 9th cycle takes total 26 cycle or fetching in 16th cycle takes total 15 + 15 = 30 cycle
So correct option will be 30.
Q.29 (D)
4 – way set associative cache
Number of block = 16
Number of set =
16
4
=4
Set number = (Block Number) Mod (Number of set)
Cache organization look like this
Q.30 (A)
R1
3
R2
2
R3
3
R4
2
Here no process in deadlock but processes have to wait for Resources. So all process finish without any
deadlock.
Q.31 (B)
Request in the order:
4, 34, 10, 7, 19, 73, 2, 15, 6, 20
0
2
4
6
7
10
15
19
20
34
50
73
99
Therefore the total time taken to service the entire request is 06
16 + 14 + 1 + 4 + 5 + 3 + 1 + 2 + 2 + 71 = 119 Ans
Q.32 (C)
As the process making transitions from running state to blocked and ready state this OS is using
preemptive scheduling.
So II and III.
Q.33 (A)
Hardware implementation of wait and signal operation using test and set method is deadlock tree and not
starvation free.
So only I is correct.
Q.34 (B)
𝑛
Q.35 (A)
T(n) = T( 3) + Cn
Apply master method.
f(n) = Cn
1
𝑎
𝑛𝑙𝑜𝑔𝑏 = 𝑛𝑙𝑜𝑔3 = 𝑛0 = 1
𝑎
Q.36 (C)
F(n) > 𝑛𝑙𝑜𝑔𝑏
So,
(f(n) 𝑙𝑜𝑔𝐾𝑛 )
Here f(n) = Cn
K=0
So complexity = (Cn)
=  (n)
Hash function h(k) = K mod 10
Keys are 12, 18, 13, 2, 3, 23, 5, 15
Q.37 (B)
Q.38 (D)
Q.39 (B)
The function of height n(d) in AVL tree is:
n(d) = n(d – 1) + n(d – 2) + 1
n(2) = n(2– 1) + n(2 – 2) + 1
= n (1) + n(0) + 1
We know that n(0) = 1
n(1) = 2
n(2) = 1 + 2 + 1 = 4
n(3) = n (2) + n(1) + 1
=4+2+1=7
So height of the tree = 3 with 7 node
Weight of edge (a, c) in less than (b, c) so it can not come after (b, c).
Recurrence Relation for Quick sort
𝑛
3𝑛
T(n) = T( 4) + T( 4 ) + n
There exist algorithms which can find the median of array in 0(n) sort.
So complexity will be (nlogn) by solving Recurrence relation by tree Method.
Q.40 (C)
L1 = {ambmcanbn m, n ≥ 0}
it is CFL
L2 = {aibjck i, j, k ≥ 0}
it is regular.
So L = L1nL2
= { aabbc, abc, aaabbbc……}
= {ambmc}
L is not Regular but it is context free.
Q.41 (C)
(A) False, 01 not accepted by DFA
(B) False, 10 not accepted or 0 not accepted by DFA
(C) True,
(D) False, 1001 not accepted by DFA
So correct option (C)
Q.42 (B)
I. True, CYK algorithm whose complexity is less than (𝑛3 )
II. False
III. False
IV. True
So correct option is I and IV
0
1
2
3
Q.43 (B)
So S2 and S3 are conflict serializable
Q.44 (B)
Order of B+ tree = 3
So maximum number of key in a node = 2
Q.45 (B)
Q.46 (B)
Q.47 (A)
Each Sequence number is generated once per ms.
Sequence number generated per second= 1000
Packet life time= 64 seconds
It means if at time ‘t’ a packet/seq.no is generated..It can exist for next 64 seconds…
(i.e. termination time= t+64 seconds)
If each new sequence number is generated after 64 seconds, (which implies no two sequence numbers/packets are
active at the same time..) Then sequence number increases once per 64 seconds.
Hence the minimum rate at which sequence number can increase= 1/64 seconds
= 0.015625 per second.
.
Q.48 (C)
For to detect odd number of bits in error the generator polynomial used for CRC checking is
divisible of (1+x)
Q.49 (D)
(i) True
(ii) True
(iii) True
(iv) False, There exists at least one process between two data base or two external entity.
Q.50 (B)
Q.51 (C)
Group of track forms cylinders
1000 cylinder it means 1000 tracks
1 surface contain 63  1000 sector.
Every surface contain 10  2 = 20 surface
The address of < 400, 16, 29> ={C  No. of surface + n}  Number of Sector + S
Where C = Cylinder, h = Surface Number and S = Sector Number.
={400, 16, 29} = (400  20 + 16 )  63 + 29 = 505037
Q.52 (C)
<0, 16, 31> = { 0  20 + 16}  63 + 31 = 1039
Q.53 (C)
exp1= l(i-1,j-1) + 1
exp2= max{l(i-1,j) , l(I,j-1)}
Q.54 (B)
Q.55 (A)
Find the name of all suppliers who have supplied a non – blue part.
Q.56 (A)
No other functional dependency are implied other than those implied by primary and candidate key
which means there exist on partial function dependency no transitive dependency so given Data base satisfied
BCNF property.
Q.57 (D)
L = 1000 bits
R = 106 bps.
tp = 25 ms.
So to maximally pack then in transit until the last bit of the frame is not reached to the destination. So in
that case
wtx = tp
w
w
Q.58 (C)
Q.59 (C)
1000
= 25  10−3
106
1000×1000
106
= 25
 w = 25
= 2𝑛−1 = 25
=n=5
So correct option (D)
RTT = 2tx + 2tp
= 2  1 + 50
= 52 ms
𝑙
w = 2 = 25 = 32 frames
to send one frame it takes 1 ms.
So to send 32 frame it takes 32 ms.
Then min time the sender will have to wait = 52 – 32 = 20 ms.
25,
14,
16,
13,
12,
8,
Q.60 (D)
After deletion of 25
After deletion of 16
12
So level order traverse of max – heap
14,
13,
12,
8,
10
Download