This folder contains example DP formulas for the Tree DP Editor.
- subtree_size.txt - Calculate the size of each subtree
- subtree_sum.txt - Calculate the sum of values in each subtree
- max_independent_set.txt - Maximum Independent Set problem
- min_vertex_cover.txt - Minimum Vertex Cover problem
- tree_diameter.txt - Find the diameter of the tree
- sum_of_distances.txt - Sum of distances using rerooting DP
- tree_matching.txt - Maximum matching in a tree
- tree_coloring.txt - Tree coloring with k=3 colors
- longest_edge_path.txt - Longest path with edge weights
These examples can be loaded directly in the Tree DP Editor by selecting them from the "Examples..." dropdown menu.
You can also use these as templates to create your own DP formulas.