IGNOU MCA · INDEPENDENT PRACTICE

MCS-211 algorithms diagnostic

Try seven original problems and get a revision order based on your answers. Free to start, with your progress saved on this device.

T(n) = 2T(n/2) + n

What is the cost of each level in this recurrence tree?

Work through a recurrence

Assume T(1) = 1 and that n is a power of two. At level k, there are 2k subproblems of size n / 2k. What does that tell you about the cost of a non-leaf level?

Reveal the solution

Multiply the number of subproblems by their size. The cost is n at every non-leaf level. There are log₂ n such levels and n unit-cost leaves. The total is Θ(n log n).

Topics in this sample

  • Recurrences and fractional knapsack
  • Topological sort and Huffman coding
  • Floyd–Warshall and string matching
  • Vertex-cover approximation

See the official course list and syllabus scope. IGNOU MCA_NEW course descriptions

Studying with classmates?

Share this diagnostic so everyone can find their own revision topics.