-
121.
last reply by CpjJwWHV • 14 years ago • asked in Computer Science And Engineering, 2010
View Comments [2 Reply]
-
122.
last reply by CpjJwWHV • 14 years ago • asked in Computer Science And Engineering, 2010
View Comments [2 Reply]
-
123.
Consider a binary max-heap implemented using an array.
[1] Which one of the following array represents a binary max- heap? [2 marks]
(A) {25, 12, 16, 13, 10, 8, 14
(B) {25, 14, 13, 16, 10, 8, 12}
(C) {25, 14, 16, 13, 10, 8, 12}
(D) {25, 14, 12, 13, 10, 8, 16}[2] Which is the content of the array after two delete operations on the correct answer to the previous question? [2 marks]
(A) {14, 13, 12, 10, 8}
(B) {14, 12, 13, 8, 10}
(C) {14, 13, 8, 12, 10}
(D) {14, 13, 12, 8, 10}last reply by CpjJwWHV • 12 years ago • asked in Computer Science And Engineering, 2009
View Comments [3 Reply]
-
124.
Frames of 1000 bits are sent over a 106 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 (within the link).
[1] What is the minimum number of bits (L) that will required to represent the sequence numbers distinctly? Assume that no time gap needs to be given between transmission of two frames. [2 marks]
(A) L= 2
(B) L= 3
(C) L= 4
(D) L= 5[2] Suppose that the sliding window protocol is used with the sender window size of 2l where l is the number of bits identified in the earlier part & acknowledgments are always piggy backed. After sending 2l 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). [2 marks]
(A) 16 ms
(B) 18 ms
(C) 20 ms
(D) 22 msasked in Computer Science And Engineering, 2009
View Comments [0 Reply]
-
125.
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)[1] 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? [2 marks]
(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
[2] Assume that, in the suppliers relation above, each supplier and each street within a city has a unique name, and (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? [2 marks]
(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 2NFlast reply by CpjJwWHV • 13 years ago • asked in Computer Science And Engineering, 2009
View Comments [1 Reply]
-
126.
A sub-sequence of a given sequence is just the given sequence with some elements (possibly none or all) left out. We are given two sequences X[m] and Y[n] of lengths m & n, respectively ,with indexes of X an Y starting from 0.
[1] We wish to find the length of the longest common sub-sequence (LCS) of X[m] & Y[n] as l(m,n), where an incomplete recursive definition for the function l(i,j) to compute the length of the LCS of X[m] & Y[n] is given below:
l(i,j)=0, if either i=0 or j=0
=expr1,if i,j>0 and x[i-1]=y[j-1]
= expr2,if i,j>0 and x[i-1]y[j-1]
Which one of the following option is correct? [2 marks]
(A) expr1= l(i-1,j)+1
(B) expr1= l(i,j-1)
(C) expr2=max(l(i-1,j),l(i,j-1))
(D) expr2=max(l(i-1,j-1),l(i,j))
[2] The values of (i,j)could be obtained by dynamic programming based on the correct recursive definition of (i,j) of the form given above ,using an array L[M,N],where M=m+1 & N=n+1,such that L[,j]= l(i,j ).
Which one of the following statements would be TRUE regarding the dynamic programming solution for the recursive definition of the l(i,j)? [2 marks]
(A) All elements of L should be initialized to 0 for the values of l(i,j) to be properly computed.
(B) The values of l(i,j) may be computed in a row major order or column major order of L[M,N]
(C) The values of l(i,j) cannot be computed in either row major order or column major order of L[M,N]
(D) L[p,q] needs to be computed before L[r,s] if either p<r or q<s
last reply by CpjJwWHV • 12 years ago • asked in Computer Science And Engineering, 2009
View Comments [1 Reply]