Hi all,


Suppose that $\mathbf{f}=[f\_1, f\_2,\ldots,f\_m]$ and $\mathbf{g}=[g\_1,g\_2,\ldots,g\_m]$ are two $m$-dimensional vectors. All $f\_i$'s are chosen uniformly randomly from a finite field $\mathbb{F}\_q$, where $q$ is the finite field size. For convenience, we denote the elements of $\mathbb{F}\_q$ as $\{0, 1, 2,\ldots,q-1\}$. Each $g\_i$ is distributed as $\mathrm{Pr}(g\_i=0)=1-p\_i$ and $\mathrm{Pr}(g\_i=r)=p\_i/(q-1),r=1,2,\ldots,q-1$. Note that $p\_i$ might not be equal for each $i\in\{1,2,\ldots,m\}$.


My question is, is that possible to determine the probability that $\mathbf{f}$ and $\mathbf{g}$ are orthogonal, i.e., $\sum\_{i=1}^mf\_ig\_i=0$? If a closed form is not possible, is that possible to bound the probability? What I want to know is, whether such a probability would approach $0$ when I use a sufficiently large $q$. Any suggestions or references are appreciated.


Thanks sincerely.



Determine the probability that two random vectors over a finite field are orthogonal
If $\vec g = \vec 0$, then all vectors $\vec f$ are orthogonal to $\vec g$. 


If $\vec g \ne \vec 0$, then $1/q$ of the vectors $\vec f$ are orthogonal to $\vec g$. Given the previous coordinates of $\vec f$, there is a unique choice for the last coordinate of $\vec f$ paired with a nonzero coordinate of $\vec g$ so that $\vec f \cdot \vec g = 0$. 


So, $Prob(\vec f \perp \vec g) = \prod (1-p\_i) + \frac{1}{q}\bigg( 1 - \prod (1-p\_i)\bigg).$ If you fix the set $\lbrace p\_i \rbrace$, the limit as $q \to \infty$ is $\prod(1-p\_i)$, not $0$.


