How can the equation of state for cosmic strings and domain walls be derived? In this article which nicely explains why it is really the quantity $\rho + 3p$ which is relevant to determine if the expansion of the universe is accelerating or decelerating by making use of the for this question relevant second Friedmann equation

$$
\frac{\ddot{a}}{a} = -\frac{4\pi G}{3}(\rho + 3p)
$$

it is mentioned that for cosmic strings 

$$
p = -\frac{\rho}{3}
$$

which has the effect that they dont contribute to the "non-inertial" expansion of the universe, and for cosmic domain walls we have

$$
p = -\frac{2 \rho}{3} 
$$

which leads to an accelerated expansion of the universe.

Whereas I understand the derivations of such equations of state for radiation, "ordinary" matter, and a constant source of dark energy, I have not yet seen analog calculations for cosmic strings and domain walls.

So how can the equation of states for topological defects such as cosmic strings and cosmic 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!