Solution (source code)

= Solution

Use base dimensions $\mathsf M,\mathsf L,\mathsf T$ for <mass>, <length> and <time>. The proposed <dimensional analysis> gives
$$
[v]=\mathsf L\mathsf T^{-1},\quad
[\omega]=\mathsf T^{-1},\quad
[\rho]=\mathsf M\mathsf L^{-3},\quad
[g]=\mathsf L\mathsf T^{-2},
$$
so
$$
[\omega^a\rho^bg^c]
=\mathsf M^b\mathsf L^{-3b+c}\mathsf T^{-a-2c}.
$$
Equating the independent dimensional powers requires
$$
b=0,\qquad -3b+c=1,\qquad -a-2c=-1.
$$
Consequently
$$
\boxed{a=-1,\qquad b=0,\qquad c=1,\qquad v\propto\frac g\omega.}
$$
The <mass density> drops out because there is no other mass-bearing quantity with which to combine it under the stated assumptions.

<Dimensional analysis> fixes the powers but leaves a dimensionless coefficient undetermined. For a linear <deep-water gravity wave>, the <dispersion relation> is $\omega^2=gk$, giving <phase velocity> $\omega/k=g/\omega$ and <group velocity> $d\omega/dk=g/(2\omega)$. Both obey the inferred scaling. The phrase wave speed alone does not distinguish these two velocities or fix the coefficient.