  For an automorphic representation $\pi$ of Ramanujan type, there is a
conjectural subgroup $\mathcal{H}_{\pi}$ of the Langlands L-group $^{L}G$
associated to $\pi$, called the {\it functional source} of $\pi$. The
functorial source problem proposed by Langlands and refined by Arthur intends
to determine $\mathcal{H}_{\pi}$ via analytic and arithmetic data of $\pi$. In
this paper, we consider the functorial source problem of automorphic
representations of a split group, a unitary group, or an orthogonal group which
do not come from endoscopy and have minimal possible ramification. In this
setting, $\mathcal{H}_{\pi}$ must be an S-subgroup of $^{L}G$. We approach the
functorial source problem by proving distinction and linear independence among
dimension data of S-subgroups. Nice results along this direction are shown in
this paper. We define a notion of quasi root system and use it as the key tool
for studying S-subgroups and their dimension data.
