Recurrence Relation - 1
Duration: 27 min
This video lesson is available to enrolled students.
Inside: a video lesson and guided study material.
Module outline
- Discrete Mathematics: Set Theory, Relations, Functions, Graph Theory, Group Theory, Propositional and Predicate Logic
- DataBase Management System/DBMS: Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, File Organization & Indexing, Relational Algebra, SQL, Relational Calculus, Transaction Management, Concurrency Control
- Digital Electronics: Digital Systems & Boolean Basics, Logic Gates & Hardware, Boolean Expression, Boolean Minimization, Combinational Circuit, Sequential Circuits, Number System, Number Representation
- Computer Architecture: Floating Point Rep, Cache Memory Organization, Input Output Organisation, Pipelining, Instr Formats & Modes, Control Unit Design
- Operating System: Introduction to OS, Process Management, CPU Scheduling, Process Synchronization, Threads & Process Creation, Deadlock, Memory Management, Virtual Memory, Disc Scheduling, File Management
- C Language: C Fundamentals, Control Flow, Functions, Arrays & Pointers, Storage Classes, Structures & Enums, DMA, Macros, Scoping & File Handling
- Data Structures: Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing
- Algorithms: Algorithm Analysis, Time Complexity Analysis, Sorting Algorithms, Greedy Algorithms, Dynamic Programming, Minimum Spanning Trees, Shortest Path Algos
- Computer Networks: Introduction to CN, DLL: Access Control, DLL: Flow Control, DLL: Error Control, DLL: Framing, Data Link Layer - Ethernet, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Net Layer:Routing Protocol, Transport Layer Services, TL: Congestion & UDP, Application Layer, Hardware Basics
- Theory Of Computation/Automata Theory: Introduction to TOC, Deterministic FA (DFA), Non-Deterministic FA, Regular Expressions, Grammar, Regular Language Properties, Moore & Mealy Machines, Pushdown Automata & CFG, Turing Machines, Complexity Theory
- Compiler Design: Intro to Compilers, Lexical Analysis, Grammar & CFG, Syntax Analysis: Top-Down, Syntax Analysis: Bottom-Up, Semantic Analysis & SDT, Intermediate Code Gen, Code Optimization, Run Time Environment
- Engineering Mathematics: Permutation and Combination, Linear Algebra, Calculus, Probability, Statistics
- General Aptitude: Ratio and Proportion (Ratios), Divisibility Rules, Data Interpretation, Logarithm, Number System, HCF LCM, Sequence and Series (Series), Speed Time and Distance, Series (Number and Letter Series) (Numerical Relations and Reasoning), Coding Decoding, Data Sufficiency, Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning), Percentage, Mensuration and Geometry, Mental Ability, Arithmetic, Profit and Loss, Powers and Exponents (Surds and Indices), Average, Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Syllogisms, Venn Diagram, Seating Arrangements, Blood Relations, Directions (Direction Test), Analogy, Algebra, Time and Work, Analytical Reasoning (Counting Figures Reasoning), Puzzle Solving (Puzzles), Cubes & Dices, Ranking, Order and Sequence, Mixture and Alligation, Age Problems, Clock, Selection Decision Table (Decision Making), Data Arrangement
- English (Verbal Aptitude): Vocabulary, Noun, Subject Verb Agreement (Verb Noun Agreement), Adjectives, Tenses, Pronoun, Preposition, Direct and Indirect Speech, Sentence Re-arrangements (Para Jumbles) (Narrative Sequencing), Sentence Completion (Fill in the blanks), Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions), Sentence Correction (Error Correction), Verbal Analogy (Word Based Analogy), Conjunction, Interjection, Verb, Articles, Adverb, Modals, Sentence Construction
- Live Classes Recordings(Earlier Batch): GATE 2026 Live Class
- Full Mock Test:
- Previous Year Papers:
- GATE 2026 Counselling: Counselling and Guidance Sessions
AI summary & chapters
AI Summary
An AI-generated summary of this video lecture.
This lecture introduces the Recursion Tree Method for analyzing divide-and-conquer recurrence relations, using T(n) = 4T(n/2) + Θ(n²) as the central example. The instructor first identifies the number of subproblems (a = 4) and the problem size reduction factor (n/2), then constructs a tree level by level: root T(n), four children T(n/2), sixteen grandchildren T(n/4), and so on. At each level k, there are 4^k subproblems of size n/2^k, and the non-recursive work per level is 4^k · (n/2^k)² = n², which is constant across levels. The tree has log₂n + 1 levels because the base case n ≤ 1 is reached when n/2^k = 1, i.e., k = log₂n. Summing the constant n² work over all levels gives T(n) = O(n² log n). The lecture emphasizes the general pattern: count subproblems, track problem size, compute per-level cost, identify number of levels via logarithms, and sum. This corresponds to the critical case (case 2) of the Master Theorem where f(n) = Θ(n^(log_b a)).
Chapters
0:00 – 2:00 00:00-02:00
The lecture opens with the heading '2. Recursion Tree Method' and poses the question: find the time complexity of T(n) = 1 if n ≤ 1, and 4T(n/2) + Θ(n²) if n > 1. The instructor writes T(m) at the top of a tree and draws four branches downward, beginning the recursion tree. Pink arrows annotate the recurrence to identify '# Subproblem' (the coefficient 4) and 'Problem Size' (n/2), establishing the two key parameters needed to build the tree.
2:00 – 5:00 02:00-05:00
The instructor constructs the first levels of the recursion tree. The root is labeled T(n), and it branches into four children each labeled T(n/2). He continues expanding to show the second level with nodes T(n/4), illustrating that each node produces four subproblems of half the size. The annotations '# Sub Problem' and 'Problem Size' remain visible, reinforcing that a = 4 subproblems are generated at each step with size reduced by factor 2.
5:00 – 10:00 05:00-10:00
The tree is expanded further to show the general pattern at depth k. The instructor writes T(n/2^k) for the leaf nodes at level k, showing that after k levels of recursion, each subproblem has size n/2^k. The visible nodes include T(n/2), T(n/4), and T(n/8) at successive levels, demonstrating the halving of problem size. The base case condition 'if n ≤ 1' is referenced to determine when the recursion stops, which occurs when n/2^k = 1.
10:00 – 15:00 10:00-15:00
Green annotations appear on the left side of the board labeling the number of nodes at each level: 4^0 = 1 at the root, 4^1 = 4 at level one, and 4^2 = 16 at level two. The instructor explains that the number of subproblems multiplies by a = 4 at each level, while the problem size divides by b = 2. The general form for level k is established: there are a^k = 4^k subproblems, each of size n/b^k = n/2^k. This systematic labeling prepares for computing the total work at each level.
15:00 – 20:00 15:00-20:00
The instructor calculates the total work at each level by multiplying the number of subproblems by the cost per subproblem. At level k, the work is 4^k · (n/2^k)² = 4^k · n²/4^k = n². This shows that the work per level is constant (n²) regardless of depth, because the increase in subproblem count exactly cancels the decrease in individual problem size. The instructor points to this cancellation as a key insight, and references the base case 'if n ≤ 1' to determine the total number of levels.
20:00 – 25:00 20:00-25:00
The number of levels is determined by setting the subproblem size equal to 1: n/2^k = 1, which gives k = log₂n. The instructor writes 'log₂n = k' on the board, indicating that the tree has log₂n + 1 levels (from level 0 to level log₂n). The total work is then the sum of n² over all levels, which equals n² · (log₂n + 1). The instructor simplifies this to O(n² log n), noting that the constant factor and lower-order terms are absorbed in Big-O notation.
25:00 – 26:43 25:00-26:43
The final derivation is summarized on the board. The recurrence T(n) = 4T(n/2) + n² is expanded, and the per-level cost is shown as 4^k · (n/2^k)² = n². The total is written as the sum of n² repeated log₂n times, yielding T(n) = n² + n²·log₂n = O(n² log n). The instructor emphasizes that this is the critical case where f(n) matches n^(log_b a), and the log factor arises from summing equal costs across all levels. The result O(n² log n) is the final answer to the original question.
The lecture systematically applies the Recursion Tree Method to T(n) = 4T(n/2) + Θ(n²). The method proceeds in five steps: (1) identify a = 4 subproblems and b = 2 size reduction from the recurrence; (2) build the tree level by level, with a^k = 4^k nodes at depth k; (3) compute the cost per level as a^k · f(n/b^k) = 4^k · (n/2^k)² = n², showing constant per-level work; (4) determine the number of levels by solving n/2^k = 1, giving k = log₂n; (5) sum the per-level costs over all levels to obtain T(n) = O(n² log n). The central insight is the cancellation between increasing subproblem count and decreasing individual size, which produces equal work at every level. This corresponds to the Master Theorem's case 2 (critical case) where f(n) = Θ(n^(log_b a)) with log₂4 = 2. The lecture emphasizes that the logarithmic factor in the final complexity comes from the number of levels, not from any single level's cost.