Dynamic Programming on Trees with Heavy-Light Decomposition and Matrix Multiplication
Weighted Independent Set with Point Updates on a Tree
Consider a rooted tree where every node carries a weight. We must support point-weight modifications and after each change report the maximum-weight independent set of the entire tree. Node count and operation count are up to (10^5), weights are bounded in absolute value by (10^2).
Standard ...
Posted on Tue, 11 Aug 2026 16:21:13 +0000 by verano
Advanced Tree Algorithms and Dynamic Programming Techniques
Weighted Path Distribution via Greedy DFS
When distributing a fixed number of routes across a rooted tree, an optimal strategy balances load evenly before allocating surplus paths based on subtree potential. The algorithm performs a depth-first traversal where each node divides incoming routes equally among its children. The remainder is assign ...
Posted on Sat, 08 Aug 2026 16:53:19 +0000 by Garcia
Heavy-Light Decomposition for Tree Operations
Heavy-Light Decomposition (HLD) is a powerful technique that partitions a rooted tree into a set of disjoint paths (chains). This transformation allows for efficient range-based operations (like updates and queries) on tree structures by mapping the nodes into a linear array using a Segment Tree.
Core Definitions
Heavy Edge: An edge connecting ...
Posted on Sun, 07 Jun 2026 17:42:18 +0000 by asunsha