PREVIOUS YEAR SOLVED PAPERS - August 2016 Paper 3

31. Consider the problem of a chain < A1, A2, A3, A4> of four matrices. Suppose that the dimensions of the matrices A1, A2, A3 and A4 are 30 × 35, 35 × 15, 15 × 5 and 5 × 10 respectively. The minimum number of scalar multiplications needed to compute the product A1A2A3A4 is ____.

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


32. Consider a hash table of size m = 10000, and the hash function h(K) = floor (m(KA mod 1)) for A = ( √(5) – 1)/2. The key 123456 is mapped to location ______.

  • Option : B
  • Explanation :
    Given hash function: h(K) = floor (m (K*A mod 1)) where A = ( √(5) – 1)/2
    h(123456) = floor(10000 * (123456 * (√5 − 1) / 2) mod 1)
    = floor(10000 * (76300.004115 mod 1)
    = floor(10000 * (.004115))
    = 41.15
    = 41
    So, option (B) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


33. Consider a weighted complete graph G on the vertex set {ν1, ν2, .... νn} such that the weight of the edge (νi, νj) is 4 | i – j|. The weight of minimum cost spanning tree of G is :

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


34. A priority queue is implemented as a max-heap. Initially, it has five elements. The level-order traversal of the heap is as follows:
20, 18, 15, 13, 12
Two new elements ‘10’ and ‘17’ are inserted in the heap in that order. The level-order traversal of the heap after the insertion of the element is:

  • Option : D
  • Explanation :
    Initially we have:

    When we insert 10 and 17:

    We have to maintain max-heap, so:

    The level-order traversal of the heap after the insertion of the element is 20, 18, 17, 13, 12, 10, 15 So, option (D) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


35. If there are n integers to sort, each integer has d digits, and each digit is in the set {1, 2, ..., k}, radix sort can sort the numbers in:

  • Option : B
  • Explanation :
    If there are n integers to sort, each integer has d digits, and each digit is in the set {1, 2, ..., k}, radix sort can sort the numbers in O(d (n + k)). For more information Refer:Radix Sort Option (B) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


Related Quiz.
August 2016 Paper 3