In the name of ALLAH, the most beneficient, the most merciful

Fundamentals of Algorithms (CS502)

Multiple Choice Questions (MCQs)

Objective Questions

  1. Chain matrix multiplication problem can be solved through ________ strategy.

    1. Dynamic programming
    2. Greedy
    3. Divide and conquer
    4. Sorting
  2. Counting sort assumes that the numbers to be sorted are in the range ________.

    1. k to n where n is large
    2. 1 to k where k is small
    3. k to n where k is small
    4. k to n where n is small
  3. In Dynamic Programming approach, we do not store the solution to each sub-problem in case if it reappears.

    1. True
    2. False
  4. In Dynamic Programming, our approach is to ________.

    1. Develop the solution in a top-down fashion
    2. Express the problem non-recursively
    3. Build the solution in a bottom-up fashion
    4. Input several sub-problems simultaneously
  5. Heap sort is a/an ________ and ________ sorting algorithm.

    1. Not in-place, not stable one
    2. In-place, stable one
    3. In-place, not stable one
    4. Not in-place, stable one
  6. If there are Θ (n2) entries in edit distance matrix then each entry E (i, j) takes ________ time to compute.

    1. Θ (n)
    2. Θ (n2)
    3. Θ (1)
    4. Θ (n log n)
  7. Radix sort is not a non-comparative integer sorting algorithm.

    1. True
    2. False
  8. Dynamic Programming is a problem-solving approach in which ________.

    1. Problem is solved in Zero time
    2. Solution is developed only at final stage
    3. Both are correct
    4. Both are incorrect
  9. Consider three matrices X, Y, Z of dimensions 1 × 2, 2 × 3, 3 × 4 respectively. The number of multiplications of X(YZ) is:

    1. 16
    2. 23
    3. 26
    4. 32
  10. We can use the optimal substructure property to devise a ________ formulation of the edit distance problem.

    1. Selective
    2. Optimum
    3. Iterative
    4. Recursive