← Back to directory

Bloom filter sizing: bits, bytes and hash count for n items at a false-positive ...

https://security-math.x402tookit.com/bloom-filter

Overview

Bloom filter sizing: bits, bytes and hash count for n items at a false-positive rate, or the rate for a given size.

Protocol x402
Price $0.02
Payment Asset USD Coin
Payment Network eip155:8453
Category uncategorized
Provider Security Math
Source bazaar
Indexed 2026-10-20 21:22:46

Health

Status healthy
Latency (p50) 567ms
Uptime (30d) 100.0%
Reliability Score 90/100
Last Checked 2026-10-28 06:39:18
Last Healthy 2026-10-28 06:39:18
Consecutive Failures 0

x402 Payment Validation

Payment Requirements Valid
Asset Verified Known USDC
Facilitator —

Input Schema

{ "method": "GET", "queryParams": { "n": 1000000, "p": 0.01 }, "type": "http" }

Output Schema

{ "example": { "asOf": "2026-10-11T14:38:12.749Z", "bitsPerItem": 9.585, "degraded": false, "disclaimer": "Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting.", "falsePositiveRate": 0.010039214559253868, "fillRatio": 0.518237, "human": "1.14 MiB", "items": 1000000, "kUsed": 7, "mBits": 9585059, "mBytes": 1198133, "notChecked": [ "real hash functions: the formula assumes k independent uniform hashes (double hashing gets very close)", "counting, scalable or cuckoo variants", "…1 more" ], "optimalK": 7, "reasons": [ "m = -n ln p / (ln 2)^2 and optimal k = (m/n) ln 2; the false-positive rate is (1 - e^(-kn/m))^k.", "A Bloom filter never gives a false negative; it gives false positives at about the stated rate once it holds n items." ], "source": "computed locally (Bloom 1970 formulas)", "summary": "For 1,000,000 items at 0.01: 9,585,059 bits (1.14 MiB), 7 hash functions, false-positive rate 1.004e-2, 9.59 bits per item.", "targetFalsePositiveRate": 0.01, "verdict": "SIZED" }, "type": "json" }