(A) True
(B) False
(C) NA
(D) NA
Tag: Fundamentals of Algorithms
The codeword assigned to characters by the Huffman algorithm have the property that no codeword is the postfix of any other?
(A) True
(B) False
(C) NA
(D) NA
Huffman algorithm uses a greedy approach to generate a postfix code T that minimizes the expected length B (T) of the encoded string?
(A) True
(B) False
(C) NA
(D) NA
Suppose we have three items as shown in the following table, and suppose the capacity of the knapsack is 50 i.e. W = 50. Item Value Weight 1 60 10 2 100 20 3 120 30 The optimal solution is to pick?
(A) Items 1 and 2
(B) Items 1 and 3
(C) Items 2 and 3
(D) None of these
The Knapsack problem belongs to the domain of __ problems.
(A) Optimization
(B) NP Complete
(C) Linear Solution
(D) Sorting
For Chain Matrix Multiplication we can not use divide and conquer approach because?
(A) We do not know the optimum k
(B) We use divide and conquer for sorting only
(C) We can easily perform it in linear time
(D) Size of data is not given
A p x q matrix A can be multiplied with a q x r matrix B. The result will be a p x r matrix C. There are (p . R) total entries in C and each takes __ to compute.
(A) O (q)
(B) O (1)
(C) O (n^2)
(D) O (n^3)
If there are O (n^2) entries in edit distance matrix then the total running time is __.
(A) O (1)
(B) O (n^2)
(C) O (n)
(D) O (n log n)