How can the equation of state for cosmic strings and domain walls be derived?
My topological defect cosmology is a little rusty, but I'm pretty sure this is how it goes.
Start with the fluid equation,
$$
\dot{\rho} + 3 {\dot{a} \over a} \left( \rho + p \right) = 0,
$$
and the equation of state,
$$
p = w \rho.
$$
Plug the equation of state into the fluid equation, assume a constant $w$, and you'll find
$$
\rho \propto a^{-3(1 + w)}.
$$
Now we'll find $\rho(a)$ for strings and sheets, and read $w$ off of them.
For cosmic strings, $\rho$ is
$$
\rho_{\rm string} = \sum^N_i {\lambda L_i \over V},
$$ 
where $N$ is the number of strings in our cosmic horizon, $\lambda$ is the linear density of the strings, and $L_i$ is the length of each string.

Here's the key: we've got to assume the length of any cosmic string scales with the expansion of the universe, since they're topological defects. Given that assumption, we can get the dependence of $\rho_{\rm string}$ on $a$:
$$
\rho_{\rm string}(a) \propto {a \over a^3} = a^{-2}.
$$
Thus,
$$
2 = 3(1 + w_{\rm string}),
$$
and $w_{\rm string} = -{1 \over 3}$.

Similarly, for domain walls, $\rho$ is
$$
\rho_{\rm wall} = \sum^N_i {\sigma A_i \over V},
$$
and since $A_i \propto a^2$, we get $w_{\rm wall} = -{2 \over 3}$.

Hope that helps!