Decision trees for parity #
Flipping any bit flips the parity, so parity is sensitive to every bit at every input
(BitString.sensitivityAt_parity), and every decision tree for it queries all of its bits in the
worst case (DecisionTree.complexity_parity) Jukna, Chapter 14. More generally,
restricted parity queries every free bit (DecisionTree.card_free_le_complexity_parity_fill).
Main results #
Cslib.DecisionTree.complexity_parity: the decision tree complexity of the parity ofnbits isn.Cslib.DecisionTree.card_free_le_complexity_parity_fill: restricted parity still needs to query every free bit.
References #
Every decision tree for the parity of n bits queries all of them in the worst case.
theorem Cslib.DecisionTree.card_free_le_complexity_parity_fill {n : ℕ} (ρ : BitString.PartialAssignment (Fin n)) :
Restricted parity is the parity of the free bits, up to a constant, so every decision tree for it queries all free bits in the worst case.