Math on CuriousCodinghttps://curiouscoding.nl/tags/math/Recent content in Math on CuriousCodingHugoenTue, 25 Jun 2024 00:00:00 +0200A near-tight lower bound on minimizer densityhttps://curiouscoding.nl/posts/minimizer-lower-bound/Tue, 25 Jun 2024 00:00:00 +0200https://curiouscoding.nl/posts/minimizer-lower-bound/Table of Contents Succinct background Definitions Lower bounds A new lower bound Discussion Post scriptum Acknowledgement In this post I will prove a new lower bound on the density of any minimizer or forward sampling scheme: \[ d(f) \geq \frac{\lceil\frac{w+k}{w}\rceil}{w+k} = \frac{\lceil\frac{\ell+1}{w}\rceil}{\ell+1}. \]
In particular, this implies that when \(k=1\), any forward sampling scheme has density at least \(2/(w+1)\), and thus that random minimizers are optimal in this case.Perfect NtHash for Robust Minimizershttps://curiouscoding.nl/posts/nthash/Sun, 31 Dec 2023 00:00:00 +0100https://curiouscoding.nl/posts/nthash/Table of Contents NtHash Minimizers Robust minimizers Is NtHash injective on kmers? Searching for a collision Proving perfection Alternatives SmHasher results TODO benchmark NtHash, NtHash2, FxHash NtHash NtHash (Mohamadi et al. 2016) is a rolling hash suitable for hashing any kind of text, but made for DNA originally. For a string of length \(k\) it is a \(64\) bit value computed as:
\begin{equation} h(x) = \bigoplus_{i=0}^{k-1} rot^i(h(x_i)) \end{equation}
where \(h(x_i)\) assigns a fixed \(64\) bit random value to each character, \(rot^i\) rotates the bits \(i\) places, and \(\bigoplus\) is the xor over all terms.A Combinatorial Identityhttps://curiouscoding.nl/posts/a-combinatorial-identity/Sun, 16 Oct 2022 00:00:00 +0200https://curiouscoding.nl/posts/a-combinatorial-identity/Some notes regarding the identity
\begin{equation} \sum_{k=0}^n \binom{2k}k \binom{2n-2k}{n-k} = 4^n \end{equation}
Gould has two derivations: The first, from Jensens equality, (18) in (Jensen 1902; Shijie 1303).
A second via the Chu-Vandermonde convolution:
\begin{equation} \sum_{k=0}^n \binom{x}k \binom{y}{n-k} = \binom{x+y}n \end{equation}
using \(x=y=-\frac 12\) and using the $-\frac 12$-transform:
\begin{equation} \binom{-1/2}{n} = (-1)^n\binom{2n}{n}\frac 1 {2^{2n}} \end{equation}
Duarte and de Oliveira (2012) has a combinatorial proof. References Duarte, Rui, and AntÃ³nio Guedes de Oliveira.