let $S$ be a vector space over a finite field of size $q$ and let $T$ be a subspace of $S$.
I am looking for a formula or an algorithm to compute the number of vectors from $S$ that are independent to $T$, which is:
$|\{v: v \in S, v \ne \sum_{i=0}^{|T|} a_i t_i, a \in q^{|T|}, t \in T \}|$
(I hope I got that right...)
I need this to calculate the chance of randomly drawing a vector from $S$ that is indepentent of $T$. The formula that I currently have for that is:
$(1-q^{-dim(S/T)})$
with $S/T$ being the quotient space.
However I find that formula difficult to explain in an intuitive way and something in the form
$\frac{\text{linear independent vectors}}{\text{all possible vectors}}$
would probably be simpler.
I am not sure I understand the layout, but, once you choose bases $B_T, B_S$, for $T,S$ respectively, a given randomly-selected vector $v$ will be dependent on vectors in $T$ iff $v \in T$: 1)Let $v \in T$. Then either $v \in B_T$, or, since $B_T$ spans $T$, $v$ is dependent on vectors in $T$. 2)Assume $v$ is dependent on $T$, i.e., $v=\Sigma c_iv_i; v_i \in T$. Then, by closedness of the operation of linear combinations, i.e., if $v_i, v_j \in T \rightarrow c_iv_i+c_jv_j \in T $ , then $v \in T$. Assuming this is correct, then the probability of $v$ being dependent on $T$ is precisely the same as the probability of $v$ being in , i.e., being contained in $T$.