Hello everyone,
In ${\mathbb R}^n$, we say that a linear subspace is \emph{rational} if it admits a basis in ${\mathbb Q}^n$ (or equivalently in ${\mathbb Z}^n$). It means that $E\cap {\mathbb Z}^n$ is a submodule of {\mathbb Z}^n of rank equal to the dimension of the given subspace. By convention, ${0}$ is rational.
Now, if $E$ is any linear subspace of ${\mathbb R}^n$, we denote $b(E)$ (resp. $c(E)$ ) the dimension of the biggest rational subspace of ${\mathbb R}^n$ contained in $E$ (resp. the smallest rational subspace of ${\mathbb R}^n$ containing $E$).
My questions: 1) How can one compute $b(E)$ and $c(E)$? I am looking mainly for an algorithm (if it is possible). My entries for the algorithm are either a basis of $E$, or a system of equations (or any equivalent characterization).
2) It is clear that $0\leq b(E)\leq dim(E)\leq c(E)\leq n$. From an article, every case is possible. How one can construct such examples of different cases? I have some ideas but I am stuck in verifying because of the first question.
Thanks in advance.
(Maybe the question is simple for specialists. In this case, I would be grateful if someone could provide me a reference).

