Query costs of decision trees #
weightedCost charges each query made on an input, including repeated queries. weightedDepth
is the largest cost of a structural root-to-leaf path. It bounds the actual cost, but equality
need not hold: repeated variables can make a structural path unreachable. Costs are natural
numbers and may be zero. Unit costs give the actual query count cost and the usual depth.
These quantities support composition when different queried bits have different computation costs; no second notion of minimum decision-tree complexity is introduced.
Main definitions #
Cslib.DecisionTree.weightedCost: the cost of the queries executed on one input.Cslib.DecisionTree.cost: the number of queries executed on one input.Cslib.DecisionTree.weightedDepth: the maximum structural path cost.
Main results #
Cslib.DecisionTree.weightedCost_le_weightedDepth: structural cost bounds actual cost.Cslib.DecisionTree.weightedDepth_le_depth_mul: a uniform query bound gives a depth bound.
The total cost of queries executed on an input, counting repeated queries each time.
Instances For
The number of queries executed on an input, including repeated queries.
Instances For
The maximum cost of a structural root-to-leaf path, including unreachable paths.
Instances For
Increasing query costs cannot decrease structural path cost.
A constant query cost multiplies the ordinary structural depth.
Charging at most d per query costs at most depth * d on every structural path.
The actual path cost is bounded by the largest structural path cost.
The number of queries executed on any input is at most the structural depth.
Relabelling queries pulls their costs back along the relabelling function.
Relabelling queries pulls back both the oracle and its query costs.