hash_probe_tail_count
def
The number of pairs of an insertion sequence of length t and an additional query slot whose insertion cost under offset sequence r strictly exceeds k, meaning the first k probed slots are all occupied.
Statement
def hash_probe_tail_count (n : ℕ) [NeZero n] (r : Fin n → ZMod n) (t k : ℕ) : ℕ- Defined in
- arXiv:2610.31363, Section 2
- Verified
- 01 Nov 2026
- Axioms
- none listed
- Built on 1
- hash_occupied_slotsThe set of occupied slots in Finset (ZMod n) after sequentially inserting a list A : List (ZMod n) into an initially empty hash table of…
- Used by 15
- hash_probe_tail_prob_zero_of_lt_strictFor any table size n with [NeZero n], any bijective offset sequence r, and load t < n, the probe tail probability is 0 whenever k > t.
- hash_probe_expected_cost_sub_constTranslating an offset sequence by subtracting a constant element c in ZMod n preserves the expected probe cost at any load t, by…
- prime_fixed_offset_linear_probe_tail_prob_interior_t_twoAt load t = 2 (where k = 2), the probe tail probability under any bijective offset r with r 0 = 0 is bounded by linear probing on any…
- prime_fixed_offset_tail_prob_two_twoFor any odd prime p and any bijective offset sequence r : Fin p → ZMod p with r 0 = 0, the second tail probability at load t = 2 is…
- hash_probe_tail_count_zero_of_lt_strictFor any table size n with [NeZero n], any bijective offset sequence r, and load t < n, the probe tail count is 0 whenever k > t.
- hash_probe_expected_cost_zeroFor any table size n with [NeZero n] and any offset sequence r : Fin n → ZMod n, the expected probe cost hash_probe_expected_cost n r 0…
- hash_probe_tail_prob_zeroFor any table size n with [NeZero n], offset sequence r : Fin n → ZMod n, and number of inserted keys t, the 0-th tail probability of…
- hash_probe_expected_cost_twoAfter two insertions the expected cost is 1+2/n+(3+[2r₁=0])/n².
- prime_fixed_offset_linear_probe_stochastic_maximum_threeFor a 3-slot hash table (p = 3), every bijective probe sequence r : Fin 3 → ZMod 3 with r 0 = 0, every load t < 3, and every integer k ≥…
- hash_probe_tail_probFor a table size n with [NeZero n], an offset sequence r : Fin n → ZMod n, and natural numbers t and k, hash_probe_tail_prob n r t k is…
- unit_first_fixed_offset_mean_probe_maximum_threeFor a 3-slot hash table (n = 3), every bijective probe sequence r : Fin 3 → ZMod 3 with r 0 = 0 and IsUnit (r 1), and every load t < 3,…
- not_hash_probe_tail_prob_zero_of_ltThe statement
hash_probe_tail_prob_zero_of_ltis false: Take n = 1, r = (fun _ => 0 : Fin 1 → ZMod 1), t = 1, k = 2. Hypotheses hold:… - hash_probe_tail_prob_oneFor any table size n ≥ 2 with [NeZero n], any bijective offset sequence r with r 0 = 0, and any load t ≤ n, the 1st tail probability…
- hash_probe_tail_two_eq_adjacent_meanThe second probe-cost tail equals the expected number of occupied adjacent pairs, divided by the table size.
- prime_fixed_offset_linear_probe_tail_prob_interior_t_predAt load t = p - 1 (one empty slot), every bijective offset sequence has identical probe tail probabilities, matching linear probing.
Read back from the Lean
For a positive natural number n (with instance [NeZero n]), a probe offset function r : Fin n → ZMod n, and natural numbers t and k, hash_probe_tail_count n r t k is defined as the cardinality of the set of pairs (seq, x) ∈ (Fin t → ZMod n) × ZMod n such that for every probe index j : Fin n with j.val < k, the slot x + r j belongs to hash_occupied_slots n r (List.ofFn seq).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Number of insertion-query pairs requiring strictly more than k probes. -/ def hash_probe_tail_count (n : ℕ) [NeZero n] (r : Fin n → ZMod n) (t k : ℕ) : ℕ := (Finset.univ.filter (fun (p : (Fin t → ZMod n) × ZMod n) => ∀ j : Fin n, j.val < k → p.2 + r j ∈ hash_occupied_slots n r (List.ofFn p.1))).card