-
73.
A hash table of length 10 uses open addressing with hash function h(k) = k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown below.
0 1 2 42 3 23 4 34 5 52 6 46 7 33 8 9
[1] Which one of the following choices gives a possible order in which the key values could have been inserted in the table? [2 marks]
(A) 46, 42, 34, 52, 23, 33
(B) 34, 42, 23, 52, 33, 46
(C) 46, 34, 42, 23, 52, 33
(D) 42, 46, 33, 23, 34, 52[2] How many different insertion sequences of the key values using the same hash function and linear probing will result in the hash table shown above? [2 marks]
(A) 10
(B) 20
(C) 30
(D) 40last reply by CpjJwWHV • 14 years ago • asked in Computer Science And Engineering, 2010
View Comments [5 Reply]
-
74.
Consider a complete undirected graph with vertex set {0, 1, 2, 3, 4}. Entry Wij in
the matrix W below is the weight of the edge {i, j}.
[1] What is the minimum possible weight of a spanning tree T in this graph such that vertex 0 is a leaf node in the tree T? [2 marks]
(A) 7
(B) 8
(C) 9
(D) 10[2] What is the minimum possible weight of a path P from vertex 1 to vertex 2 in this graph such that P contains at most 3 edges? [2 marks]
(A) 7
(B) 8
(C) 9
(D) 10last reply by CpjJwWHV • 14 years ago • asked in Computer Science And Engineering, 2010
View Comments [3 Reply]
-
75.
A computer system has an L1 cache, an L2 cache, and a main memory unity connected as shown below. The block size in L1 cache is 4 words. The block size in L2 cache is 16 words. The memory access times are 2 nanoseconds, 20 nanoseconds and 200 nanoseconds for L1 cache, L2 cache and main memory unit respectively.
[1] When there is a miss in L1 cache and a hit in L2 cache, a block is transferred from L2 cache to L1 cache. What is the time taken for this transfer? [2 marks]
(A) 2 nanoseconds
(B) 20 nanoseconds
(C) 22 nanoseconds
(D) 88 nanoseconds[2] When there is a miss in both L1 cache and L2 cache, first a block is transferred from main memory to L2 cache, and then a block is transferred from L2 cache to L1 cache. What is the total time taken for these transfers? [2 marks]
(A) 222 nanoseconds
(B) 888 nanoseconds
(C) 902 nanoseconds
(D) 968 nanosecondslast reply by CpjJwWHV • 14 years ago • asked in Computer Science And Engineering, 2010
View Comments [1 Reply]
-
76.
last reply by CpjJwWHV • 14 years ago • asked in Computer Science And Engineering, 2010
View Comments [1 Reply]
-
77.
last reply by CpjJwWHV • 14 years ago • asked in Computer Science And Engineering, 2010
View Comments [1 Reply]
-
78.
The following program consists of 3 concurrent processes and 3 binary semaphores. The semaphores are initialized as S0=1, S1=0, S2=0.
Process P0 Process P1 Process P2 while (true) {
wait (S0) ;
print ‘0’ ;
release (S1) ;
release (S2) ;
}wait (S1) ;
release (S0) ;wait (S2) ;
release (S0) ;
(A) At least twice
(B) Exactly twice
(C) Exactly thrice
(D) Exactly once
last reply by CpjJwWHV • 13 years ago • asked in Computer Science And Engineering, 2010
View Comments [2 Reply]