Solution (source code)

= Solution

Use distinct symbols for the dimensions of <mass>, length, time, temperature and amount of substance. The <molar gas constant> has dimensions $\mathsf M\mathsf L^2\mathsf T^{-2}\mathsf\Theta^{-1}\mathsf N^{-1}$, while the given $M$ is a <molar mass> with dimensions $\mathsf M\mathsf N^{-1}$. Matching dimensions in the proposed power law gives
$$
\alpha+\gamma=0,\qquad 2\alpha+\delta=0,\qquad -2\alpha=-1,\qquad -\alpha+\beta=0,
$$
with the amount-of-substance equation repeating $\alpha+\gamma=0$. Therefore
$$
\boxed{\alpha=\frac12,\quad\beta=\frac12,\quad\gamma=-\frac12,\quad\delta=-1,\qquad f\propto\frac1L\sqrt{\frac{RT}{M}}.}
$$
<Dimensional analysis> fixes these exponents but not a dimensionless multiplier. For example, an open-tube mode number and the gas's heat-capacity ratio enter the actual <resonance> <frequency> without changing the dimensions.