A. | x3-x-1=0 |
B. | x3+x-1=0 |
C. | x2-x-1=0 |
D. | x2+x-1=0 |
Option: C Explanation : Click on Discuss to view users comments. |
The solution of recurrence relation,
T(n) = 2T(floor (√n) ) + log n is
A. |
O(n log log logn)
|
B. |
O(n log logn)
|
C. | O(log log n) |
D. | O(log n log logn) |
Option: B Explanation : Click on Discuss to view users comments. |
In any n-element heap, the number of nodes of height h is
A. | less then equal to [n/2h] |
B. | greater then [n/2h] |
C. | greater then [n / 2h+1 ] |
D. | less then equal to [n / 2h+1 ] |
|
A data file of 1,00,000 , characters contains only the characters g-1, with the frequencies as indicated in table :
|
g |
h |
i |
j |
k |
l |
Frequency in Thousand |
45 |
13 |
12 |
16 |
9 |
5 |
A. |
2,52,000 bits
|
||||||||||||||
B. |
2,64,000 bits
|
||||||||||||||
C. |
2,46,000 bits
|
||||||||||||||
D. | 2,24,000 bits |
||||||||||||||
Option: D Explanation :
Question is incomplete . In this we need an additional field as follows
Now according to Huffman coding algorithem
A data file of 100,000 characters contains only the characters g-l , with the frequencies indicated. If we assign each character a 3-bit codeword, we can encode the le in 300,000 bits. Using the variablelength code shown, we can encode the fi le in only 224,000 bits.
Click on Discuss to view users comments. |
A vertex cover of an undirected graph G(V, E) is a subset V1 ⊆ V vertices such that
A. | Each pair of vertices in V, is connected by an edge |
B. | If (u, v) ∈ E then u ε V1 and v ⊂ V1 |
C. | If (u, v) ∈ E then u ∈ V1 or v ∈ V1 |
D. | All pairs of vertices in V1 are not connected by an edge |
Option: C Explanation : Click on Discuss to view users comments. |