Skip to main content

Posts

Showing posts with the label The Crazy Programmer Master’s Theorem Explained with Examples Master’s Theorem Explained with Examples The Crazy Programmer

Master’s Theorem Explained with Examples Vijay Sinha The Crazy Programmer

In this article, we will have a look at the famous Master’s Theorem. This is very useful when it comes to the Design and analysis of Algorithms following Divide and Conquer Technique. We will cover the theorem with its working and look at some examples related to it. Master’s Theorem is Used For? Master’s Method is functional in providing the solutions in Asymptotic Terms (Time Complexity) for Recurrence Relations. In simpler terms, it is an efficient and faster way in providing tight bound or time complexity without having to expand the relation. However, it is mainly responsible for Recurrence Relations based on Divide and Conquer Technique. Recurrence Relation is basically an equation where the next term of a function is dependent on its previous terms. We will have a look at it with some examples. The Theorem is applicable for relations of the form: T(n) = a T( n/b ) + f(n) where a>=1, b>1. Let us look at each term, here: n -> Indicates the Size of Problem. a