Solution (source code)

= Solution

For a constant <equation-of-state parameter> $w=P/\rho$, the <cosmological perfect-fluid continuity equation> integrates to $\rho\propto a^{-3(1+w)}$. Comparing the given powers yields
$$
\boxed{w_s=-\frac13,\qquad w_w=-\frac23,\qquad P_s=-\frac{\rho_s}{3},\quad P_w=-\frac{2\rho_w}{3}.}
$$
This <constant-equation-of-state density scaling> describes a <cosmic string network> and a <cosmological domain wall network>. An intuitive check is that the energy in a fixed comoving cell grows in proportion to the total string length, $a$, or total wall area, $a^2$, while the physical cell volume grows as $a^3$. Thus the densities scale as $a^{-2}$ and $a^{-1}$ respectively. These effective equations of state use the noninteracting, statistically isotropic network assumptions of the problem.