I have questions about the number of solutions of The liear Diophantine equation $\Sigma_{i=1}^{s(m)}a_{i}x_{i}=r$ where $s:\mathbb{N} \rightarrow \mathbb{N},a_{1},....,a_{s(m)}\in \mathbb{N}\cup$ {$0$}
Question1. How many is the number of solutions $x_{1},...,x_{s(m)}\in$ {$0,1$} s.t. $\Sigma_{i=1}^{s(m)}a_{i}x_{i}=r,(a_{i}\leq s(m), m=1,2,3,... )$ ?
Question2. How many is the number of solutions $x_{1},...,x_{s(m)}\in$ {$-1,1$} s.t. $\Sigma_{i=1}^{s(m)}a_{i}x_{i}=r,(a_{i}\leq s(m), m=1,2,3,... )$ ?
Question3. How many is the number of solutions $x_{1},...,x_{s()}\in$ {$p,q$} with $gcd(p,q)=1$ s.t. $\Sigma_{i=1}^{s(m)}a_{i}x_{i}=r,(a_{i}\leq s(m), m=1,2,3,... )$ ?
Question4.How many is the number of solutions $x_{1},...,x_{n}\in$ GF(2)(or $\mathbb{F_{2}}$) s.t. $\Sigma_{i=1}^{s(m)}a_{i}x_{i}=r,(a_{i}\leq s(m), m=1,2,3,... )$ ?
Question5.What is the sufficient condition about $a_{1},a_{2},...,a_{n}$ for the following condition 1.
Condition1. The number of solutions $x_{1},...,x_{n}$ is $2^{(\log s(m) )^{O(1)}} $

