- Meeting 24 : Wed, Sep 10, 09:00 am-09:50 am
References | |
Exercises | |
Reading | |
Greedy strategies for optimization problems. Interval scheduling problem. Five heuristic greedy strategies. Counter examples for claim of optimality for four of them. The need of a formal proof for the "earliest finishing task first" strategy.
References: | Section 4.1 in [KT]
|
- Meeting 25 : Thu, Sep 11, 12:00 pm-12:50 pm
References | |
Exercises | |
Reading | |
Correctness proof details - Greedy stays ahead. Discussion on implementation.
References: | Section 4.1 in [KT]
|
- Meeting 26 : Mon, Sep 15, 11:00 am-11:50 am
References | |
Exercises | |
Reading | |
Single source shortest path. Greedy stays ahead. Dijkstra's algorithm. Greedy stays ahead strategy - the loop invariant.
References: | Section 4.2 in [KT]
|
- Meeting 27 : Tue, Sep 16, 10:00 am-10:50 am
References | |
Exercises | |
Reading | |
Analysis of Dijkstra's Algorithm using improved implementations. Implementation of priority queue, the required operations. Simple implementations. Cost analysis.
References: | Section 4.2 in [KT]
|
- Meeting 28 : Wed, Sep 17, 09:00 am-09:50 am
References | |
Exercises | |
Reading | |
Heaps. Almost full binary trees with heap property. Array representation. Heapify procedure. Analysis of Heapify procedure.
References: | Section 6.1 and 6.2 of [CLRS]
|
- Meeting 29 : Thu, Sep 18, 12:00 pm-12:50 pm
References | |
Exercises | |
Reading | |
Tutorial 2 (Based on problem sheets 3 and 4)
- Meeting 30 : Mon, Sep 22, 11:00 am-11:50 am
References | |
Exercises | |
Reading | |
Implemetation Details of Maxheaps - Analysis of Buildheap, Extract-min, Decrease Key. Motivation to do better on Decrease key operation.
References: | Section 6.3 and 6.5 in [CLRS]
|
- Meeting 31 : Tue, Sep 23, 10:00 am-10:50 am
References | |
Exercises | |
Reading | |
Strategy to do better implementation for decrease-key operations. Introduction to amortization. Example of bit increments in a binary counter. Stack with Multipop example.
References: | Section 16.1 in [CLRS]
|
- Meeting 32 : Wed, Sep 24, 09:00 am-09:50 am
References | |
Exercises | |
Reading | |
Accounting Method of amortized analysis. Applying to the binary counter, and the multistack example.
References: | Section 16.2 in [CLRS]
|
- Meeting 33 : Sat, Sep 27, 09:00 am-10:15 am
References | |
Exercises | |
Reading | |
Potential Method for amortized analysis. Applying for the binary counter, multistack, array doubling and the binary heap example.
References: | Section 16.3 in [CLRS]
|
- Meeting 34 : Mon, Sep 29, 11:00 am-11:50 am
References | |
Exercises | |
Reading | |
Fibonacci Heaps - Basic ideas, examples. Insert and Union. Implementation Details.
References: | [CLRS] Slides shared with class.
|
- Meeting 35 : Tue, Sep 30, 10:00 am-10:50 am
References | |
Exercises | |
Reading | |
Fibonacci Heaps - Extract min. Potential function. Analysis of extract min.
References: | [CLRS]. Slides shared with class.
|
- Meeting 36 : Wed, Oct 01, 09:00 am-09:50 am
References | |
Exercises | |
Reading | |
Fibonacci Heaps - Decrease Key. Analysis of Decrease Key.
References: | [CLRS] Slides shared with class.
|
- Meeting 37 : Mon, Oct 06, 11:00 am-11:50 am
References | |
Exercises | |
Reading | |
Proof of degree bounds in Fib heaps.
Minimal Spanning Tree Problem. Problem definition and discussion.
References: | [CLRS] Slides shared with class.
|
- Meeting 38 : Tue, Oct 07, 10:00 am-10:50 am
References | |
Exercises | |
Reading | |
Is the MST unique? Glimpse of an "exchange argument" to prove that if all edge weights are distinct, then MST must be unique.
Approaches towards MST problem. The idea of growing and MST from scratch. Safe edges to add. When is an edge safe to add?
References: | [E] Section 7.1, 7.2
|
- Meeting 39 : Wed, Oct 08, 09:00 am-09:50 am
References | |
Exercises | |
Reading | |
Lightest cut edges are always safe. All safe edges must be a part of any MST. Exchange argument in action.
So we can add all safe edges and recurse - Boruvka's Algorithm. Different ways of moving towards MST. Kruskal's Algorithm and Prim's Algorithm.
References: | [E] Section 7.1, 7.2 and [KT] section 4.5
|
- Meeting 40 : Thu, Oct 09, 12:00 pm-12:50 pm
References | |
Exercises | |
Reading | |
Tutorial 3
- Meeting 41 : Mon, Oct 13, 11:00 am-11:50 am
References | |
Exercises | |
Reading | |
Spectrum of MST Algorithms via the cut property and the cycle property. Implementing Prim's Algorithm. Using Binary heaps and then Fib heaps.
References: | [E] Section 7.1, 7.2 and [KT] section 4.5
|
- Meeting 42 : Tue, Oct 14, 10:00 am-10:50 am
References | |
Exercises | |
Reading | |
Implemeting Kruskal's Algorithm. Union-Find Data structure. Array implementation. Amortized analysis. MAKESET in O(1), FIND in O(1), UNION in O(log k) amortized over k unions.
References: | [KT] section 4.6
|
- Meeting 43 : Wed, Oct 15, 09:00 am-09:50 am
References | |
Exercises | |
Reading | |
Union by rank implementation. Rank based analysis. MAKESET in O(1), UNION in O(1), FIND in O(log n) worst case analysis.
References: | [DPV] Section 5.1.4
|
- Meeting 44 : Thu, Oct 16, 12:00 pm-12:50 pm
References | |
Exercises | |
Reading | |
Union by rank and path compression. Implementation of path compression. Examples. Properties being preserved.
References: | [DPV] Section 5.1.4
|
- Meeting 45 : Tue, Oct 21, 10:00 am-10:50 am
References | |
Exercises | |
Reading | |
Analysis to prove that MAKESET in O(1), UNION in O(1), FIND in O(log* n) amortized cost. Pocket money argument based on the rank interval.
References: | [DPV] Section 5.1.4
|
- Meeting 46 : Wed, Oct 22, 09:00 am-09:50 am
References | |
Exercises | |
Reading | |
Huffman coding problem. The greedy algorithm. Greedy-choice correctness property via an exchange argument. Optimal substructure property.