  Recent experiments on weak polyelectrolyte brushes found marked shifts in the
effective p$K_\mathrm{A}$ that are linear in the logarithm of the salt
concentration. Comparing explicit-particle simulations with mean-field
calculations we show that for high grafting densities the salt concentration
effect can be explained using the ideal Donnan theory, but for low grafting
densities the full shift is due to a combination of the Donnan effect and the
polyelectrolyte effect. The latter originates from electrostatic correlations
which are neglected in the Donnan picture and which are only approximately
included in the mean-field theory. Moreover, we demonstrate that the magnitude
of the polyelectrolyte effect is almost invariant with respect to salt
concentration but depends on the grafting density of the brush. This invariance
is due to a complex cancellation of multiple effects. Based on our results, we
show how the experimentally determined p$K_\mathrm{A}$ shifts may be used to
infer the grafting density of brushes, a parameter that is difficult to measure
directly.
