Search-tree recurrences and branching-vector bounds #
A branching algorithm that splits an instance of measure n into subproblems of measures at most
n - a₁, …, n - a_b (with positive integer decreases aᵢ > 0) generates a search tree whose size
is governed by the characteristic sum ∑ᵢ r ^ (-aᵢ) (Cslib.BranchingVector.charSum). Whenever
1 ≤ r satisfies charSum steps r ≤ 1, a recurrence satisfying
T n ≤ max C (∑_{d ∈ steps, d ≤ n} T (n - d)) at every n, with C ≥ 0, satisfies
T n ≤ C * r ^ n (Cslib.BranchingVector.BranchingRecurrence.le_mul_pow).
For explicit multi-way search trees (Cslib.BranchingVector.BranchingTree) where every non-leaf
expansion decreases measure by at least some sublist of steps and 1 ≤ r satisfies
charSum steps r ≤ 1:
- the number of leaves is at most
r ^ measure s(BranchingTree.leafCount_le_pow); - the total number of internal and leaf nodes is at most
(measure s + 1) * r ^ measure s(BranchingTree.nodeCount_le_mul_pow); - per-node overhead
nodeWork ≤ Wseparates multiplicatively asworkCost nodeWork s ≤ W * nodeCount sand(workCost nodeWork s : ℝ) ≤ W * (measure s + 1) * r ^ measure s(BranchingTree.workCost_le_mul_nodeCount,BranchingTree.workCost_le_mul_pow).
Closed-form branching factors are supplied for binary splits [1, 1] (r = 2), Fibonacci splits
[1, 2] (goldenBranchFactor = (1 + √5) / 2), and k-clause prefix splits [1, 2, …, k]
(prefixBranchFactor k = 2 - (1 / 2) ^ k < 2 for k ≥ 1).
Main definitions #
Cslib.BranchingVector.charSum: characteristic sum∑_{d ∈ steps} r ^ (-d).Cslib.BranchingVector.BranchingRecurrence: abstract positive-decrease search-tree recurrence.Cslib.BranchingVector.BranchingTree: terminating multi-way search tree with measure decreases, leaves, leaf/node counts, and per-node work cost.Cslib.BranchingVector.goldenBranchFactor,Cslib.BranchingVector.prefixSteps,Cslib.BranchingVector.prefixBranchFactor: closed-form branching vectors and factors.
Main results #
Cslib.BranchingVector.BranchingRecurrence.le_mul_pow,Cslib.BranchingVector.BranchingRecurrence.le_pow: genericr ^ nrecurrence upper bound.Cslib.BranchingVector.BranchingTree.leafCount_le_pow,Cslib.BranchingVector.BranchingTree.nodeCount_le_mul_pow,Cslib.BranchingVector.BranchingTree.workCost_le_mul_pow: search-tree leaf, node, and separated per-node work bounds.Cslib.BranchingVector.BranchingTree.iff_exists_leaf,Cslib.BranchingVector.BranchingTree.sum_leaves_eq,Cslib.BranchingVector.BranchingTree.le_sum_leaves: whole-tree predicate transport and additive or subadditive leaf aggregation.Cslib.BranchingVector.charSum_fibonacci,Cslib.BranchingVector.charSum_prefixSteps_le_one: closed-form[1, 2]and[1, …, k]bounds.
References #
Characteristic sums #
Generic branching-vector recurrence #
A recurrence inequality representing a tree of recursive calls where each call branching
on a node of size n spawns subproblems of size n - d for d ∈ steps.
The base cost is bounded by C.
Build a BranchingRecurrence directly from the self-referential inequality
T n ≤ max C (∑_{d ∈ steps, d ≤ n} T (n - d)) at every n.
Generic branching-vector theorem. If 1 ≤ r satisfies charSum steps r ≤ 1, then every
BranchingRecurrence T steps C satisfies T n ≤ C * r ^ n for all n.
Terminating multi-way search trees with separate per-node work #
A terminating multi-way search tree on states σ with integer measure measure and positive
step vector steps. Every non-leaf state s expands into children s whose measure drops dominate
some sublist of steps.
- isLeaf : σ → Bool
Whether a state is a leaf of the search tree.
- children : σ → List σ
Child states generated when expanding an internal state.
- measure : σ → ℕ
Nonnegative complexity measure decreasing along every branch.
Nominal branching vector of positive measure decreases.
Every entry of
stepsis strictly positive.
Ordered list of leaves reached from s in the search tree T.
Every state in T.leaves s is a leaf.
Number of leaves in the search tree rooted at s.
Total number of nodes (internal nodes plus leaves) in the search tree rooted at s.
Total work summed over all nodes of the search tree rooted at s for per-node cost
nodeWork.
Reachability of subtree states from s in T.
Every leaf in T.leaves s is reachable from s.
Whole-tree equivalence transport: if a property P is equivalent at every reachable internal
state to holding on at least one child, then P s holds iff P holds at some leaf in
T.leaves s.
Additive weights conserved at every reachable internal expansion sum over T.leaves s to their
root value w s.
Subadditive weights (w u ≤ ∑_{c ∈ children u} w c, as in covering rather than partitioning
branching rules) are bounded above by their sum over T.leaves s.
Search-tree node bound. If 1 ≤ r and charSum T.steps r ≤ 1, then the total number of
nodes (internal and leaf) in the search tree rooted at s is at most
(T.measure s + 1) * r ^ T.measure s.
Separating per-node overhead. If nodeWork u ≤ W at every state reachable from s, then
total tree work is at most W * T.nodeCount s.
Combined tree work bound. Per-node work ≤ W combined with charSum T.steps r ≤ 1
(1 ≤ r) bounds total tree work by W * (T.measure s + 1) * r ^ T.measure s.
Closed-form branching factors #
Golden-ratio Fibonacci branching factor (1 + √5) / 2 ≈ 1.6180 for [1, 2].
goldenBranchFactor < 2 (in fact < 5 / 3).
Fibonacci [1, 2] branching has exact characteristic sum 1 at goldenBranchFactor.
Prefix step vector [1, 2, …, k] arising from k-clause disjoint prefix branching.
Every entry of prefixSteps k is strictly positive.
prefixSteps b is a prefix (hence sublist) of prefixSteps k whenever b ≤ k.
Closed-form sub-2 branching factor 2 - (1 / 2) ^ k dominating prefixSteps k (k ≥ 1).
For k = 1, 2, 3 this gives 3 / 2, 7 / 4, 15 / 8, all strictly below 2.
For k ≥ 1, 1 < prefixBranchFactor k.
prefixBranchFactor k < 2 for every k.
Closed-form k-clause branching bound. For every k ≥ 1,
charSum (prefixSteps k) (prefixBranchFactor k) ≤ 1.